/*
 * Portions of this file Copyright 1999-2005 University of Chicago
 * Portions of this file Copyright 1999-2005 The University of Southern California.
 *
 * This file or a portion of this file is licensed under the
 * terms of the Globus Toolkit Public License, found at
 * http://www.globus.org/toolkit/download/license.html.
 * If you redistribute this file, with or without
 * modifications, you must include this notice in the file.
 */


/*
 * This file is automatically generated by the Globus WSDLtoC converter
 */

#ifndef _DELEGATIONSERVICE_CLIENT_H_
#define _DELEGATIONSERVICE_CLIENT_H_

#include "globus_common.h"

EXTERN_C_BEGIN

#include "DelegationService.h"
#include "wsa_EndpointReferenceType.h"
#include "globus_soap_message_attrs.h"

#define WSADDRESSING_NS "http://schemas.xmlsoap.org/ws/2004/03/addressing"

/**
 * @defgroup DelegationService_client DelegationService Client Bindings
 */

extern globus_module_descriptor_t DelegationService_i_module;
/**
 * Module descriptor for the client stubs bindings for the
 * DelegationService service.
 * @ingroup DelegationService_client
 * @hideinitializer
 *
 * This module must be activated before calling any functions in the DelegationService
 * client bindings API.
 */
#define DELEGATIONSERVICE_MODULE (&DelegationService_i_module)

/**
 * @defgroup DelegationService_client_handle Client Handle Functions and Types
 * @ingroup DelegationService_client
 */

/**
 * Handle for the DelegationService client.
 * @ingroup DelegationService_client_handle
 *
 * A handle must be created by the client application before calling any
 * SOAP operation. Only one operation may be in progress per handle at
 * any given time.
 *
 * @see DelegationService_client_init(), DelegationService_client_destroy()
 */
typedef struct DelegationService_client_handle_s * DelegationService_client_handle_t;



/* Type and function declarations for the SetTerminationTime
 * operation
 */

/**
 * @defgroup DelegationPortType_SetTerminationTime_operation SetTerminationTime Operation
 * @ingroup DelegationService_client
 *
 * The functions and types in this group are used by clients which will
 * be making SetTerminationTime requests of the DelegationService service.
 *
 * For clients which want blocking SOAP calls, the functions
 * DelegationPortType_SetTerminationTime() and DelegationPortType_SetTerminationTime_epr() will be most appropriate. For
 * clients which want nonblocking SOAP calls, DelegationPortType_SetTerminationTime_register() and
 * DelegationPortType_SetTerminationTime_epr_register() will be most appropriate.
 *
 * The other functions in this section are used by applications which require
 * more control over the operation invocation by having separate invocations
 * and callbacks for the request and response handling of the operation.
 */

/**
 * Request callback function
 * @ingroup DelegationPortType_SetTerminationTime_operation
 * Use a function of this type when calling one of the nonblocking request
 * functions for the <code>SetTerminationTime</code> operation.
 *

 * When the request has been sent to the service, this callback function
 * will be called. If the result is <code>GLOBUS_SUCCESS</code>, then the
 * application must then call one of the response functions with the same
 * handle to receive the response to this operation.

 *
 * @param handle
 *     The @link #DelegationService_client_handle_t client handle @endlink used for
 *     the operation invocation.
 * @param user_args
 *     Application specific pointer, passed to the operation's register
 *     function.
 * @param result
 *     The result of operation request.
 */
typedef void (* DelegationPortType_SetTerminationTime_request_callback_func_t)(
    DelegationService_client_handle_t handle,
    void * user_args,
    globus_result_t result);
 
/**
 * Nonblocking operation request with EPR
 * @ingroup DelegationPortType_SetTerminationTime_operation
 * Begin sending a request for the <code>SetTerminationTime</code> operation on a
 * resource handled by the service named by the @a epr. When the operation
 * request has been sent, the @a callback function will be invoked.
 *
 * @param handle
 *     The @link #DelegationService_client_handle_t client handle @endlink which
 *     contains the state related to processing this operation.
 * @param epr
 *     Endpoint Reference of the service and resource which will process
 *     the operation.
 * @param SetTerminationTime
 *     Input parameter to the operation.
 * @param callback
 *     Callback function which will be called once the request has been
 *     sent
 * @param user_args
 *     Application-specific pointer which will be passed to the callback.
 */
globus_result_t
DelegationPortType_SetTerminationTime_epr_register_request(
    DelegationService_client_handle_t handle,
    const wsa_EndpointReferenceType * epr,
    const wsrl_SetTerminationTimeType * SetTerminationTime,
    DelegationPortType_SetTerminationTime_request_callback_func_t callback,
    void * user_args);

