Grid Community Toolkit  6.2.1705709074 (tag: v6.2.20240202)
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
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 
54 /******************************************************************************
55  Type definitions
56 ******************************************************************************/
57 
58 
97  void * user_callback_arg,
98  char * job_contact,
99  int state,
100  int errorcode);
101 
114 {
118  globus_hashtable_t extensions;
122  char * job_contact;
131 }
133 
160  void * user_callback_arg,
161  const char * job_contact,
162  globus_gram_client_job_info_t * job_info);
163 
174 
175 
185 #define GLOBUS_GRAM_CLIENT_NO_ATTR (globus_gram_client_attr_t) NULL
186 
222  void * user_callback_arg,
223  globus_gram_protocol_error_t operation_failure_code,
224  const char * job_contact,
226  globus_gram_protocol_error_t job_failure_code);
227 
228 
235 /******************************************************************************
236  Function prototypes
237 ******************************************************************************/
238 int
241  void * user_callback_arg,
242  char ** callback_contact);
243 
244 
245 int
248  callback_func,
249  void * user_callback_arg,
250  char ** callback_contact);
251 
252 int
254  const char * resource_manager_contact,
255  const char * description,
256  int job_state_mask,
257  const char * callback_contact,
258  globus_gram_client_attr_t attr,
260  register_callback,
261  void * register_callback_arg);
262 
263 int
265  const char * resource_manager_contact,
266  const char * description,
267  int job_state_mask,
268  const char * callback_contact,
269  char ** job_contact);
270 
271 int
273  const char * resource_manager_contact,
274  const char * description,
275  int job_state_mask,
276  const char * callback_contact,
277  globus_gram_client_attr_t attr,
279  callback,
280  void * callback_arg);
281 
282 int
284  const char * resource_manager_contact,
285  const char * description,
286  int job_state_mask,
287  const char * callback_contact,
288  char ** job_contact,
290 
291 int
293  const char * job_contact,
294  globus_gram_client_attr_t attr,
296  register_callback,
297  void * register_callback_arg);
298 
299 int
301  const char * job_contact);
302 
303 int
305  const char * job_contact,
306  globus_gram_client_attr_t attr,
308  register_callback,
309  void * register_callback_arg);
310 
311 int
313  const char * job_contact,
314  globus_gram_client_attr_t attr,
316  info_callback,
317  void * callback_arg);
318 
319 
320 int
322  char * job_contact,
323  gss_cred_id_t creds);
324 
325 int
327  char * job_contact,
328  gss_cred_id_t creds,
329  globus_gram_client_attr_t attr,
331  register_callback,
332  void * register_callback_arg);
333 
334 int
336  const char * job_contact,
337  int * job_status,
338  int * failure_code);
339 
340 int
342  const char * job_contact,
343  globus_gram_client_job_info_t * job_info);
344 
345 int
347  const char * job_contact,
349  const char * signal_arg,
350  globus_gram_client_attr_t attr,
352  register_callback,
353  void * register_callback_arg);
354 
355 int
357  const char * job_contact,
359  const char * signal_arg,
360  int * job_status,
361  int * failure_code);
362 
363 
364 int
366  const char * job_contact,
367  int job_state_mask,
368  const char * callback_contact,
369  globus_gram_client_attr_t attr,
371  register_callback,
372  void * register_callback_arg);
373 
374 int
376  const char * job_contact,
377  int job_state_mask,
378  const char * callback_contact,
379  int * job_status,
380  int * failure_code);
381 
382 int
384  const char * job_contact,
385  const char * callback_contact,
386  globus_gram_client_attr_t attr,
388  register_callback,
389  void * register_callback_arg);
390 
391 int
393  const char * job_contact,
394  const char * callback_contact,
395  int * job_status,
396  int * failure_code);
397 
398 int
400  char * callback_contact);
401 
402 int
404  char * job_contact);
405 
406 const char *
408  int error_code);
409 
410 int
412 
413 int
414 globus_gram_client_set_credentials(gss_cred_id_t new_credentials);
415 
416 int
418  const char * resource_manager_contact);
419 
420 int
422  const char * resource_manager_contact,
423  globus_gram_client_attr_t attr,
425  register_callback,
426  void * register_callback_arg);
427 
428 int
430  const char * resource_manager_contact,
431  globus_hashtable_t * extensions);
432 
433 int
435  const char * resource_manager_contact,
436  globus_gram_client_attr_t attr,
438  info_callback,
439  void * callback_arg);
440 
441 void
443 
449 int
451  globus_gram_client_attr_t * attr);
452 int
454  globus_gram_client_attr_t * attr);
455 
456 int
458  globus_gram_client_attr_t attr,
459  gss_cred_id_t credential);
460 
461 int
463  globus_gram_client_attr_t attr,
464  gss_cred_id_t * credential);
465 
466 int
468  globus_gram_client_attr_t attr,
469  globus_io_secure_delegation_mode_t mode);
470 
471 int
473  globus_gram_client_attr_t attr,
474  globus_io_secure_delegation_mode_t *mode);
475 
476 void
479 
480 #define GLOBUS_GRAM_CLIENT_MODULE (&globus_gram_client_module)
481 
482 extern globus_module_descriptor_t globus_gram_client_module;
483 
484 #ifdef __cplusplus
485 }
486 #endif
487 
488 #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:794
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
struct globus_gram_client_job_info_s globus_gram_client_job_info_t
Extensible job information structure.
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
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
int globus_gram_client_ping(const char *resource_manager_contact)
Send a ping request to a GRAM service.
Definition: globus_gram_client.c:870
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
int globus_gram_client_job_status_with_info(const char *job_contact, globus_gram_client_job_info_t *info)
Send a status query to a GRAM job.
Definition: globus_gram_client.c:2442
int protocol_error_code
Definition: globus_gram_client.h:130
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_hashtable_t extensions
Definition: globus_gram_client.h:118
int job_state
Definition: globus_gram_client.h:126
globus_gram_protocol_error_t
Definition: globus_gram_protocol_constants.h:25
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
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
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_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:1478
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
char * job_contact
Definition: globus_gram_client.h:122
int globus_gram_client_job_cancel(const char *job_contact)
Cancel a GRAM job.
Definition: globus_gram_client.c:1675
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:3346
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
int globus_gram_client_callback_disallow(char *callback_contact)
Stop listening for job state change callbacks.
Definition: globus_gram_client.c:3457
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:1159
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
int globus_gram_client_set_credentials(gss_cred_id_t new_credentials)
Set the default GRAM credential.
Definition: globus_gram_client.c:734
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
void * globus_gram_client_attr_t
GRAM client operation attribute.
Definition: globus_gram_client.h:173
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
Headers common to all of Globus.
Extensible job information structure.
Definition: globus_gram_client.h:113
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_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:1863
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
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
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
void globus_gram_client_debug(void)
Enable GRAM debugging.
Definition: globus_gram_client.c:344
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
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
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:705
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:2543
int globus_gram_client_job_contact_free(char *job_contact)
Free a job contact string.
Definition: globus_gram_client.c:3509
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
Module Descriptor.
Definition: globus_module.h:71