Loading...
Searching...
No Matches
globus_gram_client.h
Go to the documentation of this file.
/*
* Copyright 1999-2006 University of Chicago
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef GLOBUS_GRAM_CLIENT_H
#define GLOBUS_GRAM_CLIENT_H
/* Include header files */
#include "globus_common.h"
#include "globus_io.h"
#include "globus_gram_protocol_constants.h"
#ifdef __cplusplus
extern "C" {
#endif
#ifndef GLOBUS_GLOBAL_DOCUMENT_SET
#endif
/******************************************************************************
Type definitions
******************************************************************************/
typedef void (* globus_gram_client_callback_func_t)(
void * user_callback_arg,
char * job_contact,
int state,
int errorcode);
typedef struct globus_gram_client_job_info_s
{
globus_hashtable_t extensions;
char * job_contact;
int job_state;
int protocol_error_code;
}
globus_gram_client_job_info_t;
typedef void (* globus_gram_client_info_callback_func_t)(
void * user_callback_arg,
const char * job_contact,
globus_gram_client_job_info_t * job_info);
typedef void * globus_gram_client_attr_t;
#define GLOBUS_GRAM_CLIENT_NO_ATTR (globus_gram_client_attr_t) NULL
typedef void (* globus_gram_client_nonblocking_func_t)(
void * user_callback_arg,
globus_gram_protocol_error_t operation_failure_code,
const char * job_contact,
globus_gram_protocol_job_state_t job_state,
globus_gram_protocol_error_t job_failure_code);
/******************************************************************************
Function prototypes
******************************************************************************/
int
globus_gram_client_callback_allow(
globus_gram_client_callback_func_t callback_func,
void * user_callback_arg,
char ** callback_contact);
int
globus_gram_client_info_callback_allow(
globus_gram_client_info_callback_func_t
callback_func,
void * user_callback_arg,
char ** callback_contact);
int
globus_gram_client_register_job_request(
const char * resource_manager_contact,
const char * description,
int job_state_mask,
const char * callback_contact,
globus_gram_client_attr_t attr,
globus_gram_client_nonblocking_func_t
register_callback,
void * register_callback_arg);
int
globus_gram_client_job_request(
const char * resource_manager_contact,
const char * description,
int job_state_mask,
const char * callback_contact,
char ** job_contact);
int
globus_gram_client_register_job_request_with_info(
const char * resource_manager_contact,
const char * description,
int job_state_mask,
const char * callback_contact,
globus_gram_client_attr_t attr,
globus_gram_client_info_callback_func_t
callback,
void * callback_arg);
int
globus_gram_client_job_request_with_info(
const char * resource_manager_contact,
const char * description,
int job_state_mask,
const char * callback_contact,
char ** job_contact,
globus_gram_client_job_info_t * info);
int
globus_gram_client_register_job_cancel(
const char * job_contact,
globus_gram_client_attr_t attr,
globus_gram_client_nonblocking_func_t
register_callback,
void * register_callback_arg);
int
globus_gram_client_job_cancel(
const char * job_contact);
int
globus_gram_client_register_job_status(
const char * job_contact,
globus_gram_client_attr_t attr,
globus_gram_client_nonblocking_func_t
register_callback,
void * register_callback_arg);
int
globus_gram_client_register_job_status_with_info(
const char * job_contact,
globus_gram_client_attr_t attr,
globus_gram_client_info_callback_func_t
info_callback,
void * callback_arg);
int
globus_gram_client_job_refresh_credentials(
char * job_contact,
gss_cred_id_t creds);
int
globus_gram_client_register_job_refresh_credentials(
char * job_contact,
gss_cred_id_t creds,
globus_gram_client_attr_t attr,
globus_gram_client_nonblocking_func_t
register_callback,
void * register_callback_arg);
int
globus_gram_client_job_status(
const char * job_contact,
int * job_status,
int * failure_code);
int
globus_gram_client_job_status_with_info(
const char * job_contact,
globus_gram_client_job_info_t * job_info);
int
globus_gram_client_register_job_signal(
const char * job_contact,
globus_gram_protocol_job_signal_t signal,
const char * signal_arg,
globus_gram_client_attr_t attr,
globus_gram_client_nonblocking_func_t
register_callback,
void * register_callback_arg);
int
globus_gram_client_job_signal(
const char * job_contact,
globus_gram_protocol_job_signal_t signal,
const char * signal_arg,
int * job_status,
int * failure_code);
int
globus_gram_client_register_job_callback_registration(
const char * job_contact,
int job_state_mask,
const char * callback_contact,
globus_gram_client_attr_t attr,
globus_gram_client_nonblocking_func_t
register_callback,
void * register_callback_arg);
int
globus_gram_client_job_callback_register(
const char * job_contact,
int job_state_mask,
const char * callback_contact,
int * job_status,
int * failure_code);
int
globus_gram_client_register_job_callback_unregistration(
const char * job_contact,
const char * callback_contact,
globus_gram_client_attr_t attr,
globus_gram_client_nonblocking_func_t
register_callback,
void * register_callback_arg);
int
globus_gram_client_job_callback_unregister(
const char * job_contact,
const char * callback_contact,
int * job_status,
int * failure_code);
int
globus_gram_client_callback_disallow(
char * callback_contact);
int
globus_gram_client_job_contact_free(
char * job_contact);
const char *
globus_gram_client_error_string(
int error_code);
int
globus_gram_client_version(void);
int
globus_gram_client_set_credentials(gss_cred_id_t new_credentials);
int
globus_gram_client_ping(
const char * resource_manager_contact);
int
globus_gram_client_register_ping(
const char * resource_manager_contact,
globus_gram_client_attr_t attr,
globus_gram_client_nonblocking_func_t
register_callback,
void * register_callback_arg);
int
globus_gram_client_get_jobmanager_version(
const char * resource_manager_contact,
globus_hashtable_t * extensions);
int
globus_gram_client_register_get_jobmanager_version(
const char * resource_manager_contact,
globus_gram_client_attr_t attr,
globus_gram_client_info_callback_func_t
info_callback,
void * callback_arg);
void
globus_gram_client_debug(void);
int
globus_gram_client_attr_init(
globus_gram_client_attr_t * attr);
int
globus_gram_client_attr_destroy(
globus_gram_client_attr_t * attr);
int
globus_gram_client_attr_set_credential(
globus_gram_client_attr_t attr,
gss_cred_id_t credential);
int
globus_gram_client_attr_get_credential(
globus_gram_client_attr_t attr,
gss_cred_id_t * credential);
int
globus_gram_client_attr_set_delegation_mode(
globus_gram_client_attr_t attr,
globus_io_secure_delegation_mode_t mode);
int
globus_gram_client_attr_get_delegation_mode(
globus_gram_client_attr_t attr,
globus_io_secure_delegation_mode_t *mode);
void
globus_gram_client_job_info_destroy(
globus_gram_client_job_info_t * info);
#define GLOBUS_GRAM_CLIENT_MODULE (&globus_gram_client_module)
extern globus_module_descriptor_t globus_gram_client_module;
#ifdef __cplusplus
}
#endif
#endif /* GLOBUS_GRAM_CLIENT_H */
globus_gram_client_attr_set_delegation_mode
int globus_gram_client_attr_set_delegation_mode(globus_gram_client_attr_t attr, globus_io_secure_delegation_mode_t mode)
Set a GRAM client attribute's delegation mode.
Definition globus_gram_client_attr.c:279
globus_gram_client_attr_set_credential
int globus_gram_client_attr_set_credential(globus_gram_client_attr_t attr, gss_cred_id_t credential)
Set a GRAM client attribute's security credential.
Definition globus_gram_client_attr.c:164
globus_gram_client_attr_init
int globus_gram_client_attr_init(globus_gram_client_attr_t *attr)
Initialize a GRAM client attribute.
Definition globus_gram_client_attr.c:55
globus_gram_client_attr_get_credential
int globus_gram_client_attr_get_credential(globus_gram_client_attr_t attr, gss_cred_id_t *credential)
Get a GRAM client attribute's security credential.
Definition globus_gram_client_attr.c:217
globus_gram_client_attr_get_delegation_mode
int globus_gram_client_attr_get_delegation_mode(globus_gram_client_attr_t attr, globus_io_secure_delegation_mode_t *mode)
Get a GRAM client attribute's security credential.
Definition globus_gram_client_attr.c:338
globus_gram_client_attr_destroy
int globus_gram_client_attr_destroy(globus_gram_client_attr_t *attr)
Destroy a GRAM client attribute.
Definition globus_gram_client_attr.c:104
globus_gram_client_attr_t
void * globus_gram_client_attr_t
GRAM client operation attribute.
Definition globus_gram_client.h:173
globus_gram_client_info_callback_func_t
void(* globus_gram_client_info_callback_func_t)(void *user_callback_arg, const char *job_contact, globus_gram_client_job_info_t *job_info)
Signature for GRAM state notification callback functions with extension support.
Definition globus_gram_client.h:159
globus_gram_client_info_callback_allow
int globus_gram_client_info_callback_allow(globus_gram_client_info_callback_func_t callback_func, void *user_callback_arg, char **callback_contact)
Begin listening for job state change callbacks.
Definition globus_gram_client.c:3346
globus_gram_client_nonblocking_func_t
void(* globus_gram_client_nonblocking_func_t)(void *user_callback_arg, globus_gram_protocol_error_t operation_failure_code, const char *job_contact, globus_gram_protocol_job_state_t job_state, globus_gram_protocol_error_t job_failure_code)
Signature for callbacks signalling completion of non-blocking GRAM requests.
Definition globus_gram_client.h:221
globus_gram_client_callback_func_t
void(* globus_gram_client_callback_func_t)(void *user_callback_arg, char *job_contact, int state, int errorcode)
Signature for GRAM state notification callback functions.
Definition globus_gram_client.h:96
globus_gram_client_callback_disallow
int globus_gram_client_callback_disallow(char *callback_contact)
Stop listening for job state change callbacks.
Definition globus_gram_client.c:3457
globus_gram_client_callback_allow
int globus_gram_client_callback_allow(globus_gram_client_callback_func_t callback_func, void *user_callback_arg, char **callback_contact)
Begin listening for job state change callbacks.
Definition globus_gram_client.c:3225
globus_gram_client_job_info_t
struct globus_gram_client_job_info_s globus_gram_client_job_info_t
Extensible job information structure.
globus_gram_client_ping
int globus_gram_client_ping(const char *resource_manager_contact)
Send a ping request to a GRAM service.
Definition globus_gram_client.c:870
globus_gram_client_register_job_callback_registration
int globus_gram_client_register_job_callback_registration(const char *job_contact, int job_state_mask, const char *callback_contact, globus_gram_client_attr_t attr, globus_gram_client_nonblocking_func_t register_callback, void *register_callback_arg)
Register a new callback contact to be notified for job state changes.
Definition globus_gram_client.c:2996
globus_gram_client_register_job_cancel
int globus_gram_client_register_job_cancel(const char *job_contact, globus_gram_client_attr_t attr, globus_gram_client_nonblocking_func_t register_callback, void *register_callback_arg)
Cancel a GRAM job.
Definition globus_gram_client.c:1770
globus_gram_client_register_get_jobmanager_version
int globus_gram_client_register_get_jobmanager_version(const char *resource_manager_contact, globus_gram_client_attr_t attr, globus_gram_client_info_callback_func_t info_callback, void *callback_arg)
Get version information from a job manager without blocking.
Definition globus_gram_client.c:1052
globus_gram_client_register_job_refresh_credentials
int globus_gram_client_register_job_refresh_credentials(char *job_contact, gss_cred_id_t creds, globus_gram_client_attr_t attr, globus_gram_client_nonblocking_func_t register_callback, void *register_callback_arg)
Delegate a new credential to a job.
Definition globus_gram_client.c:2895
globus_gram_client_register_job_status_with_info
int globus_gram_client_register_job_status_with_info(const char *job_contact, globus_gram_client_attr_t attr, globus_gram_client_info_callback_func_t info_callback, void *callback_arg)
Send a status query to a GRAM job.
Definition globus_gram_client.c:2351
globus_gram_client_get_jobmanager_version
int globus_gram_client_get_jobmanager_version(const char *resource_manager_contact, globus_hashtable_t *extensions)
Get version information from a job manager.
Definition globus_gram_client.c:949
globus_gram_client_job_refresh_credentials
int globus_gram_client_job_refresh_credentials(char *job_contact, gss_cred_id_t creds)
Delegate a new credential to a job.
Definition globus_gram_client.c:2804
globus_gram_client_job_callback_register
int globus_gram_client_job_callback_register(const char *job_contact, int job_state_mask, const char *callback_contact, int *job_status, int *failure_code)
Register a new callback contact to be notified for job state changes.
Definition globus_gram_client.c:2543
globus_gram_client_job_cancel
int globus_gram_client_job_cancel(const char *job_contact)
Cancel a GRAM job.
Definition globus_gram_client.c:1675
globus_gram_client_job_request_with_info
int globus_gram_client_job_request_with_info(const char *resource_manager_contact, const char *description, int job_state_mask, const char *callback_contact, char **job_contact, globus_gram_client_job_info_t *info)
Send a job request to a GRAM service and parse extensions in the response.
Definition globus_gram_client.c:1478
globus_gram_client_register_job_callback_unregistration
int globus_gram_client_register_job_callback_unregistration(const char *job_contact, const char *callback_contact, globus_gram_client_attr_t attr, globus_gram_client_nonblocking_func_t register_callback, void *register_callback_arg)
Unregister a callback contact to stop job state change notifications.
Definition globus_gram_client.c:3121
globus_gram_client_job_status
int globus_gram_client_job_status(const char *job_contact, int *job_status, int *failure_code)
Send a status query to a GRAM job.
Definition globus_gram_client.c:2142
globus_gram_client_register_job_signal
int globus_gram_client_register_job_signal(const char *job_contact, globus_gram_protocol_job_signal_t signal, const char *signal_arg, globus_gram_client_attr_t attr, globus_gram_client_nonblocking_func_t register_callback, void *register_callback_arg)
Send a signal a GRAM job.
Definition globus_gram_client.c:2019
globus_gram_client_job_request
int globus_gram_client_job_request(const char *resource_manager_contact, const char *description, int job_state_mask, const char *callback_contact, char **job_contact)
Send a job request to a GRAM service.
Definition globus_gram_client.c:1257
globus_gram_client_register_ping
int globus_gram_client_register_ping(const char *resource_manager_contact, globus_gram_client_attr_t attr, globus_gram_client_nonblocking_func_t register_callback, void *register_callback_arg)
Send a ping request to a GRAM service.
Definition globus_gram_client.c:794
globus_gram_client_job_signal
int globus_gram_client_job_signal(const char *job_contact, globus_gram_protocol_job_signal_t signal, const char *signal_arg, int *job_status, int *failure_code)
Send a signal a GRAM job.
Definition globus_gram_client.c:1863
globus_gram_client_register_job_request
int globus_gram_client_register_job_request(const char *resource_manager_contact, const char *description, int job_state_mask, const char *callback_contact, globus_gram_client_attr_t attr, globus_gram_client_nonblocking_func_t register_callback, void *register_callback_arg)
Send a job request to a GRAM service.
Definition globus_gram_client.c:1159
globus_gram_client_register_job_request_with_info
int globus_gram_client_register_job_request_with_info(const char *resource_manager_contact, const char *description, int job_state_mask, const char *callback_contact, globus_gram_client_attr_t attr, globus_gram_client_info_callback_func_t callback, void *callback_arg)
Send a job request to a GRAM service with extensions-aware callback.
Definition globus_gram_client.c:1376
globus_gram_client_job_status_with_info
int globus_gram_client_job_status_with_info(const char *job_contact, globus_gram_client_job_info_t *job_info)
Send a status query to a GRAM job.
Definition globus_gram_client.c:2442
globus_gram_client_register_job_status
int globus_gram_client_register_job_status(const char *job_contact, globus_gram_client_attr_t attr, globus_gram_client_nonblocking_func_t register_callback, void *register_callback_arg)
Send a status query to a GRAM job.
Definition globus_gram_client.c:2254
globus_gram_client_job_callback_unregister
int globus_gram_client_job_callback_unregister(const char *job_contact, const char *callback_contact, int *job_status, int *failure_code)
Unregister a callback contact to stop job state change notifications.
Definition globus_gram_client.c:2678
globus_gram_client_job_contact_free
int globus_gram_client_job_contact_free(char *job_contact)
Free a job contact string.
Definition globus_gram_client.c:3509
globus_gram_client_set_credentials
int globus_gram_client_set_credentials(gss_cred_id_t new_credentials)
Set the default GRAM credential.
Definition globus_gram_client.c:734
globus_gram_client_error_string
const char * globus_gram_client_error_string(int error_code)
Get a description of a a GRAM error code.
Definition globus_gram_client.c:1554
globus_gram_client_debug
void globus_gram_client_debug(void)
Enable GRAM debugging.
Definition globus_gram_client.c:344
globus_gram_client_job_info_destroy
void globus_gram_client_job_info_destroy(globus_gram_client_job_info_t *info)
Free memory associated with a globus_gram_client_job_info_t structure.
Definition globus_gram_client.c:4336
globus_gram_client_version
int globus_gram_client_version(void)
Return GRAM protocol version.
Definition globus_gram_client.c:705
globus_gram_client_job_info_s
Extensible job information structure.
Definition globus_gram_client.h:114
globus_gram_client_job_info_s::job_contact
char * job_contact
Definition globus_gram_client.h:122
globus_gram_client_job_info_s::extensions
globus_hashtable_t extensions
Definition globus_gram_client.h:118
globus_gram_client_job_info_s::protocol_error_code
int protocol_error_code
Definition globus_gram_client.h:130
globus_gram_client_job_info_s::job_state
int job_state
Definition globus_gram_client.h:126