/**
 * Nonblocking operation request
 * @ingroup DelegationPortType_SetTerminationTime_operation
 * Begin sending a request for the <code>SetTerminationTime</code> operation to
 * the service at @a endpoint. When the operation
 * request has been sent, the @a callback function will be invoked.
 * @param handle
 *     The @link #DelegationService_client_handle_t client handle @endlink which
 *     contains the state related to processing this operation.
 * @param endpoint
 *     URI of the service endpoint to send the request to.
 * @param SetTerminationTime
 *     Input parameter to the operation.
 * @param callback
 *     Callback function which will be called once the request has been
 *     sent
 * @param user_args
 *     Application-specific pointer which will be passed to the callback.
 */
globus_result_t
DelegationPortType_SetTerminationTime_register_request(
    DelegationService_client_handle_t handle,
    const char * endpoint,
    const wsrl_SetTerminationTimeType * SetTerminationTime,
    DelegationPortType_SetTerminationTime_request_callback_func_t callback,
    void * user_args);

/**
 * Response callback function
 * @ingroup DelegationPortType_SetTerminationTime_operation
 * Use a function of this type when calling one of the nonblocking operation
 * or response functions for the <code>SetTerminationTime</code> operation.
 *
 * When the response has been received from the service, this callback function
 * will be called. 
 *
 * @param handle
 *     The @link #DelegationService_client_handle_t client handle @endlink used for
 *     the operation invocation.
 * @param user_args
 *     Application specific pointer, passed to the operation's register
 *     function.
 * @param result
 *     The result of operation request.
 * @param SetTerminationTimeResponse
 *     The output of the operation, if the operation succeeded.
 * @param fault_type
 *     The type of fault sent as a result of the operation, if the operation
 *     failed. If the operation succeeded, this will be NULL.
 * @param fault
 *     The fault element which was received, if the operation failed.
 *     If the operation succeeded, this will be NULL.
 */
typedef void (* DelegationPortType_SetTerminationTime_response_callback_func_t)(
    DelegationService_client_handle_t handle,
    void *                              user_args,
    globus_result_t                     result,
    const wsrl_SetTerminationTimeResponseType * SetTerminationTimeResponse,
    DelegationPortType_SetTerminationTime_fault_t fault_type,
    const xsd_any *                     fault);

/**
 * Nonblocking operation response handling
 * @ingroup DelegationPortType_SetTerminationTime_operation
 * Begin parsing the request for the <code>SetTerminationTime</code> operation begun
 * by an earlier call to
 * DelegationPortType_SetTerminationTime_register_request() or
 * DelegationPortType_SetTerminationTime_epr_register_request().  Once the response has been parsed.
 * the @a callback function will be called to pass the result of the operation
 * to the application.
 *
 * @param handle
 *     The @link #DelegationService_client_handle_t client handle @endlink which
 *     contains the state related to processing this operation.
 * @param callback
 *     Callback function which will be called once the response has been
 *     processed.
 * @param user_args
 *     Application-specific pointer which will be passed to the callback.
 */
globus_result_t
DelegationPortType_SetTerminationTime_register_response(
    DelegationService_client_handle_t handle,
    DelegationPortType_SetTerminationTime_response_callback_func_t callback,
    void * user_args);

/**
 * Nonblocking operation invocation with EPR
 * @ingroup DelegationPortType_SetTerminationTime_operation
 *
 * Begin processing a request for the SetTerminationTime operation. The operation will
 * sent to the service named by the @a epr and after the response is received,
 * the @a callback function will be invoked.
 *
 * @param handle
 *     The @link #DelegationService_client_handle_t client handle @endlink which
 *     contains the state related to processing this operation.
 * @param epr
 *     Endpoint Reference of the service and resource which will process
 *     the operation.
 * @param SetTerminationTime
 *     Input parameter to the operation.
 * @param callback
 *     Callback function which will be called once the operation has been
 *     processed.
 * @param user_args
 *     Application-specific pointer which will be passed to the callback.
 */
globus_result_t
DelegationPortType_SetTerminationTime_epr_register(
    DelegationService_client_handle_t handle,
    const wsa_EndpointReferenceType * epr,
    const wsrl_SetTerminationTimeType * SetTerminationTime,
    DelegationPortType_SetTerminationTime_response_callback_func_t callback,
    void * user_args);

/**
 * Nonblocking operation invocation
 * @ingroup DelegationPortType_SetTerminationTime_operation
 *
 * Begin processing a request for the SetTerminationTime operation. The operation will
 * sent to the service located at @a endpoint and after the response is
 * received, the @a callback function will be invoked.
 *
 * @param handle
 *     The @link #DelegationService_client_handle_t client handle @endlink which
 *     contains the state related to processing this operation.
 * @param endpoint
 *     URI of the service endpoint to send the request to.
 * @param SetTerminationTime
 *     Input parameter to the operation.
 * @param callback
 *     Callback function which will be called once the operation has been
 *     processed.
 * @param user_args
 *     Application-specific pointer which will be passed to the callback.
 */
