(file) Return to utils.h CVS log (file) (dir) Up to [OMI] / omi / unittest

 1 mike  1.1 /*
 2           **==============================================================================
 3           **
 4           ** Open Management Infrastructure (OMI)
 5           **
 6           ** Copyright (c) Microsoft Corporation
 7           ** 
 8           ** Licensed under the Apache License, Version 2.0 (the "License"); you may not 
 9           ** use this file except in compliance with the License. You may obtain a copy 
10           ** of the License at 
11           **
12           **     http://www.apache.org/licenses/LICENSE-2.0 
13           **
14           ** THIS CODE IS PROVIDED *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15           ** KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED 
16           ** WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, 
17           ** MERCHANTABLITY OR NON-INFRINGEMENT. 
18           **
19           ** See the Apache 2 License for the specific language governing permissions 
20           ** and limitations under the License.
21           **
22 mike  1.1 **==============================================================================
23           */
24           
25           #ifndef _unittest_utility_h
26           #define _unittest_utility_h
27           
28 mike  1.2 #include <sock/sock.h>
29 mike  1.1 #include <protocol/protocol.h>
30           #include <string>
31           
32           Sock SockConnectLocal(
33               unsigned short port);
34           
35           void SockSendRecvHTTP(
36               Sock sock,
37               bool useUtf16HeaderAttribute,
38               const std::string& request_body,
39               std::string& response_header,
40               std::string& response_body);
41           
42           
43           /* launching and terminating the server */
44           /* starts server (with or without ignoreAuth option dependin on flag)
45               and creates new connector to it */
46           #define USER "omi"
47           #define PASSWORD "CfgMgr2011"
48           
49           void StartServerAndConnect(
50 mike  1.1     bool ignoreAuth,
51               ProtocolCallback callback,
52               Protocol** protocol);
53           
54           void StopServerAndDisconnect(
55               Protocol** protocol);
56           
57           #endif /* _unittest_utility_h */

ViewCVS 0.9.2