/*
 * 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.
 */


#ifndef _SECURECOUNTERSERVICE_SKELETON_H_
#define _SECURECOUNTERSERVICE_SKELETON_H_

#include "globus_common.h"

EXTERN_C_BEGIN

#include "globus_service_registry.h"
#include "globus_soap_message.h"
#include "globus_operation_provider.h"
#include "SecureCounterService.h"

extern xsd_QName SecureCounterService_service_qname;

globus_result_t
SecureCounterService_init(
    globus_service_descriptor_t *       service_desc);

globus_result_t
SecureCounterService_finalize(
    globus_service_descriptor_t *       service_desc);

extern globus_service_descriptor_t      SecureCounterService_descriptor;

/**
 * globus_result_t SecureCounterServiceResourceInit(const char * resource_id);
 */
#define SecureCounterServiceInitResource(RESOURCE_ID)        \
    globus_operation_table_init_resource(       \
        SecureCounterService_descriptor.operations,          \
        RESOURCE_ID)
        
/* Error Types for SecureCounterService */
enum
{

    COUNTERPORTTYPE_GETCURRENTMESSAGE_ERROR_TYPE,
    COUNTERPORTTYPE_SUBSCRIBE_ERROR_TYPE,
    COUNTERPORTTYPE_GETRESOURCEPROPERTY_ERROR_TYPE,
    COUNTERPORTTYPE_GETMULTIPLERESOURCEPROPERTIES_ERROR_TYPE,
    COUNTERPORTTYPE_QUERYRESOURCEPROPERTIES_ERROR_TYPE,
    COUNTERPORTTYPE_DESTROY_ERROR_TYPE,
    COUNTERPORTTYPE_SETTERMINATIONTIME_ERROR_TYPE,
    COUNTERPORTTYPE_ADD_ERROR_TYPE,
    COUNTERPORTTYPE_CREATECOUNTER_ERROR_TYPE
};


extern xsd_QName CounterPortType_GetCurrentMessage_op_qname;
extern xsd_QName CounterPortType_GetCurrentMessage_input_qname;

#define CounterPortType_GetCurrentMessage_error(message) \
    globus_error_put( \
        globus_error_construct_error( \
            &SecureCounterService_module, \
            NULL, \
            COUNTERPORTTYPE_GETCURRENTMESSAGE_ERROR_TYPE, \
            __FILE__, \
            _globus_func_name, \
            __LINE__, \
            "GetCurrentMessage Error: %s", message))

#define CounterPortType_GetCurrentMessage_chain_error(result, message) \
    globus_error_put( \
        globus_error_construct_error( \
            &SecureCounterService_module, \
            result ? globus_error_get(result) : NULL, \
            COUNTERPORTTYPE_GETCURRENTMESSAGE_ERROR_TYPE, \
            __FILE__, \
            _globus_func_name, \
            __LINE__, \
            "GetCurrentMessage Error: %s", \
            (message ? message : "Nonterminal Error")))
                    
/* these functions are the service implementation and
 * must be implemented by the service implementer
 */

globus_result_t
CounterPortType_GetCurrentMessage_init(
    globus_service_engine_t             engine,
    globus_soap_message_handle_t        message,
    wsnt_GetCurrentMessageType * GetCurrentMessage);

globus_result_t
CounterPortType_GetCurrentMessage_impl(
    globus_service_engine_t             engine,
    globus_soap_message_handle_t        message,
    globus_service_descriptor_t *       descriptor,
    wsnt_GetCurrentMessageType * GetCurrentMessage,
    wsnt_GetCurrentMessageResponseType * GetCurrentMessageResponse,
    const char **                       fault_name,
    void ** fault);


extern const char * CounterPortType_GetCurrentMessage_fault_strings[];

#define CounterPortType_GetCurrentMessageFaultString(FAULT_TYPE) \
    CounterPortType_GetCurrentMessage_fault_strings[FAULT_TYPE - 1]


extern xsd_QName CounterPortType_Subscribe_op_qname;
extern xsd_QName CounterPortType_Subscribe_input_qname;

#define CounterPortType_Subscribe_error(message) \
    globus_error_put( \
        globus_error_construct_error( \
            &SecureCounterService_module, \
            NULL, \
            COUNTERPORTTYPE_SUBSCRIBE_ERROR_TYPE, \
            __FILE__, \
            _globus_func_name, \
            __LINE__, \
            "Subscribe Error: %s", message))

#define CounterPortType_Subscribe_chain_error(result, message) \
    globus_error_put( \
        globus_error_construct_error( \
            &SecureCounterService_module, \
            result ? globus_error_get(result) : NULL, \
            COUNTERPORTTYPE_SUBSCRIBE_ERROR_TYPE, \
            __FILE__, \
            _globus_func_name, \
            __LINE__, \
            "Subscribe Error: %s", \
            (message ? message : "Nonterminal Error")))
                    
