1 | /* |
---|
2 | * ---------------------------------------------------------------------- |
---|
3 | * INTERFACE: C Rappture Library Header |
---|
4 | * |
---|
5 | * ====================================================================== |
---|
6 | * AUTHOR: Derrick Kearney, Purdue University |
---|
7 | * Copyright (c) 2004-2007 Purdue Research Foundation |
---|
8 | * |
---|
9 | * See the file "license.terms" for information on usage and |
---|
10 | * redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. |
---|
11 | * ====================================================================== |
---|
12 | */ |
---|
13 | |
---|
14 | |
---|
15 | #ifndef _RAPPTURE_LIBRARY_C_H |
---|
16 | #define _RAPPTURE_LIBRARY_C_H |
---|
17 | |
---|
18 | #include "RpBufferCInterface.h" |
---|
19 | |
---|
20 | #ifdef __cplusplus |
---|
21 | extern "C" { |
---|
22 | #endif // ifdef __cplusplus |
---|
23 | |
---|
24 | typedef struct RpLibrary RpLibrary; |
---|
25 | |
---|
26 | // lib definition functions |
---|
27 | RpLibrary* rpLibrary (const char* path); |
---|
28 | int rpFreeLibrary (RpLibrary** lib); |
---|
29 | |
---|
30 | // RpLibrary member functions |
---|
31 | RpLibrary* rpElement (RpLibrary* lib, const char* path); |
---|
32 | RpLibrary* rpElementAsObject (RpLibrary* lib, const char* path); |
---|
33 | int rpElementAsType (RpLibrary* lib, const char* path, const char** retCStr); |
---|
34 | int rpElementAsComp (RpLibrary* lib, const char* path, const char** retCStr); |
---|
35 | int rpElementAsId (RpLibrary* lib, const char* path, const char** retCStr); |
---|
36 | |
---|
37 | RpLibrary* rpChildren (RpLibrary* lib, |
---|
38 | const char* path, |
---|
39 | RpLibrary* childEle ); |
---|
40 | RpLibrary* rpChildrenByType (RpLibrary* lib, |
---|
41 | const char* path, |
---|
42 | RpLibrary* childEle, |
---|
43 | const char* type ); |
---|
44 | |
---|
45 | int rpGet (RpLibrary* lib, const char* path, const char** retCStr); |
---|
46 | int rpGetString (RpLibrary* lib, const char* path, const char** retCStr); |
---|
47 | int rpGetDouble (RpLibrary* lib, const char* path, double* retDVal); |
---|
48 | |
---|
49 | int rpGetData (RpLibrary* lib, const char* path, RapptureBuffer* retBuf); |
---|
50 | |
---|
51 | int rpPut (RpLibrary* lib, |
---|
52 | const char* path, |
---|
53 | const char* value, |
---|
54 | const char* id, |
---|
55 | unsigned int append ); |
---|
56 | |
---|
57 | int rpPutString (RpLibrary* lib, |
---|
58 | const char* path, |
---|
59 | const char* value, |
---|
60 | unsigned int append ); |
---|
61 | |
---|
62 | int rpPutDouble (RpLibrary* lib, |
---|
63 | const char* path, |
---|
64 | double value, |
---|
65 | unsigned int append ); |
---|
66 | |
---|
67 | int rpPutData (RpLibrary* lib, |
---|
68 | const char* path, |
---|
69 | const char* bytes, |
---|
70 | int nBytes, |
---|
71 | unsigned int append ); |
---|
72 | |
---|
73 | int rpPutFile (RpLibrary* lib, |
---|
74 | const char* path, |
---|
75 | const char* fileName, |
---|
76 | unsigned int binary, |
---|
77 | unsigned int append ); |
---|
78 | |
---|
79 | int rpXml (RpLibrary* lib, const char** retCStr); |
---|
80 | |
---|
81 | int rpNodeComp (RpLibrary* node, const char** retCStr); |
---|
82 | int rpNodeType (RpLibrary* node, const char** retCStr); |
---|
83 | int rpNodeId (RpLibrary* node, const char** retCStr); |
---|
84 | |
---|
85 | int rpResult (RpLibrary* lib); |
---|
86 | |
---|
87 | #ifdef __cplusplus |
---|
88 | } |
---|
89 | #endif // ifdef __cplusplus |
---|
90 | |
---|
91 | #endif // ifndef _RAPPTURE_LIBRARY_C_H |
---|