/* soapClient.cpp
   Generated by gSOAP 2.7.0d from soapheader.h
   Copyright (C) 2001-2004 Genivia, Inc. All Rights Reserved.
   This software is released under one of the following three licenses:
   GPL, the gSOAP public license, or Genivia's license for commercial use.
   See README.txt for further details.
*/
#include "soapH.h"

SOAP_BEGIN_NAMESPACE(soap)

SOAP_SOURCE_STAMP("@(#) soapClient.cpp ver 2.7.0d 2006-06-16 13:36:41 GMT")


SOAP_FMAC5 int SOAP_FMAC6 soap_call_klftbridge_CreateReceiver(struct soap *soap, const char *URL, const char *action, bool useUpdaterFolder, struct klftbridge_CreateReceiverResponse &r)
{
	struct klftbridge_CreateReceiver soap_tmp_klftbridge_CreateReceiver;
	soap->encodingStyle = NULL;
	soap_tmp_klftbridge_CreateReceiver.useUpdaterFolder=useUpdaterFolder;
	soap_begin(soap);
	soap_serializeheader(soap);
	soap_serialize_klftbridge_CreateReceiver(soap, &soap_tmp_klftbridge_CreateReceiver);
	soap_begin_count(soap);
	if (soap->mode & SOAP_IO_LENGTH)
	{	soap_envelope_begin_out(soap);
		soap_putheader(soap);
		soap_body_begin_out(soap);
		soap_put_klftbridge_CreateReceiver(soap, &soap_tmp_klftbridge_CreateReceiver, "klftbridge-CreateReceiver", "");
		soap_body_end_out(soap);
		soap_envelope_end_out(soap);
	}
	if (soap_connect(soap, URL, action)
	 || soap_envelope_begin_out(soap)
	 || soap_putheader(soap)
	 || soap_body_begin_out(soap)
	 || soap_put_klftbridge_CreateReceiver(soap, &soap_tmp_klftbridge_CreateReceiver, "klftbridge-CreateReceiver", "")
	 || soap_body_end_out(soap)
	 || soap_envelope_end_out(soap)
	 || soap_end_send(soap))
		return soap_closesock(soap);
	soap_default_klftbridge_CreateReceiverResponse(soap, &r);
	if (soap_begin_recv(soap)
	 || soap_envelope_begin_in(soap)
	 || soap_recv_header(soap)
	 || soap_body_begin_in(soap))
		return soap_closesock(soap);
	soap_get_klftbridge_CreateReceiverResponse(soap, &r, "klftbridge-CreateReceiverResponse", "");
	if (soap->error)
	{	if (soap->error == SOAP_TAG_MISMATCH && soap->level == 2)
			return soap_recv_fault(soap);
		return soap_closesock(soap);
	}
	if (soap_body_end_in(soap)
	 || soap_envelope_end_in(soap)
#ifndef WITH_LEANER
	 || soap_resolve_attachments(soap)
#endif
	 || soap_end_recv(soap))
		return soap_closesock(soap);
	return soap_closesock(soap);
}

SOAP_FMAC5 int SOAP_FMAC6 soap_call_klftbridge_Connect(struct soap *soap, const char *URL, const char *action, wchar_t *receiverId, bool toMasterServer, struct klftbridge_ConnectResponse &r)
{
	struct klftbridge_Connect soap_tmp_klftbridge_Connect;
	soap->encodingStyle = NULL;
	soap_tmp_klftbridge_Connect.receiverId=receiverId;
	soap_tmp_klftbridge_Connect.toMasterServer=toMasterServer;
	soap_begin(soap);
	soap_serializeheader(soap);
	soap_serialize_klftbridge_Connect(soap, &soap_tmp_klftbridge_Connect);
	soap_begin_count(soap);
	if (soap->mode & SOAP_IO_LENGTH)
	{	soap_envelope_begin_out(soap);
		soap_putheader(soap);
		soap_body_begin_out(soap);
		soap_put_klftbridge_Connect(soap, &soap_tmp_klftbridge_Connect, "klftbridge-Connect", "");
		soap_body_end_out(soap);
		soap_envelope_end_out(soap);
	}
	if (soap_connect(soap, URL, action)
	 || soap_envelope_begin_out(soap)
	 || soap_putheader(soap)
	 || soap_body_begin_out(soap)
	 || soap_put_klftbridge_Connect(soap, &soap_tmp_klftbridge_Connect, "klftbridge-Connect", "")
	 || soap_body_end_out(soap)
	 || soap_envelope_end_out(soap)
	 || soap_end_send(soap))
		return soap_closesock(soap);
	soap_default_klftbridge_ConnectResponse(soap, &r);
	if (soap_begin_recv(soap)
	 || soap_envelope_begin_in(soap)
	 || soap_recv_header(soap)
	 || soap_body_begin_in(soap))
		return soap_closesock(soap);
	soap_get_klftbridge_ConnectResponse(soap, &r, "klftbridge-ConnectResponse", "");
	if (soap->error)
	{	if (soap->error == SOAP_TAG_MISMATCH && soap->level == 2)
			return soap_recv_fault(soap);
		return soap_closesock(soap);
	}
	if (soap_body_end_in(soap)
	 || soap_envelope_end_in(soap)
#ifndef WITH_LEANER
	 || soap_resolve_attachments(soap)
#endif
	 || soap_end_recv(soap))
		return soap_closesock(soap);
	return soap_closesock(soap);
}