globus_result_t
DelegationPortType_SetTerminationTime_register(
    DelegationService_client_handle_t handle,
    const char * endpoint,
    const wsrl_SetTerminationTimeType * SetTerminationTime,
    DelegationPortType_SetTerminationTime_response_callback_func_t callback,
    void * user_args);


/**
 * Blocking operation invocation with EPR
 * @ingroup DelegationPortType_SetTerminationTime_operation
 *
 * Request that an the SetTerminationTime operation be invoked by the service and
 * resource named by the @a epr parameter.

 * If the result is <code>GLOBUS_SUCCESS</code>, then the
 * @a SetTerminationTimeResponse parameter will be set to the result of the operation.
 * Otherwise, if the @a fault and @a fault_type parameters are non-NULL,
 * they indicate the SOAP fault type. If they are NULL, then some non-SOAP
 * error occurred, and the result's error type should be checked.

 *
 * @param handle
 *     The @link #DelegationService_client_handle_t client handle @endlink which
 *     contains the state related to processing this operation.
 * @param epr
 *     Endpoint Reference of the service and resource which will process
 *     the operation.
 * @param SetTerminationTime
 *     Input parameter to the operation.

 * @param SetTerminationTimeResponse
 *     The output of the operation, if the operation succeeded.
 * @param fault_type
 *     The type of fault sent as a result of the operation, if the operation
 *     failed. If the operation succeeded, this will be NULL.
 * @param fault
 *     The fault element which was received, if the operation failed.
 *     If the operation succeeded, this will be NULL.

 */
globus_result_t
DelegationPortType_SetTerminationTime_epr(
    DelegationService_client_handle_t handle,
    const wsa_EndpointReferenceType * epr,
    const wsrl_SetTerminationTimeType * SetTerminationTime,
    wsrl_SetTerminationTimeResponseType * * SetTerminationTimeResponse,
    DelegationPortType_SetTerminationTime_fault_t * fault_type,
    xsd_any * * fault);

/**
 * Blocking operation invocation
 * @ingroup DelegationPortType_SetTerminationTime_operation
 *
 * Request that an the SetTerminationTime operation be invoked by the service at
 * @a endpoint.

 * If the result is <code>GLOBUS_SUCCESS</code>, then the
 * @a SetTerminationTimeResponse parameter will be set to the result of the operation.
 * Otherwise, if the @a fault and @a fault_type parameters are non-NULL,
 * they indicate the SOAP fault type. If they are NULL, then some non-SOAP
 * error occurred, and the result's error type should be checked.

 *
 * @param handle
 *     The @link #DelegationService_client_handle_t client handle @endlink which
 *     contains the state related to processing this operation.
 * @param endpoint
 *     URI of the service endpoint to send the request to.
 * @param SetTerminationTime
 *     Input parameter to the operation.

 * @param SetTerminationTimeResponse
 *     The output of the operation, if the operation succeeded.
 * @param fault_type
 *     The type of fault sent as a result of the operation, if the operation
 *     failed. If the operation succeeded, this will be NULL.
 * @param fault
 *     The fault element which was received, if the operation failed.
 *     If the operation succeeded, this will be NULL.

 */
globus_result_t
DelegationPortType_SetTerminationTime(
    DelegationService_client_handle_t handle,
    const char * endpoint,
    const wsrl_SetTerminationTimeType * SetTerminationTime,
    wsrl_SetTerminationTimeResponseType * * SetTerminationTimeResponse,
    DelegationPortType_SetTerminationTime_fault_t * fault_type,
    xsd_any * * fault);



/* Type and function declarations for the Destroy
 * operation
 */

/**
 * @defgroup DelegationPortType_Destroy_operation Destroy Operation
 * @ingroup DelegationService_client
 *
 * The functions and types in this group are used by clients which will
 * be making Destroy requests of the DelegationService service.
 *
 * For clients which want blocking SOAP calls, the functions
 * DelegationPortType_Destroy() and DelegationPortType_Destroy_epr() will be most appropriate. For
 * clients which want nonblocking SOAP calls, DelegationPortType_Destroy_register() and
 * DelegationPortType_Destroy_epr_register() will be most appropriate.
 *
 * The other functions in this section are used by applications which require
 * more control over the operation invocation by having separate invocations
 * and callbacks for the request and response handling of the operation.
 */

/**
 * Request callback function
 * @ingroup DelegationPortType_Destroy_operation
 * Use a function of this type when calling one of the nonblocking request
 * functions for the <code>Destroy</code> operation.
 *

 * When the request has been sent to the service, this callback function
 * will be called. If the result is <code>GLOBUS_SUCCESS</code>, then the
 * application must then call one of the response functions with the same
 * handle to receive the response to this operation.

 *
 * @param handle
 *     The @link #DelegationService_client_handle_t client handle @endlink used for
 *     the operation invocation.
 * @param user_args
 *     Application specific pointer, passed to the operation's register
 *     function.
 * @param result
 *     The result of operation request.
 */
