realtimenetprots/sipfw/SIP/Codec/src/CSIPProxyAuthenticateHeader.cpp
changeset 0 307788aac0a8
equal deleted inserted replaced
-1:000000000000 0:307788aac0a8
       
     1 // Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     2 // All rights reserved.
       
     3 // This component and the accompanying materials are made available
       
     4 // under the terms of "Eclipse Public License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 // Name          : CSIPProxyAuthenticateHeader.cpp
       
    15 // Part of       : SIP Codec
       
    16 // Version       : SIP/5.0 
       
    17 //
       
    18 
       
    19 
       
    20 
       
    21 #include "sipproxyauthenticateheader.h"
       
    22 #include "sipstrings.h"
       
    23 #include "sipstrconsts.h"
       
    24 #include "_sipcodecdefs.h"
       
    25 
       
    26 
       
    27 // ----------------------------------------------------------------------------
       
    28 // CSIPProxyAuthenticateHeader::DecodeL
       
    29 // ----------------------------------------------------------------------------
       
    30 //
       
    31 EXPORT_C CSIPProxyAuthenticateHeader* CSIPProxyAuthenticateHeader::DecodeL(
       
    32     const TDesC8& aValue)
       
    33 	{
       
    34 	CSIPProxyAuthenticateHeader* header = 
       
    35 		new(ELeave)CSIPProxyAuthenticateHeader;
       
    36     CleanupStack::PushL(header);
       
    37     header->CSIPAuthenticateHeaderBase::ConstructL();
       
    38 	header->ParseL(aValue);
       
    39 	CleanupStack::Pop(header);
       
    40 	return header;
       
    41 	}
       
    42 
       
    43 // ----------------------------------------------------------------------------
       
    44 // CSIPProxyAuthenticateHeader::NewL
       
    45 // ----------------------------------------------------------------------------
       
    46 //
       
    47 EXPORT_C CSIPProxyAuthenticateHeader* CSIPProxyAuthenticateHeader::NewL(
       
    48     RStringF aAuthScheme)
       
    49 	{
       
    50 	CSIPProxyAuthenticateHeader* self = 
       
    51 		CSIPProxyAuthenticateHeader::NewLC(aAuthScheme);
       
    52 	CleanupStack::Pop(self);
       
    53 	return self;
       
    54 	}
       
    55 	
       
    56 // ----------------------------------------------------------------------------
       
    57 // CSIPProxyAuthenticateHeader::NewLC
       
    58 // ----------------------------------------------------------------------------
       
    59 //
       
    60 EXPORT_C CSIPProxyAuthenticateHeader* CSIPProxyAuthenticateHeader::NewLC(
       
    61     RStringF aAuthScheme)
       
    62 	{
       
    63 	CSIPProxyAuthenticateHeader* self = new(ELeave)CSIPProxyAuthenticateHeader;
       
    64 	CleanupStack::PushL(self);
       
    65 	self->CSIPAuthHeaderBase::ConstructL(aAuthScheme);
       
    66     self->ConstructL();
       
    67 	return self;
       
    68 	}
       
    69 
       
    70 // ----------------------------------------------------------------------------
       
    71 // CSIPProxyAuthenticateHeader::CSIPProxyAuthenticateHeader
       
    72 // ----------------------------------------------------------------------------
       
    73 //
       
    74 CSIPProxyAuthenticateHeader::CSIPProxyAuthenticateHeader()
       
    75 	{
       
    76 	}
       
    77 
       
    78 // ----------------------------------------------------------------------------
       
    79 // CSIPProxyAuthenticateHeader::~CSIPProxyAuthenticateHeader
       
    80 // ----------------------------------------------------------------------------
       
    81 //
       
    82 EXPORT_C CSIPProxyAuthenticateHeader::~CSIPProxyAuthenticateHeader()
       
    83 	{
       
    84 	}
       
    85 
       
    86 // ----------------------------------------------------------------------------
       
    87 // CSIPProxyAuthenticateHeader::CloneL
       
    88 // From CSIPHeaderBase:
       
    89 // ----------------------------------------------------------------------------
       
    90 //
       
    91 EXPORT_C CSIPHeaderBase* CSIPProxyAuthenticateHeader::CloneL() const
       
    92 	{
       
    93 	CSIPProxyAuthenticateHeader* clone = new(ELeave)CSIPProxyAuthenticateHeader;
       
    94 	CleanupStack::PushL(clone);
       
    95 	clone->ConstructL(*this);
       
    96 	CleanupStack::Pop(clone);
       
    97 	return clone;
       
    98 	}
       
    99 
       
   100 // ----------------------------------------------------------------------------
       
   101 // CSIPProxyAuthenticateHeader::Name
       
   102 // From CSIPHeaderBase:
       
   103 // ----------------------------------------------------------------------------
       
   104 //
       
   105 EXPORT_C RStringF CSIPProxyAuthenticateHeader::Name() const
       
   106 	{
       
   107 	return SIPStrings::StringF(SipStrConsts::EProxyAuthenticateHeader);
       
   108 	}
       
   109 
       
   110 // -----------------------------------------------------------------------------
       
   111 // CSIPProxyAuthenticateHeader::BaseDecodeL
       
   112 // -----------------------------------------------------------------------------
       
   113 //
       
   114 RPointerArray<CSIPHeaderBase> 
       
   115 CSIPProxyAuthenticateHeader::BaseDecodeL(const TDesC8& aValue)
       
   116 	{
       
   117 	CSIPProxyAuthenticateHeader* header = DecodeL(aValue);
       
   118 	CleanupStack::PushL (header);
       
   119 	RPointerArray<CSIPHeaderBase> headers;
       
   120 	User::LeaveIfError(headers.Append(header));
       
   121 	CleanupStack::Pop(header);
       
   122 	return headers;
       
   123 	}
       
   124 
       
   125 // ----------------------------------------------------------------------------
       
   126 // CSIPProxyAuthenticateHeader::InternalizeValueL
       
   127 // ----------------------------------------------------------------------------
       
   128 //
       
   129 CSIPHeaderBase* CSIPProxyAuthenticateHeader::InternalizeValueL(
       
   130     RReadStream& aReadStream)
       
   131 	{
       
   132 	CSIPProxyAuthenticateHeader* self = new(ELeave)CSIPProxyAuthenticateHeader;
       
   133 	CleanupStack::PushL(self);
       
   134 	self->DoInternalizeValueL(aReadStream);
       
   135 	CleanupStack::Pop(self);
       
   136 	return self;
       
   137 	}