author | John Kern <johnk@symbian.org> |
Thu, 12 Aug 2010 18:57:17 -0700 | |
changeset 28 | 7242cf5e2cd7 |
parent 18 | 5707b75503d5 |
permissions | -rw-r--r-- |
18
5707b75503d5
working on test for common siging test
John Kern <johnk@symbian.org>
parents:
diff
changeset
|
1 |
|
5707b75503d5
working on test for common siging test
John Kern <johnk@symbian.org>
parents:
diff
changeset
|
2 |
#include "signingcommoncase.h" |
5707b75503d5
working on test for common siging test
John Kern <johnk@symbian.org>
parents:
diff
changeset
|
3 |
|
5707b75503d5
working on test for common siging test
John Kern <johnk@symbian.org>
parents:
diff
changeset
|
4 |
SigningCommonCase::SigningCommonCase(QNetworkAccessManager &aMgr, QObject *parent) : |
5707b75503d5
working on test for common siging test
John Kern <johnk@symbian.org>
parents:
diff
changeset
|
5 |
QObject(parent), mgr(aMgr) |
5707b75503d5
working on test for common siging test
John Kern <johnk@symbian.org>
parents:
diff
changeset
|
6 |
{ |
5707b75503d5
working on test for common siging test
John Kern <johnk@symbian.org>
parents:
diff
changeset
|
7 |
testBaseURL = ::BaseURL + "?key=" + ::DefaultKey + "&api=" + ApiVersion + "&cmd="; |
5707b75503d5
working on test for common siging test
John Kern <johnk@symbian.org>
parents:
diff
changeset
|
8 |
} |
5707b75503d5
working on test for common siging test
John Kern <johnk@symbian.org>
parents:
diff
changeset
|
9 |
|
5707b75503d5
working on test for common siging test
John Kern <johnk@symbian.org>
parents:
diff
changeset
|
10 |
void SigningCommonCase::run() |
5707b75503d5
working on test for common siging test
John Kern <johnk@symbian.org>
parents:
diff
changeset
|
11 |
{ |
5707b75503d5
working on test for common siging test
John Kern <johnk@symbian.org>
parents:
diff
changeset
|
12 |
|
5707b75503d5
working on test for common siging test
John Kern <johnk@symbian.org>
parents:
diff
changeset
|
13 |
} |
5707b75503d5
working on test for common siging test
John Kern <johnk@symbian.org>
parents:
diff
changeset
|
14 |
|
5707b75503d5
working on test for common siging test
John Kern <johnk@symbian.org>
parents:
diff
changeset
|
15 |
void SigningCommonCase::uploadSIS() |
5707b75503d5
working on test for common siging test
John Kern <johnk@symbian.org>
parents:
diff
changeset
|
16 |
{ |
5707b75503d5
working on test for common siging test
John Kern <johnk@symbian.org>
parents:
diff
changeset
|
17 |
QString reqPOST = BaseURL + "uploadSIS"; |
5707b75503d5
working on test for common siging test
John Kern <johnk@symbian.org>
parents:
diff
changeset
|
18 |
QNetworkRequest request(QUrl(reqPOST.toUtf8())); |
5707b75503d5
working on test for common siging test
John Kern <johnk@symbian.org>
parents:
diff
changeset
|
19 |
request.setHeader(QNetworkRequest::ContentTypeHeader,"x-epoc/x-sisx-app"); |
5707b75503d5
working on test for common siging test
John Kern <johnk@symbian.org>
parents:
diff
changeset
|
20 |
|
5707b75503d5
working on test for common siging test
John Kern <johnk@symbian.org>
parents:
diff
changeset
|
21 |
// connect this request to a method for reply. |
5707b75503d5
working on test for common siging test
John Kern <johnk@symbian.org>
parents:
diff
changeset
|
22 |
|
5707b75503d5
working on test for common siging test
John Kern <johnk@symbian.org>
parents:
diff
changeset
|
23 |
// here is the sis file which we will post to the server. |
5707b75503d5
working on test for common siging test
John Kern <johnk@symbian.org>
parents:
diff
changeset
|
24 |
|
5707b75503d5
working on test for common siging test
John Kern <johnk@symbian.org>
parents:
diff
changeset
|
25 |
//mgr.post(request); |
5707b75503d5
working on test for common siging test
John Kern <johnk@symbian.org>
parents:
diff
changeset
|
26 |
} |
5707b75503d5
working on test for common siging test
John Kern <johnk@symbian.org>
parents:
diff
changeset
|
27 |
|
5707b75503d5
working on test for common siging test
John Kern <johnk@symbian.org>
parents:
diff
changeset
|
28 |
TestInterface::TRESULT_STATE SigningCommonCase::getResult() |
5707b75503d5
working on test for common siging test
John Kern <johnk@symbian.org>
parents:
diff
changeset
|
29 |
{ |
5707b75503d5
working on test for common siging test
John Kern <johnk@symbian.org>
parents:
diff
changeset
|
30 |
return TestInterface::INPROGESS; |
5707b75503d5
working on test for common siging test
John Kern <johnk@symbian.org>
parents:
diff
changeset
|
31 |
} |