3
/*___INFO__MARK_BEGIN__*/
4
/*************************************************************************
6
* The Contents of this file are made available subject to the terms of
7
* the Sun Industry Standards Source License Version 1.2
9
* Sun Microsystems Inc., March, 2001
12
* Sun Industry Standards Source License Version 1.2
13
* =================================================
14
* The contents of this file are subject to the Sun Industry Standards
15
* Source License Version 1.2 (the "License"); You may not use this file
16
* except in compliance with the License. You may obtain a copy of the
17
* License at http://gridengine.sunsource.net/Gridengine_SISSL_license.html
19
* Software provided under this License is provided on an "AS IS" basis,
20
* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
21
* WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
22
* MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
23
* See the License for the specific provisions governing your rights and
24
* obligations concerning the Software.
26
* The Initial Developer of the Original Code is: Sun Microsystems, Inc.
28
* Copyright: 2001 by Sun Microsystems, Inc.
30
* All Rights Reserved.
32
************************************************************************/
33
/*___INFO__MARK_END__*/
37
#ifndef __SGE_GDI_INTERN_H
38
# include "sge_gdiP.h"
41
#include "uti/sge_monitor.h"
43
#include "sgeobj/sge_object.h"
45
#include "gdi/sge_gdi_ctx.h"
46
#include "gdi/sge_gdi_packet.h"
48
typedef struct _gdi_object_t gdi_object_t;
50
typedef int (*modifier_func_t)(
51
sge_gdi_ctx_class_t *ctx,
53
lListElem *new_cal, /* destination */
54
lListElem *cep, /* reduced element */
55
int add, /* 1 for add/0 for mod */
58
gdi_object_t *object, /* some kind of "this" */
63
typedef int (*writer_func_t)(
64
sge_gdi_ctx_class_t *ctx,
66
lListElem *ep, /* new modified element */
67
gdi_object_t *this /* some kind of "this" */
70
/* allows to retrieve a master list */
71
typedef lList ** (*getMasterList)(void);
73
typedef int (*on_success_func_t)(
74
sge_gdi_ctx_class_t *ctx,
75
lListElem *ep, /* new modified and already spooled element */
76
lListElem *old_ep, /* old element is NULL in add case */
77
gdi_object_t *this, /* some kind of "this" */
78
lList **ppList, /* a list to pass back information for post processing */
79
monitoring_t *monitor /* monitoring structure */
82
struct _gdi_object_t {
83
u_long32 target; /* SGE_QUEUE_LIST */
84
int key_nm; /* QU_qname */
85
lDescr *type; /* QU_Type */
86
char *object_name; /* "queue" */
87
sge_object_type list_type; /* identifier to retrive the master list via object_type_get_master_list*/
88
modifier_func_t modifier; /* responsible for validating each our attribute modifier */
89
writer_func_t writer; /* function that spools our object */
90
on_success_func_t on_success; /* do everything what has to be done on successful writing */
93
gdi_object_t *get_gdi_object(u_long32);
96
sge_c_gdi(sge_gdi_ctx_class_t *ctx, sge_gdi_packet_class_t *packet,
97
sge_gdi_task_class_t *task, lList **answer_list, monitoring_t *monitor);
100
sge_gdi_add_mod_generic(sge_gdi_ctx_class_t *ctx,
101
lList **alpp, lListElem *instructions, int add,
102
gdi_object_t *object, const char *ruser,
103
const char *rhost, int sub_command, lList **ppList,
104
monitoring_t *monitor);
106
void sge_clean_lists(void);
108
/* EB: TODO: CLEANUP: should be replaced with sge_gdi_packet_verify_version() */
109
int verify_request_version(lList **alpp, u_long32 version, char *host,
110
char *commproc, int id);
112
#endif /* __SGE_C_GDI_H */