globus_xio_types.h

00001 /*
00002  * Copyright 1999-2006 University of Chicago
00003  * 
00004  * Licensed under the Apache License, Version 2.0 (the "License");
00005  * you may not use this file except in compliance with the License.
00006  * You may obtain a copy of the License at
00007  * 
00008  * http://www.apache.org/licenses/LICENSE-2.0
00009  * 
00010  * Unless required by applicable law or agreed to in writing, software
00011  * distributed under the License is distributed on an "AS IS" BASIS,
00012  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00013  * See the License for the specific language governing permissions and
00014  * limitations under the License.
00015  */
00016 
00017 #if !defined(GLOBUS_XIO_TYPES_H)
00018 #define GLOBUS_XIO_TYPES_H 1
00019 
00020 #include "globus_common.h"
00021 
00022 #ifdef __cplusplus
00023 extern "C" {
00024 #endif
00025 
00026 #define GLOBUS_XIO_QUERY ((globus_xio_driver_t) 0x01)
00027 
00028 /*************************************************************************
00029  *    define types
00030  ************************************************************************/
00031 typedef struct globus_i_xio_handle_s *          globus_xio_handle_t;
00032 typedef struct globus_i_xio_context_entry_s *   globus_xio_driver_handle_t;
00033 typedef struct globus_i_xio_op_s *              globus_xio_operation_t;
00034 typedef struct globus_i_xio_driver_s *          globus_xio_driver_t;
00035 typedef struct globus_i_xio_attr_s *            globus_xio_attr_t;
00036 typedef struct globus_i_xio_stack_s *           globus_xio_stack_t;
00037 typedef struct globus_i_xio_server_s *          globus_xio_server_t;
00038 typedef struct globus_i_xio_server_s *          globus_xio_driver_server_t;
00039 typedef struct globus_i_xio_op_s *              globus_xio_data_descriptor_t;
00040 typedef struct iovec                            globus_xio_iovec_t;
00041 
00049 typedef enum globus_i_xio_op_type_e
00050 {
00051     GLOBUS_XIO_OPERATION_TYPE_NONE,
00052     GLOBUS_XIO_OPERATION_TYPE_FINISHED,
00053     GLOBUS_XIO_OPERATION_TYPE_OPEN,
00054     GLOBUS_XIO_OPERATION_TYPE_CLOSE,
00055     GLOBUS_XIO_OPERATION_TYPE_READ,
00056     GLOBUS_XIO_OPERATION_TYPE_WRITE,
00057     GLOBUS_XIO_OPERATION_TYPE_ACCEPT,
00058     GLOBUS_XIO_OPERATION_TYPE_DRIVER,
00059     GLOBUS_XIO_OPERATION_TYPE_DD,
00060     GLOBUS_XIO_OPERATION_TYPE_SERVER_INIT
00061 } globus_xio_operation_type_t;
00062 
00063 typedef enum globus_i_xio_signal_type_e
00064 {
00065     GLOBUS_XIO_SIGNAL_TYPE_NONE
00066 } globus_xio_signal_type_t;
00067 
00068 typedef enum
00069 {
00070     GLOBUS_XIO_ERROR_CANCELED,
00071     GLOBUS_XIO_ERROR_EOF,
00072     GLOBUS_XIO_ERROR_COMMAND,
00073     GLOBUS_XIO_ERROR_CONTACT_STRING,
00074     GLOBUS_XIO_ERROR_PARAMETER,
00075     GLOBUS_XIO_ERROR_MEMORY,
00076     GLOBUS_XIO_ERROR_SYSTEM_ERROR,
00077     GLOBUS_XIO_ERROR_SYSTEM_RESOURCE,
00078     GLOBUS_XIO_ERROR_STACK,
00079     GLOBUS_XIO_ERROR_DRIVER,
00080     GLOBUS_XIO_ERROR_PASS,
00081     GLOBUS_XIO_ERROR_ALREADY_REGISTERED,
00082     GLOBUS_XIO_ERROR_STATE,
00083     GLOBUS_XIO_ERROR_WRAPPED,
00084     GLOBUS_XIO_ERROR_NOT_REGISTERED,
00085     GLOBUS_XIO_ERROR_NOT_ACTIVATED,
00086     GLOBUS_XIO_ERROR_UNLOADED,
00087     GLOBUS_XIO_ERROR_TIMEOUT,
00088     GLOBUS_XIO_ERROR_PARSE
00089 } globus_xio_error_type_t;
00090 
00091 
00092 /* ALL is all but ACCEPT */
00093 typedef enum
00094 {
00095     GLOBUS_XIO_ATTR_SET_TIMEOUT_ALL,
00096     GLOBUS_XIO_ATTR_SET_TIMEOUT_OPEN,
00097     GLOBUS_XIO_ATTR_SET_TIMEOUT_CLOSE,
00098     GLOBUS_XIO_ATTR_SET_TIMEOUT_READ,
00099     GLOBUS_XIO_ATTR_SET_TIMEOUT_WRITE,
00100     GLOBUS_XIO_ATTR_SET_TIMEOUT_ACCEPT,
00101     GLOBUS_XIO_ATTR_SET_SPACE,
00102     GLOBUS_XIO_ATTR_CLOSE_NO_CANCEL,
00103     GLOBUS_XIO_ATTR_SET_CREDENTIAL,
00104     GLOBUS_XIO_ATTR_GET_CREDENTIAL
00105 } globus_xio_attr_cmd_t;
00106 
00117 typedef enum
00118 {
00119     /* Make sure this enum starts at a high number */
00120     
00133     /* char **                          contact_string_out */
00134     GLOBUS_XIO_GET_LOCAL_CONTACT = 12345,
00135     
00146     /* char **                          contact_string_out */
00147     GLOBUS_XIO_GET_LOCAL_NUMERIC_CONTACT,
00148     
00159     /* char **                          contact_string_out */
00160     GLOBUS_XIO_GET_REMOTE_CONTACT,
00161     
00172     /* char **                          contact_string_out */
00173     GLOBUS_XIO_GET_REMOTE_NUMERIC_CONTACT,
00174     
00182     /* globus_off_t                     offset */
00183     GLOBUS_XIO_SEEK,
00184 
00194     /* char *                           config_string */
00195     GLOBUS_XIO_SET_STRING_OPTIONS,
00196 
00206     /* char **                          config_string */
00207     GLOBUS_XIO_GET_STRING_OPTIONS,
00208 
00218     /* const char **                    driver_name */
00219     GLOBUS_XIO_GET_DRIVER_NAME
00220     
00221 } globus_xio_handle_cmd_t;
00222 
00223 typedef enum
00224 {
00225     GLOBUS_XIO_DD_SET_OFFSET,
00226     GLOBUS_XIO_DD_GET_OFFSET
00227 } globus_xio_dd_cmd_t;
00228 
00229 typedef enum
00230 {
00231     GLOBUS_XIO_CANCEL_OPEN = 0x01,
00232     GLOBUS_XIO_CANCEL_CLOSE = 0x02,
00233     GLOBUS_XIO_CANCEL_READ = 0x04,
00234     GLOBUS_XIO_CANCEL_WRITE = 0x08
00235 } globus_xio_cancel_t;
00236 
00237 typedef enum
00238 {
00239     GLOBUS_XIO_DEBUG_ERROR = 1,
00240     GLOBUS_XIO_DEBUG_WARNING = 2,
00241     GLOBUS_XIO_DEBUG_TRACE = 4,
00242     GLOBUS_XIO_DEBUG_INTERNAL_TRACE = 8,
00243     GLOBUS_XIO_DEBUG_INFO = 16,
00244     GLOBUS_XIO_DEBUG_STATE = 32,
00245     GLOBUS_XIO_DEBUG_INFO_VERBOSE = 64
00246 } globus_xio_debug_levels_t;
00247 
00248 typedef struct
00249 {
00250     char *                              unparsed;
00251     char *                              resource;
00252     char *                              host;
00253     char *                              port;
00254     char *                              scheme;
00255     char *                              user;
00256     char *                              pass;
00257     char *                              subject;
00258 } globus_xio_contact_t;
00259 
00260 
00261 typedef struct globus_xio_driver_list_ent_s
00262 {
00263     globus_xio_driver_t                 driver;
00264     char *                              driver_name;
00265     char *                              opts;
00266     void *                              user_arg;
00267     globus_bool_t                       loaded;
00268 }globus_xio_driver_list_ent_t;
00269 
00270 #ifdef __cplusplus
00271 }
00272 #endif
00273 
00274 #endif

Generated on 2 May 2016 for globus_xio by  doxygen 1.4.7