sipxtacklib  Version 3.3
XmlRpcRequest.h
Go to the documentation of this file.
1 //
2 // Copyright (C) 2006-2011 SIPez LLC. All rights reserved.
3 //
4 // Copyright (C) 2004-2006 SIPfoundry Inc.
5 // Licensed by SIPfoundry under the LGPL license.
6 //
7 // Copyright (C) 2004-2006 Pingtel Corp. All rights reserved.
8 // Licensed to SIPfoundry under a Contributor Agreement.
9 //
10 // $$
12 
13 #ifndef _XMLRPCREQUEST_H_
14 #define _XMLRPCREQUEST_H_
15 
16 // SYSTEM INCLUDES
17 
18 // APPLICATION INCLUDES
19 #include <utl/UtlString.h>
20 #include <utl/UtlSList.h>
21 #include <utl/UtlHashMap.h>
22 #include "net/Url.h"
23 #include "net/HttpMessage.h"
24 #include "net/XmlRpcBody.h"
25 #include "net/XmlRpcResponse.h"
26 
27 // DEFINES
28 // MACROS
29 // EXTERNAL FUNCTIONS
30 // EXTERNAL VARIABLES
31 // CONSTANTS
32 const int XML_RPC_TIMEOUT = 5*1000;
33 
34 // STRUCTS
35 // TYPEDEFS
36 
37 // FORWARD DECLARATIONS
38 class ResultSetRpcTest; // unit test - see sipXcommserverLib/src/test/ResultSetRpcTest.cpp
39 
74 {
75 /* //////////////////////////// PUBLIC //////////////////////////////////// */
76 public:
77 
78  friend class XmlRpcTest;
79 
80 /* ============================ CREATORS ================================== */
81 
83  XmlRpcRequest(Url& uri,
84  const char* methodName
85  );
86 
88  virtual ~XmlRpcRequest();
89 
91  bool execute(XmlRpcResponse& response,
92  int timeoutMilliSeconds = XML_RPC_TIMEOUT,
93  UtlBoolean usePersistentConnections = TRUE);
104 /* ============================ MANIPULATORS ============================== */
105 
107  bool addParam(UtlContainable* value);
108 
109 /* ============================ ACCESSORS ================================= */
110 
111 
112 /* ============================ INQUIRY =================================== */
113 
114 /* //////////////////////////// PROTECTED ///////////////////////////////// */
115 protected:
116  friend class ResultSetRpcTest;
117 
118 /* //////////////////////////// PRIVATE /////////////////////////////////// */
119 private:
120 
122  Url mUrl;
127  HttpMessage* mpHttpRequest;
129 
131  XmlRpcBody* mpRequestBody;
132 
134  XmlRpcRequest(const XmlRpcRequest& rXmlRpcRequest);
135 
137  XmlRpcRequest& operator=(const XmlRpcRequest& rhs);
138 };
139 
140 /* ============================ INLINE METHODS ============================ */
141 
142 #endif // _XMLRPCREQUEST_H_
143 
144 
virtual ~XmlRpcRequest()
Destructor.
Definition: XmlRpcRequest.cpp:54
HTTP message container.
Definition: HttpMessage.h:191
XmlRpcRequest(Url &uri, const char *methodName)
Contruct an XML-RPC request for a given method.
Definition: XmlRpcRequest.cpp:30
friend class ResultSetRpcTest
Definition: XmlRpcRequest.h:116
const int XML_RPC_TIMEOUT
Definition: XmlRpcRequest.h:32
This class contains all the contents presented in a XML-RPC body.
Definition: XmlRpcBody.h:87
This object is used to create a XML-RPC response to a XmlRpcRequest request.
Definition: XmlRpcResponse.h:57
URL parser and constructor.
Definition: Url.h:90
This object is used to create a XML-RPC request to a specific remote XML-RPC server.
Definition: XmlRpcRequest.h:73
friend class XmlRpcTest
Definition: XmlRpcRequest.h:78
bool execute(XmlRpcResponse &response, int timeoutMilliSeconds=XML_RPC_TIMEOUT, UtlBoolean usePersistentConnections=TRUE)
Execute the named procedure on the remote server.
Definition: XmlRpcRequest.cpp:63
bool addParam(UtlContainable *value)
Add an atomic param to the XML-RPC request.
Definition: XmlRpcRequest.cpp:127

sipXtackLib home page