usbuis/usbuinotif/inc/usbnotifier.h
branchRCL_3
changeset 24 e02eb84a14d2
parent 23 25fce757be94
equal deleted inserted replaced
23:25fce757be94 24:e02eb84a14d2
    18 #define USBUINOTIFIER_H
    18 #define USBUINOTIFIER_H
    19 // INCLUDES
    19 // INCLUDES
    20 #include <usbuinotif.h>
    20 #include <usbuinotif.h>
    21 #include <eikenv.h>
    21 #include <eikenv.h>
    22 #include <data_caging_path_literals.hrh> 
    22 #include <data_caging_path_literals.hrh> 
       
    23 #include <usbman.h>
       
    24 #include <usbwatcher.h>
       
    25 #include <AknCapServerClient.h>  
    23 #include "usbuinotifdebug.h"
    26 #include "usbuinotifdebug.h"
    24 // CONSTANTS
    27 // CONSTANTS
    25 // Literal resource filename 
    28 // Literal resource filename 
    26 _LIT(KResourceFileName, "usbuinotif.rsc");
    29 _LIT(KResourceFileName, "usbuinotif.rsc");
    27 
    30 
    33 /**
    36 /**
    34  *  This class is the base class for all notifiers.
    37  *  This class is the base class for all notifiers.
    35  *
    38  *
    36  *  @lib
    39  *  @lib
    37  */
    40  */
    38 NONSHARABLE_CLASS(CUSBUINotifierBase) : public CBase, public MEikSrvNotifierBase2
    41 NONSHARABLE_CLASS(CUSBUINotifierBase) : public CActive, public MEikSrvNotifierBase2
    39     {
    42     {
    40 public:
    43 public:
    41     // Constructors and destructor
    44     // Constructors and destructor
    42 
    45 
    43     /**
    46     /**
    67      * @param aBuffer A buffer containing received parameters
    70      * @param aBuffer A buffer containing received parameters
    68      * @param aReplySlot a Reply slot.
    71      * @param aReplySlot a Reply slot.
    69      * @param aMessage Should be completed when the notifier is deactivated.
    72      * @param aMessage Should be completed when the notifier is deactivated.
    70      * @return None.
    73      * @return None.
    71      */
    74      */
    72     virtual void StartDialogL(const TDesC8& aBuffer, TInt aReplySlot,
    75     virtual void GetParamsL(const TDesC8& aBuffer, TInt aReplySlot,
    73             const RMessagePtr2& aMessage)=0;
    76             const RMessagePtr2& aMessage)=0;
       
    77 
       
    78     /**
       
    79      * A function for checking the status of Apps key.
       
    80      * @param aEnable A Boolean according to Apps key status
       
    81      * @return None.
       
    82      */
       
    83     void SuppressAppSwitching(TBool aEnable);
    74 
    84 
    75     /**
    85     /**
    76      * Check if message needs to be completed and complete it
    86      * Check if message needs to be completed and complete it
    77      * @param aReason   The completetion code
    87      * @param aReason   The completetion code
    78      */
    88      */
    79     void CompleteMessage(TInt aReason);
    89     void CompleteMessage(TInt aReason);
    80 
    90 
    81     /**
    91     /*
    82      * Initialize HbTextResolrer, if not initialized before
    92      * Check whether the keylock is on. If yes turn it off.
    83      * (checks it from TLS)
    93      * @since S60 3.2
    84      */    
    94      */
    85     void InitializeTextResolver();
    95     void DisableKeylock();
    86    
    96 
       
    97     /*
       
    98      * Restore the keyguard on if it has been disabled by DisableKeylock.
       
    99      * @since S60 3.2
       
   100      */
       
   101     void RestoreKeylock();
       
   102 
    87 protected:
   103 protected:
    88     // Functions from base classes        
   104     // Functions from base classes        
       
   105 
       
   106     /**
       
   107      * From CActive Gets called when a request completes.
       
   108      * @param None.
       
   109      * @return None.
       
   110      */
       
   111     virtual void RunL()=0;
       
   112 
       
   113     /**
       
   114      * From CActive Gets called when a leave occurres in RunL.
       
   115      * @param aError Symbian OS errorcode.
       
   116      * @return error code.
       
   117      */
       
   118     virtual TInt RunError(TInt aError);
    89 
   119 
    90     /**
   120     /**
    91      * From MEikSrvNotifierBase2 Called when a notifier is first loaded 
   121      * From MEikSrvNotifierBase2 Called when a notifier is first loaded 
    92      * to allow any initial construction that is required.
   122      * to allow any initial construction that is required.
    93      * @param None.
   123      * @param None.
    99      * From MEikSrvNotifierBase2 The notifier has been deactivated 
   129      * From MEikSrvNotifierBase2 The notifier has been deactivated 
   100      * so resources can be freed and outstanding messages completed.
   130      * so resources can be freed and outstanding messages completed.
   101      * @param None.
   131      * @param None.
   102      * @return None.
   132      * @return None.
   103      */
   133      */
   104    virtual void Cancel();
   134     virtual void Cancel();
   105 
   135 
   106 private:
   136 private:
   107     // Functions from base classes        
   137     // Functions from base classes        
   108 
   138 
   109     /**
   139     /**
   144      * @param aBuffer The updated data.
   174      * @param aBuffer The updated data.
   145      * @return A pointer to return value.
   175      * @return A pointer to return value.
   146      */
   176      */
   147     virtual TPtrC8 UpdateL(const TDesC8& aBuffer);
   177     virtual TPtrC8 UpdateL(const TDesC8& aBuffer);
   148 
   178 
   149  
   179     /**
   150   
   180      * From CActive Gets called when a request is cancelled.
       
   181      * @param None.
       
   182      * @return None.
       
   183      */
       
   184     virtual void DoCancel();
       
   185 
       
   186 private:
       
   187     TBool iKeylockChanged; // Flag used to restore the keylock
       
   188     RAknUiServer iAknServer;
   151 protected:
   189 protected:
   152     // Data
   190     // Data
   153 
   191 
   154     RMessagePtr2 iMessage; // Received message
   192     RMessagePtr2 iMessage; // Received message
   155     TInt iReplySlot; // Reply slot
   193     TInt iReplySlot; // Reply slot
   156     TBool iNeedToCompleteMessage; // Flag for releasing messages
   194     TBool iNeedToCompleteMessage; // Flag for releasing messages
   157 
   195 
   158     TInt iResourceFileFlag; // Flag for eikon env.
   196     TInt iResourceFileFlag; // Flag for eikon env.
   159     TNotifierInfo iInfo; // Notifier parameters structure    
   197     TNotifierInfo iInfo; // Notifier parameters structure    
   160     CEikonEnv* iEikEnv; // Local eikonenv, not own
   198     CEikonEnv* iEikEnv; // Local eikonenv, not own
   161     TBool iTranslator ;
   199     TBool iAppsKeyBlocked; // Apps key status 
       
   200 
       
   201     TBool iCoverDisplaySupported; // Cover Display UI feature support
       
   202 
   162     };
   203     };
   163 
   204 
   164 #endif // USBUINOTIFIER_H
   205 #endif // USBUINOTIFIER_H
   165 // End of File
   206 // End of File