convergedconnectionhandler/cchserver/inc/cchplugin.h
branchRCL_3
changeset 22 d38647835c2e
parent 0 a4daefaec16c
equal deleted inserted replaced
21:f742655b05bf 22:d38647835c2e
       
     1 /*
       
     2 * Copyright (c) 2007 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:  CCCHPlugin declaration
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef C_CCHPLUGIN_H
       
    20 #define C_CCHPLUGIN_H
       
    21 
       
    22 // INCLUDES
       
    23 #include <e32std.h>
       
    24 #include <e32base.h>
       
    25 
       
    26 #include "cchserviceobserver.h"
       
    27 
       
    28 // CONSTANTS
       
    29 // None
       
    30 
       
    31 // MACROS
       
    32 // None
       
    33 
       
    34 // DATA TYPES
       
    35 // None
       
    36 
       
    37 // FUNCTION PROTOTYPES
       
    38 // None
       
    39 
       
    40 // FORWARD DECLARATIONS
       
    41 class CCchService;
       
    42 class MCCHServiceNotifier;
       
    43 
       
    44 // CLASS DECLARATION
       
    45 
       
    46 /**
       
    47  *  CCCHPlugin declaration
       
    48  *  Class contains plug-in's information
       
    49  *  @lib cchserver.exe
       
    50  *  @since S60 3.2
       
    51  */
       
    52 NONSHARABLE_CLASS( CCCHPlugin ) : public CBase,
       
    53                                   public MCchServiceObserver
       
    54     {
       
    55 
       
    56 public: // Constructors and destructor
       
    57 
       
    58     /**
       
    59     * Two-phased constructor.
       
    60     */
       
    61     static CCCHPlugin* NewL( TUid aUid );
       
    62 
       
    63     /**
       
    64      * Destructor.
       
    65      */
       
    66     virtual ~CCCHPlugin();
       
    67     
       
    68 public: // New functions
       
    69 
       
    70     /**
       
    71      * Check Plug-ins Uid
       
    72      * @since S60 3.2
       
    73      * @param aUid Plug-in's Uid
       
    74      * @return TBool ETrue if Uid is same that this Plug-in's Uid
       
    75      */
       
    76     TBool CheckUid( const TUid aUid ) const;
       
    77     
       
    78     /**
       
    79      * Return pointer to CCHService plug-in
       
    80      * @since S60 3.2
       
    81      * @return Pointer to CCHService plug-in
       
    82      */
       
    83     CCchService* Plugin() const;
       
    84 
       
    85     /**
       
    86      * Adds a observer for plugin events.
       
    87      * @since S60 3.2
       
    88      * @param aObserver Pointer to observer.
       
    89      */
       
    90     void SetServiceNotifier( MCCHServiceNotifier* aObserver );
       
    91 
       
    92     /**
       
    93      * Removes a observer for plugin events.
       
    94      * @since S60 3.2
       
    95      * @param aObserver Pointer to observer.
       
    96      */
       
    97     void RemoveServiceNotifier( MCCHServiceNotifier* aObserver );
       
    98     
       
    99 private:
       
   100 
       
   101     /**
       
   102      * CCchService implementation have to use this callback
       
   103      * method when service state changed. 
       
   104      * @since S60 3.2
       
   105      * @param aServiceId Service which state has changed
       
   106      * @param aType Subservice's type. 
       
   107      * @param aState A new state of the service.
       
   108      */
       
   109     void ServiceStateChanged( const TServiceSelection aServiceSelection,
       
   110         TCCHSubserviceState aState, TInt aError );    
       
   111     
       
   112 private:
       
   113     
       
   114     /**
       
   115      * C++ default constructor.
       
   116      */
       
   117     CCCHPlugin( TUid aUid );
       
   118     
       
   119     /**
       
   120      * By default Symbian 2nd phase constructor is private.
       
   121      */
       
   122     void ConstructL( TUid aUid );
       
   123 
       
   124 private: // data
       
   125     
       
   126     /**
       
   127      * Loaded plug-in
       
   128      */
       
   129     CCchService*                        iPlugin;
       
   130     
       
   131     /**
       
   132      * Plug-ins Uid
       
   133      */
       
   134     TUid                                iUid;
       
   135     
       
   136     /**
       
   137      * Plug-ins observers
       
   138      */
       
   139     RPointerArray<MCCHServiceNotifier>  iObservers;
       
   140     
       
   141     };
       
   142 
       
   143 #endif // C_CCHPLUGIN_H
       
   144 
       
   145 // End of file