~ubuntu-branches/ubuntu/edgy/ncbi-tools6/edgy

« back to all changes in this revision

Viewing changes to connect/ncbi_server_info.h

  • Committer: Bazaar Package Importer
  • Author(s): Barry deFreese
  • Date: 2006-07-19 23:28:07 UTC
  • mfrom: (1.1.5 upstream)
  • Revision ID: james.westby@ubuntu.com-20060719232807-et3cdmcjgmnyleyx
Tags: 6.1.20060507-3ubuntu1
Re-merge with Debian

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#ifndef CONNECT___NCBI_SERVER_INFO__H
2
2
#define CONNECT___NCBI_SERVER_INFO__H
3
3
 
4
 
/*  $Id: ncbi_server_info.h,v 6.37 2003/04/09 19:05:48 siyan Exp $
 
4
/*  $Id: ncbi_server_info.h,v 6.40 2006/03/04 17:02:14 lavr Exp $
5
5
 * ===========================================================================
6
6
 *
7
7
 *                            PUBLIC DOMAIN NOTICE
56
56
/* Server types
57
57
 */
58
58
typedef enum {
59
 
    fSERV_Ncbid      = 0x1,
60
 
    fSERV_Standalone = 0x2,
61
 
    fSERV_HttpGet    = 0x4,
62
 
    fSERV_HttpPost   = 0x8,
63
 
    fSERV_Http       = fSERV_HttpGet | fSERV_HttpPost,
64
 
    fSERV_Firewall   = 0x10,
65
 
    fSERV_Dns        = 0x20
 
59
    fSERV_Ncbid           = 0x01,
 
60
    fSERV_Standalone      = 0x02,
 
61
    fSERV_HttpGet         = 0x04,
 
62
    fSERV_HttpPost        = 0x08,
 
63
    fSERV_Http            = fSERV_HttpGet | fSERV_HttpPost,
 
64
    fSERV_Firewall        = 0x10,
 
65
    fSERV_Dns             = 0x20
66
66
} ESERV_Type;
67
67
 
68
 
#define fSERV_Any           0
69
 
#define fSERV_StatelessOnly 0x80
70
 
typedef unsigned int TSERV_Type;  /* bit-wise OR of "ESERV_Type" flags */
71
 
 
72
68
 
73
69
/* Flags to specify the algorithm for selecting the most preferred
74
70
 * server from the set of available servers
105
101
/* Meta-addresses for various types of NCBI servers
106
102
 */
107
103
typedef struct {
108
 
    TNCBI_Size     args;
 
104
    TNCBI_Size   args;
109
105
#define SERV_NCBID_ARGS(ui)     ((char*) (ui) + (ui)->args)
110
106
} SSERV_NcbidInfo;
111
107
 
112
108
typedef struct {
113
 
    char           dummy;       /* placeholder, not used                     */
 
109
    char         dummy;         /* placeholder, not used                     */
114
110
} SSERV_StandaloneInfo;
115
111
 
116
112
typedef struct {
117
 
    TNCBI_Size     path;
118
 
    TNCBI_Size     args;
 
113
    TNCBI_Size   path;
 
114
    TNCBI_Size   args;
119
115
#define SERV_HTTP_PATH(ui)      ((char*) (ui) + (ui)->path)
120
116
#define SERV_HTTP_ARGS(ui)      ((char*) (ui) + (ui)->args)
121
117
} SSERV_HttpInfo;
122
118
 
123
119
typedef struct {
124
 
    ESERV_Type     type;        /* type of original server                   */
 
120
    ESERV_Type   type;          /* type of original server                   */
125
121
} SSERV_FirewallInfo;
126
122
 
127
123
typedef struct {
128
 
    char         pad[8];        /* reserved for the future use, must be zero */
 
124
    char/*bool*/ name;          /* name presence flag                        */
 
125
    char         pad[7];        /* reserved for the future use, must be zero */
129
126
} SSERV_DnsInfo;
130
127
 
131
128
 
215
212
 *                        Servers of this type do not take any arguments.
216
213
 *
217
214
 *    NCBID servers: Arguments to CGI in addition to specified by application.
218
 
 *                   Empty additional arguments denoted as '' (double quotes).
219
 
 *                   Note that arguments must not contain space characters.
 
215
 *                   Empty additional arguments denoted as '' (two single
 
216
 *                   quotes, back to back).  Note that the additional
 
217
 *                   arguments must not contain space characters.
220
218
 *
221
219
 *    HTTP* servers: Path (required) and args (optional) in the form
222
220
 *                   path[?args] (here brackets denote the optional part).
223
 
 *                   Note that no spaces allowed within this parameter.
 
221
 *                   Note that no spaces are allowed within these parameters.
224
222
 *
225
223
 *    FIREWALL servers: Servers of this type are converted real servers of
226
224
 *                      the above types, when only accessible via FIREWALL
227
 
 *                      mode of NCBI dispatcher. The purpose of this fake
 
225
 *                      mode of NCBI dispatcher.  The purpose of this fake
228
226
 *                      server type is just to let the client know that
229
 
 *                      the service exists. Additional parameter the original
230
 
 *                      type of the server before conversion. Note that servers
231
 
 *                      of type FIREWALL cannot be configured in LBSMD.
 
227
 *                      the service exists.  Additional parameter is optional
 
228
 *                      and if present, is the original type of the server
 
229
 *                      before conversion.  Note that servers of this type
 
230
 *                      cannot be configured in LBSMD.
232
231
 *
233
 
 *    DNS servers: Experimental (as of now) services for load-balancing
234
 
 *                 DNS mapping at the NCBI Web entry point.
 
232
 *    DNS servers: Services for DNS and DB load-balancing, 
 
233
 *                 and dynamic ProxyPassing at the NCBI Web entry point.
235
234
 *                 Never exported to the outside world.
236
235
 *
237
236
 * Tags may follow in no particular order but no more than one instance
356
355
 );
357
356
 
358
357
 
 
358
/* Make (a free()'able) copy of a server info.
 
359
 */
 
360
extern NCBI_XCONNECT_EXPORT SSERV_Info* SERV_CopyInfo
 
361
(const SSERV_Info* info
 
362
 );
 
363
 
 
364
 
359
365
/* Return an actual size (in bytes) the server info occupies
360
366
 * (to be used for copying info structures in whole).
361
367
 */
383
389
/*
384
390
 * --------------------------------------------------------------------------
385
391
 * $Log: ncbi_server_info.h,v $
 
392
 * Revision 6.40  2006/03/04 17:02:14  lavr
 
393
 * NCBI_TIME_INFINITE moved to ncbi_types.h
 
394
 *
 
395
 * Revision 6.39  2005/12/23 18:06:53  lavr
 
396
 * fSERV_StatelessOnly -> fSERV_Stateless
 
397
 * fSERV_Any, fSERV_Stateless -> <connect/ncbi_service.h>
 
398
 * +SERV_TIME_INFINITE
 
399
 *
 
400
 * Revision 6.38  2005/12/14 21:20:59  lavr
 
401
 * +SERV_CopyInfo(); DNS type to have name presence flag
 
402
 *
386
403
 * Revision 6.37  2003/04/09 19:05:48  siyan
387
404
 * Added doxygen support
388
405
 *