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

« back to all changes in this revision

Viewing changes to connect/ncbi_service_connector.h

  • Committer: Bazaar Package Importer
  • Author(s): Aaron M. Ucko
  • Date: 2002-04-04 22:13:09 UTC
  • Revision ID: james.westby@ubuntu.com-20020404221309-vfze028rfnlrldct
Tags: upstream-6.1.20011220a
ImportĀ upstreamĀ versionĀ 6.1.20011220a

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#ifndef NCBI_SERVICE_CONNECTOR__H
 
2
#define NCBI_SERVICE_CONNECTOR__H
 
3
 
 
4
/*  $Id: ncbi_service_connector.h,v 6.5 2001/09/24 20:25:11 lavr Exp $
 
5
 * ===========================================================================
 
6
 *
 
7
 *                            PUBLIC DOMAIN NOTICE
 
8
 *               National Center for Biotechnology Information
 
9
 *
 
10
 *  This software/database is a "United States Government Work" under the
 
11
 *  terms of the United States Copyright Act.  It was written as part of
 
12
 *  the author's official duties as a United States Government employee and
 
13
 *  thus cannot be copyrighted.  This software/database is freely available
 
14
 *  to the public for use. The National Library of Medicine and the U.S.
 
15
 *  Government have not placed any restriction on its use or reproduction.
 
16
 *
 
17
 *  Although all reasonable efforts have been taken to ensure the accuracy
 
18
 *  and reliability of the software and data, the NLM and the U.S.
 
19
 *  Government do not and cannot warrant the performance or results that
 
20
 *  may be obtained by using this software or data. The NLM and the U.S.
 
21
 *  Government disclaim all warranties, express or implied, including
 
22
 *  warranties of performance, merchantability or fitness for any particular
 
23
 *  purpose.
 
24
 *
 
25
 *  Please cite the author in any work or product based on this material.
 
26
 *
 
27
 * ===========================================================================
 
28
 *
 
29
 * Author:  Anton Lavrentiev
 
30
 *
 
31
 * File Description:
 
32
 *   Implement CONNECTOR for a named NCBI service
 
33
 *
 
34
 *   See in "ncbi_connector.h" for the detailed specification of the underlying
 
35
 *   connector("CONNECTOR", "SConnectorTag") methods and structures.
 
36
 *
 
37
 * --------------------------------------------------------------------------
 
38
 * $Log: ncbi_service_connector.h,v $
 
39
 * Revision 6.5  2001/09/24 20:25:11  lavr
 
40
 * +SSERVICE_Extra, +4th parameter for SERVICE_CreateConnectorEx()
 
41
 * -SERVICE_CreateConnector() - now implemented as macro
 
42
 *
 
43
 * Revision 6.4  2001/09/10 21:20:19  lavr
 
44
 * Few unimportant layout changes
 
45
 *
 
46
 * Revision 6.3  2001/06/04 17:00:18  lavr
 
47
 * Include files adjusted
 
48
 *
 
49
 * Revision 6.2  2000/12/29 17:48:34  lavr
 
50
 * Accepted server types included in SERVICE_CreateConnectorEx arguments.
 
51
 *
 
52
 * Revision 6.1  2000/10/07 22:15:12  lavr
 
53
 * Initial revision
 
54
 *
 
55
 * ==========================================================================
 
56
 */
 
57
 
 
58
#include <connect/ncbi_server_info.h>
 
59
#include <connect/ncbi_service.h>
 
60
 
 
61
#ifdef __cplusplus
 
62
extern "C" {
 
63
#endif
 
64
 
 
65
 
 
66
typedef const SSERV_Info* (*FSERVICE_GetNextInfo)(SERV_ITER iter, void* data);
 
67
typedef void              (*FSERVICE_CleanupData)(void* data);
 
68
 
 
69
typedef struct {
 
70
    void*                data;
 
71
    FSERVICE_CleanupData cleanup;
 
72
    FSERVICE_GetNextInfo get_next_info;
 
73
} SSERVICE_Extra;
 
74
 
 
75
 
 
76
extern CONNECTOR SERVICE_CreateConnectorEx(const char*           service,
 
77
                                           TSERV_Type            types,
 
78
                                           const SConnNetInfo*   net_info,
 
79
                                           const SSERVICE_Extra* params);
 
80
 
 
81
#define SERVICE_CreateConnector(service) \
 
82
    SERVICE_CreateConnectorEx(service, fSERV_Any, 0, 0)
 
83
 
 
84
 
 
85
#ifdef __cplusplus
 
86
}  /* extern "C" */
 
87
#endif
 
88
 
 
89
#endif /* NCBI_SERVICE_CONNECTOR__H */