diff options
author | David Robillard <d@drobilla.net> | 2011-03-29 04:22:58 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2011-03-29 04:22:58 +0000 |
commit | 02d551d18390a5a59cb3977ade0811cf5822d32b (patch) | |
tree | 99be007a1d74911a34be850edcfa3218a4cd0ce7 /libs/ardour/rdff.h | |
parent | b502bbc61895d61c39bf240b47e8a3664be2c541 (diff) |
Add subject to key/value chunks in RDFF (i.e. store triples).
git-svn-id: svn://localhost/ardour2/branches/3.0@9224 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/rdff.h')
-rw-r--r-- | libs/ardour/rdff.h | 30 |
1 files changed, 16 insertions, 14 deletions
diff --git a/libs/ardour/rdff.h b/libs/ardour/rdff.h index 960085db04..3d52553a4b 100644 --- a/libs/ardour/rdff.h +++ b/libs/ardour/rdff.h @@ -65,7 +65,7 @@ typedef struct { } PACKED RDFFChunk; /** - Body of a URID chunk. + Body of a RDFF "urid" chunk. */ typedef struct { uint32_t id; /**< Numeric ID of URI in this RDFF. */ @@ -73,14 +73,15 @@ typedef struct { } PACKED RDFFURIChunk; /** - Body of a KVAL chunk. + Body of a RDFF "trip" chunk. */ typedef struct { - uint32_t key; /**< Predicate URI ID. */ - uint32_t type; /**< Type URI ID. */ - uint32_t size; /**< Size of object data. */ - char value[]; /**< Object data. */ -} PACKED RDFFValueChunk; + uint32_t subject; /**< Subject URI ID. */ + uint32_t predicate; /**< Predicate URI ID. */ + uint32_t object_type; /**< Object type URI ID. */ + uint32_t object_size; /**< Size of object data. */ + char object[]; /**< Object data. */ +} PACKED RDFFTripleChunk; /** Open/Create a new RDFF file. @@ -94,18 +95,19 @@ rdff_open(const char* path, bool write); RDFFStatus rdff_write_uri(RDFF file, uint32_t id, - const char* uri, - uint32_t len); + uint32_t len, + const char* uri); /** Write a key/value record to @a file. */ RDFFStatus -rdff_write_value(RDFF file, - uint32_t key, - const void* value, - uint32_t size, - uint32_t type); +rdff_write_triple(RDFF file, + uint32_t subject, + uint32_t predicate, + uint32_t object_type, + uint32_t object_size, + const void* object); /** Read a chunk from @a file. |