equal
deleted
inserted
replaced
29 #include <QSettings> |
29 #include <QSettings> |
30 #include <smfpluginutil.h> |
30 #include <smfpluginutil.h> |
31 |
31 |
32 #include "flickrgalleryplugin.h" |
32 #include "flickrgalleryplugin.h" |
33 |
33 |
34 static int count = 1; |
34 static int count = 0; |
35 static int chance = 0; // 0 = for pics from album, 1 = pics not in any album |
35 static int chance = 0; // 0 = for pics from album, 1 = pics not in any album |
36 static int listIndex = 0;// For Mutliple Load |
36 static int listIndex = 0;// For Mutliple Load |
37 QByteArray payload; |
37 QByteArray payload; |
38 QByteArray boundary("---ThIsIsAsAmPleBouNDaRyStrInGFrOmNaliNa---"); |
38 QByteArray boundary("---ThIsIsAsAmPleBouNDaRyStrInGFrOmNaliNa---"); |
39 |
39 |
1006 aRetType = SmfRequestComplete; |
1006 aRetType = SmfRequestComplete; |
1007 error = SmfPluginErrNone; |
1007 error = SmfPluginErrNone; |
1008 } |
1008 } |
1009 #endif |
1009 #endif |
1010 } |
1010 } |
|
1011 else if (SmfPictureMultiUpload == aOperation) |
|
1012 { |
|
1013 bool result; |
|
1014 qDebug()<<("SmfMultiPictureUpload"); |
|
1015 QXmlStreamReader xml(response); |
|
1016 while (!xml.atEnd()) |
|
1017 { |
|
1018 xml.readNext(); |
|
1019 if (xml.tokenType() == QXmlStreamReader::StartElement) |
|
1020 { |
|
1021 qDebug()<<("inside tag"); |
|
1022 //If the tag is contact |
|
1023 if (xml.name() == "photoid") |
|
1024 { |
|
1025 qDebug()<<("photoid tag found"); |
|
1026 result=TRUE; |
|
1027 } |
|
1028 else |
|
1029 result=FALSE; |
|
1030 }//end If |
|
1031 }//endWhile; |
|
1032 |
|
1033 aResult->setValue(result); |
|
1034 if (listIndex < count) |
|
1035 { |
|
1036 listIndex=listIndex+1; |
|
1037 error = SmfPluginErrNone; |
|
1038 aRetType = SmfSendRequestAgain; |
|
1039 |
|
1040 } |
|
1041 else |
|
1042 { |
|
1043 //Final result sent |
|
1044 count=1; //clear counter |
|
1045 aRetType = SmfRequestComplete; |
|
1046 error = SmfPluginErrNone; |
|
1047 } |
|
1048 |
|
1049 } |
1011 else if (SmfPicturePostComment == aOperation) |
1050 else if (SmfPicturePostComment == aOperation) |
1012 { |
1051 { |
1013 qDebug()<<"Response for adding comment on a photo"; |
1052 qDebug()<<"Response for adding comment on a photo"; |
1014 |
1053 |
1015 bool commentPosted = false; |
1054 bool commentPosted = false; |