source: branches/blt4/src/core/RpLibraryCInterface.h @ 3953

Last change on this file since 3953 was 3953, checked in by gah, 11 years ago

sync with trunk

File size: 3.3 KB
Line 
1/*
2 * ----------------------------------------------------------------------
3 *  INTERFACE: C Rappture Library Header
4 *
5 * ======================================================================
6 *  AUTHOR:  Derrick Kearney, Purdue University
7 *  Copyright (c) 2004-2012  HUBzero Foundation, LLC
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
21extern "C" {
22#endif // ifdef __cplusplus
23
24typedef struct RpLibrary RpLibrary;
25
26// lib definition functions
27RpLibrary* rpLibrary  (const char* path);
28int rpFreeLibrary     (RpLibrary** lib);
29
30// RpLibrary member functions
31RpLibrary* rpElement  (RpLibrary* lib, const char* path);
32RpLibrary* rpElementAsObject (RpLibrary* lib, const char* path);
33int rpElementAsType   (RpLibrary* lib, const char* path, const char** retCStr);
34int rpElementAsComp   (RpLibrary* lib, const char* path, const char** retCStr);
35int rpElementAsId     (RpLibrary* lib, const char* path, const char** retCStr);
36
37RpLibrary* rpChildren (RpLibrary* lib,
38                            const char* path,
39                            RpLibrary* childEle  );
40RpLibrary* rpChildrenByType  (RpLibrary* lib,
41                            const char* path,
42                            RpLibrary* childEle,
43                            const char* type     );
44
45int rpGet             (RpLibrary* lib, const char* path, const char** retCStr);
46int rpGetString       (RpLibrary* lib, const char* path, const char** retCStr);
47int rpGetDouble       (RpLibrary* lib, const char* path, double* retDVal);
48
49int rpGetData         (RpLibrary* lib, const char* path, RapptureBuffer* retBuf);
50
51int rpPut             (RpLibrary* lib,
52                            const char* path,
53                            const char* value,
54                            const char* id,
55                            unsigned int append         );
56
57int rpPutString       (RpLibrary* lib,
58                            const char* path,
59                            const char* value,
60                            unsigned int append         );
61
62int rpPutDouble       (RpLibrary* lib,
63                            const char* path,
64                            double value,
65                            unsigned int append         );
66
67int rpPutData         (RpLibrary* lib,
68                            const char* path,
69                            const char* bytes,
70                            int nBytes,
71                            unsigned int append         );
72
73int rpPutFile         (RpLibrary* lib,
74                            const char* path,
75                            const char* fileName,
76                            unsigned int binary,
77                            unsigned int append         );
78
79int rpXml             (RpLibrary* lib, const char** retCStr);
80
81int rpNodeComp        (RpLibrary* node, const char** retCStr);
82int rpNodeType        (RpLibrary* node, const char** retCStr);
83int rpNodeId          (RpLibrary* node, const char** retCStr);
84
85int rpResult          (RpLibrary* lib);
86
87#ifdef __cplusplus
88}
89#endif // ifdef __cplusplus
90
91#endif // ifndef _RAPPTURE_LIBRARY_C_H
Note: See TracBrowser for help on using the repository browser.