idlefw/plugins/devicestatus/inc/aimulticontentobserver.h
branchRCL_3
changeset 114 a5a39a295112
equal deleted inserted replaced
113:0efa10d348c0 114:a5a39a295112
       
     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 // System includes
       
    23 #include <e32base.h>
       
    24 
       
    25 // User includes
       
    26 #include "aicontentobserver.h"
       
    27 
       
    28 // Forward declarations
       
    29 class CAiContentObserverOptimizer;
       
    30 class CHsContentPublisher;
       
    31 
       
    32 /**
       
    33  *  @ingroup group_devicestatusplugin
       
    34  *
       
    35  * Active Idle Content Observer interface multiplexer.
       
    36  *
       
    37  * @see MAiContentObserver
       
    38  * @since S60 3.2
       
    39  */
       
    40 NONSHARABLE_CLASS( CAiMultiContentObserver ) : public CBase,         
       
    41     public MAiContentObserver
       
    42     {
       
    43 public:
       
    44     static CAiMultiContentObserver* NewL();
       
    45     ~CAiMultiContentObserver();
       
    46     
       
    47     /**
       
    48      * Adds a new observer to this multiplexer.
       
    49      */
       
    50     void AddObserverL(MAiContentObserver& aObserver);
       
    51 
       
    52 //from base class MAiContentObserver
       
    53     TInt StartTransaction( TInt aTxId );
       
    54     TInt Commit( TInt aTxId );
       
    55     TInt CancelTransaction( TInt aTxId );
       
    56     TBool CanPublish( CHsContentPublisher& aPlugin, TInt aContent, TInt aIndex );
       
    57     TInt Publish( CHsContentPublisher& aPlugin, TInt aContent,
       
    58                   TInt aResource, TInt aIndex );
       
    59     TInt Publish( CHsContentPublisher& aPlugin, TInt aContent,
       
    60                   const TDesC16& aText, TInt aIndex );
       
    61     TInt Publish( CHsContentPublisher& aPlugin, TInt aContent,
       
    62                   const TDesC8& aBuf, TInt aIndex );
       
    63     TInt Publish( CHsContentPublisher& aPlugin, TInt aContent,
       
    64                   RFile& aFile, TInt aIndex );
       
    65     TInt Clean( CHsContentPublisher& aPlugin, TInt aContent, TInt aIndex );
       
    66     TAny* Extension( TUid aUid );
       
    67     TBool RequiresSubscription( const THsPublisherInfo& aPublisherInfo ) const;
       
    68 
       
    69     TInt SetProperty( CHsContentPublisher& aPlugin,
       
    70                const TDesC8& aElementId,
       
    71                const TDesC8& aPropertyName,
       
    72                const TDesC8& aPropertyValue );
       
    73        
       
    74     TInt SetProperty( CHsContentPublisher& aPlugin,
       
    75                const TDesC8& aElementId,
       
    76                const TDesC8& aPropertyName,
       
    77                const TDesC8& aPropertyValue,  
       
    78                MAiContentObserver::TValueType aValueType);
       
    79 
       
    80     void ClearBlackList();
       
    81     
       
    82 private:
       
    83     CAiMultiContentObserver();
       
    84     void ConstructL();
       
    85 
       
    86 private: // data
       
    87     /**
       
    88      * Array of observers.
       
    89      * Own.
       
    90      */
       
    91     RPointerArray<CAiContentObserverOptimizer> iObserverOptimizers;
       
    92 
       
    93     };
       
    94 
       
    95 
       
    96 #endif // C_AIMULTICONTENTOBSERVER_H