realtimenetprots/sipfw/SIP/Codec/api/sipstrings.h
changeset 0 307788aac0a8
equal deleted inserted replaced
-1:000000000000 0:307788aac0a8
       
     1 /*
       
     2 * Copyright (c) 2004-2009 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 * Name        : sipstrings.h
       
    16 * Part of     : SIP Codec
       
    17 * Interface   : SDK API, SIP Codec API
       
    18 * Version     : SIP/4.0 
       
    19 *
       
    20 */
       
    21 
       
    22 
       
    23 
       
    24 #ifndef SIPSTRINGS_H
       
    25 #define SIPSTRINGS_H
       
    26 
       
    27 //  INCLUDES
       
    28 #include <e32base.h>
       
    29 #include <stringpool.h>
       
    30 
       
    31 // FORWARD DECLARATIONS
       
    32 class CSIPStrings;
       
    33 
       
    34 // CLASS DECLARATION
       
    35 /**
       
    36  * @publishedAll
       
    37  * @released
       
    38  *
       
    39  * This class defines string pool for SIP Codec.
       
    40  * The client of SIP Codec must call OpenL() before 
       
    41  * invoking any function of SIP Codec classes.
       
    42  * The client must close the string pool when finished using
       
    43  * SIP Codec classes.
       
    44  *
       
    45  * @lib sipcodec.lib
       
    46  */
       
    47 class SIPStrings
       
    48 	{
       
    49 	public:	// Constructors and destructor
       
    50  		
       
    51 		/**
       
    52 		* Opens SIP Codec string pool.
       
    53 		* Implemented with a reference count.
       
    54 		*/
       
    55 		IMPORT_C static void OpenL();
       
    56 
       
    57 		/**
       
    58 		* Closes SIP Codec string pool.
       
    59 		* In other words decrements reference count and if it reaches
       
    60 		* zero, closes the string pool.	 
       
    61 		* The user must not call Close() if it has not called OpenL().
       
    62 		*/
       
    63 		IMPORT_C static void Close(); 
       
    64 
       
    65 
       
    66 	public: // New functions
       
    67 	
       
    68 		/**
       
    69 		* Gets a case-insensitive string specified 
       
    70 		* in the original string table.
       
    71 		*
       
    72 		* @param aIndex The string table enumeration value
       
    73 		* @return Initialised RStringF object
       
    74 		*/
       
    75 		IMPORT_C static RStringF StringF(TInt aIndex);
       
    76 
       
    77 		/**
       
    78 		* Gets the string pool used by SIP Codec.
       
    79 		*
       
    80 		* @return RStringPool: A handle to a string pool
       
    81 		*/
       
    82 		IMPORT_C static RStringPool Pool();
       
    83 
       
    84 		/**
       
    85 		* Gets the string table used by SIP Codec.
       
    86 		*
       
    87 		* @return TStringTable&: The string pool table
       
    88 		*/
       
    89 		IMPORT_C static const TStringTable& Table();
       
    90 	
       
    91 	private:
       
    92 
       
    93 		static CSIPStrings* Strings();
       
    94 		};
       
    95 
       
    96 #endif // SIPSTRINGS_H
       
    97 
       
    98 // End of File