SOAP_FMAC5 int SOAP_FMAC6 soap_call_klftbridge_GetFileInfo(struct soap *soap, const char *URL, const char *action, wchar_t *receiverId, wchar_t *fileName, struct klftbridge_GetFileInfoResponse &r)
{
	struct klftbridge_GetFileInfo soap_tmp_klftbridge_GetFileInfo;
	soap->encodingStyle = NULL;
	soap_tmp_klftbridge_GetFileInfo.receiverId=receiverId;
	soap_tmp_klftbridge_GetFileInfo.fileName=fileName;
	soap_begin(soap);
	soap_serializeheader(soap);
	soap_serialize_klftbridge_GetFileInfo(soap, &soap_tmp_klftbridge_GetFileInfo);
	soap_begin_count(soap);
	if (soap->mode & SOAP_IO_LENGTH)
	{	soap_envelope_begin_out(soap);
		soap_putheader(soap);
		soap_body_begin_out(soap);
		soap_put_klftbridge_GetFileInfo(soap, &soap_tmp_klftbridge_GetFileInfo, "klftbridge-GetFileInfo", "");
		soap_body_end_out(soap);
		soap_envelope_end_out(soap);
	}
	if (soap_connect(soap, URL, action)
	 || soap_envelope_begin_out(soap)
	 || soap_putheader(soap)
	 || soap_body_begin_out(soap)
	 || soap_put_klftbridge_GetFileInfo(soap, &soap_tmp_klftbridge_GetFileInfo, "klftbridge-GetFileInfo", "")
	 || soap_body_end_out(soap)
	 || soap_envelope_end_out(soap)
	 || soap_end_send(soap))
		return soap_closesock(soap);
	soap_default_klftbridge_GetFileInfoResponse(soap, &r);
	if (soap_begin_recv(soap)
	 || soap_envelope_begin_in(soap)
	 || soap_recv_header(soap)
	 || soap_body_begin_in(soap))
		return soap_closesock(soap);
	soap_get_klftbridge_GetFileInfoResponse(soap, &r, "klftbridge-GetFileInfoResponse", "");
	if (soap->error)
	{	if (soap->error == SOAP_TAG_MISMATCH && soap->level == 2)
			return soap_recv_fault(soap);
		return soap_closesock(soap);
	}
	if (soap_body_end_in(soap)
	 || soap_envelope_end_in(soap)
#ifndef WITH_LEANER
	 || soap_resolve_attachments(soap)
#endif
	 || soap_end_recv(soap))
		return soap_closesock(soap);
	return soap_closesock(soap);
}

