phonesrv_plat/cbs_mcn_client_api/inc/CMcnTopicArray.h
changeset 46 2fa1fa551b0b
parent 42 35488577e233
child 48 78df25012fda
equal deleted inserted replaced
42:35488577e233 46:2fa1fa551b0b
     1 /*
       
     2 * Copyright (c) 2003 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:  This file contains the header file of the CMcnTopicArray class.
       
    15 *
       
    16 *                CMcnTopicArray represents a list containing the numbers of CB topics which
       
    17 *                a MCN client to CbsServer has subscribed.
       
    18 *
       
    19 */
       
    20 
       
    21 
       
    22 
       
    23 #ifndef CMCNTOPICARRAY_H
       
    24 #define CMCNTOPICARRAY_H
       
    25 
       
    26 //  INCLUDES
       
    27 
       
    28 #include "e32base.h"
       
    29 
       
    30 //  CLASS DECLARATION
       
    31 
       
    32 /**
       
    33 *      CMcnTopicArray represents a list containing the numbers of CB topics which
       
    34 *      a MCN client to CbsServer has subscribed.
       
    35 */
       
    36 class CMcnTopicArray 
       
    37     : public CBase
       
    38     {
       
    39 public:     // New functions
       
    40 
       
    41     /**
       
    42     *   Returns a new instance of CMcnTopicArray, initially empty.
       
    43     */
       
    44     IMPORT_C static CMcnTopicArray* NewL();
       
    45 
       
    46     /** 
       
    47     *   Destructor. 
       
    48     */
       
    49     ~CMcnTopicArray();
       
    50 
       
    51     /**
       
    52     *   Adds a single CB topic to the topic list.
       
    53     *   Leaves with KErrArgument if the topic number is not in
       
    54     *   valid range. In this implementation, all values
       
    55     *   are accepted.
       
    56     *
       
    57     *   Leave reasons:
       
    58     *       KErrArgument, aTopicNumber not in valid range..
       
    59     *       KErrNoMemory, Out-of-memory occured.
       
    60     *
       
    61     *   @param aTopicNumber Number of subscribed CB topic.
       
    62     */
       
    63     IMPORT_C void AddCbTopicL( TUint16 aTopicNumber );
       
    64 
       
    65     /**
       
    66     *   Returns the number of topic entries in parameter aEntries.
       
    67     *   
       
    68     *   @param aEntries  The number of topic entires
       
    69     */
       
    70     void EnumerateEntries( TUint& aEntries ) const;
       
    71 
       
    72     /**
       
    73     *   Returns the number of topic in aTopicNumber corresponding to the index
       
    74     *   given in aIndex.
       
    75     *
       
    76     *   @param aIndex   Index of the topic number.
       
    77     *   @param aTopicNumber   Topic number corresponding to the given index. 
       
    78     */
       
    79     IMPORT_C void GetTopicNumber( const TUint& aIndex, TUint& aTopicNumber ) const;
       
    80 
       
    81 private:
       
    82     /// Prohibited copy constructor (not implemented).
       
    83     CMcnTopicArray( const CMcnTopicArray& aArray );
       
    84 
       
    85     /// Prohibited assignment operator (not implemented).
       
    86     CMcnTopicArray& operator=( const CMcnTopicArray& aArray );
       
    87 
       
    88     /**
       
    89     *   Default constructor.
       
    90     */
       
    91     CMcnTopicArray();
       
    92 
       
    93     /**
       
    94     *   2nd-phase constructor.
       
    95     */
       
    96     void ConstructL();
       
    97 
       
    98 private:    // data
       
    99     /// Own: contains the list of subscribed topics.
       
   100     CArrayFixFlat< TUint >* iTopicList;
       
   101     };
       
   102 
       
   103 #endif      // __CMCNTOPICARRAY_H
       
   104             
       
   105 // End of File
       
   106 
       
   107