/* these functions are the service implementation and
 * must be implemented by the service implementer
 */

globus_result_t
CounterPortType_Subscribe_init(
    globus_service_engine_t             engine,
    globus_soap_message_handle_t        message,
    wsnt_SubscribeType * Subscribe);

globus_result_t
CounterPortType_Subscribe_impl(
    globus_service_engine_t             engine,
    globus_soap_message_handle_t        message,
    globus_service_descriptor_t *       descriptor,
    wsnt_SubscribeType * Subscribe,
    wsnt_SubscribeResponseType * SubscribeResponse,
    const char **                       fault_name,
    void ** fault);


extern const char * CounterPortType_Subscribe_fault_strings[];

#define CounterPortType_SubscribeFaultString(FAULT_TYPE) \
    CounterPortType_Subscribe_fault_strings[FAULT_TYPE - 1]


extern xsd_QName CounterPortType_GetResourceProperty_op_qname;
extern xsd_QName CounterPortType_GetResourceProperty_input_qname;

#define CounterPortType_GetResourceProperty_error(message) \
    globus_error_put( \
        globus_error_construct_error( \
            &SecureCounterService_module, \
            NULL, \
            COUNTERPORTTYPE_GETRESOURCEPROPERTY_ERROR_TYPE, \
            __FILE__, \
            _globus_func_name, \
            __LINE__, \
            "GetResourceProperty Error: %s", message))

#define CounterPortType_GetResourceProperty_chain_error(result, message) \
    globus_error_put( \
        globus_error_construct_error( \
            &SecureCounterService_module, \
            result ? globus_error_get(result) : NULL, \
            COUNTERPORTTYPE_GETRESOURCEPROPERTY_ERROR_TYPE, \
            __FILE__, \
            _globus_func_name, \
            __LINE__, \
            "GetResourceProperty Error: %s", \
            (message ? message : "Nonterminal Error")))
                    
/* these functions are the service implementation and
 * must be implemented by the service implementer
 */

globus_result_t
CounterPortType_GetResourceProperty_init(
    globus_service_engine_t             engine,
    globus_soap_message_handle_t        message,
    xsd_QName * GetResourceProperty);

globus_result_t
CounterPortType_GetResourceProperty_impl(
    globus_service_engine_t             engine,
    globus_soap_message_handle_t        message,
    globus_service_descriptor_t *       descriptor,
    xsd_QName * GetResourceProperty,
    wsrp_GetResourcePropertyResponseType * GetResourcePropertyResponse,
    const char **                       fault_name,
    void ** fault);


extern const char * CounterPortType_GetResourceProperty_fault_strings[];

#define CounterPortType_GetResourcePropertyFaultString(FAULT_TYPE) \
    CounterPortType_GetResourceProperty_fault_strings[FAULT_TYPE - 1]


extern xsd_QName CounterPortType_GetMultipleResourceProperties_op_qname;
extern xsd_QName CounterPortType_GetMultipleResourceProperties_input_qname;

#define CounterPortType_GetMultipleResourceProperties_error(message) \
    globus_error_put( \
        globus_error_construct_error( \
            &SecureCounterService_module, \
            NULL, \
            COUNTERPORTTYPE_GETMULTIPLERESOURCEPROPERTIES_ERROR_TYPE, \
            __FILE__, \
            _globus_func_name, \
            __LINE__, \
            "GetMultipleResourceProperties Error: %s", message))

#define CounterPortType_GetMultipleResourceProperties_chain_error(result, message) \
    globus_error_put( \
        globus_error_construct_error( \
            &SecureCounterService_module, \
            result ? globus_error_get(result) : NULL, \
            COUNTERPORTTYPE_GETMULTIPLERESOURCEPROPERTIES_ERROR_TYPE, \
            __FILE__, \
            _globus_func_name, \
            __LINE__, \
            "GetMultipleResourceProperties Error: %s", \
            (message ? message : "Nonterminal Error")))
                    
/* these functions are the service implementation and
 * must be implemented by the service implementer
 */

globus_result_t
CounterPortType_GetMultipleResourceProperties_init(
    globus_service_engine_t             engine,
    globus_soap_message_handle_t        message,
    wsrp_GetMultipleResourcePropertiesType * GetMultipleResourceProperties);

globus_result_t
CounterPortType_GetMultipleResourceProperties_impl(
    globus_service_engine_t             engine,
    globus_soap_message_handle_t        message,
    globus_service_descriptor_t *       descriptor,
    wsrp_GetMultipleResourcePropertiesType * GetMultipleResourceProperties,
    wsrp_GetMultipleResourcePropertiesResponseType * GetMultipleResourcePropertiesResponse,
    const char **                       fault_name,
    void ** fault);


