qthighway/examples/appmgrclient/src/appmgrclient.h
branchRCL_3
changeset 10 cd2778e5acfe
parent 9 5d007b20cfd0
child 11 19a54be74e5e
equal deleted inserted replaced
9:5d007b20cfd0 10:cd2778e5acfe
     1 /*
       
     2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 *
       
     5 * This program is free software: you can redistribute it and/or modify
       
     6 * it under the terms of the GNU Lesser General Public License as published by
       
     7 * the Free Software Foundation, version 2.1 of the License.
       
     8 * 
       
     9 * This program is distributed in the hope that it will be useful,
       
    10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
       
    11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
       
    12 * GNU Lesser General Public License for more details.
       
    13 *
       
    14 * You should have received a copy of the GNU Lesser General Public License
       
    15 * along with this program.  If not, 
       
    16 * see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
       
    17 *
       
    18 * Description:
       
    19 *
       
    20 */
       
    21 
       
    22 #ifndef APPMGRCLIENT_H
       
    23 #define APPMGRCLIENT_H
       
    24 
       
    25 #include <QVBoxLayout>
       
    26 #include <QWidget>
       
    27 #include <QModelIndex>
       
    28 #include <QMap>
       
    29 #include <QStringList>
       
    30 #include <QPushButton>
       
    31 #include <QMenu>
       
    32 #include <QSpinBox>
       
    33 #include <xqappmgr.h>
       
    34 #include <XQSharableFile.h>
       
    35 
       
    36 class QLineEdit;
       
    37 class QCheckBox;
       
    38 class QLabel;
       
    39 
       
    40 class AppMgrClient : public QWidget
       
    41 {
       
    42     Q_OBJECT
       
    43             
       
    44 public:
       
    45         AppMgrClient( QWidget *parent = 0, Qt::WFlags f = 0 );
       
    46         ~AppMgrClient();
       
    47 
       
    48 private slots:
       
    49         void test1();
       
    50         void test2();
       
    51         void test3();
       
    52         void test4();
       
    53         void test5();
       
    54         void test6();
       
    55         void test7();
       
    56         void test8();
       
    57         void test9();
       
    58         void test10();
       
    59         void test11();
       
    60         void anyTest();
       
    61         
       
    62        // Aiw request responses
       
    63         void handleOk(const QVariant &result);
       
    64         void handleError(int errorCode, const QString& errorMessage);
       
    65         void test4ActionTriggered();
       
    66 
       
    67               
       
    68 private:
       
    69         bool test(XQAiwRequest **req,const QString& interface, const QString& operation);
       
    70         bool test(XQAiwRequest **req, XQAiwInterfaceDescriptor &impl, const QString& operation);
       
    71         bool test(XQAiwRequest **req, const QString &arg);
       
    72         void connectSignals(XQAiwRequest *req);
       
    73         void createTestFile(const QString &dir, const QString &file);
       
    74         bool testRunning(const QString & service, const QString & interface);
       
    75         void assert(const QString &testName, bool testResult);
       
    76 
       
    77 private:
       
    78         QCheckBox* mCheckEmbedded;
       
    79         QCheckBox* mCheckDeleteRequest;
       
    80         QCheckBox* mBackground;
       
    81         QCheckBox* mForeground;
       
    82         QCheckBox* mGenericSend;
       
    83         QCheckBox* mSynchronous;
       
    84         QLineEdit *mReqArg;
       
    85         QLineEdit *mTextRetValue;
       
    86         QLabel* mRetunSignal;
       
    87         QVBoxLayout *vl;
       
    88         XQApplicationManager appmgr;
       
    89         QPushButton *actionButton;
       
    90         QMenu *mMenu;
       
    91         QSpinBox* mDataSpinBox;
       
    92         XQAiwRequest* req1;
       
    93         XQAiwRequest* req2;
       
    94         XQAiwRequest* req3;
       
    95         XQAiwRequest* req4;
       
    96         XQAiwRequest* req5;
       
    97         XQAiwRequest* req6;
       
    98         XQAiwRequest* req7;
       
    99         XQAiwRequest* req8;
       
   100         XQAiwRequest* req9;
       
   101         XQAiwRequest* req10;
       
   102         XQAiwRequest* anyReq;
       
   103 
       
   104         int mImplIndex;
       
   105         
       
   106         RFs fs;
       
   107         RFile file;
       
   108 
       
   109         QString mAppName;
       
   110         QString mTestCase;
       
   111 };
       
   112 
       
   113 
       
   114 #endif