idlefw/plugins/devicestatus/inc/aimulticontentobserver.h
changeset 0 79c6a41cd166
child 3 ff572005ac23
equal deleted inserted replaced
-1:000000000000 0:79c6a41cd166
       
     1 /*
       
     2 * Copyright (c) 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:  Active Idle Content Observer interface multiplexer interface.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef C_AIMULTICONTENTOBSERVER_H
       
    20 #define C_AIMULTICONTENTOBSERVER_H
       
    21 
       
    22 
       
    23 #include <e32base.h>
       
    24 #include "aicontentobserver.h"
       
    25 
       
    26 
       
    27 // Forward declarations
       
    28 class CAiContentObserverOptimizer;
       
    29 /**
       
    30  *  @ingroup group_devicestatusplugin
       
    31  *
       
    32  * Active Idle Content Observer interface multiplexer.
       
    33  *
       
    34  * @see MAiContentObserver
       
    35  * @since S60 3.2
       
    36  */
       
    37 class CAiMultiContentObserver : 
       
    38         public CBase,
       
    39         public MAiContentObserver
       
    40     {
       
    41 public:
       
    42     static CAiMultiContentObserver* NewL();
       
    43     ~CAiMultiContentObserver();
       
    44     
       
    45     /**
       
    46      * Adds a new observer to this multiplexer.
       
    47      */
       
    48     void AddObserverL(MAiContentObserver& aObserver);
       
    49 
       
    50 //from base class MAiContentObserver
       
    51     TInt StartTransaction( TInt aTxId );
       
    52     TInt Commit( TInt aTxId );
       
    53     TInt CancelTransaction( TInt aTxId );
       
    54     TBool CanPublish( MAiPropertyExtension& aPlugin, TInt aContent, TInt aIndex );
       
    55     TInt Publish( MAiPropertyExtension& aPlugin, TInt aContent,
       
    56                   TInt aResource, TInt aIndex );
       
    57     TInt Publish( MAiPropertyExtension& aPlugin, TInt aContent,
       
    58                   const TDesC16& aText, TInt aIndex );
       
    59     TInt Publish( MAiPropertyExtension& aPlugin, TInt aContent,
       
    60                   const TDesC8& aBuf, TInt aIndex );
       
    61     TInt Publish( MAiPropertyExtension& aPlugin, TInt aContent,
       
    62                   RFile& aFile, TInt aIndex );
       
    63     TInt Clean( MAiPropertyExtension& aPlugin, TInt aContent, TInt aIndex );
       
    64     TAny* Extension( TUid aUid );
       
    65     TBool RequiresSubscription( const TAiPublisherInfo& aPublisherInfo ) const;
       
    66 
       
    67 private:
       
    68     CAiMultiContentObserver();
       
    69     void ConstructL();
       
    70 
       
    71 private: // data
       
    72     /**
       
    73      * Array of observers.
       
    74      * Own.
       
    75      */
       
    76     RPointerArray<CAiContentObserverOptimizer> iObserverOptimizers;
       
    77 
       
    78     };
       
    79 
       
    80 
       
    81 #endif // C_AIMULTICONTENTOBSERVER_H