NCBI C Toolkit Cross Reference

C/access/mimapi.h


  1 /*   mimapi.h
  2 * ===========================================================================
  3 *
  4 *                            PUBLIC DOMAIN NOTICE
  5 *            National Center for Biotechnology Information (NCBI)
  6 *
  7 *  This software/database is a "United States Government Work" under the
  8 *  terms of the United States Copyright Act.  It was written as part of
  9 *  the author's official duties as a United States Government employee and
 10 *  thus cannot be copyrighted.  This software/database is freely available
 11 *  to the public for use. The National Library of Medicine and the U.S.
 12 *  Government do not place any restriction on its use or reproduction.
 13 *  We would, however, appreciate having the NCBI and the author cited in
 14 *  any work or product based on this material
 15 *
 16 *  Although all reasonable efforts have been taken to ensure the accuracy
 17 *  and reliability of the software and data, the NLM and the U.S.
 18 *  Government do not and cannot warrant the performance or results that
 19 *  may be obtained by using this software or data. The NLM and the U.S.
 20 *  Government disclaim all warranties, express or implied, including
 21 *  warranties of performance, merchantability or fitness for any particular
 22 *  purpose.
 23 *
 24 * ===========================================================================
 25 *
 26 * File Name:  mimapi.h
 27 *
 28 * Author:  Jonathan Kans
 29 *
 30 * Version Creation Date:   8/16/00
 31 *
 32 * $Revision: 1.2 $
 33 *
 34 * File Description: 
 35 *
 36 * Modifications:  
 37 * --------------------------------------------------------------------------
 38 * Date     Name        Description of modification
 39 * -------  ----------  -----------------------------------------------------
 40 *
 41 *
 42 * ==========================================================================
 43 */
 44 
 45 
 46 #ifndef _MIMAPI_
 47 #define _MIMAPI_
 48 
 49 #include <ncbi.h>
 50 #include <asn.h>
 51 #include <objmim.h>
 52 #include <urlquery.h>
 53 
 54 #undef NLM_EXTERN
 55 #ifdef NLM_IMPORT
 56 #define NLM_EXTERN NLM_IMPORT
 57 #else
 58 #define NLM_EXTERN extern
 59 #endif
 60 
 61 
 62 #ifdef __cplusplus
 63 extern "C" {
 64 #endif
 65 
 66 
 67 /* See synchronous and asynchronous code examples at bottom of this header */
 68 
 69 /* low-level connection functions */
 70 
 71 NLM_EXTERN CONN MimOpenConnection (
 72   Int4 uid
 73 );
 74 
 75 NLM_EXTERN MimEntryPtr MimWaitForReply (
 76   CONN conn
 77 );
 78 
 79 /*
 80  MimSynchronousQuery opens connection, sends a
 81  uid request, and waits for a reply
 82 */
 83 
 84 NLM_EXTERN MimEntryPtr MimSynchronousQuery (
 85   Int4 uid
 86 );
 87 
 88 /*
 89  MimAsynchronousQuery opens connection, send request,
 90  and queues completion routine using urlquery queueing
 91  mechanism.
 92 
 93  MimCheckQueue should be called several times a second with
 94  a timer.  It calls QUERY_CheckQueue to poll connection,
 95  which calls completion routine when result is available,
 96  cleaning up connection afterwards.
 97 
 98  MimReadReply take conns and status parameters from completion
 99  routine and reads MimEntryPtr.
100 */
101 
102 NLM_EXTERN Boolean MimAsynchronousQuery (
103   Int4 uid,
104   QUEUE* queue,
105   QueryResultProc resultproc,
106   VoidPtr userdata
107 );
108 
109 NLM_EXTERN Int4 MimCheckQueue (
110   QUEUE* queue
111 );
112 
113 NLM_EXTERN MimEntryPtr MimReadReply (
114   CONN conn,
115   EIO_Status status
116 );
117 
118 
119 #ifdef __cplusplus
120 }
121 #endif
122 
123 #undef NLM_EXTERN
124 #ifdef NLM_EXPORT
125 #define NLM_EXTERN NLM_EXPORT
126 #else
127 #define NLM_EXTERN
128 #endif
129 
130 #endif /* _MIMAPI_ */
131 
132 

source navigation ]   [ diff markup ]   [ identifier search ]   [ freetext search ]   [ file search ]  

This page was automatically generated by the LXR engine.
Visit the LXR main site for more information.