gssettingsuis/Gs/GSFramework/inc/GSBaseDocument.h
branchRCL_3
changeset 25 7e0eff37aedb
parent 0 8c5d936e5675
equal deleted inserted replaced
24:8ee96d21d9bf 25:7e0eff37aedb
       
     1 /*
       
     2 * Copyright (c) 2002-2006 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: 
       
    15 *           Base Document class required by Symbian OS architecture.
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 #ifndef GSBASEDOCUMENT_H
       
    21 #define GSBASEDOCUMENT_H
       
    22 
       
    23 // INCLUDES
       
    24 #include <AknDoc.h>
       
    25 #include <ecom/implementationinformation.h>
       
    26 
       
    27 // CONSTANTS
       
    28 
       
    29 // FORWARD DECLARATIONS
       
    30 class CEikAppUi;
       
    31 class CGSPluginWrapper;
       
    32 class CGSPluginAndViewIdCache;
       
    33 class MGSWatchDog;
       
    34 class CGSWatchDog;
       
    35 
       
    36 
       
    37 // CLASS DECLARATION
       
    38 
       
    39 /**
       
    40 *  CGSBaseDocument application class.
       
    41 *  @since Series60_3.1
       
    42 */
       
    43 class CGSBaseDocument : public CAknDocument
       
    44 {
       
    45     public: // Constructor and destructor
       
    46 
       
    47         /**
       
    48         * Destructor.
       
    49         */
       
    50         IMPORT_C ~CGSBaseDocument();
       
    51 
       
    52     public: // New
       
    53 
       
    54         /**
       
    55         *
       
    56         */
       
    57         IMPORT_C CGSPluginWrapper* NewPluginUnloadWrapperLC();
       
    58 
       
    59         /**
       
    60         *
       
    61         */
       
    62         IMPORT_C void PreparePluginCacheL( CEikAppUi& aAppUi );
       
    63 
       
    64         /**
       
    65         *
       
    66         */
       
    67         IMPORT_C void PrepareForUIDestruction();
       
    68 
       
    69         /**
       
    70         * @return Pointer to GS application-wide watchdog. Does not transfer
       
    71         *         ownership.
       
    72         */
       
    73         IMPORT_C MGSWatchDog* WatchDog();
       
    74 
       
    75         /**
       
    76         * Stored array of GS plugin implementation infos. Use this instead of
       
    77         * repeatedly using REComSession::ListImplementationsL (performance).
       
    78         *
       
    79         * @ return reference to plugin inplementation info array.
       
    80         *          Does not transfer ownership.
       
    81         */
       
    82         IMPORT_C RImplInfoPtrArray GetImplInfo();
       
    83         
       
    84         IMPORT_C void CreateShimmedViewL(const TUid aViewUid);
       
    85 
       
    86     public: // API - but not exported
       
    87         CGSPluginAndViewIdCache& PluginViewIdCache();
       
    88         const CGSPluginAndViewIdCache& PluginViewIdCache() const;
       
    89 
       
    90     protected:
       
    91 
       
    92         /**
       
    93         * C++ constructor
       
    94         */
       
    95         IMPORT_C CGSBaseDocument( CEikApplication& aApp );
       
    96 
       
    97         /**
       
    98         * Second phase constructor
       
    99         */
       
   100         IMPORT_C void ConstructL();
       
   101 
       
   102     private: // Cleanup support
       
   103         static void CleanupPluginWrapperObject( TAny* aWrapper );
       
   104         void DoCleanupPluginWrapper( CGSPluginWrapper* aWrapper );
       
   105         static void PrintImplInfoArray( const RImplInfoPtrArray& aImplInfoArray );
       
   106         static void PrintImplInfo( const CImplementationInformation& aInfo );
       
   107         
       
   108     private: // Data
       
   109 
       
   110         // Plugin view id cache
       
   111         CGSPluginAndViewIdCache* iPluginViewIdCache;
       
   112 
       
   113         // Asynchronous loader for the GS plug-ins.
       
   114         RPointerArray<CGSPluginWrapper> iUnloadWrapperObjects;
       
   115 
       
   116         // Watchdog used GS application-wide. Owned.
       
   117         CGSWatchDog* iWatchDog;
       
   118 
       
   119         // Array of GS plugin implementation info-objects. Array is created on
       
   120         // GS startup for better performance. Use this instead of repeatedly
       
   121         // querying from ECOM.
       
   122         RImplInfoPtrArray iImplInfoArray;
       
   123 };
       
   124 
       
   125 #endif // GSBASEDOCUMENT_H
       
   126 // End of File