cbs/cbsui/inc/rcbsui.h
branchRCL_3
changeset 20 987c9837762f
parent 19 7d48bed6ce0c
child 21 0a6dd2dc9970
equal deleted inserted replaced
19:7d48bed6ce0c 20:987c9837762f
     1 /*
       
     2 * Copyright (c) 2010 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 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef RCBSUI_H
       
    20 #define RCBSUI_H
       
    21 
       
    22 // INCLUDE FILES
       
    23 #include <e32base.h>
       
    24 #include <CbsCommon.h>
       
    25 #include <RCbs.h>
       
    26 
       
    27 #include "mcbs.h"
       
    28 
       
    29 
       
    30 // CLASS DECLARATION
       
    31 
       
    32 /**
       
    33 * Delecates calls to RCbs.
       
    34 */
       
    35 class RCbsUi : public MCbs
       
    36     {
       
    37     public: // Constructor and destructor
       
    38 
       
    39         /**
       
    40         * Constructor.
       
    41         */
       
    42         RCbsUi();
       
    43        
       
    44         /**
       
    45         * Destructor.
       
    46         */
       
    47         ~RCbsUi();
       
    48         
       
    49     public: // From MCbs
       
    50 
       
    51         TInt Connect();        
       
    52         void Close();
       
    53         TVersion Version() const;
       
    54         
       
    55         // === Settings-related methods        
       
    56         void GetReceptionStatus( TBool& aStatus );        
       
    57         TInt SetReceptionStatus( TBool aStatus );        
       
    58         void GetTopicDetectionStatus( TBool& aStatus );        
       
    59         TInt SetTopicDetectionStatus( TBool aStatus );        
       
    60         void GetLanguages( TCbsSettingsLanguages& aLanguages );
       
    61         TInt SetLanguages( const TCbsSettingsLanguages& aLanguages );
       
    62         void NotifySettingsChanged( TRequestStatus& aStatus, TCbsSettingsEvent& aEvent );
       
    63         void NotifySettingsChangedCancel();
       
    64         
       
    65         //  === Topic Collection-related methods        
       
    66         void StartCollectionBrowsing();        
       
    67         TBool HasNextCollectionTopic();                            
       
    68         TInt NextCollectionTopic( TCbsTopicInfo& aInfo );
       
    69         
       
    70         //  === Topic list-related methods        
       
    71         void GetTopicCount( TInt& aCount );
       
    72         TInt GetTopic( const TInt aIndex, TCbsTopic& aTopic );
       
    73         TInt FindTopicByNumber( TCbsTopicNumber aNumber, TCbsTopic& aTopic );
       
    74         TInt DeleteTopic( TCbsTopicNumber aNumber );      
       
    75         TInt DeleteAllTopics();
       
    76         TInt AddTopic( TCbsTopic& aTopic );
       
    77         TInt ChangeTopicNameAndNumber( 
       
    78                 TCbsTopicNumber aOldNumber,
       
    79                 TCbsTopicNumber aNewNumber, 
       
    80                 const TCbsTopicName& aName );
       
    81         TInt ChangeTopicSubscriptionStatus( 
       
    82                 TCbsTopicNumber aNumber, TBool aNewStatus );
       
    83         TInt ChangeTopicHotmarkStatus( TCbsTopicNumber aNumber,
       
    84                 TBool aNewStatus );
       
    85         void NotifyOnTopicListEvent( 
       
    86                 TRequestStatus& aStatus, 
       
    87                 const TInt aRequested, 
       
    88                 TCbsTopicListEvent& aEvent, 
       
    89                 TCbsTopicNumber& aNumber );
       
    90         void NotifyOnTopicListEventCancel();
       
    91         TInt GetNewTopicsCount( TInt& aCount );
       
    92         TInt GetLatestTopicNumber( TCbsTopicNumber& aNumber );
       
    93         void GetUnreadMessageCount( TInt& aCount );
       
    94         void GetHotmarkedMessageHandle( TCbsMessageHandle& aMessage );
       
    95         TInt NumberOfUnreadHotmarkedMessages();
       
    96         TInt GetNextAndPrevTopicNumber( 
       
    97             const TCbsTopicNumber& aCurrentTopicNumber,
       
    98             TCbsTopicNumber& aPrevTopicNumber,
       
    99             TCbsTopicNumber& aNextTopicNumber,
       
   100             TInt& aPosition );
       
   101         
       
   102         // === Topic Messages-related methods       
       
   103         TInt GetMessageCount( TCbsTopicNumber aNumber, TInt& aCount );
       
   104         TInt GetMessage( TCbsTopicNumber aNumber, TInt aIndex,
       
   105                 TCbsMessage& aMessage );
       
   106         TInt FindMessageByHandle( 
       
   107                 const TCbsMessageHandle& aHandle, 
       
   108                 TCbsMessage& aMessage );
       
   109         TInt GetMessageIndexByHandle( 
       
   110                 const TCbsMessageHandle& aHandle, TInt& aIndex );
       
   111         TInt DeleteMessage( const TCbsMessageHandle& aHandle );
       
   112         TInt SaveMessage( const TCbsMessageHandle& aHandle );
       
   113         TInt LockMessage( const TCbsMessageHandle& aHandle );
       
   114         TInt ReadMessage( const TCbsMessageHandle& aHandle );
       
   115         TInt GetMessageContents( 
       
   116                 const TCbsMessageHandle& aHandle, 
       
   117                 TDes& aBuffer );
       
   118         TInt GetNextAndPrevMessageHandle(
       
   119                 const TCbsMessageHandle& aCurrentMsgHandle,
       
   120                 TCbsMessageHandle& aPrevMsgHandle,
       
   121                 TCbsMessageHandle& aNextMsgHandle,
       
   122                 TInt& aPosition );
       
   123         
       
   124         // Other methods
       
   125         TBool Connected() const;
       
   126         void Shutdown() const;
       
   127 
       
   128     private: // Data
       
   129 
       
   130         // Real cbs client
       
   131         RCbs iServer;
       
   132         
       
   133     };
       
   134     
       
   135 #endif // RCBSUI_H
       
   136 
       
   137 // End of file