typedef void (* DelegationPortType_Destroy_request_callback_func_t)(
    DelegationService_client_handle_t handle,
    void * user_args,
    globus_result_t result);
 
/**
 * Nonblocking operation request with EPR
 * @ingroup DelegationPortType_Destroy_operation
 * Begin sending a request for the <code>Destroy</code> operation on a
 * resource handled by the service named by the @a epr. When the operation
 * request has been sent, the @a callback function will be invoked.
 *
 * @param handle
 *     The @link #DelegationService_client_handle_t client handle @endlink which
 *     contains the state related to processing this operation.
 * @param epr
 *     Endpoint Reference of the service and resource which will process
 *     the operation.
 * @param Destroy
 *     Input parameter to the operation.
 * @param callback
 *     Callback function which will be called once the request has been
 *     sent
 * @param user_args
 *     Application-specific pointer which will be passed to the callback.
 */
globus_result_t
DelegationPortType_Destroy_epr_register_request(
    DelegationService_client_handle_t handle,
    const wsa_EndpointReferenceType * epr,
    const wsrl_DestroyType * Destroy,
    DelegationPortType_Destroy_request_callback_func_t callback,
    void * user_args);

/**
 * Nonblocking operation request
 * @ingroup DelegationPortType_Destroy_operation
 * Begin sending a request for the <code>Destroy</code> operation to
 * the service at @a endpoint. When the operation
 * request has been sent, the @a callback function will be invoked.
 * @param handle
 *     The @link #DelegationService_client_handle_t client handle @endlink which
 *     contains the state related to processing this operation.
 * @param endpoint
 *     URI of the service endpoint to send the request to.
 * @param Destroy
 *     Input parameter to the operation.
 * @param callback
 *     Callback function which will be called once the request has been
 *     sent
 * @param user_args
 *     Application-specific pointer which will be passed to the callback.
 */
globus_result_t
DelegationPortType_Destroy_register_request(
    DelegationService_client_handle_t handle,
    const char * endpoint,
    const wsrl_DestroyType * Destroy,
    DelegationPortType_Destroy_request_callback_func_t callback,
    void * user_args);

/**
 * Response callback function
 * @ingroup DelegationPortType_Destroy_operation
 * Use a function of this type when calling one of the nonblocking operation
 * or response functions for the <code>Destroy</code> operation.
 *
 * When the response has been received from the service, this callback function
 * will be called. 
 *
 * @param handle
 *     The @link #DelegationService_client_handle_t client handle @endlink used for
 *     the operation invocation.
 * @param user_args
 *     Application specific pointer, passed to the operation's register
 *     function.
 * @param result
 *     The result of operation request.
 * @param DestroyResponse
 *     The output of the operation, if the operation succeeded.
 * @param fault_type
 *     The type of fault sent as a result of the operation, if the operation
 *     failed. If the operation succeeded, this will be NULL.
 * @param fault
 *     The fault element which was received, if the operation failed.
 *     If the operation succeeded, this will be NULL.
 */
typedef void (* DelegationPortType_Destroy_response_callback_func_t)(
    DelegationService_client_handle_t handle,
    void *                              user_args,
    globus_result_t                     result,
    const wsrl_DestroyResponseType * DestroyResponse,
    DelegationPortType_Destroy_fault_t fault_type,
    const xsd_any *                     fault);

/**
 * Nonblocking operation response handling
 * @ingroup DelegationPortType_Destroy_operation
 * Begin parsing the request for the <code>Destroy</code> operation begun
 * by an earlier call to
 * DelegationPortType_Destroy_register_request() or
 * DelegationPortType_Destroy_epr_register_request().  Once the response has been parsed.
 * the @a callback function will be called to pass the result of the operation
 * to the application.
 *
 * @param handle
 *     The @link #DelegationService_client_handle_t client handle @endlink which
 *     contains the state related to processing this operation.
 * @param callback
 *     Callback function which will be called once the response has been
 *     processed.
 * @param user_args
 *     Application-specific pointer which will be passed to the callback.
 */
globus_result_t
DelegationPortType_Destroy_register_response(
    DelegationService_client_handle_t handle,
    DelegationPortType_Destroy_response_callback_func_t callback,
    void * user_args);

/**
 * Nonblocking operation invocation with EPR
 * @ingroup DelegationPortType_Destroy_operation
 *
 * Begin processing a request for the Destroy operation. The operation will
 * sent to the service named by the @a epr and after the response is received,
 * the @a callback function will be invoked.
 *
 * @param handle
 *     The @link #DelegationService_client_handle_t client handle @endlink which
 *     contains the state related to processing this operation.
 * @param epr
 *     Endpoint Reference of the service and resource which will process
 *     the operation.
 * @param Destroy
 *     Input parameter to the operation.
 * @param callback
 *     Callback function which will be called once the operation has been
 *     processed.
 * @param user_args
 *     Application-specific pointer which will be passed to the callback.
 */
