voipplugins/accountcreationplugin/inc/accountcreationplugin.h
branchRCL_3
changeset 21 f742655b05bf
parent 20 65a3ef1d5bd0
child 22 d38647835c2e
equal deleted inserted replaced
20:65a3ef1d5bd0 21:f742655b05bf
     1 /*
       
     2 * Copyright (c) 2007-2009 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:  Header file for CAccountCreationPlugin
       
    15  *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef ACCOUNTCREATIONPLUGIN_H
       
    20 #define ACCOUNTCREATIONPLUGIN_H
       
    21 
       
    22 #include <AiwServiceIfBase.h>
       
    23 #include <AiwServiceHandler.h>
       
    24 
       
    25 #include "accountcreationplugin.hrh"
       
    26 #include "maccountcreationpluginobserver.h"
       
    27 
       
    28 class MAiwNotifyCallback;
       
    29 class CAcpProviderListView;
       
    30 class MAccountCreationPluginObserver;
       
    31 class CEikonEnv;
       
    32 
       
    33 /**
       
    34  *  CAccountCreationPlugin class
       
    35  *  Declarition of CAccountCreationPlugin.
       
    36  *
       
    37  *  @lib accountcreationplugin.lib
       
    38  *  @since S60 v3.2
       
    39  */
       
    40 NONSHARABLE_CLASS( CAccountCreationPlugin ) : public CAiwServiceIfBase,
       
    41     public MAccountCreationPluginObserver
       
    42     {
       
    43 public:
       
    44 
       
    45     static CAccountCreationPlugin* NewL();
       
    46 
       
    47     /**
       
    48      * Destructor.
       
    49      */
       
    50     ~CAccountCreationPlugin();
       
    51 
       
    52 // from base class CAiwServiceIfBase
       
    53 
       
    54     /**
       
    55      * From CAiwServiceIfBase.
       
    56      * Initialises provider with necessary information from the Service 
       
    57      * Handler. This method is called when the consumer makes the attach 
       
    58      * operation.
       
    59      * Not used but here because of inheritance.
       
    60      * 
       
    61      * @since S60 v3.2
       
    62      * @param aFrameworkCallback Framework provided callback for provider
       
    63      *                           to send events to framework. Not used.
       
    64      * @param aInterest List of criteria items which invoked the provider.
       
    65      *                  Not used.
       
    66      */
       
    67     void InitialiseL( MAiwNotifyCallback& /*aFrameworkCallback*/,
       
    68         const RCriteriaArray& /*aInterest*/ );
       
    69 
       
    70     /**
       
    71      * From CAiwServiceIfBase.
       
    72      * Executes generic service commands included in criteria.
       
    73      * 
       
    74      * @since S60 v3.2
       
    75      * @param aCmdId Command to be executed.
       
    76      * @param aInParamList Input parameters, can be an empty list.
       
    77      * @param aOutParamList Output parameters, can be an empty list.
       
    78      * @param aCmdOptions Options for the command, see KAiwOpt* in 
       
    79      *                    AiwCommon.hrh.
       
    80      * @param aCallback Callback for asynchronous command handling, 
       
    81      *                  parameter checking, etc.
       
    82      * @leave KErrArgument Callback is missing when required.
       
    83      * @leave KErrNotSupported No provider supports service.
       
    84      */
       
    85     void HandleServiceCmdL( 
       
    86         const TInt& /*aCmdId*/, 
       
    87         const CAiwGenericParamList& /*aInParamList*/,
       
    88         CAiwGenericParamList& aOutParamList,
       
    89         TUint aCmdOptions = 0,
       
    90         const MAiwNotifyCallback* aCallback = NULL );
       
    91 
       
    92 // from base class MAccountCreationPluginObserver
       
    93 
       
    94     /**
       
    95      * From MAccountCreationPluginObserver.
       
    96      * Informs that an AIW event has occurred.
       
    97      * 
       
    98      * @since S60 v3.2
       
    99      * @param aError Error code.
       
   100      */
       
   101     void NotifyAiwEventL( TInt aError );
       
   102     
       
   103     /**
       
   104      * From MAccountCreationPluginObserver.
       
   105      * Informs that sis file is downloaded.
       
   106      * 
       
   107      * @since S60 v5.0
       
   108      * @param aFileName sis file name
       
   109      */
       
   110     void NotifySISDownloaded( TDesC& aFileName );
       
   111 
       
   112 private:
       
   113     
       
   114     CAccountCreationPlugin();
       
   115     void ConstructL();
       
   116 
       
   117     /**
       
   118      * Sends AIW service command when plugin initialization is completed. 
       
   119      *
       
   120      * @since S60 v3.2
       
   121      */ 
       
   122     void SendInitializedCallbackL() const;
       
   123 
       
   124     /**
       
   125      * Sends AIW service command when plugin is stopped its work. 
       
   126      *
       
   127      * @since S60 v3.2
       
   128      */         
       
   129     void SendCompletedCallbackL() const;
       
   130 
       
   131     /**
       
   132      * Sends AIW service command when plugin error is reached.
       
   133      *
       
   134      * @since S60 v3.2 
       
   135      */ 
       
   136     void SendErrorCallbackL() const;
       
   137 
       
   138     /**
       
   139      * Compares AIW service command connected uid to our plugin uid.
       
   140      *
       
   141      * @since S60 v3.2
       
   142      * @param aOutParamList AIW service command parameters.
       
   143      * @return ETrue if UID's matched, EFalse if not.
       
   144      */
       
   145     TBool CompareUids( const CAiwGenericParamList& aOutParamList ) const;
       
   146 
       
   147     /**
       
   148      * Launches ACP UI. 
       
   149      *
       
   150      * @since S60 v3.2
       
   151      */ 
       
   152     void LaunchPluginUiL();
       
   153 
       
   154 private: // data
       
   155 
       
   156     /**
       
   157      * Resource file offset.
       
   158      */
       
   159     TInt iResourceOffset;
       
   160 
       
   161     /**
       
   162      * Handle to AIW Service Handler.
       
   163      * Own.
       
   164      */
       
   165     CAiwServiceHandler* iServiceHandler;
       
   166 
       
   167     /**
       
   168      * Handle to AIW callback notifier.
       
   169      * Not own.
       
   170      */
       
   171     const MAiwNotifyCallback* iNotifyCallback;
       
   172     
       
   173     /**
       
   174      * Handle to AIW callback notifier.
       
   175      * Own.
       
   176      */
       
   177     CAiwGenericParamList* iCBEventParamList;
       
   178 
       
   179     /**
       
   180      * Handle to provider list view.
       
   181      * Not own.
       
   182      */
       
   183     CAcpProviderListView* iProviderListView;
       
   184 
       
   185     /**
       
   186      * CEikonEnv.
       
   187      * Own.
       
   188      */
       
   189     CEikonEnv* iEikEnv;
       
   190 
       
   191     /**
       
   192      * Boolean indicating if CSC has been started from active idle
       
   193      */ 
       
   194     TBool iLaunchedFromAI;    
       
   195     };  
       
   196 
       
   197 #endif  // ACCOUNTCREATIONPLUGIN_H
       
   198 
       
   199 // End of file.