File indexing completed on 2024-05-12 05:22:24
0001 /* 0002 * This file is part of LibKGAPI library 0003 * 0004 * SPDX-FileCopyrightText: 2013 Daniel Vrátil <dvratil@redhat.com> 0005 * 0006 * SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL 0007 */ 0008 0009 #pragma once 0010 0011 #include "createjob.h" 0012 #include "kgapilatitude_export.h" 0013 0014 namespace KGAPI2 0015 { 0016 0017 /** 0018 * @brief A job to stores one or more Locations in Google Latitude service 0019 * 0020 * @author Daniel Vrátil <dvratil@redhat.com> 0021 * @since 2.0 0022 */ 0023 class KGAPILATITUDE_DEPRECATED_EXPORT LocationCreateJob : public KGAPI2::CreateJob 0024 { 0025 Q_OBJECT 0026 0027 public: 0028 /** 0029 * @brief Constructs a job that will store given @p location in user's 0030 * Google Latitude account 0031 * 0032 * @param location Location to store 0033 * @param isCurrent Whether the location is user's current location 0034 * @param account Account to authenticate the request 0035 * @param parent 0036 */ 0037 explicit LocationCreateJob(const LocationPtr &location, bool isCurrent, const AccountPtr &account, QObject *parent = nullptr); 0038 0039 /** 0040 * @brief Destructor 0041 */ 0042 ~LocationCreateJob() override; 0043 0044 protected: 0045 /** 0046 * @brief KGAPI2::Job::start implementation 0047 */ 0048 void start() override; 0049 0050 /** 0051 * @brief KGAPI2::CreateJob::handleReplyWithItems implementation 0052 * 0053 * @param reply 0054 * @param rawData 0055 */ 0056 ObjectsList handleReplyWithItems(const QNetworkReply *reply, const QByteArray &rawData) override; 0057 0058 private: 0059 class Private; 0060 Private *const d; 0061 friend class Private; 0062 }; 0063 0064 } // namespace KGAPI2