1 /* valapi.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: valapi.h 27 * 28 * Author: Colleen Bollin 29 * 30 * Version Creation Date: 4/8/2009 31 * 32 * $Revision: 1.10 $ 33 * 34 * File Description: 35 * 36 * Modifications: 37 * -------------------------------------------------------------------------- 38 * Date Name Description of modification 39 * ------- ---------- ----------------------------------------------------- 40 * 41 * 42 * ========================================================================== 43 */ 44 45 #ifndef _valapi_h_ 46 #define _valapi_h_ 47 48 #ifdef __cplusplus 49 extern "C" { 50 #endif 51 52 NLM_EXTERN CommentRulePtr LoadCommentRuleSet (void); 53 54 NLM_EXTERN CommentRulePtr GetCommentRuleFromRuleSet (CharPtr prefix); 55 56 typedef enum { 57 eFieldValid_Valid = 0 , 58 eFieldValid_Invalid, 59 eFieldValid_MissingRequiredField, 60 eFieldValid_FieldOutOfOrder, 61 eFieldValid_DuplicateField, 62 eFieldValid_Disallowed, 63 eFieldValid_Inappropriate 64 } EFieldValid; 65 66 67 /* error code, field rule violated, value of offending field (if any), extra data provided by user */ 68 typedef void (*StructuredCommentCallback) PROTO ((EFieldValid, FieldRulePtr, UserFieldPtr, UserFieldPtr, Pointer, UserObjectPtr)); 69 70 NLM_EXTERN EFieldValid 71 IsStructuredCommentValidForRule 72 (UserObjectPtr uop, 73 CommentRulePtr comment_rule, 74 StructuredCommentCallback s_callback, 75 Pointer s_callback_data); 76 77 NLM_EXTERN EFieldValid IsStructuredCommentValid (UserObjectPtr uop, StructuredCommentCallback s_callback, Pointer s_callback_data); 78 79 NLM_EXTERN Boolean ReorderStructuredCommentFields (UserObjectPtr uop); 80 NLM_EXTERN Boolean ReorderStructuredCommentsInSeqEntry (SeqEntryPtr sep); 81 NLM_EXTERN CharPtr AutoapplyStructuredCommentPrefix (UserObjectPtr uop); 82 NLM_EXTERN CommentRulePtr NewRuleForStructuredComment (UserObjectPtr uop); 83 84 85 #ifdef __cplusplus 86 } 87 #endif 88 89 #endif 90