globus_xio  4.15
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
globus_xio_types.h
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 
17 #if !defined(GLOBUS_XIO_TYPES_H)
18 #define GLOBUS_XIO_TYPES_H 1
19 
20 #include "globus_common.h"
21 
22 #ifdef __cplusplus
23 extern "C" {
24 #endif
25 
26 #define GLOBUS_XIO_QUERY ((globus_xio_driver_t) 0x01)
27 
28 /*************************************************************************
29  * define types
30  ************************************************************************/
31 typedef struct globus_i_xio_handle_s * globus_xio_handle_t;
32 typedef struct globus_i_xio_context_entry_s * globus_xio_driver_handle_t;
33 typedef struct globus_i_xio_op_s * globus_xio_operation_t;
34 typedef struct globus_i_xio_driver_s * globus_xio_driver_t;
35 typedef struct globus_i_xio_attr_s * globus_xio_attr_t;
36 typedef struct globus_i_xio_stack_s * globus_xio_stack_t;
37 typedef struct globus_i_xio_server_s * globus_xio_server_t;
38 typedef struct globus_i_xio_server_s * globus_xio_driver_server_t;
39 typedef struct globus_i_xio_op_s * globus_xio_data_descriptor_t;
40 typedef struct iovec globus_xio_iovec_t;
41 
50 {
51  GLOBUS_XIO_OPERATION_TYPE_NONE,
52  GLOBUS_XIO_OPERATION_TYPE_FINISHED,
53  GLOBUS_XIO_OPERATION_TYPE_OPEN,
54  GLOBUS_XIO_OPERATION_TYPE_CLOSE,
55  GLOBUS_XIO_OPERATION_TYPE_READ,
56  GLOBUS_XIO_OPERATION_TYPE_WRITE,
57  GLOBUS_XIO_OPERATION_TYPE_ACCEPT,
58  GLOBUS_XIO_OPERATION_TYPE_DRIVER,
59  GLOBUS_XIO_OPERATION_TYPE_DD,
60  GLOBUS_XIO_OPERATION_TYPE_SERVER_INIT
62 
63 typedef enum globus_i_xio_signal_type_e
64 {
65  GLOBUS_XIO_SIGNAL_TYPE_NONE
66 } globus_xio_signal_type_t;
67 
68 typedef enum
69 {
70  GLOBUS_XIO_ERROR_CANCELED,
71  GLOBUS_XIO_ERROR_EOF,
72  GLOBUS_XIO_ERROR_COMMAND,
73  GLOBUS_XIO_ERROR_CONTACT_STRING,
74  GLOBUS_XIO_ERROR_PARAMETER,
75  GLOBUS_XIO_ERROR_MEMORY,
76  GLOBUS_XIO_ERROR_SYSTEM_ERROR,
77  GLOBUS_XIO_ERROR_SYSTEM_RESOURCE,
78  GLOBUS_XIO_ERROR_STACK,
79  GLOBUS_XIO_ERROR_DRIVER,
80  GLOBUS_XIO_ERROR_PASS,
81  GLOBUS_XIO_ERROR_ALREADY_REGISTERED,
82  GLOBUS_XIO_ERROR_STATE,
83  GLOBUS_XIO_ERROR_WRAPPED,
84  GLOBUS_XIO_ERROR_NOT_REGISTERED,
85  GLOBUS_XIO_ERROR_NOT_ACTIVATED,
86  GLOBUS_XIO_ERROR_UNLOADED,
87  GLOBUS_XIO_ERROR_TIMEOUT,
88  GLOBUS_XIO_ERROR_PARSE
89 } globus_xio_error_type_t;
90 
91 
92 /* ALL is all but ACCEPT */
93 typedef enum
94 {
95  GLOBUS_XIO_ATTR_SET_TIMEOUT_ALL,
96  GLOBUS_XIO_ATTR_SET_TIMEOUT_OPEN,
97  GLOBUS_XIO_ATTR_SET_TIMEOUT_CLOSE,
98  GLOBUS_XIO_ATTR_SET_TIMEOUT_READ,
99  GLOBUS_XIO_ATTR_SET_TIMEOUT_WRITE,
100  GLOBUS_XIO_ATTR_SET_TIMEOUT_ACCEPT,
101  GLOBUS_XIO_ATTR_SET_SPACE,
102  GLOBUS_XIO_ATTR_CLOSE_NO_CANCEL,
103  GLOBUS_XIO_ATTR_SET_CREDENTIAL,
104  GLOBUS_XIO_ATTR_GET_CREDENTIAL
105 } globus_xio_attr_cmd_t;
106 
117 typedef enum
118 {
119  /* Make sure this enum starts at a high number */
120 
133  /* char ** contact_string_out */
135 
146  /* char ** contact_string_out */
148 
159  /* char ** contact_string_out */
161 
172  /* char ** contact_string_out */
174 
182  /* globus_off_t offset */
184 
194  /* char * config_string */
196 
198 
199 typedef enum
200 {
201  GLOBUS_XIO_DD_SET_OFFSET,
202  GLOBUS_XIO_DD_GET_OFFSET
203 } globus_xio_dd_cmd_t;
204 
205 typedef enum
206 {
207  GLOBUS_XIO_CANCEL_OPEN = 0x01,
208  GLOBUS_XIO_CANCEL_CLOSE = 0x02,
209  GLOBUS_XIO_CANCEL_READ = 0x04,
210  GLOBUS_XIO_CANCEL_WRITE = 0x08
211 } globus_xio_cancel_t;
212 
213 typedef enum
214 {
215  GLOBUS_XIO_DEBUG_ERROR = 1,
216  GLOBUS_XIO_DEBUG_WARNING = 2,
217  GLOBUS_XIO_DEBUG_TRACE = 4,
218  GLOBUS_XIO_DEBUG_INTERNAL_TRACE = 8,
219  GLOBUS_XIO_DEBUG_INFO = 16,
220  GLOBUS_XIO_DEBUG_STATE = 32,
221  GLOBUS_XIO_DEBUG_INFO_VERBOSE = 64
222 } globus_xio_debug_levels_t;
223 
224 typedef struct
225 {
226  char * unparsed;
227  char * resource;
228  char * host;
229  char * port;
230  char * scheme;
231  char * user;
232  char * pass;
233  char * subject;
234 } globus_xio_contact_t;
235 
236 
237 typedef struct globus_xio_driver_list_ent_s
238 {
239  globus_xio_driver_t driver;
240  char * driver_name;
241  char * opts;
242  void * user_arg;
243  globus_bool_t loaded;
244 }globus_xio_driver_list_ent_t;
245 
246 #ifdef __cplusplus
247 }
248 #endif
249 
250 #endif