Changeset 3987
- Timestamp:
- 2012-02-18 19:34:33 (15 months ago)
- Location:
- trunk
- Files:
-
- 10 edited
-
jalv/src/atom_rdf.c (modified) (3 diffs)
-
jalv/src/jalv.c (modified) (1 diff)
-
lilv/src/state.c (modified) (8 diffs)
-
lilv/test/lilv_test.c (modified) (1 diff)
-
lilv/test/test_plugin.c (modified) (8 diffs)
-
plugins/dirg.lv2/src/dirg_lv2.cpp (modified) (1 diff)
-
plugins/lolep.lv2/src/object.cpp (modified) (1 diff)
-
plugins/lolep.lv2/src/print.cpp (modified) (1 diff)
-
plugins/lolep.lv2/src/rdf-read.cpp (modified) (1 diff)
-
plugins/lolep.lv2/src/rdf-write.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/jalv/src/atom_rdf.c
r3986 r3987 19 19 20 20 #include "lv2/lv2plug.in/ns/ext/atom/atom.h" 21 #include "lv2/lv2plug.in/ns/ext/atom/ atom-helpers.h"21 #include "lv2/lv2plug.in/ns/ext/atom/util.h" 22 22 #include "lv2/lv2plug.in/ns/ext/urid/urid.h" 23 23 24 24 #include "serd/serd.h" 25 25 26 #define NS_ATOM "http://lv2plug.in/ns/ext/atom#" 27 #define NS_XSD "http://www.w3.org/2001/XMLSchema#" 26 #define NS_XSD "http://www.w3.org/2001/XMLSchema#" 28 27 29 28 #define USTR(str) ((const uint8_t*)str) … … 58 57 if (atom->type == 0 && atom->size == 0) { 59 58 object = serd_node_from_string(SERD_BLANK, USTR("null")); 60 } else if (!strcmp(type, NS_ATOM "String")) {59 } else if (!strcmp(type, LV2_ATOM__String)) { 61 60 const uint8_t* str = USTR(LV2_ATOM_BODY(atom)); 62 61 object = serd_node_from_string(SERD_LITERAL, str); 63 } else if (!strcmp(type, NS_ATOM "URID")) {62 } else if (!strcmp(type, LV2_ATOM__URID)) { 64 63 const uint32_t id = *(const uint32_t*)LV2_ATOM_BODY(atom); 65 64 const uint8_t* str = USTR(unmap->unmap(unmap->handle, id)); 66 65 object = serd_node_from_string(SERD_URI, str); 67 } else if (!strcmp(type, NS_ATOM "URI")) { 66 } else if (!strcmp(type, LV2_ATOM__Path)) { 67 const uint8_t* str = USTR(LV2_ATOM_BODY(atom)); 68 object = serd_node_from_string(SERD_LITERAL, str); 69 datatype = serd_node_from_string(SERD_URI, USTR(LV2_ATOM__Path)); 70 } else if (!strcmp(type, LV2_ATOM__URI)) { 68 71 const uint8_t* str = USTR(LV2_ATOM_BODY(atom)); 69 72 object = serd_node_from_string(SERD_URI, str); 70 } else if (!strcmp(type, NS_ATOM "Int32")) {73 } else if (!strcmp(type, LV2_ATOM__Int32)) { 71 74 new_node = true; 72 75 object = serd_node_new_integer(*(int32_t*)LV2_ATOM_BODY(atom)); 73 76 datatype = serd_node_from_string(SERD_URI, USTR(NS_XSD "integer")); 74 } else if (!strcmp(type, NS_ATOM "Float")) {77 } else if (!strcmp(type, LV2_ATOM__Float)) { 75 78 new_node = true; 76 79 object = serd_node_new_decimal(*(float*)LV2_ATOM_BODY(atom), 8); 77 80 datatype = serd_node_from_string(SERD_URI, USTR(NS_XSD "decimal")); 78 } else if (!strcmp(type, NS_ATOM "Double")) {81 } else if (!strcmp(type, LV2_ATOM__Double)) { 79 82 new_node = true; 80 83 object = serd_node_new_decimal(*(float*)LV2_ATOM_BODY(atom), 16); 81 84 datatype = serd_node_from_string(SERD_URI, USTR(NS_XSD "decimal")); 82 } else if (!strcmp(type, NS_ATOM "Bool")) {85 } else if (!strcmp(type, LV2_ATOM__Bool)) { 83 86 new_node = true; 84 87 datatype = serd_node_from_string(SERD_URI, USTR(NS_XSD "boolean")); … … 88 91 object = serd_node_from_string(SERD_LITERAL, USTR("false")); 89 92 } 90 } else if (!strcmp(type, NS_ATOM "Blank")) {93 } else if (!strcmp(type, LV2_ATOM__Blank)) { 91 94 const LV2_Atom_Object* obj = (const LV2_Atom_Object*)atom; 92 95 SerdNode idnum = serd_node_new_integer(obj->id); -
trunk/jalv/src/jalv.c
r3986 r3987 92 92 static LV2_Feature unmap_feature = { NS_EXT "urid#unmap", NULL }; 93 93 static LV2_Feature instance_feature = { NS_EXT "instance-access", NULL }; 94 static LV2_Feature make_path_feature = { LV2_STATE_ MAKE_PATH_URI, NULL };94 static LV2_Feature make_path_feature = { LV2_STATE__makePath, NULL }; 95 95 96 96 #ifdef HAVE_LV2_UI_RESIZE -
trunk/lilv/src/state.c
r3975 r3987 23 23 24 24 #ifdef HAVE_LV2_STATE 25 # include "lv2/lv2plug.in/ns/ext/atom/atom.h" 25 26 # include "lv2/lv2plug.in/ns/ext/state/state.h" 26 27 #endif … … 345 346 346 347 #ifdef HAVE_LV2_STATE 347 state->state_Path = map->map(map->handle, LV2_ STATE_PATH_URI);348 state->state_Path = map->map(map->handle, LV2_ATOM__Path); 348 349 LV2_State_Map_Path pmap = { state, abstract_path, absolute_path }; 349 LV2_Feature pmap_feature = { LV2_STATE_ MAP_PATH_URI, &pmap };350 LV2_Feature pmap_feature = { LV2_STATE__mapPath, &pmap }; 350 351 LV2_State_Make_Path pmake = { state, make_path }; 351 LV2_Feature pmake_feature = { LV2_STATE_ MAKE_PATH_URI, &pmake };352 LV2_Feature pmake_feature = { LV2_STATE__makePath, &pmake }; 352 353 features = sfeatures = add_features(features, &pmap_feature, 353 354 save_dir ? &pmake_feature : NULL); … … 374 375 const LV2_Descriptor* desc = instance->lv2_descriptor; 375 376 const LV2_State_Interface* iface = (desc->extension_data) 376 ? (LV2_State_Interface*)desc->extension_data(LV2_STATE_ INTERFACE_URI)377 ? (LV2_State_Interface*)desc->extension_data(LV2_STATE__Interface) 377 378 : NULL; 378 379 … … 402 403 LV2_State_Map_Path map_path = { 403 404 (LilvState*)state, abstract_path, absolute_path }; 404 LV2_Feature map_feature = { LV2_STATE_ MAP_PATH_URI, &map_path };405 LV2_Feature map_feature = { LV2_STATE__mapPath, &map_path }; 405 406 406 407 const LV2_Feature** sfeatures = add_features(features, &map_feature, NULL); … … 409 410 const LV2_Descriptor* desc = instance->lv2_descriptor; 410 411 const LV2_State_Interface* iface = (desc->extension_data) 411 ? (LV2_State_Interface*)desc->extension_data(LV2_STATE_ INTERFACE_URI)412 ? (LV2_State_Interface*)desc->extension_data(LV2_STATE__Interface) 412 413 : NULL; 413 414 … … 497 498 498 499 #ifdef HAVE_LV2_STATE 499 state->state_Path = map->map(map->handle, LV2_ STATE_PATH_URI);500 state->state_Path = map->map(map->handle, LV2_ATOM__Path); 500 501 #endif 501 502 … … 561 562 #ifdef HAVE_LV2_STATE 562 563 SordNode* state_path_node = sord_new_uri(world->world, 563 USTR(LV2_ STATE_PATH_URI));564 USTR(LV2_ATOM__Path)); 564 565 #endif 565 566 … … 600 601 state_path_node)) { 601 602 prop.size = strlen((const char*)sord_node_get_string(o)) + 1; 602 prop.type = map->map(map->handle, LV2_ STATE_PATH_URI);603 prop.type = map->map(map->handle, LV2_ATOM__Path); 603 604 prop.flags = LV2_STATE_IS_PORTABLE; 604 605 prop.value = lilv_path_join( -
trunk/lilv/test/lilv_test.c
r3971 r3987 1243 1243 1244 1244 LV2_State_Make_Path make_path = { NULL, lilv_make_path }; 1245 LV2_Feature make_path_feature = { LV2_STATE_ MAKE_PATH_URI, &make_path };1245 LV2_Feature make_path_feature = { LV2_STATE__makePath, &make_path }; 1246 1246 const LV2_Feature* ffeatures[] = { &make_path_feature, &map_feature, NULL }; 1247 1247 -
trunk/lilv/test/test_plugin.c
r3971 r3987 23 23 #include <string.h> 24 24 25 #include "lv2/lv2plug.in/ns/ext/atom/atom.h" 25 26 #include "lv2/lv2plug.in/ns/ext/state/state.h" 26 27 #include "lv2/lv2plug.in/ns/ext/urid/urid.h" … … 110 111 test->uris.atom_Float = test->map->map( 111 112 test->map->handle, NS_ATOM "Float"); 112 } else if (!strcmp(features[i]->URI, LV2_STATE_ MAKE_PATH_URI)) {113 } else if (!strcmp(features[i]->URI, LV2_STATE__makePath)) { 113 114 make_path = (LV2_State_Make_Path*)features[i]->data; 114 115 } … … 169 170 LV2_State_Make_Path* make_path = NULL; 170 171 for (int i = 0; features && features[i]; ++i) { 171 if (!strcmp(features[i]->URI, LV2_STATE_ MAP_PATH_URI)) {172 if (!strcmp(features[i]->URI, LV2_STATE__mapPath)) { 172 173 map_path = (LV2_State_Map_Path*)features[i]->data; 173 } else if (!strcmp(features[i]->URI, LV2_STATE_ MAKE_PATH_URI)) {174 } else if (!strcmp(features[i]->URI, LV2_STATE__makePath)) { 174 175 make_path = (LV2_State_Make_Path*)features[i]->data; 175 176 } … … 248 249 apath, 249 250 strlen(apath) + 1, 250 map_uri(plugin, LV2_ STATE_PATH_URI),251 map_uri(plugin, LV2_ATOM__Path), 251 252 LV2_STATE_IS_PORTABLE); 252 253 … … 263 264 apath, 264 265 strlen(apath) + 1, 265 map_uri(plugin, LV2_ STATE_PATH_URI),266 map_uri(plugin, LV2_ATOM__Path), 266 267 LV2_STATE_IS_PORTABLE); 267 268 … … 280 281 apath, 281 282 strlen(apath) + 1, 282 map_uri(plugin, LV2_ STATE_PATH_URI),283 map_uri(plugin, LV2_ATOM__Path), 283 284 LV2_STATE_IS_PORTABLE); 284 285 free(apath); … … 298 299 LV2_State_Map_Path* map_path = NULL; 299 300 for (int i = 0; features && features[i]; ++i) { 300 if (!strcmp(features[i]->URI, LV2_STATE_ MAP_PATH_URI)) {301 if (!strcmp(features[i]->URI, LV2_STATE__mapPath)) { 301 302 map_path = (LV2_State_Map_Path*)features[i]->data; 302 303 } … … 351 352 { 352 353 static const LV2_State_Interface state = { save, restore }; 353 if (!strcmp(uri, LV2_STATE_ INTERFACE_URI)) {354 if (!strcmp(uri, LV2_STATE__Interface)) { 354 355 return &state; 355 356 } -
trunk/plugins/dirg.lv2/src/dirg_lv2.cpp
r3608 r3987 22 22 23 23 #include "lv2/lv2plug.in/ns/ext/atom/atom.h" 24 #include "lv2/lv2plug.in/ns/ext/atom/ atom-helpers.h"24 #include "lv2/lv2plug.in/ns/ext/atom/util.h" 25 25 #include "lv2/lv2plug.in/ns/ext/contexts/contexts.h" 26 26 #include "lv2/lv2plug.in/ns/ext/uri-map/uri-map.h" -
trunk/plugins/lolep.lv2/src/object.cpp
r3153 r3987 24 24 25 25 #include "lv2/lv2plug.in/ns/ext/atom/atom.h" 26 #include "lv2/lv2plug.in/ns/ext/atom/ atom-helpers.h"26 #include "lv2/lv2plug.in/ns/ext/atom/util.h" 27 27 #include "lv2/lv2plug.in/ns/ext/contexts/contexts.h" 28 28 #include "lv2/lv2plug.in/ns/ext/uri-map/uri-map.h" 29 30 #include "LV2Extensions.hpp" 31 #include "LV2Plugin.hpp" 29 32 #include "lolep.hpp" 30 #include "LV2Plugin.hpp"31 #include "LV2Extensions.hpp"32 33 33 34 using namespace std; -
trunk/plugins/lolep.lv2/src/print.cpp
r3153 r3987 20 20 #include <ctype.h> 21 21 #include <stdio.h> 22 22 23 #include "lv2/lv2plug.in/ns/ext/atom/atom.h" 23 #include "lv2/lv2plug.in/ns/ext/atom/ atom-helpers.h"24 #include "lv2/lv2plug.in/ns/ext/atom/util.h" 24 25 #include "lv2/lv2plug.in/ns/ext/contexts/contexts.h" 26 #include "lv2/lv2plug.in/ns/ext/event/event.h" 25 27 #include "lv2/lv2plug.in/ns/ext/uri-map/uri-map.h" 26 #include "lv2/lv2plug.in/ns/ext/event/event.h" 28 29 #include "LV2Extensions.hpp" 30 #include "LV2Plugin.hpp" 27 31 #include "lolep.hpp" 28 #include "LV2Plugin.hpp"29 #include "LV2Extensions.hpp"30 32 31 33 using namespace std; -
trunk/plugins/lolep.lv2/src/rdf-read.cpp
r3284 r3987 29 29 30 30 #include "lv2/lv2plug.in/ns/ext/atom/atom.h" 31 #include "lv2/lv2plug.in/ns/ext/atom/ atom-helpers.h"31 #include "lv2/lv2plug.in/ns/ext/atom/util.h" 32 32 #include "lv2/lv2plug.in/ns/ext/contexts/contexts.h" 33 33 #include "lv2/lv2plug.in/ns/ext/uri-map/uri-map.h" -
trunk/plugins/lolep.lv2/src/rdf-write.cpp
r3284 r3987 25 25 #include "serd/serd.h" 26 26 27 #include "lv2/lv2plug.in/ns/ext/atom/atom-helpers.h"28 27 #include "lv2/lv2plug.in/ns/ext/atom/atom.h" 28 #include "lv2/lv2plug.in/ns/ext/atom/util.h" 29 29 #include "lv2/lv2plug.in/ns/ext/contexts/contexts.h" 30 30 #include "lv2/lv2plug.in/ns/ext/uri-map/uri-map.h"
Note: See TracChangeset
for help on using the changeset viewer.
