00001 /** @file 00002 00003 Private RecFile and RecPipe declarations 00004 00005 @section license License 00006 00007 Licensed to the Apache Software Foundation (ASF) under one 00008 or more contributor license agreements. See the NOTICE file 00009 distributed with this work for additional information 00010 regarding copyright ownership. The ASF licenses this file 00011 to you under the Apache License, Version 2.0 (the 00012 "License"); you may not use this file except in compliance 00013 with the License. You may obtain a copy of the License at 00014 00015 http://www.apache.org/licenses/LICENSE-2.0 00016 00017 Unless required by applicable law or agreed to in writing, software 00018 distributed under the License is distributed on an "AS IS" BASIS, 00019 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 00020 See the License for the specific language governing permissions and 00021 limitations under the License. 00022 */ 00023 00024 #ifndef _P_REC_FILE_H_ 00025 #define _P_REC_FILE_H_ 00026 00027 //------------------------------------------------------------------------- 00028 // types/defines 00029 //------------------------------------------------------------------------- 00030 00031 #define REC_HANDLE_INVALID -1 00032 typedef int RecHandle; 00033 00034 //------------------------------------------------------------------------- 00035 // RecFile 00036 //------------------------------------------------------------------------- 00037 00038 RecHandle RecFileOpenR(const char *file); 00039 RecHandle RecFileOpenW(const char *file); 00040 int RecFileClose(RecHandle h_file); 00041 int RecFileRead(RecHandle h_file, char *buf, int size, int *bytes_read); 00042 int RecFileWrite(RecHandle h_file, char *buf, int size, int *bytes_written); 00043 int RecFileGetSize(RecHandle h_file); 00044 int RecFileExists(const char *file); 00045 int RecFileSync(RecHandle h_file); 00046 00047 //------------------------------------------------------------------------- 00048 // RecPipe 00049 //------------------------------------------------------------------------- 00050 00051 RecHandle RecPipeCreate(const char *base_path, const char *name); 00052 RecHandle RecPipeConnect(const char *base_path, const char *name); 00053 int RecPipeClose(RecHandle h_pipe); 00054 int RecPipeRead(RecHandle h_pipe, char *buf, int size); 00055 int RecPipeWrite(RecHandle h_pipe, char *buf, int size); 00056 00057 #endif