NCBI C Toolkit Cross Reference

C/access/strucapi.h


  1 /*   strucapi.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:  strucapi.h
 27 *
 28 * Author:  Jonathan Kans
 29 *
 30 * Version Creation Date:   8/18/00
 31 *
 32 * $Revision: 1.4 $
 33 *
 34 * File Description: 
 35 *
 36 * Modifications:  
 37 * --------------------------------------------------------------------------
 38 * Date     Name        Description of modification
 39 * -------  ----------  -----------------------------------------------------
 40 *
 41 *
 42 * ==========================================================================
 43 */
 44 
 45 
 46 #ifndef _STRUCAPI_
 47 #define _STRUCAPI_
 48 
 49 #include <ncbi.h>
 50 #include <asn.h>
 51 #include <mmdbapi.h>
 52 #include <objmime.h>
 53 #include <urlquery.h>
 54 
 55 #undef NLM_EXTERN
 56 #ifdef NLM_IMPORT
 57 #define NLM_EXTERN NLM_IMPORT
 58 #else
 59 #define NLM_EXTERN extern
 60 #endif
 61 
 62 
 63 #ifdef __cplusplus
 64 extern "C" {
 65 #endif
 66 
 67 
 68 /* See synchronous and asynchronous code examples at bottom of this header */
 69 
 70 /* low-level connection functions */
 71 
 72 NLM_EXTERN CONN StrucOpenConnection (
 73   Int4 uid
 74 );
 75 
 76 NLM_EXTERN BiostrucSeqPtr StrucWaitForReply (
 77   CONN conn
 78 );
 79 
 80 /*
 81  StrucSynchronousQuery opens connection, sends a
 82  uid request, and waits for a reply
 83 */
 84 
 85 NLM_EXTERN BiostrucSeqPtr StrucSynchronousQuery (
 86   Int4 uid
 87 );
 88 
 89 /*
 90  StrucAsynchronousQuery opens connection, send request,
 91  and queues completion routine using urlquery queueing
 92  mechanism.
 93 
 94  StrucCheckQueue should be called several times a second with
 95  a timer.  It calls QUERY_CheckQueue to poll connection,
 96  which calls completion routine when result is available,
 97  cleaning up connection afterwards.
 98 
 99  StrucReadReply take conns and status parameters from completion
100  routine and reads BiostrucSeqPtr.
101 */
102 
103 NLM_EXTERN Boolean StrucAsynchronousQuery (
104   Int4 uid,
105   QUEUE* queue,
106   QueryResultProc resultproc,
107   VoidPtr userdata
108 );
109 
110 NLM_EXTERN Int4 StrucCheckQueue (
111   QUEUE* queue
112 );
113 
114 NLM_EXTERN BiostrucSeqPtr StrucReadReply (
115   CONN conn,
116   EIO_Status status
117 );
118 
119 
120 #ifdef __cplusplus
121 }
122 #endif
123 
124 #undef NLM_EXTERN
125 #ifdef NLM_EXPORT
126 #define NLM_EXTERN NLM_EXPORT
127 #else
128 #define NLM_EXTERN
129 #endif
130 
131 #endif /* _STRUCAPI_ */
132 
133 

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.