void DriveManager::GetFileChanges (qlonglong startId,
			const QString& pageToken, const QString& key)
	{
		QString urlSuffix = "includeDeleted=true&access_token=" + key;

		if (startId)
		{
			urlSuffix.append ("&startChangeId=");
			urlSuffix += QString::number (startId);
		}

		if (!pageToken.isEmpty ())
		{
			urlSuffix.append ("&pageToken=");
			urlSuffix += pageToken;
		}

		const QString str = "https://www.googleapis.com/drive/v2/changes?" + urlSuffix;

		QNetworkReply *reply = Core::Instance ().GetProxy ()->GetNetworkAccessManager ()->
				get (QNetworkRequest (str));
		connect (reply,
				SIGNAL (finished ()),
				this,
				SLOT (handleGetFileChanges ()));
	}
Esempio n. 2
0
	void DriveManager::GetFileChanges (qlonglong startId, const QString& key)
	{
		const QString str = startId ?
			QString ("https://www.googleapis.com/drive/v2/changes?includeDeleted=true&startChangeId=%1&access_token=%2")
					.arg (startId + 1)
					.arg (key) :
			QString ("https://www.googleapis.com/drive/v2/changes?includeDeleted=true&access_token=%1")
					.arg (key);

		QNetworkReply *reply = Core::Instance ().GetProxy ()->GetNetworkAccessManager ()->
				get (QNetworkRequest (str));
		connect (reply,
				SIGNAL (finished ()),
				this,
				SLOT (handleGetFileChanges ()));
	}