KPublicTransport

locationreply.h
1/*
2 SPDX-FileCopyrightText: 2018 Volker Krause <vkrause@kde.org>
3
4 SPDX-License-Identifier: LGPL-2.0-or-later
5*/
6
7#ifndef KPUBLICTRANSPORT_LOCATIONREPLY_H
8#define KPUBLICTRANSPORT_LOCATIONREPLY_H
9
10#include "reply.h"
11
12#include <vector>
13
14namespace KPublicTransport {
15
16class AbstractBackend;
17class Location;
18class LocationRequest;
19class LocationReplyPrivate;
20
21/** Location query reply. */
22class KPUBLICTRANSPORT_EXPORT LocationReply : public Reply
23{
24 Q_OBJECT
25public:
26 ~LocationReply() override;
27
28 /** The request this is the reply for. */
29 LocationRequest request() const;
30
31 /** Returns the found locations. */
32 const std::vector<Location>& result() const;
33 /** Returns the found locations for moving elsewhere. */
34 std::vector<Location>&& takeResult();
35
36private:
37 friend class Manager;
38 friend class ManagerPrivate;
39 explicit LocationReply(const LocationRequest &req, QObject *parent = nullptr);
40
41 friend class AbstractBackend;
42 Q_DECL_HIDDEN void addResult(std::vector<Location> &&res);
43 using Reply::addError;
44 Q_DECL_HIDDEN void addError(const AbstractBackend *backend, Reply::Error error, const QString &errorMsg);
45
46
47 Q_DECLARE_PRIVATE(LocationReply)
48};
49
50}
51
52#endif // KPUBLICTRANSPORT_LOCATIONREPLY_H
Describes a location search.
Entry point for starting public transport queries.
Definition manager.h:42
Query response base class.
Definition reply.h:25
Error
Error types.
Definition reply.h:31
Query operations and data types for accessing realtime public transport information from online servi...
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Tue Mar 26 2024 11:13:06 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.