qtmobility/examples/bearermonitor/sessionwidget.h
changeset 4 90517678cc4f
parent 0 cfcbf08528c4
child 5 453da2cfceef
equal deleted inserted replaced
1:2b40d63a9c3d 4:90517678cc4f
    40 ****************************************************************************/
    40 ****************************************************************************/
    41 
    41 
    42 #ifndef SESSIONWIDGET_H
    42 #ifndef SESSIONWIDGET_H
    43 #define SESSIONWIDGET_H
    43 #define SESSIONWIDGET_H
    44 
    44 
       
    45 #if defined(Q_WS_MAEMO_5) || defined(Q_WS_MAEMO_6)
       
    46 #include "ui_sessionwidget_maemo.h"
       
    47 #else
    45 #include "ui_sessionwidget.h"
    48 #include "ui_sessionwidget.h"
    46 
    49 #endif
    47 #include <qnetworksession.h>
    50 #include <qnetworksession.h>
    48 
    51 
    49 QTM_USE_NAMESPACE
    52 QTM_USE_NAMESPACE
    50 
    53 
    51 class SessionWidget : public QWidget, public Ui_SessionWidget
    54 class SessionWidget : public QWidget, public Ui_SessionWidget
    52 {
    55 {
    53     Q_OBJECT
    56     Q_OBJECT
    54 
    57 
    55 public:
    58 public:
    56     SessionWidget(const QNetworkConfiguration &config, QWidget *parent = 0);
    59     explicit SessionWidget(const QNetworkConfiguration &config, QWidget *parent = 0);
    57     ~SessionWidget();
    60     ~SessionWidget();
    58 
    61 
    59 private:
    62 private:
    60     void updateSessionState(QNetworkSession::State state);
    63     void updateSessionState(QNetworkSession::State state);
    61     void updateSessionError(QNetworkSession::SessionError error);
    64     void updateSessionError(QNetworkSession::SessionError error);
    64     void openSession();
    67     void openSession();
    65     void openSyncSession();
    68     void openSyncSession();
    66     void closeSession();
    69     void closeSession();
    67     void stopSession();
    70     void stopSession();
    68     void updateSession();
    71     void updateSession();
    69 
    72 #if defined(Q_WS_MAEMO_5) || defined(Q_WS_MAEMO_6)
       
    73     void deleteSession();
       
    74 #endif
    70 private:
    75 private:
    71     QNetworkSession *session;
    76     QNetworkSession *session;
    72 };
    77 };
    73 
    78 
    74 #endif
    79 #endif