Grid Community Toolkit  6.2.1541705016
globus_gram_client.h
Go to the documentation of this file.
1 /*
2  * Copyright 1999-2006 University of Chicago
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
26 #ifndef GLOBUS_GRAM_CLIENT_H
27 #define GLOBUS_GRAM_CLIENT_H
28 
29 /* Include header files */
30 #include "globus_common.h"
31 #include "globus_io.h"
33 
34 #ifdef __cplusplus
35 extern "C" {
36 #endif
37 
38 #ifndef GLOBUS_GLOBAL_DOCUMENT_SET
39 
43 #endif
44 
52 /******************************************************************************
53  Type definitions
54 ******************************************************************************/
55 
56 
94  void * user_callback_arg,
95  char * job_contact,
96  int state,
97  int errorcode);
98 
111 {
115  globus_hashtable_t extensions;
119  char * job_contact;
128 }
130 
157  void * user_callback_arg,
158  const char * job_contact,
159  globus_gram_client_job_info_t * job_info);
160 
171 
172 
182 #define GLOBUS_GRAM_CLIENT_NO_ATTR (globus_gram_client_attr_t) NULL
183 
219  void * user_callback_arg,
220  globus_gram_protocol_error_t operation_failure_code,
221  const char * job_contact,
223  globus_gram_protocol_error_t job_failure_code);
224 
225 
231 /******************************************************************************
232  Function prototypes
233 ******************************************************************************/
234 int
237  void * user_callback_arg,
238  char ** callback_contact);
239 
240 
241 int
244  callback_func,
245  void * user_callback_arg,
246  char ** callback_contact);
247 
248 int
250  const char * resource_manager_contact,
251  const char * description,
252  int job_state_mask,
253  const char * callback_contact,
256  register_callback,
257  void * register_callback_arg);
258 
259 int
261  const char * resource_manager_contact,
262  const char * description,
263  int job_state_mask,
264  const char * callback_contact,
265  char ** job_contact);
266 
267 int
269  const char * resource_manager_contact,
270  const char * description,
271  int job_state_mask,
272  const char * callback_contact,
275  callback,
276  void * callback_arg);
277 
278 int
280  const char * resource_manager_contact,
281  const char * description,
282  int job_state_mask,
283  const char * callback_contact,
284  char ** job_contact,
286 
287 int
289  const char * job_contact,
292  register_callback,
293  void * register_callback_arg);
294 
295 int
297  const char * job_contact);
298 
299 int
301  const char * job_contact,
304  register_callback,
305  void * register_callback_arg);
306 
307 int
309  const char * job_contact,
312  info_callback,
313  void * callback_arg);
314 
315 
316 int
318  char * job_contact,
319  gss_cred_id_t creds);
320 
321 int
323  char * job_contact,
324  gss_cred_id_t creds,
327  register_callback,
328  void * register_callback_arg);
329 
330 int
332  const char * job_contact,
333  int * job_status,
334  int * failure_code);
335 
336 int
338  const char * job_contact,
339  globus_gram_client_job_info_t * job_info);
340 
341 int
343  const char * job_contact,
345  const char * signal_arg,
348  register_callback,
349  void * register_callback_arg);
350 
351 int
353  const char * job_contact,
355  const char * signal_arg,
356  int * job_status,
357  int * failure_code);
358 
359 
360 int
362  const char * job_contact,
363  int job_state_mask,
364  const char * callback_contact,
367  register_callback,
368  void * register_callback_arg);
369 
370 int
372  const char * job_contact,
373  int job_state_mask,
374  const char * callback_contact,
375  int * job_status,
376  int * failure_code);
377 
378 int
380  const char * job_contact,
381  const char * callback_contact,
384  register_callback,
385  void * register_callback_arg);
386 
387 int
389  const char * job_contact,
390  const char * callback_contact,
391  int * job_status,
392  int * failure_code);
393 
394 int
396  char * callback_contact);
397 
398 int
400  char * job_contact);
401 
402 const char *
404  int error_code);
405 
406 int
408 
409 int
410 globus_gram_client_set_credentials(gss_cred_id_t new_credentials);
411 
412 int
414  const char * resource_manager_contact);
415 
416 int
418  const char * resource_manager_contact,
421  register_callback,
422  void * register_callback_arg);
423 
424 int
426  const char * resource_manager_contact,
427  globus_hashtable_t * extensions);
428 
429 int
431  const char * resource_manager_contact,
434  info_callback,
435  void * callback_arg);
436 
437 void
439 
444 int
447 int
450 
451 int
454  gss_cred_id_t credential);
455 
456 int
459  gss_cred_id_t * credential);
460 
461 int
464  globus_io_secure_delegation_mode_t mode);
465 
466 int
469  globus_io_secure_delegation_mode_t *mode);
470 
471 void
474 
475 #define GLOBUS_GRAM_CLIENT_MODULE (&globus_gram_client_module)
476 
477 extern globus_module_descriptor_t globus_gram_client_module;
478 
479 #ifdef __cplusplus
480 }
481 #endif
482 
483 #endif /* GLOBUS_GRAM_CLIENT_H */
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
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:796
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:93
const char * globus_gram_client_error_string(int error_code)
Get a description of a a GRAM error code.
Definition: globus_gram_client.c:1556
struct globus_gram_client_job_info_s globus_gram_client_job_info_t
Extensible job information structure.
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:1772
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:156
int globus_gram_client_ping(const char *resource_manager_contact)
Send a ping request to a GRAM service.
Definition: globus_gram_client.c:872
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:951
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:2444
int protocol_error_code
Definition: globus_gram_client.h:127
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:2256
globus_hashtable_t extensions
Definition: globus_gram_client.h:115
int job_state
Definition: globus_gram_client.h:123
globus_gram_protocol_error_t
Definition: globus_gram_protocol_constants.h:25
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:2806
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:2353
globus_gram_protocol_job_signal_t
Definition: globus_gram_protocol_constants.h:212
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
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:1480
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:2021
char * job_contact
Definition: globus_gram_client.h:119
int globus_gram_client_job_cancel(const char *job_contact)
Cancel a GRAM job.
Definition: globus_gram_client.c:1677
int globus_gram_client_attr_init(globus_gram_client_attr_t *attr)
Initialize a GRAM client attribute.
Definition: globus_gram_client_attr.c:55
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:3348
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:2144
int globus_gram_client_callback_disallow(char *callback_contact)
Stop listening for job state change callbacks.
Definition: globus_gram_client.c:3459
int globus_gram_client_attr_destroy(globus_gram_client_attr_t *attr)
Destroy a GRAM client attribute.
Definition: globus_gram_client_attr.c:104
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:1161
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:3227
int globus_gram_client_set_credentials(gss_cred_id_t new_credentials)
Set the default GRAM credential.
Definition: globus_gram_client.c:736
void * globus_gram_client_attr_t
GRAM client operation attribute.
Definition: globus_gram_client.h:170
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:4347
Headers common to all of Globus.
Extensible job information structure.
Definition: globus_gram_client.h:110
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:1259
globus_gram_protocol_job_state_t
Definition: globus_gram_protocol_constants.h:270
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:1865
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:1378
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:218
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:2680
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:2998
void globus_gram_client_debug(void)
Enable GRAM debugging.
Definition: globus_gram_client.c:346
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:2897
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:3123
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
int globus_gram_client_version(void)
Return GRAM protocol version.
Definition: globus_gram_client.c:707
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
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:2545
int globus_gram_client_job_contact_free(char *job_contact)
Free a job contact string.
Definition: globus_gram_client.c:3520
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:1054
Module Descriptor.
Definition: globus_module.h:69