NCBI C Toolkit Cross Reference

C/access/pmfapi.h


  1 /*   pmfapi.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:  pmfapi.h
 27 *
 28 * Author:  Jonathan Kans
 29 *
 30 * Version Creation Date:   5/5/00
 31 *
 32 * $Revision: 1.31 $
 33 *
 34 * File Description: 
 35 *
 36 * Modifications:  
 37 * --------------------------------------------------------------------------
 38 *
 39 * ==========================================================================
 40 */
 41 
 42 #ifndef _PMFAPI_
 43 #define _PMFAPI_
 44 
 45 #include <ncbi.h>
 46 #include <asn.h>
 47 #include <objmedli.h>
 48 #include <objpubme.h>
 49 #include <objsset.h>
 50 #include <urlquery.h>
 51 
 52 #undef NLM_EXTERN
 53 #ifdef NLM_IMPORT
 54 #define NLM_EXTERN NLM_IMPORT
 55 #else
 56 #define NLM_EXTERN extern
 57 #endif
 58 
 59 
 60 #ifdef __cplusplus
 61 extern "C" {
 62 #endif
 63 
 64 
 65 /* low-level connection functions */
 66 
 67 NLM_EXTERN CONN PubMedFetchOpenConnection (
 68   Int4 uid
 69 );
 70 
 71 NLM_EXTERN CONN PubSeqFetchOpenConnection (
 72   Int4 uid,
 73   Int2 retcode,
 74   Int4 flags
 75 );
 76 
 77 NLM_EXTERN CONN PubSeqFetchTraceOpenConnection (
 78   Uint4 tid,
 79   Int2 retcode,
 80   Int4 flags
 81 );
 82 
 83 NLM_EXTERN CONN PubSeqFetchSRAOpenConnection (
 84   CharPtr sraid
 85 );
 86 
 87 NLM_EXTERN CONN GiRevHistOpenConnection (
 88   Int4 uid,
 89   Int4 num,
 90   Int4Ptr uids
 91 );
 92 
 93 NLM_EXTERN CONN GiAccVerOpenConnection (
 94   Int4 uid,
 95   Int4 num,
 96   Int4Ptr uids
 97 );
 98 
 99 NLM_EXTERN CONN AccnRevHistOpenConnection (
100   CharPtr accn
101 );
102 
103 NLM_EXTERN CONN GiSeqIdSetOpenConnection (
104   Int4 gi
105 );
106 
107 NLM_EXTERN CONN AccnListOpenConnection (
108   CharPtr PNTR accns
109 );
110 
111 NLM_EXTERN PubmedEntryPtr PubMedWaitForReply (
112   CONN conn
113 );
114 
115 NLM_EXTERN SeqEntryPtr PubSeqWaitForReply (
116   CONN conn
117 );
118 
119 NLM_EXTERN CharPtr GiRevHistWaitForReply (
120   CONN conn
121 );
122 
123 NLM_EXTERN CharPtr GiAccVerWaitForReply (
124   CONN conn
125 );
126 
127 NLM_EXTERN Int4 AccnRevHistWaitForReply (
128   CONN conn
129 );
130 
131 NLM_EXTERN SeqIdPtr GiSeqIdSetWaitForReply (
132   CONN conn
133 );
134 
135 NLM_EXTERN CharPtr AccnListWaitForReply (
136   CONN conn
137 );
138 
139 /*
140  PubMedSynchronousQuery and PubSeqSynchronousQuery open a
141  connection, send a uid request, and wait for a reply
142 */
143 
144 NLM_EXTERN PubmedEntryPtr PubMedSynchronousQuery (
145   Int4 uid
146 );
147 
148 NLM_EXTERN SeqEntryPtr PubSeqSynchronousQuery (
149   Int4 uid,
150   Int2 retcode,
151   Int4 flags
152 );
153 
154 NLM_EXTERN SeqEntryPtr PubSeqSynchronousQueryTI (
155   Uint4 tid,
156   Int2 retcode,
157   Int4 flags
158 );
159 
160 NLM_EXTERN SeqEntryPtr PubSeqSynchronousQuerySRA (
161   CharPtr sraid
162 );
163 
164 NLM_EXTERN CharPtr GiRevHistSynchronousQuery (
165   Int4 uid,
166   Int4 num,
167   Int4Ptr uids
168 );
169 
170 NLM_EXTERN CharPtr GiAccVerSynchronousQuery (
171   Int4 uid,
172   Int4 num,
173   Int4Ptr uids
174 );
175 
176 NLM_EXTERN Int4 AccnRevHistSynchronousQuery (
177   CharPtr accn
178 );
179 
180 NLM_EXTERN SeqIdPtr GiSeqIdSetSynchronousQuery (
181   Int4 gi
182 );
183 
184 NLM_EXTERN CharPtr AccnListSynchronousQuery (
185   CharPtr PNTR accns
186 );
187 
188 /*
189  PubMedAsynchronousQuery and PubSeqAsynchronousQuery open
190  connection, send request, and queue completion routine
191  using urlquery queueing mechanism.
192 
193  PubMedCheckQueue and PubSeqCheckQueue should be called
194  several times a second with a timer.  They each call
195  QUERY_CheckQueue to poll connection, which calls completion
196  routine when result is available, cleaning up connection
197  afterwards.
198 
199  PubMedReadReply and PubSeqReadReply take conn and status
200  parameters from completion routine and reads PubmedEntryPtr
201  or SeqEntryPtr.
202 */
203 
204 NLM_EXTERN Boolean PubMedAsynchronousQuery (
205   Int4 uid,
206   QUEUE* q,
207   QueryResultProc resultproc,
208   VoidPtr userdata
209 );
210 
211 NLM_EXTERN Int4 PubMedCheckQueue (
212   QUEUE* q
213 );
214 
215 NLM_EXTERN PubmedEntryPtr PubMedReadReply (
216   CONN conn,
217   EIO_Status status
218 );
219 
220 NLM_EXTERN Boolean PubSeqAsynchronousQuery (
221   Int4 uid,
222   Int2 retcode,
223   Int4 flags,
224   QUEUE* q,
225   QueryResultProc resultproc,
226   VoidPtr userdata
227 );
228 
229 NLM_EXTERN Int4 PubSeqCheckQueue (
230   QUEUE* q
231 );
232 
233 NLM_EXTERN SeqEntryPtr PubSeqReadReply (
234   CONN conn,
235   EIO_Status status
236 );
237 
238 NLM_EXTERN Boolean GiRevHistAsynchronousQuery (
239   Int4 uid,
240   Int4 num,
241   Int4Ptr uids,
242   QUEUE* q,
243   QueryResultProc resultproc,
244   VoidPtr userdata
245 );
246 
247 NLM_EXTERN Int4 GiRevHistCheckQueue (
248   QUEUE* q
249 );
250 
251 NLM_EXTERN CharPtr GiRevHistReadReply (
252   CONN conn,
253   EIO_Status status
254 );
255 
256 NLM_EXTERN Boolean GiAccVerAsynchronousQuery (
257   Int4 uid,
258   Int4 num,
259   Int4Ptr uids,
260   QUEUE* q,
261   QueryResultProc resultproc,
262   VoidPtr userdata
263 );
264 
265 NLM_EXTERN Int4 GiAccVerCheckQueue (
266   QUEUE* q
267 );
268 
269 NLM_EXTERN CharPtr GiAccVerReadReply (
270   CONN conn,
271   EIO_Status status
272 );
273 
274 NLM_EXTERN Boolean AccnRevHistAsynchronousQuery (
275   CharPtr accn,
276   QUEUE* q,
277   QueryResultProc resultproc,
278   VoidPtr userdata
279 );
280 
281 NLM_EXTERN Int4 AccnRevHistCheckQueue (
282   QUEUE* q
283 );
284 
285 NLM_EXTERN Int4 AccnRevHistReadReply (
286   CONN conn,
287   EIO_Status status
288 );
289 
290 NLM_EXTERN Boolean GiSeqIdSetAsynchronousQuery (
291   Int4 gi,
292   QUEUE* queue,
293   QueryResultProc resultproc,
294   VoidPtr userdata
295 );
296 
297 NLM_EXTERN Int4 GiSeqIdSetCheckQueue (
298   QUEUE* queue
299 );
300 
301 NLM_EXTERN SeqIdPtr GiSeqIdSetReadReply (
302   CONN conn,
303   EIO_Status status
304 );
305 
306 NLM_EXTERN Boolean AccnListAsynchronousQuery (
307   CharPtr PNTR accns,
308   QUEUE* queue,
309   QueryResultProc resultproc,
310   VoidPtr userdata
311 );
312 
313 NLM_EXTERN Int4 AccnListCheckQueue (
314   QUEUE* queue
315 );
316 
317 NLM_EXTERN CharPtr AccnListReadReply (
318   CONN conn,
319   EIO_Status status
320 );
321 
322 /* PMID fetch registration function */
323 
324 NLM_EXTERN Boolean PubMedFetchEnable (
325   void
326 );
327 
328 NLM_EXTERN void PubMedFetchDisable (
329   void
330 );
331 
332 /* SeqId fetch registration function */
333 
334 NLM_EXTERN Boolean PubSeqFetchEnable (
335   void
336 );
337 
338 NLM_EXTERN Boolean PubSeqFetchEnableEx (
339   Boolean fetch,
340   Boolean seqidtogi,
341   Boolean gitoseqid,
342   Boolean precache,
343   Boolean seqidset
344 );
345 
346 NLM_EXTERN void PubSeqFetchDisable (
347   void
348 );
349 
350 /* multiple SeqId preload into cache functions */
351 
352 NLM_EXTERN Int4 GiRevHistPreLoadSeqIdGiCache (
353   Int4 num,
354   Int4Ptr uids
355 );
356 
357 NLM_EXTERN Int4 GiRevHistPreLoadSeqIdGiCacheEx (
358   Int4 num,
359   Int4Ptr uids,
360   Boolean filter
361 );
362 
363 NLM_EXTERN Int4 LIBCALLBACK GiRevHistLookupFarSeqIDs (
364   SeqEntryPtr sep,
365   Boolean components,
366   Boolean locations,
367   Boolean products,
368   Boolean alignments,
369   Boolean history,
370   Boolean inference,
371   Boolean others
372 );
373 
374 NLM_EXTERN Int4 AccnListPreLoadSeqIdGiCache (
375   CharPtr PNTR accns
376 );
377 
378 /* SeqId chain fetch function */
379 
380 NLM_EXTERN SeqIdPtr LIBCALLBACK GiRevHistLookupSeqIdSet (
381   Int4 gi
382 );
383 
384 /* multiple Accession bulk lookup or preload section */
385 
386 typedef void (LIBCALLBACK *CacheAccnListProc) (
387   Int4 gi,
388   CharPtr accnver
389 );
390 
391 /*
392  CacheAccnList takes the AccnList query result, and calls the
393  user callback if it is not NULL, otherwise it preloads the
394  sequence manager gi/accession lookup cache.  Used internally
395  by AccnListPreLoadSeqIdGiCache function.
396 */
397 
398 NLM_EXTERN Int4 CacheAccnList (
399   CharPtr str,
400   CacheAccnListProc userfunc
401 );
402 
403 
404 #ifdef __cplusplus
405 }
406 #endif
407 
408 #undef NLM_EXTERN
409 #ifdef NLM_EXPORT
410 #define NLM_EXTERN NLM_EXPORT
411 #else
412 #define NLM_EXTERN
413 #endif
414 
415 #endif /* _PMFAPI_ */
416 
417 

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.