From kde-commits Mon Aug 08 13:08:25 2011 From: Alexander Potashev Date: Mon, 08 Aug 2011 13:08:25 +0000 To: kde-commits Subject: [libkvkontakte] libkvkontakte: Add GetWallPhotoUploadServerJob Message-Id: <20110808130825.951C7A60AE () git ! kde ! org> X-MARC-Message: https://marc.info/?l=kde-commits&m=131280893921738 Git commit 6f5445f0353662e5a4c4e880f2e6458f4c4a605e by Alexander Potashev. Committed on 08/08/2011 at 14:30. Pushed by aspotashev into branch 'master'. Add GetWallPhotoUploadServerJob M +2 -0 libkvkontakte/CMakeLists.txt A +31 -0 libkvkontakte/getwallphotouploadserverjob.cpp [License: LGPL (v2/3+eV)] A +35 -0 libkvkontakte/getwallphotouploadserverjob.h [License: LGPL (v2/3+eV)] http://commits.kde.org/libkvkontakte/6f5445f0353662e5a4c4e880f2e6458f4c4a605e diff --git a/libkvkontakte/CMakeLists.txt b/libkvkontakte/CMakeLists.txt index 9a565c8..ae4b461 100644 --- a/libkvkontakte/CMakeLists.txt +++ b/libkvkontakte/CMakeLists.txt @@ -36,6 +36,7 @@ set(libkvkontakte_SRCS getapplicationpermissionsjob.cpp getuploadserverjobbase.cpp getprofilephotouploadserverjob.cpp + getwallphotouploadserverjob.cpp qintlist.cpp util.cpp @@ -104,4 +105,5 @@ install(FILES getvariablejob.h getuploadserverjobbase.h getprofilephotouploadserverjob.h + getwallphotouploadserverjob.h DESTINATION ${INCLUDE_INSTALL_DIR}/libkvkontakte COMPONENT Devel) diff --git a/libkvkontakte/getwallphotouploadserverjob.cpp b/libkvkontakte/getwallphotouploadserverjob.cpp new file mode 100644 index 0000000..6e26894 --- /dev/null +++ b/libkvkontakte/getwallphotouploadserverjob.cpp @@ -0,0 +1,31 @@ +/* Copyright 2011 Alexander Potashev + + This library is free software; you can redistribute it and/or modify + it under the terms of the GNU Library General Public License as published + by the Free Software Foundation; either version 2 of the License or + ( at your option ) version 3 or, at the discretion of KDE e.V. + ( which shall act as a proxy as in section 14 of the GPLv3 ), any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ +#include "getwallphotouploadserverjob.h" +#include + +namespace Vkontakte +{ + +GetWallPhotoUploadServerJob::GetWallPhotoUploadServerJob(const QString &accessToken, int id, bool uploadToGroup) + : GetUploadServerJobBase(accessToken, "photos.getWallUploadServer") +{ + addQueryItem(uploadToGroup ? "gid" : "uid", QString::number(id)); +} + +} /* namespace Vkontakte */ diff --git a/libkvkontakte/getwallphotouploadserverjob.h b/libkvkontakte/getwallphotouploadserverjob.h new file mode 100644 index 0000000..ca6c7ae --- /dev/null +++ b/libkvkontakte/getwallphotouploadserverjob.h @@ -0,0 +1,35 @@ +/* Copyright 2011 Alexander Potashev + + This library is free software; you can redistribute it and/or modify + it under the terms of the GNU Library General Public License as published + by the Free Software Foundation; either version 2 of the License or + ( at your option ) version 3 or, at the discretion of KDE e.V. + ( which shall act as a proxy as in section 14 of the GPLv3 ), any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ +#ifndef GETWALLPHOTOUPLOADSERVERJOB_H +#define GETWALLPHOTOUPLOADSERVERJOB_H + +#include "getuploadserverjobbase.h" + +namespace Vkontakte +{ + +class LIBKVKONTAKTE_EXPORT GetWallPhotoUploadServerJob : public GetUploadServerJobBase +{ +public: + GetWallPhotoUploadServerJob(const QString &accessToken, int id, bool uploadToGroup = false); +}; + +} /* namespace Vkontakte */ + +#endif // GETWALLPHOTOUPLOADSERVERJOB_H