extern const char * CounterPortType_GetMultipleResourceProperties_fault_strings[];

#define CounterPortType_GetMultipleResourcePropertiesFaultString(FAULT_TYPE) \
    CounterPortType_GetMultipleResourceProperties_fault_strings[FAULT_TYPE - 1]


extern xsd_QName CounterPortType_QueryResourceProperties_op_qname;
extern xsd_QName CounterPortType_QueryResourceProperties_input_qname;

#define CounterPortType_QueryResourceProperties_error(message) \
    globus_error_put( \
        globus_error_construct_error( \
            &SecureCounterService_module, \
            NULL, \
            COUNTERPORTTYPE_QUERYRESOURCEPROPERTIES_ERROR_TYPE, \
            __FILE__, \
            _globus_func_name, \
            __LINE__, \
            "QueryResourceProperties Error: %s", message))

#define CounterPortType_QueryResourceProperties_chain_error(result, message) \
    globus_error_put( \
        globus_error_construct_error( \
            &SecureCounterService_module, \
            result ? globus_error_get(result) : NULL, \
            COUNTERPORTTYPE_QUERYRESOURCEPROPERTIES_ERROR_TYPE, \
            __FILE__, \
            _globus_func_name, \
            __LINE__, \
            "QueryResourceProperties Error: %s", \
            (message ? message : "Nonterminal Error")))
                    
/* these functions are the service implementation and
 * must be implemented by the service implementer
 */

globus_result_t
CounterPortType_QueryResourceProperties_init(
    globus_service_engine_t             engine,
    globus_soap_message_handle_t        message,
    wsrp_QueryResourcePropertiesType * QueryResourceProperties);

globus_result_t
CounterPortType_QueryResourceProperties_impl(
    globus_service_engine_t             engine,
    globus_soap_message_handle_t        message,
    globus_service_descriptor_t *       descriptor,
    wsrp_QueryResourcePropertiesType * QueryResourceProperties,
    wsrp_QueryResourcePropertiesResponseType * QueryResourcePropertiesResponse,
    const char **                       fault_name,
    void ** fault);


extern const char * CounterPortType_QueryResourceProperties_fault_strings[];

#define CounterPortType_QueryResourcePropertiesFaultString(FAULT_TYPE) \
    CounterPortType_QueryResourceProperties_fault_strings[FAULT_TYPE - 1]


extern xsd_QName CounterPortType_Destroy_op_qname;
extern xsd_QName CounterPortType_Destroy_input_qname;

#define CounterPortType_Destroy_error(message) \
    globus_error_put( \
        globus_error_construct_error( \
            &SecureCounterService_module, \
            NULL, \
            COUNTERPORTTYPE_DESTROY_ERROR_TYPE, \
            __FILE__, \
            _globus_func_name, \
            __LINE__, \
            "Destroy Error: %s", message))

#define CounterPortType_Destroy_chain_error(result, message) \
    globus_error_put( \
        globus_error_construct_error( \
            &SecureCounterService_module, \
            result ? globus_error_get(result) : NULL, \
            COUNTERPORTTYPE_DESTROY_ERROR_TYPE, \
            __FILE__, \
            _globus_func_name, \
            __LINE__, \
            "Destroy Error: %s", \
            (message ? message : "Nonterminal Error")))
                    
/* these functions are the service implementation and
 * must be implemented by the service implementer
 */

globus_result_t
CounterPortType_Destroy_init(
    globus_service_engine_t             engine,
    globus_soap_message_handle_t        message,
    wsrl_DestroyType * Destroy);

globus_result_t
CounterPortType_Destroy_impl(
    globus_service_engine_t             engine,
    globus_soap_message_handle_t        message,
    globus_service_descriptor_t *       descriptor,
    wsrl_DestroyType * Destroy,
    wsrl_DestroyResponseType * DestroyResponse,
    const char **                       fault_name,
    void ** fault);


extern const char * CounterPortType_Destroy_fault_strings[];

#define CounterPortType_DestroyFaultString(FAULT_TYPE) \
    CounterPortType_Destroy_fault_strings[FAULT_TYPE - 1]


extern xsd_QName CounterPortType_SetTerminationTime_op_qname;
extern xsd_QName CounterPortType_SetTerminationTime_input_qname;

#define CounterPortType_SetTerminationTime_error(message) \
    globus_error_put( \
        globus_error_construct_error( \
            &SecureCounterService_module, \
            NULL, \
            COUNTERPORTTYPE_SETTERMINATIONTIME_ERROR_TYPE, \
            __FILE__, \
            _globus_func_name, \
            __LINE__, \
            "SetTerminationTime Error: %s", message))