globus_result_t
DelegationPortType_Destroy_epr_register(
    DelegationService_client_handle_t handle,
    const wsa_EndpointReferenceType * epr,
    const wsrl_DestroyType * Destroy,
    DelegationPortType_Destroy_response_callback_func_t callback,
    void * user_args);

/**
 * Nonblocking operation invocation
 * @ingroup DelegationPortType_Destroy_operation
 *
 * Begin processing a request for the Destroy operation. The operation will
 * sent to the service located at @a endpoint and after the response is
 * received, the @a callback function will be invoked.
 *
 * @param handle
 *     The @link #DelegationService_client_handle_t client handle @endlink which
 *     contains the state related to processing this operation.
 * @param endpoint
 *     URI of the service endpoint to send the request to.
 * @param Destroy
 *     Input parameter to the operation.
 * @param callback
 *     Callback function which will be called once the operation has been
 *     processed.
 * @param user_args
 *     Application-specific pointer which will be passed to the callback.
 */
globus_result_t
DelegationPortType_Destroy_register(
    DelegationService_client_handle_t handle,
    const char * endpoint,
    const wsrl_DestroyType * Destroy,
    DelegationPortType_Destroy_response_callback_func_t callback,
    void * user_args);


/**
 * Blocking operation invocation with EPR
 * @ingroup DelegationPortType_Destroy_operation
 *
 * Request that an the Destroy operation be invoked by the service and
 * resource named by the @a epr parameter.

 * If the result is <code>GLOBUS_SUCCESS</code>, then the
 * @a DestroyResponse parameter will be set to the result of the operation.
 * Otherwise, if the @a fault and @a fault_type parameters are non-NULL,
 * they indicate the SOAP fault type. If they are NULL, then some non-SOAP
 * error occurred, and the result's error type should be checked.

 *
 * @param handle
 *     The @link #DelegationService_client_handle_t client handle @endlink which
 *     contains the state related to processing this operation.
 * @param epr
 *     Endpoint Reference of the service and resource which will process
 *     the operation.
 * @param Destroy
 *     Input parameter to the operation.

 * @param DestroyResponse
 *     The output of the operation, if the operation succeeded.
 * @param fault_type
 *     The type of fault sent as a result of the operation, if the operation
 *     failed. If the operation succeeded, this will be NULL.
 * @param fault
 *     The fault element which was received, if the operation failed.
 *     If the operation succeeded, this will be NULL.

 */
globus_result_t
DelegationPortType_Destroy_epr(
    DelegationService_client_handle_t handle,
    const wsa_EndpointReferenceType * epr,
    const wsrl_DestroyType * Destroy,
    wsrl_DestroyResponseType * * DestroyResponse,
    DelegationPortType_Destroy_fault_t * fault_type,
    xsd_any * * fault);

/**
 * Blocking operation invocation
 * @ingroup DelegationPortType_Destroy_operation
 *
 * Request that an the Destroy operation be invoked by the service at
 * @a endpoint.

 * If the result is <code>GLOBUS_SUCCESS</code>, then the
 * @a DestroyResponse parameter will be set to the result of the operation.
 * Otherwise, if the @a fault and @a fault_type parameters are non-NULL,
 * they indicate the SOAP fault type. If they are NULL, then some non-SOAP
 * error occurred, and the result's error type should be checked.

 *
 * @param handle
 *     The @link #DelegationService_client_handle_t client handle @endlink which
 *     contains the state related to processing this operation.
 * @param endpoint
 *     URI of the service endpoint to send the request to.
 * @param Destroy
 *     Input parameter to the operation.

 * @param DestroyResponse
 *     The output of the operation, if the operation succeeded.
 * @param fault_type
 *     The type of fault sent as a result of the operation, if the operation
 *     failed. If the operation succeeded, this will be NULL.
 * @param fault
 *     The fault element which was received, if the operation failed.
 *     If the operation succeeded, this will be NULL.

 */
globus_result_t
DelegationPortType_Destroy(
    DelegationService_client_handle_t handle,
    const char * endpoint,
    const wsrl_DestroyType * Destroy,
    wsrl_DestroyResponseType * * DestroyResponse,
    DelegationPortType_Destroy_fault_t * fault_type,
    xsd_any * * fault);



/* Type and function declarations for the refresh
 * operation
 */

/**
 * @defgroup DelegationPortType_refresh_operation refresh Operation
 * @ingroup DelegationService_client
 *
 * The functions and types in this group are used by clients which will
 * be making refresh requests of the DelegationService service.
 *
 * For clients which want blocking SOAP calls, the functions
 * DelegationPortType_refresh() and DelegationPortType_refresh_epr() will be most appropriate. For
 * clients which want nonblocking SOAP calls, DelegationPortType_refresh_register() and
 * DelegationPortType_refresh_epr_register() will be most appropriate.
 *
 * The other functions in this section are used by applications which require
 * more control over the operation invocation by having separate invocations
 * and callbacks for the request and response handling of the operation.
 */

