Changeset 3987


Ignore:
Timestamp:
02/18/12 19:34:33 (3 years ago)
Author:
drobilla
Message:

Update for latest LV2 changes.

Location:
trunk
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • trunk/jalv/src/atom_rdf.c

    r3986 r3987  
    1919 
    2020#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" 
    2222#include "lv2/lv2plug.in/ns/ext/urid/urid.h" 
    2323 
    2424#include "serd/serd.h" 
    2525 
    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#" 
    2827 
    2928#define USTR(str) ((const uint8_t*)str) 
     
    5857    if (atom->type == 0 && atom->size == 0) { 
    5958        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)) { 
    6160        const uint8_t* str = USTR(LV2_ATOM_BODY(atom)); 
    6261        object = serd_node_from_string(SERD_LITERAL, str); 
    63     } else if (!strcmp(type, NS_ATOM "URID")) { 
     62    } else if (!strcmp(type, LV2_ATOM__URID)) { 
    6463        const uint32_t id  = *(const uint32_t*)LV2_ATOM_BODY(atom); 
    6564        const uint8_t* str = USTR(unmap->unmap(unmap->handle, id)); 
    6665        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)) { 
    6871        const uint8_t* str = USTR(LV2_ATOM_BODY(atom)); 
    6972        object = serd_node_from_string(SERD_URI, str); 
    70     } else if (!strcmp(type, NS_ATOM "Int32")) { 
     73    } else if (!strcmp(type, LV2_ATOM__Int32)) { 
    7174        new_node = true; 
    7275        object   = serd_node_new_integer(*(int32_t*)LV2_ATOM_BODY(atom)); 
    7376        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)) { 
    7578        new_node = true; 
    7679        object   = serd_node_new_decimal(*(float*)LV2_ATOM_BODY(atom), 8); 
    7780        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)) { 
    7982        new_node = true; 
    8083        object   = serd_node_new_decimal(*(float*)LV2_ATOM_BODY(atom), 16); 
    8184        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)) { 
    8386        new_node = true; 
    8487        datatype = serd_node_from_string(SERD_URI, USTR(NS_XSD "boolean")); 
     
    8891            object = serd_node_from_string(SERD_LITERAL, USTR("false")); 
    8992        } 
    90     } else if (!strcmp(type, NS_ATOM "Blank")) { 
     93    } else if (!strcmp(type, LV2_ATOM__Blank)) { 
    9194        const LV2_Atom_Object* obj = (const LV2_Atom_Object*)atom; 
    9295        SerdNode idnum = serd_node_new_integer(obj->id); 
  • trunk/jalv/src/jalv.c

    r3986 r3987  
    9292static LV2_Feature unmap_feature     = { NS_EXT "urid#unmap", NULL }; 
    9393static LV2_Feature instance_feature  = { NS_EXT "instance-access", NULL }; 
    94 static LV2_Feature make_path_feature = { LV2_STATE_MAKE_PATH_URI, NULL }; 
     94static LV2_Feature make_path_feature = { LV2_STATE__makePath, NULL }; 
    9595 
    9696#ifdef HAVE_LV2_UI_RESIZE 
  • trunk/lilv/src/state.c

    r3975 r3987  
    2323 
    2424#ifdef HAVE_LV2_STATE 
     25#    include "lv2/lv2plug.in/ns/ext/atom/atom.h" 
    2526#    include "lv2/lv2plug.in/ns/ext/state/state.h" 
    2627#endif 
     
    345346 
    346347#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); 
    348349    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 }; 
    350351    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 }; 
    352353    features = sfeatures = add_features(features, &pmap_feature, 
    353354                                        save_dir ? &pmake_feature : NULL); 
     
    374375    const LV2_Descriptor*      desc  = instance->lv2_descriptor; 
    375376    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) 
    377378        : NULL; 
    378379 
     
    402403    LV2_State_Map_Path map_path = { 
    403404        (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 }; 
    405406 
    406407    const LV2_Feature** sfeatures = add_features(features, &map_feature, NULL); 
     
    409410    const LV2_Descriptor*      desc  = instance->lv2_descriptor; 
    410411    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) 
    412413        : NULL; 
    413414 
     
    497498 
    498499#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); 
    500501#endif 
    501502 
     
    561562#ifdef HAVE_LV2_STATE 
    562563    SordNode* state_path_node = sord_new_uri(world->world, 
    563                                              USTR(LV2_STATE_PATH_URI)); 
     564                                             USTR(LV2_ATOM__Path)); 
    564565#endif 
    565566 
     
    600601                                        state_path_node)) { 
    601602                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); 
    603604                prop.flags = LV2_STATE_IS_PORTABLE; 
    604605                prop.value = lilv_path_join( 
  • trunk/lilv/test/lilv_test.c

    r3971 r3987  
    12431243 
    12441244    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 }; 
    12461246    const LV2_Feature*  ffeatures[]       = { &make_path_feature, &map_feature, NULL }; 
    12471247 
  • trunk/lilv/test/test_plugin.c

    r3971 r3987  
    2323#include <string.h> 
    2424 
     25#include "lv2/lv2plug.in/ns/ext/atom/atom.h" 
    2526#include "lv2/lv2plug.in/ns/ext/state/state.h" 
    2627#include "lv2/lv2plug.in/ns/ext/urid/urid.h" 
     
    110111            test->uris.atom_Float = test->map->map( 
    111112                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)) { 
    113114            make_path = (LV2_State_Make_Path*)features[i]->data; 
    114115        } 
     
    169170    LV2_State_Make_Path* make_path = NULL; 
    170171    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)) { 
    172173            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)) { 
    174175            make_path = (LV2_State_Make_Path*)features[i]->data; 
    175176        } 
     
    248249              apath, 
    249250              strlen(apath) + 1, 
    250               map_uri(plugin, LV2_STATE_PATH_URI), 
     251              map_uri(plugin, LV2_ATOM__Path), 
    251252              LV2_STATE_IS_PORTABLE); 
    252253 
     
    263264                  apath, 
    264265                  strlen(apath) + 1, 
    265                   map_uri(plugin, LV2_STATE_PATH_URI), 
     266                  map_uri(plugin, LV2_ATOM__Path), 
    266267                  LV2_STATE_IS_PORTABLE); 
    267268 
     
    280281                  apath, 
    281282                  strlen(apath) + 1, 
    282                   map_uri(plugin, LV2_STATE_PATH_URI), 
     283                  map_uri(plugin, LV2_ATOM__Path), 
    283284                  LV2_STATE_IS_PORTABLE); 
    284285            free(apath); 
     
    298299    LV2_State_Map_Path* map_path = NULL; 
    299300    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)) { 
    301302            map_path = (LV2_State_Map_Path*)features[i]->data; 
    302303        } 
     
    351352{ 
    352353    static const LV2_State_Interface state = { save, restore }; 
    353     if (!strcmp(uri, LV2_STATE_INTERFACE_URI)) { 
     354    if (!strcmp(uri, LV2_STATE__Interface)) { 
    354355        return &state; 
    355356    } 
  • trunk/plugins/dirg.lv2/src/dirg_lv2.cpp

    r3608 r3987  
    2222 
    2323#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" 
    2525#include "lv2/lv2plug.in/ns/ext/contexts/contexts.h" 
    2626#include "lv2/lv2plug.in/ns/ext/uri-map/uri-map.h" 
  • trunk/plugins/lolep.lv2/src/object.cpp

    r3153 r3987  
    2424 
    2525#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" 
    2727#include "lv2/lv2plug.in/ns/ext/contexts/contexts.h" 
    2828#include "lv2/lv2plug.in/ns/ext/uri-map/uri-map.h" 
     29 
     30#include "LV2Extensions.hpp" 
     31#include "LV2Plugin.hpp" 
    2932#include "lolep.hpp" 
    30 #include "LV2Plugin.hpp" 
    31 #include "LV2Extensions.hpp" 
    3233 
    3334using namespace std; 
  • trunk/plugins/lolep.lv2/src/print.cpp

    r3153 r3987  
    2020#include <ctype.h> 
    2121#include <stdio.h> 
     22 
    2223#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" 
    2425#include "lv2/lv2plug.in/ns/ext/contexts/contexts.h" 
     26#include "lv2/lv2plug.in/ns/ext/event/event.h" 
    2527#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" 
    2731#include "lolep.hpp" 
    28 #include "LV2Plugin.hpp" 
    29 #include "LV2Extensions.hpp" 
    3032 
    3133using namespace std; 
  • trunk/plugins/lolep.lv2/src/rdf-read.cpp

    r3284 r3987  
    2929 
    3030#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" 
    3232#include "lv2/lv2plug.in/ns/ext/contexts/contexts.h" 
    3333#include "lv2/lv2plug.in/ns/ext/uri-map/uri-map.h" 
  • trunk/plugins/lolep.lv2/src/rdf-write.cpp

    r3284 r3987  
    2525#include "serd/serd.h" 
    2626 
    27 #include "lv2/lv2plug.in/ns/ext/atom/atom-helpers.h" 
    2827#include "lv2/lv2plug.in/ns/ext/atom/atom.h" 
     28#include "lv2/lv2plug.in/ns/ext/atom/util.h" 
    2929#include "lv2/lv2plug.in/ns/ext/contexts/contexts.h" 
    3030#include "lv2/lv2plug.in/ns/ext/uri-map/uri-map.h" 
Note: See TracChangeset for help on using the changeset viewer.