sipxtacklib  Version 3.3
SipRequestContext.h
Go to the documentation of this file.
1 //
2 // Copyright (C) 2004-2006 SIPfoundry Inc.
3 // Licensed by SIPfoundry under the LGPL license.
4 //
5 // Copyright (C) 2004-2006 Pingtel Corp. All rights reserved.
6 // Licensed to SIPfoundry under a Contributor Agreement.
7 //
8 // $$
10 
11 #ifndef _SipRequestContext_h_
12 #define _SipRequestContext_h_
13 
14 // SYSTEM INCLUDES
15 //#include <...>
16 
17 // APPLICATION INCLUDES
18 #include <utl/UtlString.h>
19 #include <utl/UtlDList.h>
20 
21 
22 // DEFINES
23 // MACROS
24 // EXTERNAL FUNCTIONS
25 // EXTERNAL VARIABLES
26 // CONSTANTS
27 // STRUCTS
28 // TYPEDEFS
29 // FORWARD DECLARATIONS
30 
32 
51 {
52 /* //////////////////////////// PUBLIC //////////////////////////////////// */
53 public:
54  static const char* sAUTH_USER;
55  static const char* sAUTH_REALM;
56  static const char* sREQUEST_METHOD;
57  static const char* sSERVER_DOMAIN;
58 
59 /* ============================ CREATORS ================================== */
60 
62 
66  SipRequestContext(const char* requestMethod = NULL);
67  //:Default constructor
68 
69 
70  virtual
72  //:Destructor
73 
74 /* ============================ MANIPULATORS ============================== */
75 
76 /* ============================ ACCESSORS ================================= */
77 
79 
96  UtlBoolean getVariable(const char* name,
97  UtlString& value,
98  int occurance = 0) const;
99 
100 
102 
105  void addVariable( const char* name, const char* value);
106 
108 
111  int toString(UtlString& dumpString);
112 
113 /* ============================ INQUIRY =================================== */
114 
115 /* //////////////////////////// PROTECTED ///////////////////////////////// */
116 protected:
117 
119  UtlBoolean getVariable(int index,
120  UtlString& name,
121  UtlString& value) const;
122 
123 /* //////////////////////////// PRIVATE /////////////////////////////////// */
124 private:
125 
126  SipRequestContext(const SipRequestContext& rSipRequestContext);
127  //:Copy constructor
128  SipRequestContext& operator=(const SipRequestContext& rhs);
129  //:Assignment operator
130 
131  UtlDList mVariableList;
132 };
133 
134 /* ============================ INLINE METHODS ============================ */
135 
136 #endif // _SipRequestContext_h_
UtlBoolean getVariable(const char *name, UtlString &value, int occurance=0) const
Get context variables provided in this request context.
Definition: SipRequestContext.cpp:122
static const char * sAUTH_REALM
Definition: SipRequestContext.h:55
static const char * sSERVER_DOMAIN
Definition: SipRequestContext.h:57
SipRequestContext(const char *requestMethod=NULL)
Constructor.
Definition: SipRequestContext.cpp:32
virtual ~SipRequestContext()
Definition: SipRequestContext.cpp:73
Class Container for context variables for SIP request API.
Definition: SipRequestContext.h:50
int toString(UtlString &dumpString)
Get a string of all the values and names in the SipRequestContext.
Definition: SipRequestContext.cpp:164
void addVariable(const char *name, const char *value)
Add a variable to the context.
Definition: SipRequestContext.cpp:182
static const char * sAUTH_USER
Definition: SipRequestContext.h:54
static const char * sREQUEST_METHOD
Definition: SipRequestContext.h:56

sipXtackLib home page