/**
 * Request callback function
 * @ingroup DelegationPortType_refresh_operation
 * Use a function of this type when calling one of the nonblocking request
 * functions for the <code>refresh</code> operation.
 *

 * When the request has been sent to the service, this callback function
 * will be called. If the result is <code>GLOBUS_SUCCESS</code>, then the
 * application must then call one of the response functions with the same
 * handle to receive the response to this operation.

 *
 * @param handle
 *     The @link #DelegationService_client_handle_t client handle @endlink used for
 *     the operation invocation.
 * @param user_args
 *     Application specific pointer, passed to the operation's register
 *     function.
 * @param result
 *     The result of operation request.
 */
typedef void (* DelegationPortType_refresh_request_callback_func_t)(
    DelegationService_client_handle_t handle,
    void * user_args,
    globus_result_t result);
 
/**
 * Nonblocking operation request with EPR
 * @ingroup DelegationPortType_refresh_operation
 * Begin sending a request for the <code>refresh</code> operation on a
 * resource handled by the service named by the @a epr. When the operation
 * request has been sent, the @a callback function will be invoked.
 *
 * @param handle
 *     The @link #DelegationService_client_handle_t client handle @endlink which
 *     contains the state related to processing this operation.
 * @param epr
 *     Endpoint Reference of the service and resource which will process
 *     the operation.
 * @param refreshRequest
 *     Input parameter to the operation.
 * @param callback
 *     Callback function which will be called once the request has been
 *     sent
 * @param user_args
 *     Application-specific pointer which will be passed to the callback.
 */
globus_result_t
DelegationPortType_refresh_epr_register_request(
    DelegationService_client_handle_t handle,
    const wsa_EndpointReferenceType * epr,
    const wst_RequestSecurityTokenType * refreshRequest,
    DelegationPortType_refresh_request_callback_func_t callback,
    void * user_args);

/**
 * Nonblocking operation request
 * @ingroup DelegationPortType_refresh_operation
 * Begin sending a request for the <code>refresh</code> operation to
 * the service at @a endpoint. When the operation
 * request has been sent, the @a callback function will be invoked.
 * @param handle
 *     The @link #DelegationService_client_handle_t client handle @endlink which
 *     contains the state related to processing this operation.
 * @param endpoint
 *     URI of the service endpoint to send the request to.
 * @param refreshRequest
 *     Input parameter to the operation.
 * @param callback
 *     Callback function which will be called once the request has been
 *     sent
 * @param user_args
 *     Application-specific pointer which will be passed to the callback.
 */
globus_result_t
DelegationPortType_refresh_register_request(
    DelegationService_client_handle_t handle,
    const char * endpoint,
    const wst_RequestSecurityTokenType * refreshRequest,
    DelegationPortType_refresh_request_callback_func_t callback,
    void * user_args);

/**
 * Response callback function
 * @ingroup DelegationPortType_refresh_operation
 * Use a function of this type when calling one of the nonblocking operation
 * or response functions for the <code>refresh</code> operation.
 *
 * When the response has been received from the service, this callback function
 * will be called. 
 *
 * @param handle
 *     The @link #DelegationService_client_handle_t client handle @endlink used for
 *     the operation invocation.
 * @param user_args
 *     Application specific pointer, passed to the operation's register
 *     function.
 * @param result
 *     The result of operation request.
 * @param voidElemType
 *     The output of the operation, if the operation succeeded.
 * @param fault_type
 *     The type of fault sent as a result of the operation, if the operation
 *     failed. If the operation succeeded, this will be NULL.
 * @param fault
 *     The fault element which was received, if the operation failed.
 *     If the operation succeeded, this will be NULL.
 */
typedef void (* DelegationPortType_refresh_response_callback_func_t)(
    DelegationService_client_handle_t handle,
    void *                              user_args,
    globus_result_t                     result,
    const wsdelegation_voidType * voidElemType,
    DelegationPortType_refresh_fault_t fault_type,
    const xsd_any *                     fault);

/**
 * Nonblocking operation response handling
 * @ingroup DelegationPortType_refresh_operation
 * Begin parsing the request for the <code>refresh</code> operation begun
 * by an earlier call to
 * DelegationPortType_refresh_register_request() or
 * DelegationPortType_refresh_epr_register_request().  Once the response has been parsed.
 * the @a callback function will be called to pass the result of the operation
 * to the application.
 *
 * @param handle
 *     The @link #DelegationService_client_handle_t client handle @endlink which
 *     contains the state related to processing this operation.
 * @param callback
 *     Callback function which will be called once the response has been
 *     processed.
 * @param user_args
 *     Application-specific pointer which will be passed to the callback.
 */
