|
NCBI Home IEB Home C Toolkit docs C++ Toolkit source browser C Toolkit source browser (2) |
NCBI C Toolkit Cross ReferenceC/connect/ncbi_file_connector.h |
source navigation diff markup identifier search freetext search file search |
1 #ifndef CONNECT___NCBI_FILE_CONNECTOR__H
2 #define CONNECT___NCBI_FILE_CONNECTOR__H
3
4 /* $Id: ncbi_file_connector.h,v 6.4 2003/04/09 17:58:50 siyan Exp $
5 * ===========================================================================
6 *
7 * PUBLIC DOMAIN NOTICE
8 * National Center for Biotechnology Information
9 *
10 * This software/database is a "United States Government Work" under the
11 * terms of the United States Copyright Act. It was written as part of
12 * the author's official duties as a United States Government employee and
13 * thus cannot be copyrighted. This software/database is freely available
14 * to the public for use. The National Library of Medicine and the U.S.
15 * Government have not placed any restriction on its use or reproduction.
16 *
17 * Although all reasonable efforts have been taken to ensure the accuracy
18 * and reliability of the software and data, the NLM and the U.S.
19 * Government do not and cannot warrant the performance or results that
20 * may be obtained by using this software or data. The NLM and the U.S.
21 * Government disclaim all warranties, express or implied, including
22 * warranties of performance, merchantability or fitness for any particular
23 * purpose.
24 *
25 * Please cite the author in any work or product based on this material.
26 *
27 * ===========================================================================
28 *
29 * Author: Vladimir Alekseyev, Denis Vakatov
30 *
31 * File Description:
32 * Implement CONNECTOR for a FILE stream
33 *
34 * See in "connectr.h" for the detailed specification of the underlying
35 * connector("CONNECTOR", "SConnectorTag") methods and structures.
36 *
37 */
38
39 #include <connect/ncbi_connector.h>
40
41
42 /** @addtogroup Connectors
43 *
44 * @{
45 */
46
47
48 #ifdef __cplusplus
49 extern "C" {
50 #endif
51
52
53 /* Create new CONNECTOR structure to handle a data transfer between two files.
54 * Return NULL on error.
55 */
56 extern NCBI_XCONNECT_EXPORT CONNECTOR FILE_CreateConnector
57 (const char* in_file_name, /* to read data from */
58 const char* out_file_name /* to write the read data to */
59 );
60
61
62 /* Open mode for the output data file
63 */
64 typedef enum {
65 eFCM_Truncate, /* create new or replace existing file */
66 eFCM_Seek, /* seek before the first i/o */
67 eFCM_Append /* add after the end of file */
68 } EFileConnMode;
69
70
71 /* Extended file connector attributes
72 */
73 typedef struct {
74 size_t r_pos; /* file position to start reading at */
75 EFileConnMode w_mode; /* how to open output file */
76 size_t w_pos; /* eFCM_Seek mode only: begin to write at "w_pos" */
77 } SFileConnAttr;
78
79
80 /* An extended version of FILE_CreateConnector().
81 */
82 extern NCBI_XCONNECT_EXPORT CONNECTOR FILE_CreateConnectorEx
83 (const char* in_file_name,
84 const char* out_file_name,
85 const SFileConnAttr* attr
86 );
87
88
89 #ifdef __cplusplus
90 } /* extern "C" */
91 #endif
92
93
94 /* @} */
95
96
97 /*
98 * --------------------------------------------------------------------------
99 * $Log: ncbi_file_connector.h,v $
100 * Revision 6.4 2003/04/09 17:58:50 siyan
101 * Added doxygen support
102 *
103 * Revision 6.3 2003/01/08 01:59:32 lavr
104 * DLL-ize CONNECT library for MSVC (add NCBI_XCONNECT_EXPORT)
105 *
106 * Revision 6.2 2002/09/19 18:00:42 lavr
107 * Header file guard macro changed; log moved to the end
108 *
109 * Revision 6.1 2000/04/12 15:18:10 vakatov
110 * Initial revision
111 *
112 * ==========================================================================
113 */
114
115 #endif /* CONNECT___NCBI_FILE_CONNECTOR__H */
116 |
This page was automatically generated by the
LXR engine.
Visit the LXR main site for more information. |