#define CounterPortType_SetTerminationTime_chain_error(result, message) \
    globus_error_put( \
        globus_error_construct_error( \
            &SecureCounterService_module, \
            result ? globus_error_get(result) : NULL, \
            COUNTERPORTTYPE_SETTERMINATIONTIME_ERROR_TYPE, \
            __FILE__, \
            _globus_func_name, \
            __LINE__, \
            "SetTerminationTime Error: %s", \
            (message ? message : "Nonterminal Error")))
                    
/* these functions are the service implementation and
 * must be implemented by the service implementer
 */

globus_result_t
CounterPortType_SetTerminationTime_init(
    globus_service_engine_t             engine,
    globus_soap_message_handle_t        message,
    wsrl_SetTerminationTimeType * SetTerminationTime);

globus_result_t
CounterPortType_SetTerminationTime_impl(
    globus_service_engine_t             engine,
    globus_soap_message_handle_t        message,
    globus_service_descriptor_t *       descriptor,
    wsrl_SetTerminationTimeType * SetTerminationTime,
    wsrl_SetTerminationTimeResponseType * SetTerminationTimeResponse,
    const char **                       fault_name,
    void ** fault);


extern const char * CounterPortType_SetTerminationTime_fault_strings[];

#define CounterPortType_SetTerminationTimeFaultString(FAULT_TYPE) \
    CounterPortType_SetTerminationTime_fault_strings[FAULT_TYPE - 1]


extern xsd_QName CounterPortType_add_op_qname;
extern xsd_QName CounterPortType_add_input_qname;

#define CounterPortType_add_error(message) \
    globus_error_put( \
        globus_error_construct_error( \
            &SecureCounterService_module, \
            NULL, \
            COUNTERPORTTYPE_ADD_ERROR_TYPE, \
            __FILE__, \
            _globus_func_name, \
            __LINE__, \
            "add Error: %s", message))

#define CounterPortType_add_chain_error(result, message) \
    globus_error_put( \
        globus_error_construct_error( \
            &SecureCounterService_module, \
            result ? globus_error_get(result) : NULL, \
            COUNTERPORTTYPE_ADD_ERROR_TYPE, \
            __FILE__, \
            _globus_func_name, \
            __LINE__, \
            "add Error: %s", \
            (message ? message : "Nonterminal Error")))
                    
/* these functions are the service implementation and
 * must be implemented by the service implementer
 */

globus_result_t
CounterPortType_add_init(
    globus_service_engine_t             engine,
    globus_soap_message_handle_t        message,
    xsd_int * add);

globus_result_t
CounterPortType_add_impl(
    globus_service_engine_t             engine,
    globus_soap_message_handle_t        message,
    globus_service_descriptor_t *       descriptor,
    xsd_int * add,
    xsd_int * addResponse,
    const char **                       fault_name,
    void ** fault);


extern const char * CounterPortType_add_fault_strings[];

#define CounterPortType_addFaultString(FAULT_TYPE) \
    CounterPortType_add_fault_strings[FAULT_TYPE - 1]


extern xsd_QName CounterPortType_createCounter_op_qname;
extern xsd_QName CounterPortType_createCounter_input_qname;

#define CounterPortType_createCounter_error(message) \
    globus_error_put( \
        globus_error_construct_error( \
            &SecureCounterService_module, \
            NULL, \
            COUNTERPORTTYPE_CREATECOUNTER_ERROR_TYPE, \
            __FILE__, \
            _globus_func_name, \
            __LINE__, \
            "createCounter Error: %s", message))

#define CounterPortType_createCounter_chain_error(result, message) \
    globus_error_put( \
        globus_error_construct_error( \
            &SecureCounterService_module, \
            result ? globus_error_get(result) : NULL, \
            COUNTERPORTTYPE_CREATECOUNTER_ERROR_TYPE, \
            __FILE__, \
            _globus_func_name, \
            __LINE__, \
            "createCounter Error: %s", \
            (message ? message : "Nonterminal Error")))
                    
/* these functions are the service implementation and
 * must be implemented by the service implementer
 */

globus_result_t
CounterPortType_createCounter_init(
    globus_service_engine_t             engine,
    globus_soap_message_handle_t        message,
    createCounterType * createCounter);

globus_result_t
CounterPortType_createCounter_impl(
    globus_service_engine_t             engine,
    globus_soap_message_handle_t        message,
    globus_service_descriptor_t *       descriptor,
    createCounterType * createCounter,
    createCounterResponseType * createCounterResponse,
    const char **                       fault_name,
    void ** fault);


extern const char * CounterPortType_createCounter_fault_strings[];

#define CounterPortType_createCounterFaultString(FAULT_TYPE) \
    CounterPortType_createCounter_fault_strings[FAULT_TYPE - 1]


EXTERN_C_END

#endif
