1.1 --- a/epoc32/include/sipfromtoheaderbase.h Tue Nov 24 13:55:44 2009 +0000
1.2 +++ b/epoc32/include/sipfromtoheaderbase.h Tue Mar 16 16:12:26 2010 +0000
1.3 @@ -1,1 +1,135 @@
1.4 -sipfromtoheaderbase.h
1.5 +/*
1.6 +* Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
1.7 +* All rights reserved.
1.8 +* This component and the accompanying materials are made available
1.9 +* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
1.10 +* which accompanies this distribution, and is available
1.11 +* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
1.12 +*
1.13 +* Initial Contributors:
1.14 +* Nokia Corporation - initial contribution.
1.15 +*
1.16 +* Contributors:
1.17 +*
1.18 +* Description:
1.19 +* Name : sipfromtoheaderbase.h
1.20 +* Part of : SIP Codec
1.21 +* Interface : SDK API, SIP Codec API
1.22 +* Version : SIP/4.0
1.23 +*
1.24 +*/
1.25 +
1.26 +
1.27 +
1.28 +
1.29 +#ifndef CSIPFROMTOHEADERBASE_H
1.30 +#define CSIPFROMTOHEADERBASE_H
1.31 +
1.32 +// INCLUDES
1.33 +#include "sipparameterheaderbase.h"
1.34 +#include "_sipcodecdefs.h"
1.35 +
1.36 +// FORWARD DECLARATIONS
1.37 +class CSIPAddress;
1.38 +class CSIPFromToHeaderParams;
1.39 +
1.40 +// CLASS DECLARATION
1.41 +/**
1.42 +* @publishedAll
1.43 +* @released
1.44 +*
1.45 +* Class provides functions for setting and getting parameters in SIP "From"
1.46 +* and "To" header.
1.47 +*
1.48 +* This is an abstract class and cannot be instantiated.
1.49 +*
1.50 +* @lib sipcodec.lib
1.51 +*/
1.52 +class CSIPFromToHeaderBase : public CSIPParameterHeaderBase
1.53 + {
1.54 + public: // Constructors and destructor
1.55 +
1.56 + /**
1.57 + * Destructor, deletes the resources of CSIPFromToHeaderBase.
1.58 + */
1.59 + IMPORT_C virtual ~CSIPFromToHeaderBase();
1.60 +
1.61 +
1.62 + public: // New functions
1.63 +
1.64 + /**
1.65 + * Compares this instance to another "From" or "To" header object
1.66 + * @param aHeader a header to compare to
1.67 + * @return ETrue, if the objects are equal otherwise EFalse
1.68 + */
1.69 + IMPORT_C TBool operator==(const CSIPFromToHeaderBase& aHeader) const;
1.70 +
1.71 + /**
1.72 + * Sets the name-address
1.73 + * @pre aSIPAddress != 0
1.74 + * @param aSIPAddress a name-address to set, the ownership is transferred
1.75 + */
1.76 + IMPORT_C void SetSIPAddressL(CSIPAddress* aSIPAddress);
1.77 +
1.78 + /**
1.79 + * Gets the name-address as const
1.80 + * @return name-address object
1.81 + */
1.82 + IMPORT_C const CSIPAddress& SIPAddress() const;
1.83 +
1.84 + /**
1.85 + * Gets the name-address
1.86 + * @return name-address object
1.87 + */
1.88 + IMPORT_C CSIPAddress& SIPAddress();
1.89 +
1.90 +
1.91 + public: // From CSIPHeaderBase, for internal use
1.92 +
1.93 + /**
1.94 + * @internalComponent
1.95 + */
1.96 + TBool HasCompactName() const;
1.97 +
1.98 + /**
1.99 + * @internalComponent
1.100 + */
1.101 + TPreferredPlace PreferredPlaceInMessage() const;
1.102 +
1.103 + protected: // Constructors
1.104 +
1.105 + CSIPFromToHeaderBase();
1.106 + void ConstructL();
1.107 + void ConstructL(CSIPAddress* aSIPAddress);
1.108 + void ConstructL(CSIPAddress* aSIPAddress, const TDesC8& aTag);
1.109 + void ConstructL(const CSIPFromToHeaderBase& aSIPFromToHeaderBase);
1.110 +
1.111 + protected: // New functions
1.112 +
1.113 + void DoInternalizeValueL(RReadStream& aReadStream);
1.114 +
1.115 + private: // From CSIPHeaderBase
1.116 +
1.117 + void ExternalizeValueL(RWriteStream& aWriteStream) const;
1.118 +
1.119 + private: // From CSIPParameterHeaderBase
1.120 +
1.121 + HBufC8* ToTextMandatoryPartLC() const;
1.122 + void ParseMandatoryPartL(const TDesC8& aMandatoryPart);
1.123 + const CSIPParamContainerBase& Params() const;
1.124 + CSIPParamContainerBase& Params();
1.125 +
1.126 + private: // Data
1.127 +
1.128 + CSIPAddress* iSIPAddress;
1.129 + CSIPFromToHeaderParams* iParams;
1.130 +
1.131 +private: // For testing purposes
1.132 +
1.133 + UNIT_TEST(CSIPFromToHeaderTest)
1.134 + };
1.135 +
1.136 +
1.137 +#endif // CSIPFROMTOHEADERBASE_H
1.138 +
1.139 +// End of File