globus_result_t
DelegationPortType_refresh_register_response(
    DelegationService_client_handle_t handle,
    DelegationPortType_refresh_response_callback_func_t callback,
    void * user_args);

/**
 * Nonblocking operation invocation with EPR
 * @ingroup DelegationPortType_refresh_operation
 *
 * Begin processing a request for the refresh operation. The operation will
 * sent to the service named by the @a epr and after the response is received,
 * the @a callback function will be invoked.
 *
 * @param handle
 *     The @link #DelegationService_client_handle_t client handle @endlink which
 *     contains the state related to processing this operation.
 * @param epr
 *     Endpoint Reference of the service and resource which will process
 *     the operation.
 * @param refreshRequest
 *     Input parameter to the operation.
 * @param callback
 *     Callback function which will be called once the operation has been
 *     processed.
 * @param user_args
 *     Application-specific pointer which will be passed to the callback.
 */
globus_result_t
DelegationPortType_refresh_epr_register(
    DelegationService_client_handle_t handle,
    const wsa_EndpointReferenceType * epr,
    const wst_RequestSecurityTokenType * refreshRequest,
    DelegationPortType_refresh_response_callback_func_t callback,
    void * user_args);

/**
 * Nonblocking operation invocation
 * @ingroup DelegationPortType_refresh_operation
 *
 * Begin processing a request for the refresh operation. The operation will
 * sent to the service located at @a endpoint and after the response is
 * received, the @a callback function will be invoked.
 *
 * @param handle
 *     The @link #DelegationService_client_handle_t client handle @endlink which
 *     contains the state related to processing this operation.
 * @param endpoint
 *     URI of the service endpoint to send the request to.
 * @param refreshRequest
 *     Input parameter to the operation.
 * @param callback
 *     Callback function which will be called once the operation has been
 *     processed.
 * @param user_args
 *     Application-specific pointer which will be passed to the callback.
 */
globus_result_t
DelegationPortType_refresh_register(
    DelegationService_client_handle_t handle,
    const char * endpoint,
    const wst_RequestSecurityTokenType * refreshRequest,
    DelegationPortType_refresh_response_callback_func_t callback,
    void * user_args);


/**
 * Blocking operation invocation with EPR
 * @ingroup DelegationPortType_refresh_operation
 *
 * Request that an the refresh operation be invoked by the service and
 * resource named by the @a epr parameter.

 * If the result is <code>GLOBUS_SUCCESS</code>, then the
 * @a voidElemType parameter will be set to the result of the operation.
 * Otherwise, if the @a fault and @a fault_type parameters are non-NULL,
 * they indicate the SOAP fault type. If they are NULL, then some non-SOAP
 * error occurred, and the result's error type should be checked.

 *
 * @param handle
 *     The @link #DelegationService_client_handle_t client handle @endlink which
 *     contains the state related to processing this operation.
 * @param epr
 *     Endpoint Reference of the service and resource which will process
 *     the operation.
 * @param refreshRequest
 *     Input parameter to the operation.

 * @param voidElemType
 *     The output of the operation, if the operation succeeded.
 * @param fault_type
 *     The type of fault sent as a result of the operation, if the operation
 *     failed. If the operation succeeded, this will be NULL.
 * @param fault
 *     The fault element which was received, if the operation failed.
 *     If the operation succeeded, this will be NULL.

 */
globus_result_t
DelegationPortType_refresh_epr(
    DelegationService_client_handle_t handle,
    const wsa_EndpointReferenceType * epr,
    const wst_RequestSecurityTokenType * refreshRequest,
    wsdelegation_voidType * * voidElemType,
    DelegationPortType_refresh_fault_t * fault_type,
    xsd_any * * fault);

/**
 * Blocking operation invocation
 * @ingroup DelegationPortType_refresh_operation
 *
 * Request that an the refresh operation be invoked by the service at
 * @a endpoint.

 * If the result is <code>GLOBUS_SUCCESS</code>, then the
 * @a voidElemType parameter will be set to the result of the operation.
 * Otherwise, if the @a fault and @a fault_type parameters are non-NULL,
 * they indicate the SOAP fault type. If they are NULL, then some non-SOAP
 * error occurred, and the result's error type should be checked.

 *
 * @param handle
 *     The @link #DelegationService_client_handle_t client handle @endlink which
 *     contains the state related to processing this operation.
 * @param endpoint
 *     URI of the service endpoint to send the request to.
 * @param refreshRequest
 *     Input parameter to the operation.

 * @param voidElemType
 *     The output of the operation, if the operation succeeded.
 * @param fault_type
 *     The type of fault sent as a result of the operation, if the operation
 *     failed. If the operation succeeded, this will be NULL.
 * @param fault
 *     The fault element which was received, if the operation failed.
 *     If the operation succeeded, this will be NULL.

 */
