eventsui/eventshandlerui/eventsnotifier/evtinfonote/inc/evtinfonote.h
branchRCL_3
changeset 17 1fc85118c3ae
parent 16 8173571d354e
child 18 870918037e16
equal deleted inserted replaced
16:8173571d354e 17:1fc85118c3ae
     1 /*
       
     2 * Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). 
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:  Info Note implementation
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef C_EVTINFONOTE_H
       
    20 #define C_EVTINFONOTE_H
       
    21 
       
    22 // System Includes
       
    23 #include <eiknotapi.h>
       
    24 
       
    25 // User Includes
       
    26 
       
    27 // Forward Declarations
       
    28 class CEikonEnv;
       
    29 class CEvtInfoNoteImpl;
       
    30 class CAknNotifierAppServerAppUi;
       
    31 class CEvtInfoNoteInputParam;
       
    32 
       
    33 /**
       
    34  * Info Note implementation for Event UI Triggers
       
    35  *
       
    36  * This class provides the notifier implementation which displays the
       
    37  * Events UI trigger notifiers. This class is displays the subject,
       
    38  * description and the accuracy levels of the triggers fired.
       
    39  *
       
    40  * @since S60 v9.1
       
    41  */
       
    42 class CEvtInfoNote : public CActive,
       
    43                      public MEikSrvNotifierBase2
       
    44     {
       
    45 private: // Constants and Enumerations
       
    46 	enum TEvtInfoNoteEvent    
       
    47 		{
       
    48 		// No event
       
    49 		ENone,
       
    50 		
       
    51 		// Display the event trigger info note
       
    52 		EDisplayNotifier,
       
    53 		
       
    54 		};
       
    55 		
       
    56 public:
       
    57     /**
       
    58      * Static two phase constructor
       
    59      */
       
    60     static CEvtInfoNote* NewL();
       
    61     
       
    62     /**
       
    63      * Destructor.
       
    64      */
       
    65     virtual ~CEvtInfoNote();
       
    66     
       
    67 public: // Inherited from MEikSrvNotifierBase2
       
    68 
       
    69     /**
       
    70      * Frees all the resources owned by the notifier
       
    71      */
       
    72     virtual void Release();
       
    73 
       
    74     /**
       
    75      * Gets the notifier parameters.
       
    76      */
       
    77     TNotifierInfo Info() const;
       
    78      
       
    79     /**
       
    80      * Starts the notifier.
       
    81      */
       
    82     virtual TPtrC8 StartL( const TDesC8&        aBuffer );
       
    83      
       
    84     /**
       
    85      * Starts the notifier. This is an asynchronous function. The completion
       
    86      * of the request can be communicated through the RMessagePtr2 object
       
    87      */
       
    88     virtual void StartL( const TDesC8&          aBuffer,
       
    89                                TInt             aReplySlot,
       
    90                          const RMessagePtr2&    aMessage );
       
    91      
       
    92     /**
       
    93      * Cancels an active notifier.
       
    94      */
       
    95     virtual void Cancel();
       
    96      
       
    97     /**
       
    98      * Updates a currently active notifier with new data.
       
    99      */
       
   100     virtual TPtrC8 UpdateL( const TDesC8&   aBuffer );
       
   101     
       
   102     /**
       
   103      * Updates a currently active notifier with new data.
       
   104      */    
       
   105     virtual void UpdateL( const TDesC8&         aBuffer, 
       
   106                                 TInt            aReplySlot, 
       
   107                           const RMessagePtr2&   aMessage);
       
   108        
       
   109     /**
       
   110      * Registers the Info Note display
       
   111      */
       
   112     virtual TNotifierInfo RegisterL();
       
   113 	                
       
   114 protected:
       
   115     /**
       
   116      * C++ constructor made protected for this class must not be instantiated
       
   117      * directly
       
   118      */
       
   119     CEvtInfoNote();
       
   120     
       
   121     /**
       
   122      * Second phase of the two phase constructor
       
   123      */
       
   124     void ConstructL();
       
   125     
       
   126 protected: // Inherited from CActive
       
   127     virtual void RunL();
       
   128     
       
   129     virtual void DoCancel();
       
   130     
       
   131     virtual TInt RunError( TInt aError ); 
       
   132         
       
   133 private:
       
   134 	/**
       
   135 	 * Completes any outstanding request with the requested error code.
       
   136 	 */
       
   137 	void CompleteMessage( TInt          aError,
       
   138 	                      TInt          aKeyPressEvent = ENone );
       
   139 	                      
       
   140     /**
       
   141      * Converts the current input buffer into the Input parameter
       
   142      * structure.
       
   143      */
       
   144     CEvtInfoNoteInputParam*     GetInputParametersLC();
       
   145      
       
   146 protected:    
       
   147     /**
       
   148      * Eikon Env pointer
       
   149      */
       
   150     CEikonEnv*                  iEikEnv;
       
   151         
       
   152     /**
       
   153      * Notifier information structure
       
   154      * Owns
       
   155      */
       
   156     TNotifierInfo               iInfo;
       
   157             
       
   158 private:  // Data members
       
   159 
       
   160     /**
       
   161      * Handle to the current message
       
   162      */
       
   163     RMessagePtr2                iMessage;
       
   164     
       
   165     /** 
       
   166      * Confirmation query dialog
       
   167      */
       
   168     CEvtInfoNoteImpl*    	    iInfoNote;
       
   169     
       
   170     /**
       
   171      * Resource file handle
       
   172      */
       
   173     TInt                        iResourceFileFlag;
       
   174     
       
   175 	/**
       
   176 	 * Current Trigger event
       
   177 	 */
       
   178 	TEvtInfoNoteEvent			iTriggerEvent;
       
   179 	
       
   180 	/**
       
   181 	 * Boolean flag to indicate whether App switching has been
       
   182 	 * enabled.
       
   183 	 */
       
   184 	TBool                       iAppSwitchSupress;
       
   185 	
       
   186 	/**
       
   187 	 * Reference to the Notifier App server's Application UI
       
   188 	 */
       
   189 	CAknNotifierAppServerAppUi* iAppUi;
       
   190 	
       
   191 	/**
       
   192 	 * Input Buffer
       
   193 	 * Owns
       
   194 	 */
       
   195 	HBufC8*                     iInputBuffer;
       
   196 	
       
   197 	/**
       
   198 	 * Reply Slot
       
   199 	 */
       
   200 	TInt                        iReplySlot;
       
   201     };
       
   202 
       
   203 #endif // C_EVTINFONOTE_H