source: branches/uq/src/core/RpBufferCInterface.h @ 5679

Last change on this file since 5679 was 5679, checked in by ldelgass, 9 years ago

Full merge 1.3 branch to uq branch to sync. Fixed partial subdirectory merge
by removing mergeinfo from lang/python/Rappture directory.

  • Property svn:eol-style set to native
File size: 2.0 KB
Line 
1
2/*
3 * ----------------------------------------------------------------------
4 *  INTERFACE: C Rappture Buffer Header
5 *
6 * ======================================================================
7 *  AUTHOR:  Derrick Kearney, Purdue University
8 *  Copyright (c) 2004-2012  HUBzero Foundation, LLC
9 *
10 *  See the file "license.terms" for information on usage and
11 *  redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
12 * ======================================================================
13 */
14
15
16#ifndef _RAPPTURE_BUFFER_C_H
17#define _RAPPTURE_BUFFER_C_H
18
19#include "RpOutcomeCInterface.h"
20
21#ifdef __cplusplus
22extern "C" {
23#endif // ifdef __cplusplus
24
25typedef struct {
26    void* _buf;
27    /*
28    const char* (*bytes)();
29    unsigned int (*size)();
30    // void (*clear)();
31    int (*append)(const char*, int);
32    int (*read)(const char*, int);
33    int (*seek)(int, int);
34    int (*tell)();
35    // void (*rewind);
36    bool (*load)(Outcome &result, const char*);
37    bool (*dump)(Outcome &result, const char*);
38    bool (*encode)(Outcome &result, bool, bool);
39    bool (*decode)(Outcome &result, bool, bool);
40    */
41}RapptureBuffer;
42
43int RapptureBufferInit(RapptureBuffer* buf);
44int RapptureBufferNew(RapptureBuffer* buf);
45int RapptureBufferFree(RapptureBuffer* buf);
46const char* RapptureBufferBytes(RapptureBuffer* buf);
47unsigned int RapptureBufferSize(RapptureBuffer* buf);
48int RapptureBufferAppend(RapptureBuffer* buf, const char* bytes, int size);
49int RapptureBufferRead(RapptureBuffer* buf, const char* bytes, int size);
50int RapptureBufferSeek(RapptureBuffer* buf, int offset, int whence);
51int RapptureBufferTell(RapptureBuffer* buf);
52RapptureOutcome RapptureBufferLoad(RapptureBuffer* buf, const char* filename);
53RapptureOutcome RapptureBufferDump(RapptureBuffer* buf, const char* filename);
54RapptureOutcome RapptureBufferEncode(RapptureBuffer* buf, int compress,
55        int base64 );
56RapptureOutcome RapptureBufferDecode(RapptureBuffer* buf,
57        int decompress, int base64 );
58
59#ifdef __cplusplus
60}
61#endif // ifdef __cplusplus
62
63#endif // ifndef _RAPPTURE_BUFFER_C_H
Note: See TracBrowser for help on using the repository browser.