S60 3rd Edition API Reference: sipcontenttypeheader.h Source File

sipcontenttypeheader.h

Go to the documentation of this file.
00001 /*
00002 * =============================================================================
00003 *  Name        : sipcontenttypeheader.h
00004 *  Part of     : SIP Codec
00005 *  Interface   : SDK API, SIP Codec API
00006 *  Description : 
00007 *  Version     : SIP/4.0 
00008 *
00009 *  Copyright (c) 2004 Nokia Corporation. 
00010 *  This material, including documentation and any related 
00011 *  computer programs, is protected by copyright controlled by 
00012 *  Nokia Corporation. All rights are reserved. Copying, 
00013 *  including reproducing, storing, adapting or translating, any 
00014 *  or all of this material requires the prior written consent of 
00015 *  Nokia Corporation. This material also contains confidential 
00016 *  information which may not be disclosed to others without the 
00017 *  prior written consent of Nokia Corporation. 
00018 * =============================================================================
00019 */
00020 
00021 
00022 #ifndef CSIPCONTENTTYPEHEADER_H
00023 #define CSIPCONTENTTYPEHEADER_H
00024 
00025 //  INCLUDES
00026 #include "SipParameterHeaderBase.h"
00027 #include "_sipcodecdefs.h"
00028 
00029 // FORWARD DECLARATIONS
00030 class CSIPContentTypeHeaderParams;
00031 
00032 // CLASS DECLARATION
00042 class CSIPContentTypeHeader : public CSIPParameterHeaderBase
00043         {
00044         public: // Constructors and destructor
00045 
00052                 IMPORT_C static CSIPContentTypeHeader* DecodeL(const TDesC8& aValue);
00053 
00060                 IMPORT_C static CSIPContentTypeHeader* 
00061                         NewL(const TDesC8& aMediaType, const TDesC8& aMediaSubtype);
00062 
00070                 IMPORT_C static CSIPContentTypeHeader* 
00071                         NewLC(const TDesC8& aMediaType, const TDesC8& aMediaSubtype);
00072 
00076                 IMPORT_C ~CSIPContentTypeHeader();
00077 
00078         public: // New functions
00079 
00084                 IMPORT_C const TDesC8& MediaType() const;
00085 
00090                 IMPORT_C void SetMediaTypeL(const TDesC8& aMediaType);
00091 
00096                 IMPORT_C const TDesC8& MediaSubtype() const;
00097 
00102                 IMPORT_C void SetMediaSubtypeL(const TDesC8& aMediaSubtype);
00103 
00111                 IMPORT_C static CSIPHeaderBase* 
00112                         InternalizeValueL(RReadStream& aReadStream);
00113 
00114 
00115         public: // From CSIPHeaderBase
00116 
00120                 IMPORT_C CSIPHeaderBase* CloneL() const;
00121 
00125                 IMPORT_C RStringF Name() const;
00126 
00127 
00128         public: // From CSIPHeaderBase, for internal use
00129 
00130                 TBool HasCompactName() const;
00131                 RStringF CompactName() const;
00132                 TPreferredPlace PreferredPlaceInMessage() const;
00133 
00134         public: // New functions, for internal use
00135 
00136                 static RPointerArray<CSIPHeaderBase> BaseDecodeL(const TDesC8& aValue);
00137 
00138         private: // From CSIPHeaderBase
00139 
00140                 void ExternalizeValueL(RWriteStream& aWriteStream) const;
00141 
00142         private: // CSIPParameterHeaderBase
00143 
00144                 HBufC8* ToTextMandatoryPartLC() const;
00145                 void ParseMandatoryPartL(const TDesC8& aMandatoryPart);
00146                 const CSIPParamContainerBase& Params() const;
00147                 CSIPParamContainerBase& Params();
00148 
00149         private: // Constructors
00150 
00151                 CSIPContentTypeHeader();
00152                 void ConstructL();
00153                 void ConstructL(const TDesC8& aMediaType, const TDesC8& aMediaSubtype);
00154                 void ConstructL(const CSIPContentTypeHeader& aContentTypeHeader);
00155 
00156         private: // New functions
00157 
00158                 void DoInternalizeValueL(RReadStream& aReadStream);
00159 
00160         private: // Data
00161 
00162                 HBufC8* iMediaType;
00163                 HBufC8* iMediaSubtype;
00164                 CSIPContentTypeHeaderParams* iParams;
00165 
00166         private: // For testing purposes
00167         
00168                 UNIT_TEST(CSIPContentTypeHeaderTest)
00169         };
00170 
00171 // CSIPCONTENTTYPEHEADER_H
00172 #endif
00173 
00174 // End of File

Copyright © Nokia Corporation 2001-2007
Back to top