SOAP_FMAC5 int SOAP_FMAC6 soap_call_klftbridge_GetNextFileChunk(struct soap *soap, const char *URL, const char *action, wchar_t *receiverId, wchar_t *fileName, ULONG64 startFilePos, ULONG64 neededSize, struct klftbridge_GetNextFileChunkResponse &r)
{
	struct klftbridge_GetNextFileChunk soap_tmp_klftbridge_GetNextFileChunk;
	soap->encodingStyle = NULL;
	soap_tmp_klftbridge_GetNextFileChunk.receiverId=receiverId;
	soap_tmp_klftbridge_GetNextFileChunk.fileName=fileName;
	soap_tmp_klftbridge_GetNextFileChunk.startFilePos=startFilePos;
	soap_tmp_klftbridge_GetNextFileChunk.neededSize=neededSize;
	soap_begin(soap);
	soap_serializeheader(soap);
	soap_serialize_klftbridge_GetNextFileChunk(soap, &soap_tmp_klftbridge_GetNextFileChunk);
	soap_begin_count(soap);
	if (soap->mode & SOAP_IO_LENGTH)
	{	soap_envelope_begin_out(soap);
		soap_putheader(soap);
		soap_body_begin_out(soap);
		soap_put_klftbridge_GetNextFileChunk(soap, &soap_tmp_klftbridge_GetNextFileChunk, "klftbridge-GetNextFileChunk", "");
		soap_body_end_out(soap);
		soap_envelope_end_out(soap);
	}
	if (soap_connect(soap, URL, action)
	 || soap_envelope_begin_out(soap)
	 || soap_putheader(soap)
	 || soap_body_begin_out(soap)
	 || soap_put_klftbridge_GetNextFileChunk(soap, &soap_tmp_klftbridge_GetNextFileChunk, "klftbridge-GetNextFileChunk", "")
	 || soap_body_end_out(soap)
	 || soap_envelope_end_out(soap)
	 || soap_end_send(soap))
		return soap_closesock(soap);
	soap_default_klftbridge_GetNextFileChunkResponse(soap, &r);
	if (soap_begin_recv(soap)
	 || soap_envelope_begin_in(soap)
	 || soap_recv_header(soap)
	 || soap_body_begin_in(soap))
		return soap_closesock(soap);
	soap_get_klftbridge_GetNextFileChunkResponse(soap, &r, "klftbridge-GetNextFileChunkResponse", "");
	if (soap->error)
	{	if (soap->error == SOAP_TAG_MISMATCH && soap->level == 2)
			return soap_recv_fault(soap);
		return soap_closesock(soap);
	}
	if (soap_body_end_in(soap)
	 || soap_envelope_end_in(soap)
#ifndef WITH_LEANER
	 || soap_resolve_attachments(soap)
#endif
	 || soap_end_recv(soap))
		return soap_closesock(soap);
	return soap_closesock(soap);
}

SOAP_FMAC5 int SOAP_FMAC6 soap_call_klftbridge_ReleaseReceiver(struct soap *soap, const char *URL, const char *action, wchar_t *receiverId, struct klftbridge_ReleaseReceiverResponse &r)
{
	struct klftbridge_ReleaseReceiver soap_tmp_klftbridge_ReleaseReceiver;
	soap->encodingStyle = NULL;
	soap_tmp_klftbridge_ReleaseReceiver.receiverId=receiverId;
	soap_begin(soap);
	soap_serializeheader(soap);
	soap_serialize_klftbridge_ReleaseReceiver(soap, &soap_tmp_klftbridge_ReleaseReceiver);
	soap_begin_count(soap);
	if (soap->mode & SOAP_IO_LENGTH)
	{	soap_envelope_begin_out(soap);
		soap_putheader(soap);
		soap_body_begin_out(soap);
		soap_put_klftbridge_ReleaseReceiver(soap, &soap_tmp_klftbridge_ReleaseReceiver, "klftbridge-ReleaseReceiver", "");
		soap_body_end_out(soap);
		soap_envelope_end_out(soap);
	}
	if (soap_connect(soap, URL, action)
	 || soap_envelope_begin_out(soap)
	 || soap_putheader(soap)
	 || soap_body_begin_out(soap)
	 || soap_put_klftbridge_ReleaseReceiver(soap, &soap_tmp_klftbridge_ReleaseReceiver, "klftbridge-ReleaseReceiver", "")
	 || soap_body_end_out(soap)
	 || soap_envelope_end_out(soap)
	 || soap_end_send(soap))
		return soap_closesock(soap);
	soap_default_klftbridge_ReleaseReceiverResponse(soap, &r);
	if (soap_begin_recv(soap)
	 || soap_envelope_begin_in(soap)
	 || soap_recv_header(soap)
	 || soap_body_begin_in(soap))
		return soap_closesock(soap);
	soap_get_klftbridge_ReleaseReceiverResponse(soap, &r, "klftbridge-ReleaseReceiverResponse", "");
	if (soap->error)
	{	if (soap->error == SOAP_TAG_MISMATCH && soap->level == 2)
			return soap_recv_fault(soap);
		return soap_closesock(soap);
	}
	if (soap_body_end_in(soap)
	 || soap_envelope_end_in(soap)
#ifndef WITH_LEANER
	 || soap_resolve_attachments(soap)
#endif
	 || soap_end_recv(soap))
		return soap_closesock(soap);
	return soap_closesock(soap);
}

SOAP_END_NAMESPACE(soap)

/* end of soapClient.cpp */
