Msrp/MsrpHeader/inc/CMsrpMessageIdHeader.h
branchMSRP_FrameWork
changeset 25 505ad3f0ce5c
equal deleted inserted replaced
22:f1578314b8da 25:505ad3f0ce5c
       
     1 /*
       
     2 * Copyright (c) 2009-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 * Initial Contributors:
       
     9 * Nokia Corporation - initial contribution.
       
    10 * Contributors:
       
    11 *
       
    12 * Description:
       
    13 * MSRP Implementation
       
    14 *
       
    15 */
       
    16 
       
    17 #ifndef CMSRPMESSAGEIDHEADER_H
       
    18 #define CMSRPMESSAGEIDHEADER_H
       
    19 
       
    20 //  INCLUDES
       
    21 #include "CMsrpHeaderBase.h"
       
    22 
       
    23 // CLASS DECLARATION
       
    24 /**
       
    25 * @publishedAll
       
    26 *
       
    27 * Class provides functions for setting and getting MSRP "Message-ID" header field
       
    28 *
       
    29 * @lib msrpclient.lib
       
    30 */
       
    31 class CMSRPMessageIdHeader : public CMSRPHeaderBase
       
    32 	{
       
    33 	public:	// Constructors and destructor
       
    34 
       
    35 		/**
       
    36 		* Creates a new instance of CMSRMessageIdHeader
       
    37 		* @param aMessageId unique message identifier
       
    38 		* @return a new instance of CMSRPMessageIdHeader
       
    39 		*/
       
    40 		IMPORT_C static CMSRPMessageIdHeader* NewL( const TDesC8& aMessageId );
       
    41 
       
    42 		/**
       
    43 		* Creates a new instance of CMSRPMessageIdHeader and puts it to CleanupStack
       
    44 		* @param aMessageId unique message identifier
       
    45 		* @return a new instance of CMSRPMessageIdHeader
       
    46 		*/
       
    47 		IMPORT_C static CMSRPMessageIdHeader* NewLC( const TDesC8& aMessageId );
       
    48 
       
    49 		/**
       
    50 		* Creates a new instance of CMSRMessageIdHeader
       
    51 		* @return a new instance of CMSRPMessageIdHeader
       
    52 		*/
       
    53 		static CMSRPMessageIdHeader* NewL( );
       
    54 
       
    55 		/**
       
    56 		* Destructor, deletes the resources of CMSRPMessageIdHeader.
       
    57 		*/
       
    58 		IMPORT_C ~CMSRPMessageIdHeader();
       
    59 
       
    60 	public: // New functions
       
    61 
       
    62 		/**
       
    63 		* Constructs an instance of a CMSRPMessageIdHeader from a RReadStream
       
    64 		* @param aReadStream a stream containing the value of the
       
    65 		*        externalized object (header name not included).
       
    66 		* @return an instance of a CMSRPMessageIdHeader
       
    67 		*/
       
    68 		IMPORT_C static CMSRPMessageIdHeader*
       
    69 			InternalizeValueL( RReadStream& aReadStream );
       
    70 
       
    71 	public: // From CMSRPHeaderBase
       
    72 
       
    73 		IMPORT_C void ExternalizeValueL( RWriteStream& aWriteStream ) const;
       
    74 
       
    75 	protected: // From CMSRPHeaderBase
       
    76 
       
    77 		RStringF Name() const;
       
    78 		HBufC8* ToTextValueL() const;
       
    79 
       
    80 	private: // Constructors
       
    81 
       
    82 	    /**
       
    83 	     * Constructor.
       
    84 	     */
       
    85 		CMSRPMessageIdHeader();
       
    86 
       
    87 	    /**
       
    88 	     * Two-phased constructor.
       
    89 		 * @param aMessageId unique message identifier
       
    90 	     */
       
    91         void ConstructL( const TDesC8& aMessageId );
       
    92 
       
    93 	    /**
       
    94 	     * Two-phased constructor.
       
    95 	     */
       
    96         void ConstructL( );
       
    97 
       
    98 	private: // new functions
       
    99 
       
   100 	    /**
       
   101 		* Internalize external object data
       
   102 		* @param aReadStream a stream containing the value of the
       
   103 		*        externalized object (header name not included).
       
   104 		*/
       
   105 		void DoInternalizeValueL( RReadStream& aReadStream );
       
   106 
       
   107   	private: // variables
       
   108 
       
   109 		// value as a string
       
   110 		HBufC8* iIdValue;
       
   111 
       
   112 	};
       
   113 
       
   114 #endif // CMSRPMESSAGEIDHEADER_H
       
   115 
       
   116 // End of File