[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: branches/extragear/kde3/libs/kipi-plugins/picasawebexport
From: Vardhman Jain <vardhman () gmail ! com>
Date: 2008-06-06 15:27:08
Message-ID: 1212766028.109176.29546.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 817676 by jaiva:
Added listAllAlbums() replacing listAlbums() which now uses authenticated call to \
fetch the list of all albums for the user including the unlisted albums.
BUG:162994
M +9 -7 picasawebtalker.cpp
M +1 -1 picasawebtalker.h
M +2 -2 picasawebwindow.cpp
--- branches/extragear/kde3/libs/kipi-plugins/picasawebexport/picasawebtalker.cpp \
#817675:817676 @@ -236,10 +236,12 @@
/** PicasaWeb's Album listing request/response
* First a request is sent to the url below and then we might(?) get a redirect URL
- * WE then need to send the GET request to the Redirect url
- */
-void PicasawebTalker::listAlbums()
-{
+ * WE then need to send the GET request to the Redirect url (this however gets \
taken care off by the + * KIO libraries.
+ * This uses the authenticated album list fetching to get all the albums included \
the unlisted-albums + * which is not returned for an unauthorised request as done \
without the Authorization header. +*/
+void PicasawebTalker::listAllAlbums() {
if (m_job)
{
m_job->kill();
@@ -248,8 +250,10 @@
QString url = "http://picasaweb.google.com/data/feed/api/user/" + m_username \
+ "?kind=album"; QByteArray tmp;
+ QString auth_string = "GoogleLogin auth=" + m_token;
KIO::TransferJob* job = KIO::get(url, tmp, false);
job->addMetaData("content-type", "Content-Type: \
application/x-www-form-urlencoded" ); + job->addMetaData("customHTTPHeader", \
"Authorization: " + auth_string );
connect(job, SIGNAL(data(KIO::Job*, const QByteArray&)),
this, SLOT(data(KIO::Job*, const QByteArray&)));
@@ -261,6 +265,7 @@
m_job = job;
m_buffer.resize(0);
emit signalBusy( true );
+
}
void PicasawebTalker::getPhotoProperty(const QString& method,const QString& argList)
@@ -480,7 +485,6 @@
form.finish();
KIO::TransferJob* job = KIO::http_post(postUrl, form.formData(), false);
- KIO::Job *job_obj= job;
job->addMetaData("content-type", form.contentType());
job->addMetaData("customHTTPHeader", "Authorization: " + auth_string );
@@ -674,8 +678,6 @@
success = 1;
}
- //listAlbums();
-
if(success)
{
authProgressDlg->hide();
--- branches/extragear/kde3/libs/kipi-plugins/picasawebexport/picasawebtalker.h \
#817675:817676 @@ -85,7 +85,7 @@
void authenticate(const QString& token=NULL, const QString& username=NULL, const \
QString& password=NULL) ;
void getPhotoProperty(const QString& method, const QString& argList) ;
void getHTMLResponseCode(const QString& str);
- void listAlbums();
+ void listAllAlbums();
void listPhotos( const QString& albumName );
void createAlbum( const QString& albumTitle, const QString& albumDesc, const \
QString& location,
uint timestamp, const QString& access, const QString& \
media_keywords, bool isCommentEnabled=true);
--- branches/extragear/kde3/libs/kipi-plugins/picasawebexport/picasawebwindow.cpp \
#817675:817676 @@ -237,7 +237,7 @@
void PicasawebWindow::slotUpdateAlbumsList()
{
- m_talker->listAlbums();
+ m_talker->listAllAlbums();
}
void PicasawebWindow::slotClose()
@@ -339,7 +339,7 @@
m_userId=m_talker->getUserId();
m_userNameDisplayLabel->setText(m_username);
m_widget->setEnabled(true);
- m_talker->listAlbums();
+ m_talker->listAllAlbums();
}
void PicasawebWindow::slotBusy( bool val )
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic