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