idlefw/plugins/devicestatus/inc/aidevicestatuscontentobserver.h
changeset 0 79c6a41cd166
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:  Device status content publisher
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef M_AIDEVICESTATUSCONTENTOBSERVER_H
       
    20 #define M_AIDEVICESTATUSCONTENTOBSERVER_H
       
    21 
       
    22 
       
    23 class MAiDeviceStatusPublisher;
       
    24 
       
    25 /**
       
    26  *  @ingroup group_devicestatusplugin
       
    27  *
       
    28  *  Device status content publisher.
       
    29  *
       
    30  *  All of the publishers uses this interface to publish content.
       
    31  *
       
    32  *  @since S60 3.2
       
    33  */
       
    34 class MAiDeviceStatusContentObserver
       
    35     {
       
    36 
       
    37 protected:
       
    38     /**
       
    39      * Virtual destructor.
       
    40      *
       
    41      * This cannot be used to destroy observer object.
       
    42      */
       
    43      virtual ~MAiDeviceStatusContentObserver() {};
       
    44 
       
    45 public:
       
    46 
       
    47     /**
       
    48      * Publish unicode text.
       
    49      *
       
    50      * @since S60 3.2
       
    51      * @param aPublisher is reference to publisher which is publishing.
       
    52      * @param aContent is content id.
       
    53      * @param aText is published text.
       
    54      * @param aPriority is priority of the content.
       
    55      * @return KErrNone if publish is successful, otherwise system wide error code.
       
    56      */
       
    57     virtual TInt Publish( MAiDeviceStatusPublisher& aPublisher, TInt aContent,
       
    58                           const TDesC16& aText, TInt aPriority ) = 0;
       
    59 
       
    60     /**
       
    61      * Publish data buffer.
       
    62      *
       
    63      * @since S60 3.2
       
    64      * @param aPublisher is reference to publisher which is publishing.
       
    65      * @param aContent is content id.
       
    66      * @param aBuf is data buffer.
       
    67      * @param aPriority is priority of the content.
       
    68      * @return KErrNone if publish is successful, otherwise system wide error code.
       
    69      */
       
    70     virtual TInt Publish( MAiDeviceStatusPublisher& aPublisher, TInt aContent,
       
    71                           const TDesC8& aBuf, TInt aPriority ) = 0;
       
    72 
       
    73     /**
       
    74      * Publish resource.
       
    75      *
       
    76      * @since S60 3.2
       
    77      * @param aPublisher is reference to publisher which is publishing.
       
    78      * @param aContent is content id.
       
    79      * @param aResource is resource id.
       
    80      * @param aPriority is priority of the content.
       
    81      * @return KErrNone if publish is successful, otherwise system wide error code.
       
    82      */
       
    83     virtual TInt Publish( MAiDeviceStatusPublisher& aPublisher, TInt aContent,
       
    84                           TInt aResource, TInt aPriority ) = 0;
       
    85 
       
    86     /**
       
    87      * Clean content.
       
    88      *
       
    89      * @since S60 3.2
       
    90      * @param aPublisher is reference to publisher which is publishing.
       
    91      * @param aContent is content id.
       
    92      * @param aPriority is priority of the content.
       
    93      * @return KErrNone if publish is successful, otherwise system wide error code.
       
    94      */
       
    95     virtual TInt Clean( MAiDeviceStatusPublisher& aPublisher, TInt aContent, TInt aPriority ) = 0;
       
    96 
       
    97     };
       
    98 
       
    99 
       
   100 #endif // M_AIDEVICESTATUSCONTENTOBSERVER_H