messagingapp/msgnotifications/msgnotificationdialogplugin/inc/msgnotificationdialogwidget.h
changeset 73 ecf6a73a9186
parent 68 e8a69c93c830
equal deleted inserted replaced
68:e8a69c93c830 73:ecf6a73a9186
    18 #ifndef MSGNOTIFICATIONDIALOGWIDGET_H
    18 #ifndef MSGNOTIFICATIONDIALOGWIDGET_H
    19 #define MSGNOTIFICATIONDIALOGWIDGET_H
    19 #define MSGNOTIFICATIONDIALOGWIDGET_H
    20 
    20 
    21 #include <QObject>
    21 #include <QObject>
    22 #include <QVariantMap>
    22 #include <QVariantMap>
    23 #include <QRunnable>
       
    24 #include <hbdevicedialoginterface.h>
    23 #include <hbdevicedialoginterface.h>
    25 #include <hbdevicedialog.h>
    24 #include <hbdevicedialog.h>
    26 #include <hbnotificationdialog.h>
    25 #include <hbnotificationdialog.h>
    27 
       
    28 
       
    29 /**
       
    30  * Class for sending service request
       
    31  */
       
    32 class ServiceRequestSenderTask :public QObject,public QRunnable
       
    33 {
       
    34     Q_OBJECT
       
    35     
       
    36 public:
       
    37     /**
       
    38      * Constructor
       
    39      */
       
    40     ServiceRequestSenderTask(qint64 conversationId);
       
    41     
       
    42     /**
       
    43      * Destructor
       
    44      */
       
    45     ~ServiceRequestSenderTask();
       
    46      
       
    47     /**
       
    48      * create and send service request
       
    49      */
       
    50      void run();
       
    51 
       
    52 private slots:
       
    53 
       
    54     /**
       
    55      * Slot invoked after Conversation view is launched.
       
    56      */
       
    57      void onRequestCompleted(const QVariant& value);
       
    58      
       
    59     /**
       
    60      * Slot invoked if error occurred during launch of CV.
       
    61      */
       
    62      void onRequestError(int errorCode, const QString& errorMessage);
       
    63           
       
    64 signals:
       
    65 
       
    66 	/**
       
    67 	* Signal is emitted to indicate that Notification Dialog 
       
    68 	* can now be closed.
       
    69 	*/
       
    70      void serviceRequestCompleted();
       
    71      
       
    72 private: 
       
    73      qint64 mConvId;
       
    74 };
       
    75 
    26 
    76 /**
    27 /**
    77  * Message notification widget class. 
    28  * Message notification widget class. 
    78  * Widget shown for the new message notifications. 
    29  * Widget shown for the new message notifications. 
    79  * Part of messagenotificationplugin.
    30  * Part of messagenotificationplugin.
    88     /** 
    39     /** 
    89      * Constructor 
    40      * Constructor 
    90      * @param parameters variant map list
    41      * @param parameters variant map list
    91      */
    42      */
    92     MsgNotificationDialogWidget(const QVariantMap &parameters);
    43     MsgNotificationDialogWidget(const QVariantMap &parameters);
       
    44     
       
    45     /** 
       
    46      * Destructor 
       
    47      */
       
    48     ~MsgNotificationDialogWidget();
    93 
    49 
    94     /**
    50     /**
    95      * @see HbDeviceDialogInterface
    51      * @see HbDeviceDialogInterface
    96      */
    52      */
    97     bool setDeviceDialogParameters(const QVariantMap &parameters);
    53     bool setDeviceDialogParameters(const QVariantMap &parameters);
   158     void deviceDialogData(QVariantMap data);
   114     void deviceDialogData(QVariantMap data);
   159 
   115 
   160 private:
   116 private:
   161     Q_DISABLE_COPY(MsgNotificationDialogWidget)
   117     Q_DISABLE_COPY(MsgNotificationDialogWidget)
   162 
   118 
   163      /**
   119     /**
       
   120       * Current conversation id.
       
   121       */
       
   122     qint64 mConversationId;
       
   123      
       
   124     /**
   164       * Hold the last error 
   125       * Hold the last error 
   165       */
   126       */
   166      int mLastError;
   127      int mLastError;
   167     
   128 
   168      /**
   129      /**
   169       * Show event has come or not
   130       * Show event has come or not
   170       */
   131       */
   171      bool mShowEventReceived;
   132      bool mShowEventReceived;     
   172     
       
   173      /**
       
   174       * Current conversation id.
       
   175       */
       
   176      qint64 mConversationId;
       
   177 };
   133 };
   178 
   134 
   179 #endif // MSGNOTIFICATIONDIALOGWIDGET_P_H
   135 #endif // MSGNOTIFICATIONDIALOGWIDGET_P_H