logsui/logsserviceextension/inc/clogsextensionfactory.h
changeset 0 e686773b3f54
equal deleted inserted replaced
-1:000000000000 0:e686773b3f54
       
     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:  Creates extension's instances.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef C_CLOGSEXTENSIONFACTORY_H
       
    21 #define C_CLOGSEXTENSIONFACTORY_H
       
    22 
       
    23 
       
    24 //  INCLUDES
       
    25 #include <e32base.h>
       
    26 
       
    27 #include "MLogsExtensionFactory.h"
       
    28 #include "MLogsViewExtension.h"
       
    29 #include "MLogsUiControlExtension.h"
       
    30 //#include "clogsviewextension.h"
       
    31 //#include "clogsuicontrolextension.h"
       
    32 
       
    33 class CLogsViewExtension;
       
    34 class CLogsUiControlExtension;
       
    35 
       
    36 /**
       
    37  * Extension factory. 
       
    38  *
       
    39  * @since S60 v3.2
       
    40  */
       
    41 NONSHARABLE_CLASS(CLogsExtensionFactory) : public CBase,
       
    42                                            public MLogsExtensionFactory                                    
       
    43     {
       
    44 
       
    45 public: 
       
    46         
       
    47     /**
       
    48      * Creates a new CLogsExtensionFactory.
       
    49      */
       
    50     static CLogsExtensionFactory* NewL();
       
    51 
       
    52     /**
       
    53      * Destructor.
       
    54      */
       
    55     ~CLogsExtensionFactory();
       
    56 
       
    57 
       
    58 // From MLogsExtensionFactory
       
    59     
       
    60     /**
       
    61      * From MLogsExtensionFactory
       
    62      * Cleans up the object that is owned through a pointer to
       
    63      * this interface (for a C class this could simply be 
       
    64      * accomplished by calling e.g. 'delete this' ).
       
    65      *
       
    66      * @since S60 v3.2 
       
    67      */
       
    68     void Release(); 
       
    69     
       
    70     /**
       
    71      * From MLogsExtensionFactory
       
    72      * Creates a logs view extension.
       
    73      *
       
    74      * @since S60 v3.2
       
    75      * @param aId id of the logs view to create the extension
       
    76      *            for.
       
    77      * @param aEngine pbk engine to be provided to extensions.
       
    78      * @param aObserver observer
       
    79      * @return Logs view extension object.
       
    80      */
       
    81     MLogsViewExtension* CreateLogsViewExtensionL
       
    82         ( CPbkContactEngine& aEngine, MLogsExtObserver* aObserver );
       
    83         
       
    84 
       
    85     /**
       
    86      * From MLogsExtensionFactory 
       
    87      * Creates a Logs UI control extension.
       
    88      *
       
    89      * @since S60 v3.2
       
    90      * @return Logs control extension object.
       
    91      */        
       
    92     MLogsUiControlExtension* CreateLogsUiControlExtensionL();
       
    93 
       
    94 
       
    95 private:
       
    96 
       
    97     /**
       
    98      * Symbian second-phase constructor
       
    99      */
       
   100     void ConstructL();
       
   101 
       
   102     /**
       
   103      * Constructor.
       
   104      */
       
   105     CLogsExtensionFactory();
       
   106 
       
   107 
       
   108 private: // data
       
   109 
       
   110     /**
       
   111      * view extension
       
   112      * Own.
       
   113      */
       
   114     CLogsViewExtension* iViewExtension;
       
   115     
       
   116     /** 
       
   117      * app extension
       
   118      * Own.
       
   119      */
       
   120     CLogsUiControlExtension* iControlExtension;    
       
   121 
       
   122     };
       
   123 
       
   124 #endif // C_CLOGSEXTENSIONFACTORY_H