idlefw/plugins/devicestatus/inc/aidevicestatuspublisher.h
changeset 0 79c6a41cd166
child 8 d0529222e3f0
equal deleted inserted replaced
-1:000000000000 0:79c6a41cd166
       
     1 /*
       
     2 * Copyright (c) 2005-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:  Interface for device status publisher.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef M_AIDEVICESTATUSPUBLISHER_H
       
    20 #define M_AIDEVICESTATUSPUBLISHER_H
       
    21 
       
    22 #include <e32std.h>
       
    23 #include "aicontentobserver.h"
       
    24 
       
    25 class MAiPublishPrioritizer;
       
    26 class MAiPublisherBroadcaster;
       
    27 
       
    28 /**
       
    29  *  @ingroup group_devicestatusplugin
       
    30  *
       
    31  *  Interface for device status publisher.
       
    32  *
       
    33  *  @since S60 3.2
       
    34  */
       
    35 class MAiDeviceStatusPublisher
       
    36     {
       
    37 
       
    38 public:
       
    39     /**
       
    40      * Virtual destructor.
       
    41      *
       
    42      * Publisher can be destroyed through this interface.
       
    43      */
       
    44     virtual ~MAiDeviceStatusPublisher() {};
       
    45 
       
    46     /**
       
    47      * Subscribe content observer.
       
    48      *
       
    49      * @param aObserver is reference to content observer.
       
    50      * @param aExtension is reference to property extension.
       
    51      * @param aPrioritizer is reference to publish prioritizer.
       
    52      * @param aBroadcaster is reference for publisher broadcaster.
       
    53      */
       
    54     virtual void Subscribe( MAiContentObserver& aObserver, 
       
    55                             MAiPropertyExtension& aExtension,
       
    56                             MAiPublishPrioritizer& aPrioritizer,
       
    57                             MAiPublisherBroadcaster& aBroadcaster ) = 0;
       
    58 
       
    59     /**
       
    60      * Resume publisher.
       
    61      *
       
    62      * Publisher publishes content if it is available.
       
    63      */
       
    64     virtual void ResumeL() = 0;
       
    65 
       
    66     /**
       
    67      * Refresh publisher.
       
    68      *
       
    69      * This has the same effect as the publisher would get content update from system.
       
    70      * Publisher publishes content if it is available.
       
    71      * @param aClean ETrue if current content needs to be cleaned.
       
    72      */
       
    73     virtual void RefreshL( TBool aClean ) = 0;
       
    74     
       
    75     /**
       
    76      * Refresh specific content.
       
    77      *
       
    78      * This has the same effect as the publisher would get content update from system.
       
    79      * Publisher publishes content if it is available.
       
    80      * @param aContentId Id of the content item that is requested to republish.
       
    81      * @param aClean ETrue if current content needs to be cleaned.
       
    82      * @return true if content was republished.
       
    83      */
       
    84     virtual TBool RefreshL( TInt /*aContentId*/, TBool /*aClean*/ ) { return EFalse; }
       
    85 
       
    86     /**
       
    87      * Refresh specific content with specific priority.
       
    88      *
       
    89      * This has the same effect as the publisher would get content update from system.
       
    90      * Publisher publishes content if it is available and has correct priority.
       
    91      * @param aContentId Id of the content item that is requested to republish.
       
    92      * @param aPriority Priority of the content that needs to be refreshed.
       
    93      * @return true if content was republished.
       
    94      */
       
    95     virtual TBool RefreshContentWithPriorityL( TInt /*aContentId*/, TInt /*aPriority*/ ) { return EFalse; }
       
    96     };
       
    97 
       
    98 
       
    99 #endif // M_AIDEVICESTATUSPUBLISHER_H