usbuis/usbuinotif/src/usbuinmain.cpp
branchRCL_3
changeset 79 25fce757be94
parent 13 7068aba64af5
child 80 e02eb84a14d2
equal deleted inserted replaced
77:5b2a402e96ac 79:25fce757be94
    17 
    17 
    18 // INCLUDE FILES
    18 // INCLUDE FILES
    19 #include <ecom/ecom.h>
    19 #include <ecom/ecom.h>
    20 #include <ecom/implementationproxy.h>
    20 #include <ecom/implementationproxy.h>
    21 #include <eiknotapi.h>
    21 #include <eiknotapi.h>
    22 #include <eikenv.h>
       
    23 #include <AknNotifierWrapper.h>
       
    24 #include <usbuinotif.h>
       
    25 
    22 
    26 #include "usbuincableconnectednotifier.h"
    23 #include "usbuincableconnectednotifier.h"
    27 #include "usbuinqueriesnotifier.h"
    24 #include "usbuinqueriesnotifiermdrv.h"
    28 
       
    29 
       
    30 #include "usbuinotifdebug.h"
    25 #include "usbuinotifdebug.h"
    31 #include "usbuinotifotgwarning.h"    
    26 #include "usbuinotifotgwarning.h"    
    32 #include "usbuinotifotgerror.h"    
    27 #include "usbuinotifotgerror.h"    
    33 #include "usbuinotifmsmmerror.h" 
    28 #include "usbuinotifmsmmerror.h" 
    34 
    29 
    35 // CONSTANTS
    30 // CONSTANTS
    36 const TInt KUSBUINotifierArrayIncrement = 4;
    31 const TInt KUSBUINotifierArrayIncrement = 5;
    37 _LIT( KUSBUINotifdll, "usbavkonnotif.dll" ); 
    32 
    38 // ================= EXPORTED FUNCTIONS =======================================
    33 // ================= EXPORTED FUNCTIONS =======================================
    39 // ----------------------------------------------------------------------------
    34 // ----------------------------------------------------------------------------
    40 //
    35 //
    41 // Instantiate notifiers
    36 // Instantiate notifiers
    42 //
    37 //
    44 
    39 
    45 void CreateUSBUINotifiersL(CArrayPtrFlat<MEikSrvNotifierBase2>* aNotifiers)
    40 void CreateUSBUINotifiersL(CArrayPtrFlat<MEikSrvNotifierBase2>* aNotifiers)
    46     {
    41     {
    47     FLOG(_L("[USBUINOTIF]\t CreateUSBUINotifiersL"));
    42     FLOG(_L("[USBUINOTIF]\t CreateUSBUINotifiersL"));
    48 
    43 
    49     /* The CableconnectionNotifier is created on the Avkon Wrapper
    44     CUSBUICableConnectedNotifier* cableConnectedNotifier =
    50  * because it contains the discreet popups which are only possible
    45         CUSBUICableConnectedNotifier::NewL();
    51  * to be launched in a UI framework
    46     CleanupStack::PushL( cableConnectedNotifier );
    52  */
    47     aNotifiers->AppendL( cableConnectedNotifier );
    53     CAknCommonNotifierWrapper* master = 
    48     CleanupStack::Pop( cableConnectedNotifier );
    54                 CAknCommonNotifierWrapper::NewL(KCableConnectedNotifierUid,
    49 
    55                                                 KCableConnectedNotifierUid,
       
    56                                                 MEikSrvNotifierBase2::ENotifierPriorityVHigh,
       
    57                                                 KUSBUINotifdll,
       
    58                                                 1); // no synchronous reply used.
       
    59         CleanupStack::PushL(master);
       
    60         
       
    61         aNotifiers->AppendL(master ); 
       
    62         CleanupStack::Pop( master );
       
    63     CUSBUIQueriesNotifier* queriesNotifier = CUSBUIQueriesNotifier::NewL();
    50     CUSBUIQueriesNotifier* queriesNotifier = CUSBUIQueriesNotifier::NewL();
    64     CleanupStack::PushL( queriesNotifier );
    51     CleanupStack::PushL( queriesNotifier );
    65     aNotifiers->AppendL( queriesNotifier );
    52     aNotifiers->AppendL( queriesNotifier );
    66     CleanupStack::Pop( queriesNotifier );
    53     CleanupStack::Pop( queriesNotifier );
    67 
    54 
   125 // ----------------------------------------------------------------------------
   112 // ----------------------------------------------------------------------------
   126 // ECOM 
   113 // ECOM 
   127 // ----------------------------------------------------------------------------
   114 // ----------------------------------------------------------------------------
   128 
   115 
   129 const TImplementationProxy ImplementationTable[] =
   116 const TImplementationProxy ImplementationTable[] =
   130     {
   117 {
   131     IMPLEMENTATION_PROXY_ENTRY( 0x10281F23, NotifierArray )
   118     IMPLEMENTATION_PROXY_ENTRY( 0x10281F23, NotifierArray )
   132     };
   119 };
   133 
   120 
   134 EXPORT_C const TImplementationProxy* ImplementationGroupProxy(
   121 EXPORT_C const TImplementationProxy* ImplementationGroupProxy(
   135         TInt& aTableCount)
   122         TInt& aTableCount)
   136     {
   123     {
   137     FLOG(_L("[USBUINOTIF]\t ImplementationGroupProxy"));
   124     FLOG(_L("[USBUINOTIF]\t ImplementationGroupProxy"));