realtimenetprots/sipfw/SIP/Codec/inc/siprequest.h
changeset 0 307788aac0a8
equal deleted inserted replaced
-1:000000000000 0:307788aac0a8
       
     1 /*
       
     2 * Copyright (c) 2005-2009 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 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:
       
    15 * Name        : siprequest.h
       
    16 * Part of     : SIP Codec
       
    17 * Interface   : SIP Codec API
       
    18 * Version     : SIP/4.0 
       
    19 *
       
    20 */
       
    21 
       
    22 
       
    23 
       
    24 
       
    25 /**
       
    26  @internalComponent
       
    27 */
       
    28 
       
    29 #ifndef CSIPREQUEST_H
       
    30 #define CSIPREQUEST_H
       
    31 
       
    32 //  INCLUDES
       
    33 #include "sipmessage.h"
       
    34 #include "_sipcodecdefs.h"
       
    35 
       
    36 // FORWARD DECLARATIONS
       
    37 class CURIContainer;
       
    38 
       
    39 // CLASS DECLARATION
       
    40 /**
       
    41 * Class provides functions for manipulating a SIP request.
       
    42 *
       
    43 * @lib sipcodec.lib
       
    44 */
       
    45 class CSIPRequest : public CSIPMessage
       
    46     {
       
    47     public: // Constructors and destructor
       
    48 
       
    49         /**
       
    50         * Creates a new instance of CSIPRequest
       
    51         * @return new instance of CSIPRequest
       
    52         */
       
    53         IMPORT_C static CSIPRequest* NewL();
       
    54 
       
    55         /**
       
    56         * Creates a new instance of CSIPRequest and pushes it to CleanupStack
       
    57         * @return new instance of CSIPRequest
       
    58         */
       
    59         IMPORT_C static CSIPRequest* NewLC();
       
    60 
       
    61         /**
       
    62         * Creates a new instance of CSIPRequest
       
    63         * @param aMethod a SIP method (has to be a SIP token)
       
    64         * @return new instance of CSIPRequest
       
    65         */
       
    66         IMPORT_C static CSIPRequest* NewL(RStringF aMethod);
       
    67 
       
    68         /**
       
    69         * Creates a new instance of CSIPRequest and pushes it to CleanupStack
       
    70         * @param aMethod a SIP method (has to be a SIP token)
       
    71         * @return new instance of CSIPRequest
       
    72         */
       
    73         IMPORT_C static CSIPRequest* NewLC(RStringF aMethod);
       
    74 
       
    75         /**
       
    76         * Destructor
       
    77         */
       
    78         IMPORT_C ~CSIPRequest();
       
    79 
       
    80     public: // From CSIPMessage
       
    81 
       
    82 		/**
       
    83 		* From CSIPMessage IsRequest
       
    84 		*/
       
    85         IMPORT_C TBool IsRequest() const;
       
    86 
       
    87     public: // New functions
       
    88 
       
    89         /**
       
    90         * Sets the SIP method
       
    91         * @param aMethod a SIP method (has to be a SIP token)
       
    92         */
       
    93         IMPORT_C void SetMethodL(const TDesC8& aMethod);
       
    94         
       
    95         /**
       
    96         * Sets the SIP method
       
    97         * @param aMethod a SIP method (has to be a SIP token)
       
    98         */
       
    99         IMPORT_C void SetMethodL(RStringF aMethod);    
       
   100         
       
   101         /**
       
   102         * Gets the SIP method 
       
   103         * @return the SIP method
       
   104         */
       
   105         IMPORT_C RStringF Method() const;
       
   106 
       
   107     public: // New function, for internal use
       
   108 
       
   109         /**
       
   110         * Sets the request URI
       
   111         * @pre aRequestURI != 0
       
   112         * @param aRequestURI the ownership is transferred
       
   113         */
       
   114         IMPORT_C void SetRequestURIL(CURIContainer* aRequestURI);
       
   115         
       
   116         /**
       
   117         * Gets the request URI
       
   118         * @return the request URI
       
   119         * The ownership is NOT transferred
       
   120         */    
       
   121         IMPORT_C CURIContainer* RequestURI();
       
   122 
       
   123     private: // Constructors
       
   124 
       
   125         CSIPRequest();
       
   126         void ConstructL();
       
   127         void ConstructL(RStringF aMethod);
       
   128 
       
   129     private: // From CSIPMessage
       
   130 
       
   131         HBufC8* ToTextFirstLineLC() const;
       
   132 
       
   133     private: // Data
       
   134 
       
   135         RStringF iMethod;
       
   136         CURIContainer* iRequestURI;
       
   137         };
       
   138 
       
   139 #endif // CSIPREQUEST_H
       
   140 
       
   141 // End of File