phoneengine/loghandling/inc/cpelogextensionwrapper.h
changeset 0 5f000ab63145
equal deleted inserted replaced
-1:000000000000 0:5f000ab63145
       
     1 /*
       
     2 * Copyright (c) 2008 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: Definition of CPELogExtensionWrapper class.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef C_CPELOGEXTENSIONWRAPPER_H
       
    21 #define C_CPELOGEXTENSIONWRAPPER_H
       
    22 
       
    23 #include <e32base.h>
       
    24 #include <telloggingextension.h>
       
    25 
       
    26 /**
       
    27  *  Provides container friendly interface for extension plugin handling.
       
    28  *    
       
    29  *  @lib loghandling.dll
       
    30  *  @since S60 v5.1
       
    31  */
       
    32 NONSHARABLE_CLASS( CPELogExtensionWrapper ) : public CTelLoggingExtension
       
    33     {
       
    34 
       
    35 public:
       
    36 
       
    37     /**
       
    38      * Two-phased constructor.
       
    39      * @param   aImplementationUid  An Ecom plugin implementation identifier.
       
    40      */
       
    41     static CPELogExtensionWrapper* NewL( TUid aImplementationUid );
       
    42 
       
    43     /**
       
    44      * Two-phased constructor.
       
    45      * @param   aImplementationUid  An Ecom plugin implementation identifier.
       
    46      */
       
    47     static CPELogExtensionWrapper* NewLC( TUid aImplementationUid );
       
    48 
       
    49     /**
       
    50     * Destructor.
       
    51     */
       
    52     virtual ~CPELogExtensionWrapper();
       
    53 
       
    54     /**
       
    55      * Provides comparison algorithm for CPELogExtensionWrapper objects using
       
    56      * extension plugin implementation identifier as a search key.
       
    57      * 
       
    58      * @param   aKey        A search key.
       
    59      * @param   aWrapper    An object to match with a key.
       
    60      * @since   S60 v5.1
       
    61      * @return  ETrue if match, EFalse otherwise.
       
    62      */
       
    63     static TBool MatchByUid( 
       
    64         const TUid* aKey, const CPELogExtensionWrapper& aWrapper );
       
    65     
       
    66     // from base class CTelLoggingExtension
       
    67     /**
       
    68     * From CTelLoggingExtension.
       
    69     * @see CTelLoggingExtension.
       
    70     */
       
    71     void InitializeL( TUint aServiceId, const TDesC& aOrigAddress );
       
    72     
       
    73     /**
       
    74     * From CTelLoggingExtension.
       
    75     * @see CTelLoggingExtension.
       
    76     */
       
    77     TInt GetPhoneNumber( RBuf& aPhoneNumber );
       
    78 
       
    79     /**
       
    80     * From CTelLoggingExtension.
       
    81     * @see CTelLoggingExtension.
       
    82     */
       
    83     TInt GetVoipAddress( RBuf& aVoipAddress );
       
    84     
       
    85     /**
       
    86     * From CTelLoggingExtension.
       
    87     * @see CTelLoggingExtension.
       
    88     */
       
    89     TInt GetMyAddress( RBuf& aMyAddress );
       
    90     
       
    91     /**
       
    92     * From CTelLoggingExtension.
       
    93     * @see CTelLoggingExtension.
       
    94     */
       
    95     TInt GetRemotePartyName( RBuf& aRemotePartyName );
       
    96 
       
    97 private:
       
    98 
       
    99     CPELogExtensionWrapper() {};
       
   100     
       
   101     CPELogExtensionWrapper( TUid aImplementationUid );
       
   102 
       
   103     void ConstructL();
       
   104     
       
   105     /**
       
   106      * Creates logging extension plugin.
       
   107      * @since   S60 v5.1
       
   108      * @return A new logging extension plugin instance.
       
   109      */
       
   110     CTelLoggingExtension* CreateLoggingExtensionL() const;
       
   111     
       
   112     /**
       
   113      * Returns identifier of the wrapped extension plugin.
       
   114      * @since   S60 v5.1
       
   115      * @return Identifier of the extension plugin.
       
   116      */
       
   117     TUid Identifier() const;
       
   118 
       
   119 private: // data
       
   120 
       
   121     /**
       
   122      * Extension plugin identifier.
       
   123      */
       
   124     TUid iPluginUid;
       
   125 
       
   126     /**
       
   127      * Logging extension plugin.
       
   128      * Own.
       
   129      */
       
   130     CTelLoggingExtension* iPlugin;
       
   131 
       
   132     };
       
   133 
       
   134 #endif // C_CPELOGEXTENSIONWRAPPER_H