globus_result_t
DelegationPortType_refresh(
    DelegationService_client_handle_t handle,
    const char * endpoint,
    const wst_RequestSecurityTokenType * refreshRequest,
    wsdelegation_voidType * * voidElemType,
    DelegationPortType_refresh_fault_t * fault_type,
    xsd_any * * fault);



/**
 * Initialize a client handle
 * @ingroup DelegationService_client_handle
 * Initialize new client handle state for use with operation-related functions.
 *
 * @param handle
 *     Pointer to the handle to initialize.
 * @param attrs
 *    Default attributes to use with this handle. This parameter may be NULL.
 *    Certain atttributes may cause different handlers to be pushed onto the
 *    default handler chain for this client.
 * @param handlers
 *    Handle chain to use with this handle. This parameter may be NULL.
 *    Typically the default handler chain used by this function is sufficient.
 */
globus_result_t
DelegationService_client_init(
    DelegationService_client_handle_t *  handle,
    globus_soap_message_attr_t attrs,
    globus_handler_chain_t handlers);

/**
 * Destroy a client handle
 * @ingroup DelegationService_client_handle
 *
 * Destroys the state associated with this client handle.
 *
 * @param handle
 *     Handle to destroy.
 */
void
DelegationService_client_destroy(
    DelegationService_client_handle_t handle);

/**
 * Cancel the current operation associated with this handle.
 * @ingroup DelegationService_client_handle
 * 
 * @param handle
 *     Handle which has the operation to cancel.
 */
globus_result_t
DelegationService_client_operation_cancel(
    DelegationService_client_handle_t handle);

/**
 * Get handle's type registry
 * @ingroup DelegationService_client_handle
 *
 * The type registry maps XML element names to type information structures.
 * Applications may wish to get the registry from a handle to set extra
 * type mappings (for example, to set a mapping for an element which is
 * to be received as part of an extensibility element).
 *
 * @param handle
 *     The handle to query.
 * @param registry
 *     A pointer to a registry handle which will be set to the handle's
 *     registry.
 */
globus_result_t
DelegationService_client_get_registry(
    DelegationService_client_handle_t handle,
    globus_xsd_type_registry_t * registry);

/**
 * Get handle's handler chain
 * @ingroup DelegationService_client_handle
 *
 * The handler chain contains information about which handlers (typically
 * SOAP header processors) will be invoked when a request is sent or a
 * response is received. Applications which want to add custom handlers at
 * run time may wish to push additional handlers onto this chain.
 *
 * @param handle
 *     The handle to query.
 * @param handlers
 *     A pointer to a handler chain which will be set to the handle's
 *     chain.
 */
globus_result_t
DelegationService_client_get_handler_chain(
    DelegationService_client_handle_t handle,
    globus_handler_chain_t * handlers);

/**
 * Set a SOAP attribute on a handle
 * @ingroup DelegationService_client_handle
 *
 * Set a SOAP attribute on a handle. This can be used to change how
 * the SOAP engine will process operations sent via this handle.
 *
 * @param handle
 *     The handle to modify.
 * @param prop_name
 *     The attribute name. This should be one of the
 *     <code>GLOBUS_SOAP_MESSAGE_*_KEY</code> values.
 * @param copy
 *     A function to copy the value. This is required if @a value will go
 *     out of scope.
 * @param destroy
 *     A function to destroy a copy of the value. Required if @a copy is set.
 * @param value
 *     The new value of the attribute.
 */
globus_result_t
DelegationService_client_attr_set(
    DelegationService_client_handle_t handle,
    const char * prop_name,
    globus_soap_message_attr_copy_func_t copy,
    globus_soap_message_attr_destroy_func_t destroy,
    void * value);

/**
 * Remove a SOAP attribute from a handle
 * @ingroup DelegationService_client_handle
 *
 * Remove a SOAP attribute on a handle. This can be used to change how
 * the SOAP engine will process operations sent via this handle.
 *
 * @param handle
 *     The handle to modify.
 * @param prop_name
 *     The attribute name. This should be one of the
 *     <code>GLOBUS_SOAP_MESSAGE_*_KEY</code> values.
 * 
 * @return
 *     This function returns the current value of the attribute.
 */
void *
DelegationService_client_attr_remove(
    DelegationService_client_handle_t handle,
    const char * prop_name);

/**
 * Get a SOAP attribute from a handle
 * @ingroup DelegationService_client_handle
 *
 * Get the current value of a SOAP attribute set on a handle. 
 *
 * @param handle
 *     The handle to query.
 * @param prop_name
 *     The attribute name. This should be one of the
 *     <code>GLOBUS_SOAP_MESSAGE_*_KEY</code> values.
 * 
 * @return
 *     This function returns the current value of the attribute.
 */
void *
DelegationService_client_attr_get(
    DelegationService_client_handle_t handle,
    const char * prop_name);

EXTERN_C_END

#endif
