NCBI C Toolkit Cross Reference

C/access/mla2api.h


  1 /*   mla2api.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:  mla2api.h
 27 *
 28 * Author:  Jonathan Kans
 29 *
 30 * Version Creation Date:   1/30/07
 31 *
 32 * $Revision: 1.7 $
 33 *
 34 * File Description: 
 35 *
 36 * Modifications:  
 37 * --------------------------------------------------------------------------
 38 *
 39 * ==========================================================================
 40 */
 41 
 42 #ifndef _MLA2API_
 43 #define _MLA2API_
 44 
 45 #include <ncbi.h>
 46 #include <asn.h>
 47 #include <mlkludge.h>
 48 #include <objmla2.h>
 49 #include <urlquery.h>
 50 
 51 #undef NLM_EXTERN
 52 #ifdef NLM_IMPORT
 53 #define NLM_EXTERN NLM_IMPORT
 54 #else
 55 #define NLM_EXTERN extern
 56 #endif
 57 
 58 
 59 #ifdef __cplusplus
 60 extern "C" {
 61 #endif
 62 
 63 
 64 /* low-level connection functions */
 65 
 66 NLM_EXTERN CONN Mla2OpenConnection (void);
 67 
 68 NLM_EXTERN MlaBackPtr Mla2WaitForReply (
 69   CONN conn
 70 );
 71 
 72 /*
 73  Mla2SynchronousQuery opens connection, sends
 74  MlaRequestPtr ASN.1 query, and waits for reply,
 75  cleaning up connection afterwards.
 76 */
 77 
 78 NLM_EXTERN MlaBackPtr Mla2SynchronousQuery (
 79   MlaRequestPtr mrp
 80 );
 81 
 82 /*
 83  Mla2AsynchronousQuery opens connection, sends
 84  request, and queues completion routine using urlquery
 85  queueing mechanism.
 86 
 87  Mla2CheckQueue should be called several times a
 88  second with a timer.  It calls QUERY_CheckQueue to
 89  poll connection, which calls completion routine when
 90  result is available, cleaning up connection afterwards.
 91 
 92  Mla2ReadReply takes conn and status parameters from
 93  completion routine and reads MlaBackPtr.
 94 */
 95 
 96 NLM_EXTERN Boolean Mla2AsynchronousQuery (
 97   MlaRequestPtr mrp,
 98   QUEUE* queue,
 99   QueryResultProc resultproc,
100   VoidPtr userdata
101 );
102 
103 NLM_EXTERN Int4 Mla2CheckQueue (
104   QUEUE* queue
105 );
106 
107 NLM_EXTERN MlaBackPtr Mla2ReadReply (
108   CONN conn,
109   EIO_Status status
110 );
111 
112 /* request creation functions */
113 
114 NLM_EXTERN MlaRequestPtr Mla2CreateJournalTitleRequest (
115   CharPtr journal_name
116 );
117 
118 NLM_EXTERN MlaRequestPtr Mla2CreateCitArtJournalRequest (
119   CitArtPtr cap
120 );
121 
122 NLM_EXTERN MlaRequestPtr Mla2CreateCitArtMatchRequest (
123   CitArtPtr cap
124 );
125 
126 NLM_EXTERN MlaRequestPtr Mla2CreateCitationtMatchRequest (
127   CharPtr author,
128   CharPtr journal,
129   CharPtr volume,
130   CharPtr page,
131   Int4 year,
132   CharPtr title
133 );
134 
135 NLM_EXTERN MlaRequestPtr Mla2CreatePubFetchRequest (
136   Int4 pmid
137 );
138 
139 /*
140    reply extraction functions - these do not free the MlaBackPtr,
141    but unlink the internal structure so MlaBackFree can be called
142 */
143 
144 NLM_EXTERN TitleMsgListPtr Mla2ExtractJournalTitleReply (
145   MlaBackPtr mbp
146 );
147 
148 NLM_EXTERN Int4 Mla2ExtractCitMatchReply (
149   MlaBackPtr mbp
150 );
151 
152 NLM_EXTERN CitArtPtr Mla2ExtractPubFetchReply (
153   MlaBackPtr mbp
154 );
155 
156 /* utility functions */
157 
158 NLM_EXTERN void ChangeCitArtMLAuthorsToSTD (
159   CitArtPtr cap
160 );
161 
162 NLM_EXTERN void ChangeMlaBackMLAuthorsToSTD (
163   MlaBackPtr mbp 
164 );
165 
166 NLM_EXTERN Boolean Mla2IsEPubOnlyJournal (
167   CharPtr jta,
168   Int2Ptr starting_yearP
169 );
170 
171 /*
172    Mla2CorrectCitArt takes the original and fetched CitArt and
173    fixes author types, compares author lists for differences,
174    restores consortium authors, and other automatic cleanup
175    functions to be determined with experience
176 */
177 
178 NLM_EXTERN Int2 Mla2CorrectCitArt (
179   CitArtPtr newcap,
180   CitArtPtr oldcap
181 );
182 
183 
184 #ifdef __cplusplus
185 }
186 #endif
187 
188 #undef NLM_EXTERN
189 #ifdef NLM_EXPORT
190 #define NLM_EXTERN NLM_EXPORT
191 #else
192 #define NLM_EXTERN
193 #endif
194 
195 #endif /* _MLA2API_ */
196 
197 

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.