1*12720SWyllys.Ingersoll@Sun.COM /*
2*12720SWyllys.Ingersoll@Sun.COM  * CDDL HEADER START
3*12720SWyllys.Ingersoll@Sun.COM  *
4*12720SWyllys.Ingersoll@Sun.COM  * The contents of this file are subject to the terms of the
5*12720SWyllys.Ingersoll@Sun.COM  * Common Development and Distribution License (the "License").
6*12720SWyllys.Ingersoll@Sun.COM  * You may not use this file except in compliance with the License.
7*12720SWyllys.Ingersoll@Sun.COM  *
8*12720SWyllys.Ingersoll@Sun.COM  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9*12720SWyllys.Ingersoll@Sun.COM  * or http://www.opensolaris.org/os/licensing.
10*12720SWyllys.Ingersoll@Sun.COM  * See the License for the specific language governing permissions
11*12720SWyllys.Ingersoll@Sun.COM  * and limitations under the License.
12*12720SWyllys.Ingersoll@Sun.COM  *
13*12720SWyllys.Ingersoll@Sun.COM  * When distributing Covered Code, include this CDDL HEADER in each
14*12720SWyllys.Ingersoll@Sun.COM  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15*12720SWyllys.Ingersoll@Sun.COM  * If applicable, add the following below this CDDL HEADER, with the
16*12720SWyllys.Ingersoll@Sun.COM  * fields enclosed by brackets "[]" replaced with your own identifying
17*12720SWyllys.Ingersoll@Sun.COM  * information: Portions Copyright [yyyy] [name of copyright owner]
18*12720SWyllys.Ingersoll@Sun.COM  *
19*12720SWyllys.Ingersoll@Sun.COM  * CDDL HEADER END
20*12720SWyllys.Ingersoll@Sun.COM  */
21*12720SWyllys.Ingersoll@Sun.COM 
22*12720SWyllys.Ingersoll@Sun.COM /*
23*12720SWyllys.Ingersoll@Sun.COM  * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
24*12720SWyllys.Ingersoll@Sun.COM  */
25*12720SWyllys.Ingersoll@Sun.COM 
26*12720SWyllys.Ingersoll@Sun.COM /**
27*12720SWyllys.Ingersoll@Sun.COM  * \file KMSAgentSoapUtilities.h
28*12720SWyllys.Ingersoll@Sun.COM  */
29*12720SWyllys.Ingersoll@Sun.COM 
30*12720SWyllys.Ingersoll@Sun.COM #ifndef KMSAgentSoapUtilities_h
31*12720SWyllys.Ingersoll@Sun.COM #define KMSAgentSoapUtilities_h
32*12720SWyllys.Ingersoll@Sun.COM 
33*12720SWyllys.Ingersoll@Sun.COM /**
34*12720SWyllys.Ingersoll@Sun.COM  *  maximum length of a network IP address
35*12720SWyllys.Ingersoll@Sun.COM  */
36*12720SWyllys.Ingersoll@Sun.COM static const int g_iMAX_PEER_NETWORK_ADDRESS_LENGTH = 50;
37*12720SWyllys.Ingersoll@Sun.COM 
38*12720SWyllys.Ingersoll@Sun.COM /**
39*12720SWyllys.Ingersoll@Sun.COM  *  maximum length of a soap fault message string
40*12720SWyllys.Ingersoll@Sun.COM  */
41*12720SWyllys.Ingersoll@Sun.COM static const int g_iMAX_SOAP_FAULT_MESSAGE_LENGTH = 256;
42*12720SWyllys.Ingersoll@Sun.COM 
43*12720SWyllys.Ingersoll@Sun.COM //BEN CHANGE - removed predeclaration of struct soap
44*12720SWyllys.Ingersoll@Sun.COM // need the real declaration
45*12720SWyllys.Ingersoll@Sun.COM //struct soap;
46*12720SWyllys.Ingersoll@Sun.COM 
47*12720SWyllys.Ingersoll@Sun.COM /**
48*12720SWyllys.Ingersoll@Sun.COM  *  copies at most g_iMAX_PEER_NETWORK_ADDRESS_LENGTH characters
49*12720SWyllys.Ingersoll@Sun.COM  *  from the peer's network address from the soap runtime context.
50*12720SWyllys.Ingersoll@Sun.COM  *  <code>o_psPeerNetworkAddress</code> should be at least
51*12720SWyllys.Ingersoll@Sun.COM  *  <code>g_iMAX_PEER_NETWORK_ADDRESS_LENGTH</code> in length.
52*12720SWyllys.Ingersoll@Sun.COM  */
53*12720SWyllys.Ingersoll@Sun.COM void GetPeerNetworkAddress( char* const  o_psPeerNetworkAddress,
54*12720SWyllys.Ingersoll@Sun.COM                             struct soap* i_pSoap );
55*12720SWyllys.Ingersoll@Sun.COM 
56*12720SWyllys.Ingersoll@Sun.COM /**
57*12720SWyllys.Ingersoll@Sun.COM  *  creates a soap fault message and stores it in o_psFaultMessage.  The fault message
58*12720SWyllys.Ingersoll@Sun.COM  *  has the form:  " SoapFaultCode=%s SoapFaultString=%s SoapFaultDetail=%s" with the
59*12720SWyllys.Ingersoll@Sun.COM  *  appropriate values substitued for %s from the soap runtime.
60*12720SWyllys.Ingersoll@Sun.COM  *  @param o_psFaultMessage a buffer for the fault message that is at least
61*12720SWyllys.Ingersoll@Sun.COM  *  <code>g_iMAX_SOAP_FAULT_MESSAGE_LENGTH</code> in size.
62*12720SWyllys.Ingersoll@Sun.COM  *  @param i_pstSoap the soap runtime context to process for fault information
63*12720SWyllys.Ingersoll@Sun.COM  */
64*12720SWyllys.Ingersoll@Sun.COM // BEN - removed const
65*12720SWyllys.Ingersoll@Sun.COM void GetSoapFault(char* o_psFaultMessage,
66*12720SWyllys.Ingersoll@Sun.COM                   struct soap *i_pstSoap);
67*12720SWyllys.Ingersoll@Sun.COM 
68*12720SWyllys.Ingersoll@Sun.COM bool PutBinaryIntoSoapBinary(
69*12720SWyllys.Ingersoll@Sun.COM         struct soap* i_pSoap,
70*12720SWyllys.Ingersoll@Sun.COM         const unsigned char* i_pBinary,
71*12720SWyllys.Ingersoll@Sun.COM         int i_iBinarySize,
72*12720SWyllys.Ingersoll@Sun.COM         unsigned char*& o_pSoapBinary,
73*12720SWyllys.Ingersoll@Sun.COM         int& o_iSoapBinarySize );
74*12720SWyllys.Ingersoll@Sun.COM 
75*12720SWyllys.Ingersoll@Sun.COM #endif //KMSAgentSoapUtilities_h
76