File indexing completed on 2024-04-28 04:42:42

0001 /*
0002  * SPDX-FileCopyrightText: 2020-2021 Han Young <hanyoung@protonmail.com>
0003  * SPDX-FileCopyrightText: 2020 Devin Lin <espidev@gmail.com>
0004  * SPDX-FileCopyrightText: 2022 Volker Krause <vkrause@kde.org>
0005  * SPDX-License-Identifier: LGPL-2.0-or-later
0006  */
0007 
0008 #ifndef KWEATHERCORE_LOCATIONQUERYREPLY_H
0009 #define KWEATHERCORE_LOCATIONQUERYREPLY_H
0010 
0011 #include "reply.h"
0012 
0013 class QGeoPositionInfoSource;
0014 class QNetworkAccessManager;
0015 
0016 namespace KWeatherCore
0017 {
0018 
0019 class LocationQueryResult;
0020 class LocationQueryReplyPrivate;
0021 
0022 /** Asynchronous reply for a location query.
0023  *  @see LocationQuery
0024  *  @since 0.6
0025  */
0026 class KWEATHERCORE_EXPORT LocationQueryReply : public Reply
0027 {
0028 public:
0029     ~LocationQueryReply() override;
0030 
0031     /** Result of the location query.
0032      *  Can be none, one or multiple elements.
0033      */
0034     const std::vector<LocationQueryResult> &result() const;
0035 
0036 private:
0037     friend class LocationQuery;
0038     explicit LocationQueryReply(const QString &name, int number, QNetworkAccessManager *nam, QObject *parent = nullptr);
0039     explicit LocationQueryReply(QGeoPositionInfoSource *source, QNetworkAccessManager *nam, QObject *parent = nullptr);
0040     Q_DECLARE_PRIVATE(LocationQueryReply)
0041 };
0042 
0043 }
0044 
0045 #endif // KWEATHERCORE_LOCATIONQUERYREPLY_H