×
Namespaces

Variants
Actions
Revision as of 04:01, 15 June 2012 by hamishwillee (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Archived:Using SIP-ETag Extension values in a SIP request

From Nokia Developer Wiki
Jump to: navigation, search

Archived.pngArchived: This article is archived because it is not considered relevant for third-party developers creating commercial solutions today. If you think this article is still relevant, let us know by adding the template {{ReviewForRemovalFromArchive|user=~~~~|write your reason here}}.




Article Metadata
Compatibility
Platform(s): S60 3rd Edition
S60 3rd Edition (initial release)
Article
Created: User:Technical writer 1 (14 Sep 2007)
Last edited: hamishwillee (15 Jun 2012)

Overview

The SIP-ETag header field identifies the published event state. It is used by the server in response to a PUBLISH request in order to convey a unique entity tag for the published state. The client may then use this tag in a Sip-If-Match header to update the previously published state.


Solution

Getting the Extension header value

Use UserHeadersL() of CSIPMessageElements class to set the extension header value.

If the response for the request is 200 OK, you can get the SIP-ETag value using the code below.

   RStringF aExtHeaderName;
   RPointerArray<CSIPHeaderBase> headers;
   CSIPHeaderBase::PushLC(&headers);
   headers = iMessageElements->UserHeadersL(aExtHeaderName);
   CleanupStack::PopAndDestroy(); // headers
   

where iMessageElements is a pointer to CSIPMessageElements class.


Setting the extension header value

Use SetUserHeadersL() of the CSIPMessageElements class to set the extension header value.

While sending the re-PUBLISH request, you can set the SIP-If-Match header value using

   RPointerArray<CSIPHeaderBase> headers;
   CSIPHeaderBase::PushLC(&headers);
   CSIPExtensionHeader* header2 = 
       CSIPExtensionHeader::NewLC(iExtHeaderName.DesC(),_L8("value2"));
   User::LeaveIfError(headers.Append(header2));
   CleanupStack::Pop(2); // header2 & headers

   // Set E-Tag header value 
   iMessageElements->SetUserHeadersL(headers);
This page was last modified on 15 June 2012, at 04:01.
51 page views in the last 30 days.
×