Browse Source

Update static lilv; misc changes

tags/1.9.4
falkTX 11 years ago
parent
commit
7dd253d750
100 changed files with 806 additions and 360 deletions
  1. +0
    -6
      doc/Carla-TODO
  2. +7
    -3
      source/discovery/carla-discovery.cpp
  3. +9
    -0
      source/includes/ladspa_rdf.hpp
  4. +1
    -1
      source/includes/lilv
  5. +30
    -0
      source/includes/lv2_rdf.hpp
  6. +1
    -1
      source/includes/sord
  7. +1
    -1
      source/includes/sratom
  8. +4
    -4
      source/libs/lilv/Makefile
  9. +1
    -1
      source/libs/lilv/config/sord_config.h
  10. BIN
      source/libs/lilv/lilv-0.14.4/waf
  11. +0
    -0
      source/libs/lilv/lilv-0.16.0/AUTHORS
  12. +0
    -0
      source/libs/lilv/lilv-0.16.0/COPYING
  13. +0
    -0
      source/libs/lilv/lilv-0.16.0/INSTALL
  14. +22
    -0
      source/libs/lilv/lilv-0.16.0/NEWS
  15. +0
    -0
      source/libs/lilv/lilv-0.16.0/PACKAGING
  16. +0
    -0
      source/libs/lilv/lilv-0.16.0/README
  17. +0
    -0
      source/libs/lilv/lilv-0.16.0/bindings/lilv.i
  18. +0
    -0
      source/libs/lilv/lilv-0.16.0/bindings/python/lv2_apply.py
  19. +0
    -0
      source/libs/lilv/lilv-0.16.0/bindings/python/lv2_list.py
  20. +0
    -0
      source/libs/lilv/lilv-0.16.0/doc/layout.xml
  21. +0
    -0
      source/libs/lilv/lilv-0.16.0/doc/lv2info.1
  22. +0
    -0
      source/libs/lilv/lilv-0.16.0/doc/lv2ls.1
  23. +1
    -1
      source/libs/lilv/lilv-0.16.0/doc/reference.doxygen.in
  24. +0
    -0
      source/libs/lilv/lilv-0.16.0/doc/style.css
  25. +1
    -1
      source/libs/lilv/lilv-0.16.0/lilv.pc.in
  26. +0
    -0
      source/libs/lilv/lilv-0.16.0/lilv.ttl
  27. +79
    -22
      source/libs/lilv/lilv-0.16.0/lilv/lilv.h
  28. +14
    -30
      source/libs/lilv/lilv-0.16.0/lilv/lilvmm.hpp
  29. +19
    -0
      source/libs/lilv/lilv-0.16.0/src/collections.c
  30. +0
    -0
      source/libs/lilv/lilv-0.16.0/src/instance.c
  31. +0
    -0
      source/libs/lilv/lilv-0.16.0/src/lib.c
  32. +11
    -5
      source/libs/lilv/lilv-0.16.0/src/lilv_internal.h
  33. +4
    -0
      source/libs/lilv/lilv-0.16.0/src/node.c
  34. +75
    -61
      source/libs/lilv/lilv-0.16.0/src/plugin.c
  35. +0
    -0
      source/libs/lilv/lilv-0.16.0/src/pluginclass.c
  36. +31
    -21
      source/libs/lilv/lilv-0.16.0/src/port.c
  37. +0
    -0
      source/libs/lilv/lilv-0.16.0/src/query.c
  38. +0
    -0
      source/libs/lilv/lilv-0.16.0/src/scalepoint.c
  39. +34
    -25
      source/libs/lilv/lilv-0.16.0/src/state.c
  40. +0
    -54
      source/libs/lilv/lilv-0.16.0/src/ui.c
  41. +2
    -1
      source/libs/lilv/lilv-0.16.0/src/util.c
  42. +66
    -66
      source/libs/lilv/lilv-0.16.0/src/world.c
  43. +0
    -0
      source/libs/lilv/lilv-0.16.0/src/zix/common.h
  44. +0
    -0
      source/libs/lilv/lilv-0.16.0/src/zix/tree.c
  45. +0
    -0
      source/libs/lilv/lilv-0.16.0/src/zix/tree.h
  46. +31
    -3
      source/libs/lilv/lilv-0.16.0/test/lilv_test.c
  47. +0
    -0
      source/libs/lilv/lilv-0.16.0/test/manifest.ttl.in
  48. +0
    -0
      source/libs/lilv/lilv-0.16.0/test/test_plugin.c
  49. +0
    -0
      source/libs/lilv/lilv-0.16.0/test/test_plugin.ttl.in
  50. +0
    -0
      source/libs/lilv/lilv-0.16.0/utils/bench.h
  51. +0
    -0
      source/libs/lilv/lilv-0.16.0/utils/lilv-bench.c
  52. +0
    -0
      source/libs/lilv/lilv-0.16.0/utils/lilv.bash_completion
  53. +0
    -0
      source/libs/lilv/lilv-0.16.0/utils/lv2bench.c
  54. +0
    -0
      source/libs/lilv/lilv-0.16.0/utils/lv2info.c
  55. +0
    -0
      source/libs/lilv/lilv-0.16.0/utils/lv2ls.c
  56. +0
    -0
      source/libs/lilv/lilv-0.16.0/utils/uri_table.h
  57. BIN
      source/libs/lilv/lilv-0.16.0/waf
  58. +19
    -28
      source/libs/lilv/lilv-0.16.0/wscript
  59. BIN
      source/libs/lilv/sord-0.10.4/sord-0.10.4.tar.bz2.sig
  60. BIN
      source/libs/lilv/sord-0.10.4/waf
  61. +0
    -0
      source/libs/lilv/sord-0.12.0/AUTHORS
  62. +0
    -0
      source/libs/lilv/sord-0.12.0/COPYING
  63. +0
    -0
      source/libs/lilv/sord-0.12.0/INSTALL
  64. +12
    -0
      source/libs/lilv/sord-0.12.0/NEWS
  65. +0
    -0
      source/libs/lilv/sord-0.12.0/PACKAGING
  66. +1
    -1
      source/libs/lilv/sord-0.12.0/README
  67. +187
    -0
      source/libs/lilv/sord-0.12.0/doc/layout.xml
  68. +0
    -0
      source/libs/lilv/sord-0.12.0/doc/reference.doxygen.in
  69. +1
    -1
      source/libs/lilv/sord-0.12.0/doc/sord_validate.1
  70. +1
    -1
      source/libs/lilv/sord-0.12.0/doc/sordi.1
  71. +0
    -0
      source/libs/lilv/sord-0.12.0/doc/style.css
  72. +0
    -0
      source/libs/lilv/sord-0.12.0/sord.pc.in
  73. +15
    -1
      source/libs/lilv/sord-0.12.0/sord/sord.h
  74. +54
    -3
      source/libs/lilv/sord-0.12.0/sord/sordmm.hpp
  75. +26
    -1
      source/libs/lilv/sord-0.12.0/src/sord.c
  76. +0
    -0
      source/libs/lilv/sord-0.12.0/src/sord_internal.h
  77. +16
    -0
      source/libs/lilv/sord-0.12.0/src/sord_test.c
  78. +28
    -15
      source/libs/lilv/sord-0.12.0/src/sord_validate.c
  79. +2
    -2
      source/libs/lilv/sord-0.12.0/src/sordi.c
  80. +0
    -0
      source/libs/lilv/sord-0.12.0/src/sordmm_test.cpp
  81. +0
    -0
      source/libs/lilv/sord-0.12.0/src/syntax.c
  82. +0
    -0
      source/libs/lilv/sord-0.12.0/src/zix/common.h
  83. +0
    -0
      source/libs/lilv/sord-0.12.0/src/zix/digest.c
  84. +0
    -0
      source/libs/lilv/sord-0.12.0/src/zix/digest.h
  85. +0
    -0
      source/libs/lilv/sord-0.12.0/src/zix/hash.c
  86. +0
    -0
      source/libs/lilv/sord-0.12.0/src/zix/hash.h
  87. +0
    -0
      source/libs/lilv/sord-0.12.0/src/zix/tree.c
  88. +0
    -0
      source/libs/lilv/sord-0.12.0/src/zix/tree.h
  89. +0
    -0
      source/libs/lilv/sord-0.12.0/tests/README.txt
  90. +0
    -0
      source/libs/lilv/sord-0.12.0/tests/UTF-8.ttl
  91. +0
    -0
      source/libs/lilv/sord-0.12.0/tests/manifest.ttl
  92. +0
    -0
      source/libs/lilv/sord-0.12.0/tests/rdf-schema.out
  93. +0
    -0
      source/libs/lilv/sord-0.12.0/tests/rdf-schema.ttl
  94. +0
    -0
      source/libs/lilv/sord-0.12.0/tests/rdfq-results.out
  95. +0
    -0
      source/libs/lilv/sord-0.12.0/tests/rdfq-results.ttl
  96. +0
    -0
      source/libs/lilv/sord-0.12.0/tests/rdfs-namespace.out
  97. +0
    -0
      source/libs/lilv/sord-0.12.0/tests/rdfs-namespace.ttl
  98. +0
    -0
      source/libs/lilv/sord-0.12.0/tests/test-00.out
  99. +0
    -0
      source/libs/lilv/sord-0.12.0/tests/test-00.ttl
  100. +0
    -0
      source/libs/lilv/sord-0.12.0/tests/test-01.out

+ 0
- 6
doc/Carla-TODO View File

@@ -1,7 +1,6 @@
# Carla TODO

CODE CLEANUP:
- Create PluginGUI class in C++ code, remove python one (need to handle parent somehow)
- Smarter audio/midi port names (count == 1: "audio-in" else: "audio-in-x")

GENERAL:
@@ -10,8 +9,6 @@ GENERAL:
- implement midi-learn (new dialog)
- implement midi-cc automation special rules (invert, half, logarithmic, etc)
- allow to change position of plugins (up/down)
- allow to set m_ctrlInChannel from GUI (needs GUI widget)
- add macro to get midi channel (status & 0x0F)

ENGINE:
- complete RtAudio+RtMidi support
@@ -44,6 +41,3 @@ FluidSynth:
Native:
- Cleanup API
- Document API

Carla:
- auto-tab height fix

+ 7
- 3
source/discovery/carla-discovery.cpp View File

@@ -1500,7 +1500,7 @@ int main(int argc, char* argv[])

const char* const stype = argv[1];
const char* const filename = argv[2];
const PluginType type = getPluginTypeFromString(stype);
const PluginType type = getPluginTypeFromString(stype);

bool openLib = false;
void* handle = nullptr;
@@ -1528,9 +1528,13 @@ int main(int argc, char* argv[])
}

// never do init for dssi-vst, takes too long and it's crashy
bool doInit = !QString(filename).endsWith("dssi-vst.so", Qt::CaseInsensitive);
#ifdef __USE_GNU
bool doInit = (strcasestr(filename, "dssi-vst") != nullptr);
#else
bool doInit = (std::strstr(filename, "dssi-vst") != nullptr);
#endif

if (doInit && getenv("CARLA_DISCOVERY_NO_PROCESSING_CHECKS"))
if (doInit && getenv("CARLA_DISCOVERY_NO_PROCESSING_CHECKS") != nullptr)
doInit = false;

if (doInit && handle != nullptr)


+ 9
- 0
source/includes/ladspa_rdf.hpp View File

@@ -129,6 +129,9 @@ struct LADSPA_RDF_ScalePoint {
if (Label != nullptr)
delete[] Label;
}

LADSPA_RDF_ScalePoint(LADSPA_RDF_ScalePoint&) = delete;
LADSPA_RDF_ScalePoint(const LADSPA_RDF_ScalePoint&) = delete;
};

// Port
@@ -158,6 +161,9 @@ struct LADSPA_RDF_Port {
if (ScalePoints != nullptr)
delete[] ScalePoints;
}

LADSPA_RDF_Port(LADSPA_RDF_Port&) = delete;
LADSPA_RDF_Port(const LADSPA_RDF_Port&) = delete;
};

// Plugin
@@ -187,6 +193,9 @@ struct LADSPA_RDF_Descriptor {
if (Ports != nullptr)
delete[] Ports;
}

LADSPA_RDF_Descriptor(LADSPA_RDF_Descriptor&) = delete;
LADSPA_RDF_Descriptor(const LADSPA_RDF_Descriptor&) = delete;
};

#endif // LADSPA_RDF_INCLUDED

+ 1
- 1
source/includes/lilv View File

@@ -1 +1 @@
../libs/lilv/lilv-0.14.4/lilv
../libs/lilv/lilv-0.16.0/lilv

+ 30
- 0
source/includes/lv2_rdf.hpp View File

@@ -37,6 +37,9 @@ struct LV2_Type {
if (URI != nullptr)
delete[] URI;
}

LV2_Type(LV2_Type&) = delete;
LV2_Type(const LV2_Type&) = delete;
};

// Port Midi Map Types
@@ -310,6 +313,9 @@ struct LV2_RDF_PortMidiMap {
LV2_RDF_PortMidiMap()
: Type(0),
Number(0) {}

LV2_RDF_PortMidiMap(LV2_RDF_PortMidiMap&) = delete;
LV2_RDF_PortMidiMap(const LV2_RDF_PortMidiMap&) = delete;
};

// Port Points
@@ -324,6 +330,9 @@ struct LV2_RDF_PortPoints {
Default(0.0f),
Minimum(0.0f),
Maximum(1.0f) {}

LV2_RDF_PortPoints(LV2_RDF_PortPoints&) = delete;
LV2_RDF_PortPoints(const LV2_RDF_PortPoints&) = delete;
};

// Port Unit
@@ -350,6 +359,9 @@ struct LV2_RDF_PortUnit {
if (Symbol != nullptr)
delete[] Symbol;
}

LV2_RDF_PortUnit(LV2_RDF_PortUnit&) = delete;
LV2_RDF_PortUnit(const LV2_RDF_PortUnit&) = delete;
};

// Port Scale Point
@@ -366,6 +378,9 @@ struct LV2_RDF_PortScalePoint {
if (Label != nullptr)
delete[] Label;
}

LV2_RDF_PortScalePoint(LV2_RDF_PortScalePoint&) = delete;
LV2_RDF_PortScalePoint(const LV2_RDF_PortScalePoint&) = delete;
};

// Port
@@ -401,6 +416,9 @@ struct LV2_RDF_Port {
if (ScalePoints != nullptr)
delete[] ScalePoints;
}

LV2_RDF_Port(LV2_RDF_Port&) = delete;
LV2_RDF_Port(const LV2_RDF_Port&) = delete;
};

// Preset
@@ -419,6 +437,9 @@ struct LV2_RDF_Preset {
if (Label != nullptr)
delete[] Label;
}

LV2_RDF_Preset(LV2_RDF_Preset&) = delete;
LV2_RDF_Preset(const LV2_RDF_Preset&) = delete;
};

// Feature
@@ -435,6 +456,9 @@ struct LV2_RDF_Feature {
if (URI != nullptr)
delete[] URI;
}

LV2_RDF_Feature(LV2_RDF_Feature&) = delete;
LV2_RDF_Feature(const LV2_RDF_Feature&) = delete;
};

// UI
@@ -472,6 +496,9 @@ struct LV2_RDF_UI {
if (Extensions != nullptr)
delete[] Extensions;
}

LV2_RDF_UI(LV2_RDF_UI&) = delete;
LV2_RDF_UI(const LV2_RDF_UI&) = delete;
};

// Plugin
@@ -545,6 +572,9 @@ struct LV2_RDF_Descriptor {
if (UIs != nullptr)
delete[] UIs;
}

LV2_RDF_Descriptor(LV2_RDF_Descriptor&) = delete;
LV2_RDF_Descriptor(const LV2_RDF_Descriptor&) = delete;
};

#endif // LV2_RDF_INCLUDED

+ 1
- 1
source/includes/sord View File

@@ -1 +1 @@
../libs/lilv/sord-0.10.4/sord
../libs/lilv/sord-0.12.0/sord

+ 1
- 1
source/includes/sratom View File

@@ -1 +1 @@
../libs/lilv/sratom-0.4.0/sratom
../libs/lilv/sratom-0.4.2/sratom

+ 4
- 4
source/libs/lilv/Makefile View File

@@ -9,11 +9,11 @@ include ../../Makefile.mk
# --------------------------------------------------------------

SERD_VERSION = 0.18.2
SORD_VERSION = 0.10.4
SRATOM_VERSION = 0.4.0
LILV_VERSION = 0.14.4
SORD_VERSION = 0.12.0
SRATOM_VERSION = 0.4.2
LILV_VERSION = 0.16.0

BUILD_C_FLAGS += -fvisibility=hidden -fPIC -w
BUILD_C_FLAGS += -fvisibility=hidden -fPIC
BUILD_C_FLAGS += -Iconfig -I../../includes

OBJS = serd.c.o sord.c.o sratom.c.o lilv.c.o


+ 1
- 1
source/libs/lilv/config/sord_config.h View File

@@ -2,7 +2,7 @@
#ifndef _SORD_CONFIG_H_
#define _SORD_CONFIG_H_

#define SORD_VERSION "0.10.4"
#define SORD_VERSION "0.12.0"

#define HAVE_SERD 1
#define HAVE_PCRE 1


BIN
source/libs/lilv/lilv-0.14.4/waf View File


source/libs/lilv/lilv-0.14.4/AUTHORS → source/libs/lilv/lilv-0.16.0/AUTHORS View File


source/libs/lilv/lilv-0.14.4/COPYING → source/libs/lilv/lilv-0.16.0/COPYING View File


source/libs/lilv/lilv-0.14.4/INSTALL → source/libs/lilv/lilv-0.16.0/INSTALL View File


source/libs/lilv/lilv-0.14.4/NEWS → source/libs/lilv/lilv-0.16.0/NEWS View File

@@ -1,3 +1,25 @@
lilv (0.16.0) stable;

* Add lilv_world_ask() for easily checking if a statement exists
* Add lilv_world_get() and lilv_port_get() for easily getting one value
* Add lilv_nodes_merge()
* Make lilv_plugin_get_port_by_designation() return a const pointer
* Require a URI for lilv_state_to_string() and fail gracefully otherwise
* Fail gracefully when lilv_state_new_from_string() is called on NULL
* Make state loading functions fall back to lv2:default for port values,
so a plugin description can be loaded as default state
* Ignore state ports with no value instead of printing an error
* Support atom:supports in lilv_port_supports_event()
* Add va_list variant of lilv_plugin_get_num_ports_of_class()
* Fix several plugin functions that failed to load data if called first
* Correctly depend on serd at build time (fix compilation in odd cases)
* Disable timestamps in HTML documentation for reproducible build
* lilvmm.hpp: Support varargs for Plugin::get_num_ports_of_class()
* lilvmm.hpp: Add several missing methods
* Update to waf 1.7.8 and autowaf r90 (install docs to versioned directory)

-- David Robillard <d@drobilla.net> Mon, 18 Feb 2013 16:43:10 -0500

lilv (0.14.4) stable;

* Deprecate old flawed Lilv::Instance constructors

source/libs/lilv/lilv-0.14.4/PACKAGING → source/libs/lilv/lilv-0.16.0/PACKAGING View File


source/libs/lilv/lilv-0.14.4/README → source/libs/lilv/lilv-0.16.0/README View File


source/libs/lilv/lilv-0.14.4/bindings/lilv.i → source/libs/lilv/lilv-0.16.0/bindings/lilv.i View File


source/libs/lilv/lilv-0.14.4/bindings/python/lv2_apply.py → source/libs/lilv/lilv-0.16.0/bindings/python/lv2_apply.py View File


source/libs/lilv/lilv-0.14.4/bindings/python/lv2_list.py → source/libs/lilv/lilv-0.16.0/bindings/python/lv2_list.py View File


source/libs/lilv/sord-0.10.4/doc/layout.xml → source/libs/lilv/lilv-0.16.0/doc/layout.xml View File


source/libs/lilv/lilv-0.14.4/doc/lv2info.1 → source/libs/lilv/lilv-0.16.0/doc/lv2info.1 View File


source/libs/lilv/lilv-0.14.4/doc/lv2ls.1 → source/libs/lilv/lilv-0.16.0/doc/lv2ls.1 View File


source/libs/lilv/lilv-0.14.4/doc/reference.doxygen.in → source/libs/lilv/lilv-0.16.0/doc/reference.doxygen.in View File

@@ -939,7 +939,7 @@ HTML_COLORSTYLE_GAMMA = 80
# page will contain the date and time when the page was generated. Setting
# this to NO can help when comparing the output of multiple runs.

HTML_TIMESTAMP = YES
HTML_TIMESTAMP = NO

# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML
# documentation will contain sections that can be hidden and shown after the

source/libs/lilv/lilv-0.14.4/doc/style.css → source/libs/lilv/lilv-0.16.0/doc/style.css View File


source/libs/lilv/lilv-0.14.4/lilv.pc.in → source/libs/lilv/lilv-0.16.0/lilv.pc.in View File

@@ -6,6 +6,6 @@ includedir=@INCLUDEDIR@
Name: Lilv
Version: @LILV_VERSION@
Description: Simple C library for hosting LV2 plugins
Requires: lv2core @LILV_PKG_DEPS@
Requires: lv2 @PKG_serd_0@ @PKG_sord_0@ @PKG_sratom_0@
Libs: -L${libdir} -l@LIB_LILV@ -ldl
Cflags: -I${includedir}/lilv-@LILV_MAJOR_VERSION@

source/libs/lilv/lilv-0.14.4/lilv.ttl → source/libs/lilv/lilv-0.16.0/lilv.ttl View File


source/libs/lilv/lilv-0.14.4/lilv/lilv.h → source/libs/lilv/lilv-0.16.0/lilv/lilv.h View File

@@ -21,6 +21,7 @@
#ifndef LILV_LILV_H
#define LILV_LILV_H

#include <stdarg.h>
#include <stddef.h>
#include <stdint.h>
#include <stdio.h>
@@ -464,6 +465,13 @@ LILV_API
bool
lilv_nodes_contains(const LilvNodes* values, const LilvNode* value);

/**
Return a new LilvNodes that contains all nodes from both @p a and @p b.
*/
LILV_API
LilvNodes*
lilv_nodes_merge(const LilvNodes* a, const LilvNodes* b);

/* Plugins */

LILV_API
@@ -641,6 +649,38 @@ lilv_world_find_nodes(LilvWorld* world,
const LilvNode* predicate,
const LilvNode* object);

/**
Find a single node that matches a pattern.
Exactly one of @p subject, @p predicate, @p object must be NULL.
This function is equivalent to
lilv_nodes_get_first(lilv_world_find_nodes(...)) but simplifies the common
case of only wanting a single value.
@return the first matching node, or NULL if no matches are found.
*/
LILV_API
LilvNode*
lilv_world_get(LilvWorld* world,
const LilvNode* subject,
const LilvNode* predicate,
const LilvNode* object);

/**
Return true iff a statement matching a certain pattern exists.

This is useful for checking if particular statement exists without having to
bother with collections and memory management.

@param subject Subject of statement, or NULL for anything.
@param predicate Predicate (key) of statement, or NULL for anything.
@param object Object (value) of statement, or NULL for anything.
*/
LILV_API
bool
lilv_world_ask(LilvWorld* world,
const LilvNode* subject,
const LilvNode* predicate,
const LilvNode* object);

/**
@}
@name Plugin
@@ -858,6 +898,19 @@ uint32_t
lilv_plugin_get_num_ports_of_class(const LilvPlugin* p,
const LilvNode* class_1, ...);

#ifndef SWIG
/**
Variant of lilv_plugin_get_num_ports_of_class() that takes a va_list.

This function calls va_arg() on @p args but does not call va_end().
*/
LILV_API
uint32_t
lilv_plugin_get_num_ports_of_class_va(const LilvPlugin* p,
const LilvNode* class_1,
va_list args);
#endif

/**
Return whether or not the plugin introduces (and reports) latency.
The index of the latency port can be found with lilv_plugin_get_latency_port
@@ -908,7 +961,7 @@ lilv_plugin_get_port_by_symbol(const LilvPlugin* plugin,
ports for a particular designation.
*/
LILV_API
LilvPort*
const LilvPort*
lilv_plugin_get_port_by_designation(const LilvPlugin* plugin,
const LilvNode* port_class,
const LilvNode* designation);
@@ -1019,6 +1072,19 @@ lilv_port_get_value(const LilvPlugin* plugin,
const LilvPort* port,
const LilvNode* predicate);

/**
Get a single property value of a port.

This is equivalent to lilv_nodes_get_first(lilv_port_get_value(...)) but is
simpler to use in the common case of only caring about one value. The
caller is responsible for freeing the returned node.
*/
LILV_API
LilvNode*
lilv_port_get(const LilvPlugin* plugin,
const LilvPort* port,
const LilvNode* predicate);

/**
Return the LV2 port properties of a port.
*/
@@ -1037,13 +1103,16 @@ lilv_port_has_property(const LilvPlugin* p,
const LilvNode* property_uri);

/**
Return whether a port is an event port and supports a certain event type.
Return whether a port supports a certain event type.

More precisely, this returns true iff the port has an atom:supports or an
ev:supportsEvent property with @p event_type as the value.
*/
LILV_API
bool
lilv_port_supports_event(const LilvPlugin* p,
const LilvPort* port,
const LilvNode* event_uri);
const LilvNode* event_type);

/**
Get the index of a port.
@@ -1138,6 +1207,8 @@ lilv_port_get_scale_points(const LilvPlugin* plugin,

/**
Load a state snapshot from @c world's RDF model.
This function can be used to load the default state of a plugin by passing
the plugin URI as the @p subject parameter.
@param subject The subject of the state description (e.g. a preset URI).
@return A new LilvState which must be freed with lilv_state_free().
*/
@@ -1377,6 +1448,11 @@ lilv_state_save(LilvWorld* world,

/**
Save state to a string. This function does not use the filesystem.

@param uri URI for the state description (mandatory).
@param base_uri Base URI for serialisation. Unless you know what you are
doing, pass NULL for this, otherwise the state may not be restorable via
lilv_state_new_from_string().
*/
LILV_API
char*
@@ -1692,25 +1768,6 @@ LILV_API
const LilvNode*
lilv_ui_get_binary_uri(const LilvUI* ui);

/**
Custom calls
*/
LILV_API
LilvNodes*
lilv_ui_get_supported_features(const LilvUI* ui);

LILV_API
LilvNodes*
lilv_ui_get_required_features(const LilvUI* ui);

LILV_API
LilvNodes*
lilv_ui_get_optional_features(const LilvUI* ui);

LILV_API
LilvNodes*
lilv_ui_get_extension_data(const LilvUI* ui);

/**
@}
@}

source/libs/lilv/lilv-0.14.4/lilv/lilvmm.hpp → source/libs/lilv/lilv-0.16.0/lilv/lilvmm.hpp View File

@@ -60,7 +60,6 @@ uri_to_path(const char* uri) {
#endif

struct Node {
inline Node(LilvNode* node) : me(node) {}
inline Node(const LilvNode* node) : me(lilv_node_duplicate(node)) {}
inline Node(const Node& copy) : me(lilv_node_duplicate(copy.me)) {}

@@ -137,7 +136,7 @@ struct ScalePoints {
struct Nodes {
LILV_WRAP_COLL(Nodes, Node, nodes);
LILV_WRAP1(bool, nodes, contains, const Node, node);
LILV_WRAP0(Node, nodes, get_first);
LILV_WRAP0(Node, nodes, get_first);
};

struct Port {
@@ -169,26 +168,6 @@ struct Port {
const LilvPort* me;
};

struct UI {
inline UI(const LilvUI* c_obj) : me(c_obj) {}
LILV_WRAP_CONVERSION(const LilvUI);

LILV_WRAP0(Node, ui, get_uri);
LILV_WRAP1(bool, ui, is_a, LilvNode*, ui_class);
LILV_WRAP0(Node, ui, get_bundle_uri);
LILV_WRAP0(Node, ui, get_binary_uri);
LILV_WRAP0(Nodes, ui, get_supported_features);
LILV_WRAP0(Nodes, ui, get_required_features);
LILV_WRAP0(Nodes, ui, get_optional_features);
LILV_WRAP0(Nodes, ui, get_extension_data);

const LilvUI* me;
};

struct UIs {
LILV_WRAP_COLL(UIs, UI, uis);
};

struct Plugin {
inline Plugin(const LilvPlugin* c_obj) : me(c_obj) {}
LILV_WRAP_CONVERSION(const LilvPlugin);
@@ -212,9 +191,9 @@ struct Plugin {
LILV_WRAP0(Node, plugin, get_author_email);
LILV_WRAP0(Node, plugin, get_author_homepage);
LILV_WRAP0(bool, plugin, is_replaced);
LILV_WRAP0(Nodes, plugin, get_extension_data);
LILV_WRAP0(UIs, plugin, get_uis);
LILV_WRAP1(Nodes, plugin, get_related, Node, type);
LILV_WRAP0(Nodes, plugin, get_extension_data);
LILV_WRAP0(UIs, plugin, get_uis);
LILV_WRAP1(Nodes, plugin, get_related, Node, type);

inline Port get_port_by_index(unsigned index) {
return Port(me, lilv_plugin_get_port_by_index(me, index));
@@ -231,10 +210,15 @@ struct Plugin {
me, min_values, max_values, def_values);
}

inline unsigned get_num_ports_of_class(LilvNode* class_1,
LilvNode* class_2) {
// TODO: varargs
return lilv_plugin_get_num_ports_of_class(me, class_1, class_2, NULL);
inline unsigned get_num_ports_of_class(LilvNode* class_1, ...) {
va_list args;
va_start(args, class_1);

const uint32_t count = lilv_plugin_get_num_ports_of_class_va(
me, class_1, args);

va_end(args);
return count;
}

const LilvPlugin* me;
@@ -324,7 +308,7 @@ struct World {
LILV_WRAP0(const LilvPluginClass*, world, get_plugin_class);
LILV_WRAP0(const LilvPluginClasses*, world, get_plugin_classes);
LILV_WRAP0(const Plugins, world, get_all_plugins);
LILV_WRAP1(int, world, load_resource, const LilvNode*, resource);
LILV_WRAP1(int, world, load_resource, const LilvNode*, resource);

LilvWorld* me;
};

source/libs/lilv/lilv-0.14.4/src/collections.c → source/libs/lilv/lilv-0.16.0/src/collections.c View File

@@ -143,6 +143,25 @@ lilv_nodes_contains(const LilvNodes* list, const LilvNode* value)
return false;
}

LILV_API
LilvNodes*
lilv_nodes_merge(const LilvNodes* a, const LilvNodes* b)
{
LilvNodes* result = lilv_nodes_new();

LILV_FOREACH(nodes, i, a)
zix_tree_insert((ZixTree*)result,
lilv_node_duplicate(lilv_nodes_get(a, i)),
NULL);

LILV_FOREACH(nodes, i, b)
zix_tree_insert((ZixTree*)result,
lilv_node_duplicate(lilv_nodes_get(b, i)),
NULL);

return result;
}

/* Iterator */

#define LILV_COLLECTION_IMPL(prefix, CT, ET) \

source/libs/lilv/lilv-0.14.4/src/instance.c → source/libs/lilv/lilv-0.16.0/src/instance.c View File


source/libs/lilv/lilv-0.14.4/src/lib.c → source/libs/lilv/lilv-0.16.0/src/lib.c View File


source/libs/lilv/lilv-0.14.4/src/lilv_internal.h → source/libs/lilv/lilv-0.16.0/src/lilv_internal.h View File

@@ -51,7 +51,7 @@ static inline char* dlerror(void) { return "Unknown error"; }
#include "lilv/lilv.h"

#ifdef LILV_DYN_MANIFEST
# include "lv2/lv2plug.in/ns/ext/dynmanifest/dynmanifest.h"
# include "lv2/dynmanifest.h"
#endif

/*
@@ -310,11 +310,17 @@ lilv_world_query_internal(LilvWorld* world,
const SordNode* predicate,
const SordNode* object);

bool
lilv_world_ask_internal(LilvWorld* world,
const SordNode* subject,
const SordNode* predicate,
const SordNode* object);

LilvNodes*
lilv_world_query_values_internal(LilvWorld* world,
const SordNode* subject,
const SordNode* predicate,
const SordNode* object);
lilv_world_find_nodes_internal(LilvWorld* world,
const SordNode* subject,
const SordNode* predicate,
const SordNode* object);

#define FOREACH_MATCH(iter) \
for (; !sord_iter_end(iter); sord_iter_next(iter))

source/libs/lilv/lilv-0.14.4/src/node.c → source/libs/lilv/lilv-0.16.0/src/node.c View File

@@ -92,6 +92,10 @@ lilv_node_new(LilvWorld* world, LilvNodeType type, const char* str)
LilvNode*
lilv_node_new_from_node(LilvWorld* world, const SordNode* node)
{
if (!node) {
return NULL;
}

LilvNode* result = NULL;
SordNode* datatype_uri = NULL;
LilvNodeType type = LILV_VALUE_STRING;

source/libs/lilv/lilv-0.14.4/src/plugin.c → source/libs/lilv/lilv-0.16.0/src/plugin.c View File

@@ -405,7 +405,7 @@ lilv_plugin_get_value_internal(const LilvPlugin* p,
const SordNode* predicate)
{
lilv_plugin_load_if_necessary(p);
return lilv_world_query_values_internal(
return lilv_world_find_nodes_internal(
p->world, p->plugin_uri->node, predicate, NULL);
}

@@ -528,37 +528,57 @@ lilv_plugin_get_port_ranges_float(const LilvPlugin* p,

LILV_API
uint32_t
lilv_plugin_get_num_ports_of_class(const LilvPlugin* p,
const LilvNode* class_1, ...)
lilv_plugin_get_num_ports_of_class_va(const LilvPlugin* p,
const LilvNode* class_1,
va_list args)
{
lilv_plugin_load_ports_if_necessary(p);

uint32_t ret = 0;
va_list args;
uint32_t count = 0;

// Build array of classes from args so we can walk it several times
size_t n_classes = 0;
const LilvNode** classes = NULL;
for (LilvNode* class_i = NULL; (class_i = va_arg(args, LilvNode*)); ) {
classes = (const LilvNode**)realloc(
classes, ++n_classes * sizeof(LilvNode*));
classes[n_classes - 1] = class_i;
}

// Check each port against every type
for (unsigned i = 0; i < p->num_ports; ++i) {
LilvPort* port = p->ports[i];
if (!port || !lilv_port_is_a(p, port, class_1))
continue;

va_start(args, class_1);
if (port && lilv_port_is_a(p, port, class_1)) {
bool matches = true;
for (size_t j = 0; j < n_classes; ++j) {
if (!lilv_port_is_a(p, port, classes[j])) {
matches = false;
break;
}
}

bool matches = true;
for (LilvNode* class_i = NULL; (class_i = va_arg(args, LilvNode*)); ) {
if (!lilv_port_is_a(p, port, class_i)) {
va_end(args);
matches = false;
break;
if (matches) {
++count;
}
}
}

if (matches)
++ret;
free(classes);
return count;
}

va_end(args);
}
LILV_API
uint32_t
lilv_plugin_get_num_ports_of_class(const LilvPlugin* p,
const LilvNode* class_1, ...)
{
va_list args;
va_start(args, class_1);

return ret;
uint32_t count = lilv_plugin_get_num_ports_of_class_va(p, class_1, args);

va_end(args);
return count;
}

LILV_API
@@ -592,7 +612,7 @@ lilv_plugin_has_latency(const LilvPlugin* p)
return ret;
}

static LilvPort*
static const LilvPort*
lilv_plugin_get_port_by_property(const LilvPlugin* plugin,
const LilvNode* port_property)
{
@@ -617,7 +637,7 @@ lilv_plugin_get_port_by_property(const LilvPlugin* plugin,
}

LILV_API
LilvPort*
const LilvPort*
lilv_plugin_get_port_by_designation(const LilvPlugin* plugin,
const LilvNode* port_class,
const LilvNode* designation)
@@ -648,10 +668,10 @@ LILV_API
uint32_t
lilv_plugin_get_latency_port_index(const LilvPlugin* p)
{
LilvNode* property = lilv_node_new_from_node(
LilvNode* prop = lilv_node_new_from_node(
p->world, p->world->uris.lv2_reportsLatency);
LilvPort* latency_port = lilv_plugin_get_port_by_property(p, property);
lilv_node_free(property);
const LilvPort* latency_port = lilv_plugin_get_port_by_property(p, prop);
lilv_node_free(prop);
return latency_port ? latency_port->index : UINT32_MAX;
}

@@ -660,13 +680,18 @@ bool
lilv_plugin_has_feature(const LilvPlugin* p,
const LilvNode* feature)
{
LilvNodes* features = lilv_plugin_get_supported_features(p);

const bool ret = (features && feature
&& lilv_nodes_contains(features, feature));

lilv_nodes_free(features);
return ret;
lilv_plugin_load_if_necessary(p);
const SordNode* predicates[] = { p->world->uris.lv2_requiredFeature,
p->world->uris.lv2_optionalFeature,
NULL };

for (const SordNode** pred = predicates; *pred; ++pred) {
if (lilv_world_ask_internal(
p->world, p->plugin_uri->node, *pred, feature->node)) {
return true;
}
}
return false;
}

LILV_API
@@ -675,20 +700,9 @@ lilv_plugin_get_supported_features(const LilvPlugin* p)
{
LilvNodes* optional = lilv_plugin_get_optional_features(p);
LilvNodes* required = lilv_plugin_get_required_features(p);
LilvNodes* result = lilv_nodes_new();

LILV_FOREACH(nodes, i, optional)
zix_tree_insert((ZixTree*)result,
lilv_node_duplicate(lilv_nodes_get(optional, i)),
NULL);
LILV_FOREACH(nodes, i, required)
zix_tree_insert((ZixTree*)result,
lilv_node_duplicate(lilv_nodes_get(required, i)),
NULL);

LilvNodes* result = lilv_nodes_merge(optional, required);
lilv_nodes_free(optional);
lilv_nodes_free(required);

return result;
}

@@ -696,16 +710,22 @@ LILV_API
LilvNodes*
lilv_plugin_get_optional_features(const LilvPlugin* p)
{
return lilv_plugin_get_value_internal(
p, p->world->uris.lv2_optionalFeature);
lilv_plugin_load_if_necessary(p);
return lilv_world_find_nodes_internal(p->world,
p->plugin_uri->node,
p->world->uris.lv2_optionalFeature,
NULL);
}

LILV_API
LilvNodes*
lilv_plugin_get_required_features(const LilvPlugin* p)
{
return lilv_plugin_get_value_internal(
p, p->world->uris.lv2_requiredFeature);
lilv_plugin_load_if_necessary(p);
return lilv_world_find_nodes_internal(p->world,
p->plugin_uri->node,
p->world->uris.lv2_requiredFeature,
NULL);
}

LILV_API
@@ -719,18 +739,12 @@ lilv_plugin_has_extension_data(const LilvPlugin* p,
return false;
}

SordIter* iter = lilv_world_query_internal(
lilv_plugin_load_if_necessary(p);
return lilv_world_ask_internal(
p->world,
p->plugin_uri->node,
p->world->uris.lv2_extensionData,
uri->node);

if (iter) {
sord_iter_free(iter);
return true;
} else {
return false;
}
}

LILV_API
@@ -937,8 +951,10 @@ LILV_API
LilvNodes*
lilv_plugin_get_related(const LilvPlugin* plugin, const LilvNode* type)
{
lilv_plugin_load_if_necessary(plugin);

LilvWorld* const world = plugin->world;
LilvNodes* const related = lilv_world_query_values_internal(
LilvNodes* const related = lilv_world_find_nodes_internal(
world,
NULL,
world->uris.lv2_appliesTo,
@@ -951,14 +967,12 @@ lilv_plugin_get_related(const LilvPlugin* plugin, const LilvNode* type)
LilvNodes* matches = lilv_nodes_new();
LILV_FOREACH(nodes, i, related) {
LilvNode* node = (LilvNode*)lilv_collection_get((ZixTree*)related, i);
SordIter* titer = lilv_world_query_internal(
world, node->node, world->uris.rdf_a, type->node);
if (!sord_iter_end(titer)) {
if (lilv_world_ask_internal(
world, node->node, world->uris.rdf_a, type->node)) {
zix_tree_insert((ZixTree*)matches,
lilv_node_new_from_node(world, node->node),
NULL);
}
sord_iter_free(titer);
}

lilv_nodes_free(related);

source/libs/lilv/lilv-0.14.4/src/pluginclass.c → source/libs/lilv/lilv-0.16.0/src/pluginclass.c View File


source/libs/lilv/lilv-0.14.4/src/port.c → source/libs/lilv/lilv-0.16.0/src/port.c View File

@@ -20,6 +20,7 @@
#include <stdlib.h>
#include <string.h>

#include "lv2/atom.h"
#include "lv2/event.h"

#include "lilv_internal.h"
@@ -68,16 +69,11 @@ lilv_port_has_property(const LilvPlugin* p,
const LilvPort* port,
const LilvNode* property)
{
assert(property);
SordIter* results = lilv_world_query_internal(
return lilv_world_ask_internal(
p->world,
port->node,
p->world->uris.lv2_portProperty,
lilv_node_as_node(property));

const bool ret = !sord_iter_end(results);
sord_iter_free(results);
return ret;
}

LILV_API
@@ -86,16 +82,19 @@ lilv_port_supports_event(const LilvPlugin* p,
const LilvPort* port,
const LilvNode* event)
{
assert(event);
SordIter* results = lilv_world_query_internal(
p->world,
port->node,
sord_new_uri(p->world->world, (const uint8_t*)LV2_EVENT__supportsEvent),
lilv_node_as_node(event));

const bool ret = !sord_iter_end(results);
sord_iter_free(results);
return ret;
const uint8_t* predicates[] = { (const uint8_t*)LV2_EVENT__supportsEvent,
(const uint8_t*)LV2_ATOM__supports,
NULL };

for (const uint8_t** pred = predicates; *pred; ++pred) {
if (lilv_world_ask_internal(p->world,
port->node,
sord_new_uri(p->world->world, *pred),
lilv_node_as_node(event))) {
return true;
}
}
return false;
}

static LilvNodes*
@@ -103,15 +102,11 @@ lilv_port_get_value_by_node(const LilvPlugin* p,
const LilvPort* port,
const SordNode* predicate)
{
assert(sord_node_get_type(predicate) == SORD_URI);

SordIter* results = lilv_world_query_internal(
return lilv_world_find_nodes_internal(
p->world,
port->node,
predicate,
NULL);

return lilv_nodes_from_stream_objects(p->world, results, SORD_OBJECT);
}

LILV_API
@@ -131,6 +126,21 @@ lilv_port_get_value(const LilvPlugin* p,
lilv_node_as_node(predicate));
}

LILV_API
LilvNode*
lilv_port_get(const LilvPlugin* p,
const LilvPort* port,
const LilvNode* predicate)
{
LilvNodes* values = lilv_port_get_value(p, port, predicate);

LilvNode* value = lilv_node_duplicate(
values ? lilv_nodes_get_first(values) : NULL);

lilv_nodes_free(values);
return value;
}

LILV_API
uint32_t
lilv_port_get_index(const LilvPlugin* p,

source/libs/lilv/lilv-0.14.4/src/query.c → source/libs/lilv/lilv-0.16.0/src/query.c View File


source/libs/lilv/lilv-0.14.4/src/scalepoint.c → source/libs/lilv/lilv-0.16.0/src/scalepoint.c View File


source/libs/lilv/lilv-0.14.4/src/state.c → source/libs/lilv/lilv-0.16.0/src/state.c View File

@@ -432,15 +432,6 @@ lilv_state_restore(const LilvState* state,
}
}

static SordNode*
get1(SordModel* model, const SordNode* s, const SordNode* p)
{
SordIter* const i = sord_search(model, s, p, 0, 0);
SordNode* const node = i ? sord_node_copy(sord_iter_get_node(i, SORD_OBJECT)) : NULL;
sord_iter_free(i);
return node;
}

static LilvState*
new_state_from_model(LilvWorld* world,
LV2_URID_Map* map,
@@ -463,6 +454,12 @@ new_state_from_model(LilvWorld* world,
state->dir = lilv_strdup((const char*)sord_node_get_string(graph));
}
sord_iter_free(i);
} else if (sord_ask(model,
node,
world->uris.rdf_a,
world->uris.lv2_Plugin, 0)) {
// Loading plugin description as state (default state)
state->plugin_uri = lilv_node_new_from_node(world, node);
} else {
LILV_ERRORF("State %s missing lv2:appliesTo property\n",
sord_node_get_string(node));
@@ -490,18 +487,18 @@ new_state_from_model(LilvWorld* world,
// Get port values
SordIter* ports = sord_search(model, node, world->uris.lv2_port, 0, 0);
FOREACH_MATCH(ports) {
const SordNode* port = sord_iter_get_node(ports, SORD_OBJECT);
const SordNode* label = get1(model, port, world->uris.rdfs_label);
const SordNode* symbol = get1(model, port, world->uris.lv2_symbol);
const SordNode* value = get1(model, port, world->uris.pset_value);
const SordNode* port = sord_iter_get_node(ports, SORD_OBJECT);

SordNode* label = sord_get(model, port, world->uris.rdfs_label, 0, 0);
SordNode* symbol = sord_get(model, port, world->uris.lv2_symbol, 0, 0);
SordNode* value = sord_get(model, port, world->uris.pset_value, 0, 0);
if (!value) {
value = sord_get(model, port, world->uris.lv2_default, 0, 0);
}
if (!symbol) {
LILV_ERRORF("State `%s' port missing symbol.\n",
sord_node_get_string(node));
} else if (!value) {
LILV_ERRORF("State `%s' port `%s' missing value.\n",
sord_node_get_string(symbol),
sord_node_get_string(node));
} else {
} else if (value) {
chunk.len = 0;
sratom_read(sratom, &forge, world->world, model, value);
LV2_Atom* atom = (LV2_Atom*)chunk.buf;
@@ -515,12 +512,15 @@ new_state_from_model(LilvWorld* world,
(const char*)sord_node_get_string(label));
}
}
sord_node_free(world->world, value);
sord_node_free(world->world, symbol);
sord_node_free(world->world, label);
}
sord_iter_free(ports);

// Get properties
SordNode* statep = sord_new_uri(world->world, USTR(LV2_STATE__state));
const SordNode* state_node = get1(model, node, statep);
SordNode* statep = sord_new_uri(world->world, USTR(LV2_STATE__state));
SordNode* state_node = sord_get(model, node, statep, NULL, NULL);
if (state_node) {
SordIter* props = sord_search(model, state_node, 0, 0, 0);
FOREACH_MATCH(props) {
@@ -553,6 +553,7 @@ new_state_from_model(LilvWorld* world,
}
sord_iter_free(props);
}
sord_node_free(world->world, state_node);
sord_node_free(world->world, statep);

free((void*)chunk.buf);
@@ -642,6 +643,10 @@ lilv_state_new_from_string(LilvWorld* world,
LV2_URID_Map* map,
const char* str)
{
if (!str) {
return NULL;
}

SerdNode base = SERD_NODE_NULL;
SerdEnv* env = serd_env_new(&base);
SordModel* model = sord_new(world->world, SORD_SPO|SORD_OPS, false);
@@ -650,14 +655,13 @@ lilv_state_new_from_string(LilvWorld* world,
set_prefixes(env);
serd_reader_read_string(reader, USTR(str));

const SordNode* p = sord_new_uri(world->world, USTR(LILV_NS_RDF "type"));
const SordNode* o = sord_new_uri(world->world, USTR(LV2_PRESETS__Preset));
SordIter* const i = sord_search(model, NULL, p, o, NULL);
const SordNode* s = sord_iter_get_node(i, SORD_SUBJECT);
SordNode* o = sord_new_uri(world->world, USTR(LV2_PRESETS__Preset));
SordNode* s = sord_get(model, NULL, world->uris.rdf_a, o, NULL);

LilvState* state = new_state_from_model(world, map, model, s, NULL);

sord_iter_free(i);
sord_node_free(world->world, s);
sord_node_free(world->world, o);
serd_reader_free(reader);
sord_free(model);
serd_env_free(env);
@@ -984,6 +988,11 @@ lilv_state_to_string(LilvWorld* world,
const char* uri,
const char* base_uri)
{
if (!uri) {
LILV_ERROR("Attempt to serialise state with no URI\n");
return NULL;
}

SerdChunk chunk = { NULL, 0 };
SerdEnv* env = NULL;
SerdNode base = serd_node_from_string(SERD_URI, USTR(base_uri));

source/libs/lilv/lilv-0.14.4/src/ui.c → source/libs/lilv/lilv-0.16.0/src/ui.c View File

@@ -128,57 +128,3 @@ lilv_ui_get_binary_uri(const LilvUI* ui)
assert(ui->binary_uri);
return ui->binary_uri;
}

static LilvNodes*
lilv_ui_get_value_internal(const LilvUI* ui,
const SordNode* predicate)
{
return lilv_world_query_values_internal(
ui->world, ui->uri->node, predicate, NULL);
}

LILV_API
LilvNodes*
lilv_ui_get_supported_features(const LilvUI* ui)
{
LilvNodes* optional = lilv_ui_get_optional_features(ui);
LilvNodes* required = lilv_ui_get_required_features(ui);
LilvNodes* result = lilv_nodes_new();

LILV_FOREACH(nodes, i, optional)
zix_tree_insert((ZixTree*)result,
lilv_node_duplicate(lilv_nodes_get(optional, i)),
NULL);
LILV_FOREACH(nodes, i, required)
zix_tree_insert((ZixTree*)result,
lilv_node_duplicate(lilv_nodes_get(required, i)),
NULL);

lilv_nodes_free(optional);
lilv_nodes_free(required);

return result;
}

LILV_API
LilvNodes*
lilv_ui_get_required_features(const LilvUI* ui)
{
return lilv_ui_get_value_internal(
ui, ui->world->uris.lv2_requiredFeature);
}

LILV_API
LilvNodes*
lilv_ui_get_optional_features(const LilvUI* ui)
{
return lilv_ui_get_value_internal(
ui, ui->world->uris.lv2_optionalFeature);
}

LILV_API
LilvNodes*
lilv_ui_get_extension_data(const LilvUI* ui)
{
return lilv_ui_get_value_internal(ui, ui->world->uris.lv2_extensionData);
}

source/libs/lilv/lilv-0.14.4/src/util.c → source/libs/lilv/lilv-0.16.0/src/util.c View File

@@ -29,6 +29,7 @@
#include <string.h>

#ifdef _WIN32
# define _WIN32_WINNT 0x0600 /* for CreateSymbolicLink */
# include <windows.h>
# include <direct.h>
# include <io.h>
@@ -425,7 +426,7 @@ lilv_symlink(const char* oldpath, const char* newpath)
int ret = 0;
if (strcmp(oldpath, newpath)) {
#ifdef _WIN32
ret = 0;
ret = !CreateSymbolicLink(newpath, oldpath, 0);
#else
ret = symlink(oldpath, newpath);
#endif

source/libs/lilv/lilv-0.14.4/src/world.c → source/libs/lilv/lilv-0.16.0/src/world.c View File

@@ -185,31 +185,37 @@ lilv_world_find_nodes(LilvWorld* world,
LILV_ERRORF("Subject `%s' is not a resource\n",
sord_node_get_string(subject->node));
return NULL;
}
if (!lilv_node_is_uri(predicate)) {
} else if (!lilv_node_is_uri(predicate)) {
LILV_ERRORF("Predicate `%s' is not a URI\n",
sord_node_get_string(predicate->node));
return NULL;
}
if (!subject && !object) {
} else if (!subject && !object) {
LILV_ERROR("Both subject and object are NULL\n");
return NULL;
}
return lilv_world_find_nodes_internal(
world,
subject ? subject->node : NULL,
predicate->node,
object ? object->node : NULL);
}

SordNode* const subject_node = subject
? sord_node_copy(subject->node)
: NULL;

SordNode* const object_node = object
? sord_node_copy(object->node)
: NULL;

LilvNodes* ret = lilv_world_query_values_internal(
world, subject_node, predicate->node, object_node);

sord_node_free(world->world, subject_node);
sord_node_free(world->world, object_node);
return ret;
LILV_API
LilvNode*
lilv_world_get(LilvWorld* world,
const LilvNode* subject,
const LilvNode* predicate,
const LilvNode* object)
{
SordNode* snode = sord_get(world->model,
subject ? subject->node : NULL,
predicate ? predicate->node : NULL,
object ? object->node : NULL,
NULL);
LilvNode* lnode = lilv_node_new_from_node(world, snode);
sord_node_free(world->world, snode);
return lnode;
}

SordIter*
@@ -221,11 +227,31 @@ lilv_world_query_internal(LilvWorld* world,
return sord_search(world->model, subject, predicate, object, NULL);
}

bool
lilv_world_ask_internal(LilvWorld* world,
const SordNode* subject,
const SordNode* predicate,
const SordNode* object)
{
return sord_ask(world->model, subject, predicate, object, NULL);
}

LILV_API
bool
lilv_world_ask(LilvWorld* world,
const LilvNode* subject,
const LilvNode* predicate,
const LilvNode* object)
{
return sord_ask(
world->model, subject->node, predicate->node, object->node, NULL);
}

LilvNodes*
lilv_world_query_values_internal(LilvWorld* world,
const SordNode* subject,
const SordNode* predicate,
const SordNode* object)
lilv_world_find_nodes_internal(LilvWorld* world,
const SordNode* subject,
const SordNode* predicate,
const SordNode* object)
{
return lilv_nodes_from_stream_objects(
world,
@@ -667,49 +693,28 @@ lilv_world_load_plugin_classes(LilvWorld* world)
FOREACH_MATCH(classes) {
const SordNode* class_node = sord_iter_get_node(classes, SORD_SUBJECT);

// Get parents (superclasses)
SordIter* parents = sord_search(
world->model,
class_node,
world->uris.rdfs_subClassOf,
NULL,
NULL);

if (sord_iter_end(parents)) {
sord_iter_free(parents);
SordNode* parent = sord_get(
world->model, class_node, world->uris.rdfs_subClassOf, NULL, NULL);
if (!parent || sord_node_get_type(parent) != SORD_URI) {
continue;
}

const SordNode* parent_node = sord_iter_get_node(parents, SORD_OBJECT);
sord_iter_free(parents);

if (!sord_node_get_type(parent_node) == SORD_URI) {
// Class parent is not a resource, ignore (e.g. owl restriction)
SordNode* label = sord_get(
world->model, class_node, world->uris.rdfs_label, NULL, NULL);
if (!label) {
sord_node_free(world->world, parent);
continue;
}

// Get labels
SordIter* labels = sord_search(
world->model,
class_node,
world->uris.rdfs_label,
NULL,
NULL);

if (sord_iter_end(labels)) {
sord_iter_free(labels);
continue;
}

const SordNode* label_node = sord_iter_get_node(labels, SORD_OBJECT);
const uint8_t* label = sord_node_get_string(label_node);
sord_iter_free(labels);

LilvPluginClass* pclass = lilv_plugin_class_new(
world, parent_node, class_node, (const char*)label);
world, parent, class_node,
(const char*)sord_node_get_string(label));
if (pclass) {
zix_tree_insert((ZixTree*)world->plugin_classes, pclass, NULL);
}

sord_node_free(world->world, label);
sord_node_free(world->world, parent);
}
sord_iter_free(classes);
}
@@ -730,19 +735,14 @@ lilv_world_load_all(LilvWorld* world)
(ZixTree*)world->plugins, p);

// ?new dc:replaces plugin
SordIter* replacement = sord_search(
world->model,
NULL,
world->uris.dc_replaces,
lilv_node_as_node(lilv_plugin_get_uri(plugin)),
NULL);
if (!sord_iter_end(replacement)) {
/* TODO: Check if replacement is actually a known plugin,
though this is expensive...
*/
if (sord_ask(world->model,
NULL,
world->uris.dc_replaces,
lilv_node_as_node(lilv_plugin_get_uri(plugin)),
NULL)) {
// TODO: Check if replacement is a known plugin? (expensive)
((LilvPlugin*)plugin)->replaced = true;
}
sord_iter_free(replacement);
}

// Query out things to cache

source/libs/lilv/lilv-0.14.4/src/zix/common.h → source/libs/lilv/lilv-0.16.0/src/zix/common.h View File


source/libs/lilv/lilv-0.14.4/src/zix/tree.c → source/libs/lilv/lilv-0.16.0/src/zix/tree.c View File


source/libs/lilv/lilv-0.14.4/src/zix/tree.h → source/libs/lilv/lilv-0.16.0/src/zix/tree.h View File


source/libs/lilv/lilv-0.14.4/test/lilv_test.c → source/libs/lilv/lilv-0.16.0/test/lilv_test.c View File

@@ -170,6 +170,7 @@ struct TestCase {
TestFunc func;
};

#define PREFIX_ATOM "@prefix atom: <http://lv2plug.in/ns/ext/atom#> . \n"
#define PREFIX_LINE "@prefix : <http://example.org/> .\n"
#define PREFIX_LV2 "@prefix lv2: <http://lv2plug.in/ns/lv2core#> .\n"
#define PREFIX_LV2EV "@prefix lv2ev: <http://lv2plug.in/ns/ext/event#> . \n"
@@ -180,7 +181,7 @@ struct TestCase {
#define PREFIX_DOAP "@prefix doap: <http://usefulinc.com/ns/doap#> .\n"

#define MANIFEST_PREFIXES PREFIX_LINE PREFIX_LV2 PREFIX_RDFS
#define BUNDLE_PREFIXES PREFIX_LINE PREFIX_LV2 PREFIX_RDF PREFIX_RDFS PREFIX_FOAF PREFIX_DOAP
#define BUNDLE_PREFIXES PREFIX_ATOM PREFIX_LINE PREFIX_LV2 PREFIX_RDF PREFIX_RDFS PREFIX_FOAF PREFIX_DOAP
#define PLUGIN_NAME(name) "doap:name \"" name "\""
#define LICENSE_GPL "doap:license <http://usefulinc.com/doap/licenses/gpl>"

@@ -561,6 +562,14 @@ test_plugin(void)
TEST_ASSERT(!strcmp(lilv_node_as_string(klass_uri),
"http://lv2plug.in/ns/lv2core#CompressorPlugin"));

LilvNode* rdf_type = lilv_new_uri(
world, "http://www.w3.org/1999/02/22-rdf-syntax-ns#type");
TEST_ASSERT(lilv_world_ask(world,
lilv_plugin_get_uri(plug),
rdf_type,
klass_uri));
lilv_node_free(rdf_type);

const LilvNode* plug_bundle_uri = lilv_plugin_get_bundle_uri(plug);
TEST_ASSERT(!strcmp(lilv_node_as_string(plug_bundle_uri), bundle_dir_uri));

@@ -616,7 +625,7 @@ test_plugin(void)

LilvNode* lv2_latency = lilv_new_uri(world,
"http://lv2plug.in/ns/lv2core#latency");
LilvPort* latency_port = lilv_plugin_get_port_by_designation(
const LilvPort* latency_port = lilv_plugin_get_port_by_designation(
plug, out_class, lv2_latency);
lilv_node_free(lv2_latency);

@@ -702,6 +711,8 @@ test_plugin(void)
TEST_ASSERT(thing_name);
TEST_ASSERT(lilv_node_is_string(thing_name));
TEST_ASSERT(!strcmp(lilv_node_as_string(thing_name), "Something else"));
LilvNode* thing_name2 = lilv_world_get(world, thing_uri, name_p, NULL);
TEST_ASSERT(lilv_node_equals(thing_name, thing_name2));

LilvUIs* uis = lilv_plugin_get_uis(plug);
TEST_ASSERT(lilv_uis_size(uis) == 0);
@@ -720,6 +731,7 @@ test_plugin(void)

lilv_nodes_free(thing_names);
lilv_node_free(thing_uri);
lilv_node_free(thing_name2);
lilv_node_free(name_p);
lilv_node_free(control_class);
lilv_node_free(audio_class);
@@ -756,7 +768,8 @@ test_port(void)
" a lv2:EventPort ; a lv2:InputPort ; "
" lv2:index 1 ; lv2:symbol \"event_in\" ; "
" lv2:name \"Event Input\" ; "
" lv2ev:supportsEvent <http://example.org/event> "
" lv2ev:supportsEvent <http://example.org/event> ;"
" atom:supports <http://example.org/atomEvent> "
"] ."))
return 0;

@@ -839,6 +852,9 @@ test_port(void)
LilvNodes* comments = lilv_port_get_value(plug, p, rdfs_comment);
TEST_ASSERT(!strcmp(lilv_node_as_string(lilv_nodes_get_first(comments)),
"comment"));
LilvNode* comment = lilv_port_get(plug, p, rdfs_comment);
TEST_ASSERT(!strcmp(lilv_node_as_string(comment), "comment"));
lilv_node_free(comment);
lilv_nodes_free(comments);

setenv("LANG", "fr", 1);
@@ -906,8 +922,10 @@ test_port(void)

LilvNode* event_type = lilv_new_uri(world, "http://example.org/event");
LilvNode* event_type_2 = lilv_new_uri(world, "http://example.org/otherEvent");
LilvNode* atom_event = lilv_new_uri(world, "http://example.org/atomEvent");
TEST_ASSERT(lilv_port_supports_event(plug, ep, event_type));
TEST_ASSERT(!lilv_port_supports_event(plug, ep, event_type_2));
TEST_ASSERT(lilv_port_supports_event(plug, ep, atom_event));

LilvNode* name_p = lilv_new_uri(world, "http://lv2plug.in/ns/lv2core#name");
LilvNodes* names = lilv_port_get_value(plug, p, name_p);
@@ -941,6 +959,7 @@ test_port(void)
lilv_node_free(toggled_prop);
lilv_node_free(event_type);
lilv_node_free(event_type_2);
lilv_node_free(atom_event);

lilv_node_free(min);
lilv_node_free(max);
@@ -1214,6 +1233,15 @@ test_state(void)
// Ensure they are equal
TEST_ASSERT(lilv_state_equals(state, state2));

// Check that we can't save a state with no URI
char* bad_state_str = lilv_state_to_string(
world, &map, &unmap, state, NULL, NULL);
TEST_ASSERT(!bad_state_str);

// Check that we can't restore the NULL string (and it doesn't crash)
LilvState* bad_state = lilv_state_new_from_string(world, &map, NULL);
TEST_ASSERT(!bad_state);
// Save state to a string
char* state1_str = lilv_state_to_string(
world, &map, &unmap, state, "http://example.org/state1", NULL);

source/libs/lilv/lilv-0.14.4/test/manifest.ttl.in → source/libs/lilv/lilv-0.16.0/test/manifest.ttl.in View File


source/libs/lilv/lilv-0.14.4/test/test_plugin.c → source/libs/lilv/lilv-0.16.0/test/test_plugin.c View File


source/libs/lilv/lilv-0.14.4/test/test_plugin.ttl.in → source/libs/lilv/lilv-0.16.0/test/test_plugin.ttl.in View File


source/libs/lilv/lilv-0.14.4/utils/bench.h → source/libs/lilv/lilv-0.16.0/utils/bench.h View File


source/libs/lilv/lilv-0.14.4/utils/lilv-bench.c → source/libs/lilv/lilv-0.16.0/utils/lilv-bench.c View File


source/libs/lilv/lilv-0.14.4/utils/lilv.bash_completion → source/libs/lilv/lilv-0.16.0/utils/lilv.bash_completion View File


source/libs/lilv/lilv-0.14.4/utils/lv2bench.c → source/libs/lilv/lilv-0.16.0/utils/lv2bench.c View File


source/libs/lilv/lilv-0.14.4/utils/lv2info.c → source/libs/lilv/lilv-0.16.0/utils/lv2info.c View File


source/libs/lilv/lilv-0.14.4/utils/lv2ls.c → source/libs/lilv/lilv-0.16.0/utils/lv2ls.c View File


source/libs/lilv/lilv-0.14.4/utils/uri_table.h → source/libs/lilv/lilv-0.16.0/utils/uri_table.h View File


BIN
source/libs/lilv/lilv-0.16.0/waf View File


source/libs/lilv/lilv-0.14.4/wscript → source/libs/lilv/lilv-0.16.0/wscript View File

@@ -1,29 +1,22 @@
#!/usr/bin/env python
import os
import sys
import subprocess

from waflib.extras import autowaf as autowaf
import sys
import waflib.Options as Options
import waflib.extras.autowaf as autowaf

# Version of this package (even if built as a child)
LILV_VERSION = '0.14.4'
LILV_MAJOR_VERSION = '0'

# Library version (UNIX style major, minor, micro)
# Library and package version (UNIX style major, minor, micro)
# major increment <=> incompatible changes
# minor increment <=> compatible changes (additions)
# micro increment <=> no interface changes
# Lilv uses the same version number for both library and package
LILV_LIB_VERSION = LILV_VERSION

# Variables for 'waf dist'
APPNAME = 'lilv'
VERSION = LILV_VERSION
LILV_VERSION = '0.16.0'
LILV_MAJOR_VERSION = '0'

# Mandatory variables
top = '.'
out = 'build'
# Mandatory waf variables
APPNAME = 'lilv' # Package name for waf dist
VERSION = LILV_VERSION # Package version for waf dist
top = '.' # Source directory
out = 'build' # Build directory

def options(opt):
opt.load('compiler_c')
@@ -84,9 +77,9 @@ def configure(conf):
autowaf.check_pkg(conf, 'serd-0', uselib_store='SERD',
atleast_version='0.14.0', mandatory=True)
autowaf.check_pkg(conf, 'sord-0', uselib_store='SORD',
atleast_version='0.8.0', mandatory=True)
atleast_version='0.12.0', mandatory=True)
autowaf.check_pkg(conf, 'sratom-0', uselib_store='SRATOM',
atleast_version='0.2.0', mandatory=True)
atleast_version='0.4.0', mandatory=True)

autowaf.define(conf, 'LILV_NEW_LV2', 1) # New LV2 discovery API

@@ -155,8 +148,7 @@ def configure(conf):
'/usr/local/%s/lv2' % libdirname])
autowaf.define(conf, 'LILV_DEFAULT_LV2_PATH', lv2_path)

conf.env.LIB_LILV = ['lilv-%s' % LILV_MAJOR_VERSION]

autowaf.set_lib_env(conf, 'lilv', LILV_VERSION)
conf.write_config_header('lilv_config.h', remove=False)

autowaf.display_msg(conf, 'Default LV2_PATH',
@@ -237,12 +229,12 @@ def build(bld):
includes = ['.', './src'],
name = 'liblilv',
target = 'lilv-%s' % LILV_MAJOR_VERSION,
vnum = LILV_LIB_VERSION,
vnum = LILV_VERSION,
install_path = '${LIBDIR}',
defines = ['LILV_SHARED', 'LILV_INTERNAL'],
cflags = libflags,
lib = lib)
autowaf.use_lib(bld, obj, 'SORD SRATOM LV2')
autowaf.use_lib(bld, obj, 'SERD SORD SRATOM LV2')

# Static library
if bld.env.BUILD_STATIC:
@@ -252,10 +244,10 @@ def build(bld):
includes = ['.', './src'],
name = 'liblilv_static',
target = 'lilv-%s' % LILV_MAJOR_VERSION,
vnum = LILV_LIB_VERSION,
vnum = LILV_VERSION,
install_path = '${LIBDIR}',
defines = defines + ['LILV_INTERNAL'])
autowaf.use_lib(bld, obj, 'SORD SRATOM LV2')
autowaf.use_lib(bld, obj, 'SERD SORD SRATOM LV2')

if bld.env.BUILD_TESTS:
test_libs = lib
@@ -301,7 +293,7 @@ def build(bld):
defines = defines + ['LILV_INTERNAL'],
cflags = test_cflags,
lib = test_libs)
autowaf.use_lib(bld, obj, 'SORD SRATOM LV2')
autowaf.use_lib(bld, obj, 'SERD SORD SRATOM LV2')

# Unit test program
bpath = os.path.abspath(os.path.join(out, 'test', 'test_plugin.lv2'))
@@ -310,13 +302,12 @@ def build(bld):
source = 'test/lilv_test.c',
includes = ['.', './src'],
use = 'liblilv_profiled',
uselib = 'SORD LV2',
lib = test_libs,
target = 'test/lilv_test',
install_path = None,
defines = defines + ['LILV_TEST_BUNDLE=\"%s/\"' % bpath],
cflags = test_cflags)
autowaf.use_lib(bld, obj, 'SORD SRATOM LV2')
autowaf.use_lib(bld, obj, 'SERD SORD SRATOM LV2')

# Utilities
if bld.env.BUILD_UTILS:

BIN
source/libs/lilv/sord-0.10.4/sord-0.10.4.tar.bz2.sig View File


BIN
source/libs/lilv/sord-0.10.4/waf View File


source/libs/lilv/sord-0.10.4/AUTHORS → source/libs/lilv/sord-0.12.0/AUTHORS View File


source/libs/lilv/sord-0.10.4/COPYING → source/libs/lilv/sord-0.12.0/COPYING View File


source/libs/lilv/sord-0.10.4/INSTALL → source/libs/lilv/sord-0.12.0/INSTALL View File


source/libs/lilv/sord-0.10.4/NEWS → source/libs/lilv/sord-0.12.0/NEWS View File

@@ -1,3 +1,15 @@
sord (0.12.0) stable;

* Update to waf 1.7.9 and autowaf r90 (install docs to versioned directory)
* Add sord_get() for easily getting single property values
* sord_validate: Pass type check when range is xsd:anyURI and value is a URI
* sord_validate: Support any subClassOf rdf:Property, not just baked-in ones
* sordmm.hpp: Add convenient constructors for decimal and integer literals
* sordmm.hpp: Add Node::to_serd_node()
* sordmm.hpp: Don't automatically add RDF namespace prefix to world

-- David Robillard <d@drobilla.net> Mon, 18 Feb 2013 11:05:59 -0500

sord (0.10.4) stable;

* Implement better data type validation in sord_validate conformant with

source/libs/lilv/sord-0.10.4/PACKAGING → source/libs/lilv/sord-0.12.0/PACKAGING View File


source/libs/lilv/sord-0.10.4/README → source/libs/lilv/sord-0.12.0/README View File

@@ -1,5 +1,5 @@
Sord
----
====

Sord is a lightweight C library for storing RDF statements in memory.


+ 187
- 0
source/libs/lilv/sord-0.12.0/doc/layout.xml View File

@@ -0,0 +1,187 @@
<doxygenlayout version="1.0">
<!-- Navigation index tabs for HTML output -->
<navindex>
<tab type="mainpage" visible="yes" title=""/>
<tab type="pages" visible="yes" title="" intro=""/>
<tab type="modules" visible="yes" title="" intro=""/>
<tab type="namespaces" visible="yes" title="">
<tab type="namespacelist" visible="yes" title="" intro=""/>
<tab type="namespacemembers" visible="yes" title="" intro=""/>
</tab>
<tab type="classes" visible="yes" title="">
<tab type="classlist" visible="yes" title="" intro=""/>
<tab type="classindex" visible="$ALPHABETICAL_INDEX" title=""/>
<tab type="hierarchy" visible="yes" title="" intro=""/>
<tab type="classmembers" visible="yes" title="" intro=""/>
</tab>
<tab type="files" visible="yes" title="">
<tab type="filelist" visible="yes" title="" intro=""/>
<tab type="globals" visible="yes" title="" intro=""/>
</tab>
<tab type="examples" visible="yes" title="" intro=""/>
</navindex>

<!-- Layout definition for a class page -->
<class>
<briefdescription visible="yes"/>
<includes visible="$SHOW_INCLUDE_FILES"/>
<inheritancegraph visible="$CLASS_GRAPH"/>
<collaborationgraph visible="$COLLABORATION_GRAPH"/>
<allmemberslink visible="yes"/>
<memberdecl>
<nestedclasses visible="yes" title=""/>
<publictypes title=""/>
<publicslots title=""/>
<signals title=""/>
<publicmethods title=""/>
<publicstaticmethods title=""/>
<publicattributes title=""/>
<publicstaticattributes title=""/>
<protectedtypes title=""/>
<protectedslots title=""/>
<protectedmethods title=""/>
<protectedstaticmethods title=""/>
<protectedattributes title=""/>
<protectedstaticattributes title=""/>
<packagetypes title=""/>
<packagemethods title=""/>
<packagestaticmethods title=""/>
<packageattributes title=""/>
<packagestaticattributes title=""/>
<properties title=""/>
<events title=""/>
<privatetypes title=""/>
<privateslots title=""/>
<privatemethods title=""/>
<privatestaticmethods title=""/>
<privateattributes title=""/>
<privatestaticattributes title=""/>
<friends title=""/>
<related title="" subtitle=""/>
<membergroups visible="yes"/>
</memberdecl>
<detaileddescription title=""/>
<memberdef>
<inlineclasses title=""/>
<typedefs title=""/>
<enums title=""/>
<constructors title=""/>
<functions title=""/>
<related title=""/>
<variables title=""/>
<properties title=""/>
<events title=""/>
</memberdef>
<usedfiles visible="$SHOW_USED_FILES"/>
<authorsection visible="yes"/>
</class>

<!-- Layout definition for a namespace page -->
<namespace>
<briefdescription visible="yes"/>
<memberdecl>
<nestednamespaces visible="yes" title=""/>
<classes visible="yes" title=""/>
<typedefs title=""/>
<enums title=""/>
<functions title=""/>
<variables title=""/>
<membergroups visible="yes"/>
</memberdecl>
<detaileddescription title=""/>
<memberdef>
<inlineclasses title=""/>
<typedefs title=""/>
<enums title=""/>
<functions title=""/>
<variables title=""/>
</memberdef>
<authorsection visible="yes"/>
</namespace>

<!-- Layout definition for a file page -->
<file>
<briefdescription visible="yes"/>
<includes visible="$SHOW_INCLUDE_FILES"/>
<includegraph visible="$INCLUDE_GRAPH"/>
<includedbygraph visible="$INCLUDED_BY_GRAPH"/>
<sourcelink visible="yes"/>
<memberdecl>
<classes visible="yes" title=""/>
<namespaces visible="yes" title=""/>
<defines title=""/>
<typedefs title=""/>
<enums title=""/>
<functions title=""/>
<variables title=""/>
<membergroups visible="yes"/>
</memberdecl>
<detaileddescription title=""/>
<memberdef>
<inlineclasses title=""/>
<defines title=""/>
<typedefs title=""/>
<enums title=""/>
<functions title=""/>
<variables title=""/>
</memberdef>
<authorsection/>
</file>

<!-- Layout definition for a group page -->
<group>
<briefdescription visible="no"/>
<groupgraph visible="$GROUP_GRAPHS"/>
<detaileddescription title=""/>
<memberdecl>
<nestedgroups visible="yes" title=""/>
<dirs visible="yes" title=""/>
<files visible="yes" title=""/>
<namespaces visible="yes" title=""/>
<classes visible="yes" title=""/>
<defines title=""/>
<typedefs title=""/>
<enums title=""/>
<enumvalues title=""/>
<functions title=""/>
<variables title=""/>
<signals title=""/>
<publicslots title=""/>
<protectedslots title=""/>
<privateslots title=""/>
<events title=""/>
<properties title=""/>
<friends title=""/>
<membergroups visible="yes"/>
</memberdecl>
<memberdef>
<pagedocs/>
<inlineclasses title=""/>
<defines title=""/>
<typedefs title=""/>
<enums title=""/>
<enumvalues title=""/>
<functions title=""/>
<variables title=""/>
<signals title=""/>
<publicslots title=""/>
<protectedslots title=""/>
<privateslots title=""/>
<events title=""/>
<properties title=""/>
<friends title=""/>
</memberdef>
<authorsection visible="yes"/>
</group>

<!-- Layout definition for a directory page -->
<directory>
<briefdescription visible="yes"/>
<directorygraph visible="yes"/>
<memberdecl>
<dirs visible="yes"/>
<files visible="yes"/>
</memberdecl>
<detaileddescription title=""/>
</directory>
</doxygenlayout>

source/libs/lilv/sord-0.10.4/doc/reference.doxygen.in → source/libs/lilv/sord-0.12.0/doc/reference.doxygen.in View File


source/libs/lilv/sord-0.10.4/doc/sord_validate.1 → source/libs/lilv/sord-0.12.0/doc/sord_validate.1 View File

@@ -45,7 +45,7 @@ sord_validate `find ~/schemas/ -name '*.ttl'` data.ttl
sord_validate was written by David Robillard <d@drobilla.net>

.SH COPYRIGHT
Copyright \(co 2012 David Robillard.
Copyright \(co 2012-2013 David Robillard.
.br
License: <http://www.opensource.org/licenses/isc-license>
.br

source/libs/lilv/sord-0.10.4/doc/sordi.1 → source/libs/lilv/sord-0.12.0/doc/sordi.1 View File

@@ -31,7 +31,7 @@ Display version information and exit.
Sordi was written by David Robillard <d@drobilla.net>

.SH COPYRIGHT
Copyright \(co 2011 David Robillard.
Copyright \(co 2011-2013 David Robillard.
.br
License: <http://www.opensource.org/licenses/isc-license>
.br

source/libs/lilv/sord-0.10.4/doc/style.css → source/libs/lilv/sord-0.12.0/doc/style.css View File


source/libs/lilv/sord-0.10.4/sord.pc.in → source/libs/lilv/sord-0.12.0/sord.pc.in View File


source/libs/lilv/sord-0.10.4/sord/sord.h → source/libs/lilv/sord-0.12.0/sord/sord.h View File

@@ -1,5 +1,5 @@
/*
Copyright 2011-2012 David Robillard <http://drobilla.net>
Copyright 2011-2013 David Robillard <http://drobilla.net>

Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
@@ -397,6 +397,20 @@ sord_search(SordModel* model,
const SordNode* p,
const SordNode* o,
const SordNode* g);
/**
Search for a single node that matches a pattern.
Exactly one of @p s, @p p, @p o must be NULL.
This function is mainly useful for predicates that only have one value.
The returned node must be freed using sord_node_free.
@return the first matching node, or NULL if no matches are found.
*/
SORD_API
SordNode*
sord_get(SordModel* model,
const SordNode* s,
const SordNode* p,
const SordNode* o,
const SordNode* g);

/**
Return true iff a statement exists.

source/libs/lilv/sord-0.10.4/sord/sordmm.hpp → source/libs/lilv/sord-0.12.0/sord/sordmm.hpp View File

@@ -1,5 +1,5 @@
/*
Copyright 2011-2012 David Robillard <http://drobilla.net>
Copyright 2011-2013 David Robillard <http://drobilla.net>

Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
@@ -113,7 +113,6 @@ public:
: _next_blank_id(0)
{
_c_obj = sord_world_new();
add_prefix("rdf", "http://www.w3.org/1999/02/22-rdf-syntax-ns#");
}

inline ~World() {
@@ -151,6 +150,7 @@ public:
inline Node(World& world, Type t, const std::string& s);
inline Node(World& world);
inline Node(World& world, const SordNode* node);
inline Node(World& world, SordNode* node, bool copy=false);
inline Node(const Node& other);
inline ~Node();

@@ -161,6 +161,10 @@ public:
inline const SordNode* get_node() const { return _c_obj; }
inline SordNode* get_node() { return _c_obj; }

const SerdNode* to_serd_node() {
return sord_node_to_serd_node(_c_obj);
}

inline bool is_valid() const { return type() != UNKNOWN; }

inline bool operator<(const Node& other) const {
@@ -240,6 +244,30 @@ class Literal : public Node {
public:
inline Literal(World& world, const std::string& s)
: Node(world, Node::LITERAL, s) {}

static inline Node decimal(World& world, double d, unsigned frac_digits) {
const SerdNode val = serd_node_new_decimal(d, 7);
const SerdNode type = serd_node_from_string(
SERD_URI, (const uint8_t*)SORD_NS_XSD "decimal");

return Node(
world,
sord_node_from_serd_node(
world.c_obj(), world.prefixes().c_obj(), &val, &type, NULL),
false);
}

static inline Node integer(World& world, int64_t i) {
const SerdNode val = serd_node_new_integer(i);
const SerdNode type = serd_node_from_string(
SERD_URI, (const uint8_t*)SORD_NS_XSD "integer");

return Node(
world,
sord_node_from_serd_node(
world.c_obj(), world.prefixes().c_obj(), &val, &type, NULL),
false);
}
};

inline
@@ -278,7 +306,14 @@ inline
Node::Node(World& world, const SordNode* node)
: _world(&world)
{
_c_obj = node ? sord_node_copy(node) : NULL;
_c_obj = sord_node_copy(node);
}

inline
Node::Node(World& world, SordNode* node, bool copy)
: _world(&world)
{
_c_obj = copy ? sord_node_copy(node) : node;
}

inline
@@ -431,6 +466,10 @@ public:
const Node& predicate,
const Node& object);

inline Node get(const Node& subject,
const Node& predicate,
const Node& object);

inline World& world() const { return _world; }

private:
@@ -596,6 +635,18 @@ Model::find(const Node& subject,
return Iter(_world, sord_find(_c_obj, quad));
}

inline Node
Model::get(const Node& subject,
const Node& predicate,
const Node& object)
{
SordNode* c_node = sord_get(
_c_obj, subject.c_obj(), predicate.c_obj(), object.c_obj(), NULL);
Node node(_world, c_node);
sord_node_free(_world.c_obj(), c_node);
return node;
}

} // namespace Sord

#endif // SORD_SORDMM_HPP

source/libs/lilv/sord-0.10.4/src/sord.c → source/libs/lilv/sord-0.12.0/src/sord.c View File

@@ -1,5 +1,5 @@
/*
Copyright 2011 David Robillard <http://drobilla.net>
Copyright 2011-2013 David Robillard <http://drobilla.net>

Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
@@ -844,6 +844,31 @@ sord_search(SordModel* model,
return sord_find(model, pat);
}

SordNode*
sord_get(SordModel* model,
const SordNode* s,
const SordNode* p,
const SordNode* o,
const SordNode* g)
{
if ((bool)s + (bool)p + (bool)o != 2) {
return NULL;
}

SordIter* i = sord_search(model, s, p, o, g);
SordNode* ret = NULL;
if (!s) {
ret = sord_node_copy(sord_iter_get_node(i, SORD_SUBJECT));
} else if (!p) {
ret = sord_node_copy(sord_iter_get_node(i, SORD_PREDICATE));
} else if (!o) {
ret = sord_node_copy(sord_iter_get_node(i, SORD_OBJECT));
}

sord_iter_free(i);
return ret;
}

bool
sord_ask(SordModel* model,
const SordNode* s,

source/libs/lilv/sord-0.10.4/src/sord_internal.h → source/libs/lilv/sord-0.12.0/src/sord_internal.h View File


source/libs/lilv/sord-0.10.4/src/sord_test.c → source/libs/lilv/sord-0.12.0/src/sord_test.c View File

@@ -238,6 +238,22 @@ test_read(SordWorld* world, SordModel* sord, SordNode* g,
TUP_FMT_ARGS(nomatch));
}

if (sord_get(sord, NULL, NULL, uri(world, 3), g)) {
return test_fail("Fail: Get *,*,3 succeeded\n");
} else if (!sord_node_equals(
sord_get(sord, uri(world, 1), uri(world, 2), NULL, g),
uri(world, 3))) {
return test_fail("Fail: Get 1,2,* != 3\n");
} else if (!sord_node_equals(
sord_get(sord, uri(world, 1), NULL, uri(world, 3), g),
uri(world, 2))) {
return test_fail("Fail: Get 1,*,3 != 2\n");
} else if (!sord_node_equals(
sord_get(sord, NULL, uri(world, 2), uri(world, 3), g),
uri(world, 1))) {
return test_fail("Fail: Get *,2,3 != 1\n");
}

for (unsigned i = 0; i < NUM_PATTERNS; ++i) {
QueryTest test = patterns[i];
SordQuad pat = { test.query[0], test.query[1], test.query[2], g };

source/libs/lilv/sord-0.10.4/src/sord_validate.c → source/libs/lilv/sord-0.12.0/src/sord_validate.c View File

@@ -1,5 +1,5 @@
/*
Copyright 2012 David Robillard <http://drobilla.net>
Copyright 2012-2013 David Robillard <http://drobilla.net>

Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
@@ -63,6 +63,7 @@ typedef struct {
SordNode* rdfs_domain;
SordNode* rdfs_range;
SordNode* rdfs_subClassOf;
SordNode* xsd_anyURI;
SordNode* xsd_decimal;
SordNode* xsd_maxInclusive;
SordNode* xsd_minInclusive;
@@ -79,7 +80,7 @@ print_version(void)
{
printf("sord_validate " SORD_VERSION
" <http://drobilla.net/software/sord>\n");
printf("Copyright 2012 David Robillard <http://drobilla.net>.\n"
printf("Copyright 2012-2013 David Robillard <http://drobilla.net>.\n"
"License: <http://www.opensource.org/licenses/isc>\n"
"This is free software; you are free to change and redistribute it."
"\nThere is NO WARRANTY, to the extent permitted by law.\n");
@@ -349,6 +350,12 @@ check_type(SordModel* model,
} else if (sord_node_get_type(node) == SORD_URI) {
if (sord_node_equals(type, uris->foaf_Document)) {
return true; // Questionable...
} else if (is_descendant_of(
model, uris,
type, uris->xsd_anyURI, uris->owl_onDatatype)) {
/* Type is any URI and this is a URI, so pass. Restrictions on
anyURI subtypes are not currently checked (very uncommon). */
return true; // Type is anyURI, and this is a URI
} else {
SordIter* t = sord_search(model, node, uris->rdf_type, NULL, NULL);
for (; !sord_iter_end(t); sord_iter_next(t)) {
@@ -446,6 +453,7 @@ main(int argc, char** argv)
URI(rdfs, domain);
URI(rdfs, range);
URI(rdfs, subClassOf);
URI(xsd, anyURI);
URI(xsd, decimal);
URI(xsd, maxInclusive);
URI(xsd, minInclusive);
@@ -465,24 +473,29 @@ main(int argc, char** argv)
const SordNode* pred = quad[SORD_PREDICATE];
const SordNode* obj = quad[SORD_OBJECT];

bool is_Property = sord_ask(
model, pred, uris.rdf_type, uris.rdf_Property, 0);
bool is_OntologyProperty = sord_ask(
model, pred, uris.rdf_type, uris.owl_OntologyProperty, 0);
bool is_ObjectProperty = sord_ask(
bool is_any_property = false;
SordIter* t = sord_search(model, pred, uris.rdf_type, NULL, NULL);
for (; !sord_iter_end(t); sord_iter_next(t)) {
if (is_descendant_of(model, &uris,
sord_iter_get_node(t, SORD_OBJECT),
uris.rdf_Property,
uris.rdfs_subClassOf)) {
is_any_property = true;
break;
}
}
sord_iter_free(t);

const bool is_ObjectProperty = sord_ask(
model, pred, uris.rdf_type, uris.owl_ObjectProperty, 0);
bool is_FunctionalProperty = sord_ask(
const bool is_FunctionalProperty = sord_ask(
model, pred, uris.rdf_type, uris.owl_FunctionalProperty, 0);
bool is_InverseFunctionalProperty = sord_ask(
const bool is_InverseFunctionalProperty = sord_ask(
model, pred, uris.rdf_type, uris.owl_InverseFunctionalProperty, 0);
bool is_DatatypeProperty = sord_ask(
const bool is_DatatypeProperty = sord_ask(
model, pred, uris.rdf_type, uris.owl_DatatypeProperty, 0);
bool is_AnnotationProperty = sord_ask(
model, pred, uris.rdf_type, uris.owl_AnnotationProperty, 0);

if (!is_Property && !is_OntologyProperty && !is_ObjectProperty &&
!is_FunctionalProperty && !is_InverseFunctionalProperty &&
!is_DatatypeProperty && !is_AnnotationProperty) {
if (!is_any_property) {
error("Use of undefined property", quad);
}


source/libs/lilv/sord-0.10.4/src/sordi.c → source/libs/lilv/sord-0.12.0/src/sordi.c View File

@@ -1,5 +1,5 @@
/*
Copyright 2011-2012 David Robillard <http://drobilla.net>
Copyright 2011-2013 David Robillard <http://drobilla.net>

Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
@@ -40,7 +40,7 @@ static int
print_version(void)
{
printf("sordi " SORD_VERSION " <http://drobilla.net/software/sord>\n");
printf("Copyright 2011-2012 David Robillard <http://drobilla.net>.\n"
printf("Copyright 2011-2013 David Robillard <http://drobilla.net>.\n"
"License: <http://www.opensource.org/licenses/isc>\n"
"This is free software; you are free to change and redistribute it."
"\nThere is NO WARRANTY, to the extent permitted by law.\n");

source/libs/lilv/sord-0.10.4/src/sordmm_test.cpp → source/libs/lilv/sord-0.12.0/src/sordmm_test.cpp View File


source/libs/lilv/sord-0.10.4/src/syntax.c → source/libs/lilv/sord-0.12.0/src/syntax.c View File


source/libs/lilv/sord-0.10.4/src/zix/common.h → source/libs/lilv/sord-0.12.0/src/zix/common.h View File


source/libs/lilv/sord-0.10.4/src/zix/digest.c → source/libs/lilv/sord-0.12.0/src/zix/digest.c View File


source/libs/lilv/sord-0.10.4/src/zix/digest.h → source/libs/lilv/sord-0.12.0/src/zix/digest.h View File


source/libs/lilv/sord-0.10.4/src/zix/hash.c → source/libs/lilv/sord-0.12.0/src/zix/hash.c View File


source/libs/lilv/sord-0.10.4/src/zix/hash.h → source/libs/lilv/sord-0.12.0/src/zix/hash.h View File


source/libs/lilv/sord-0.10.4/src/zix/tree.c → source/libs/lilv/sord-0.12.0/src/zix/tree.c View File


source/libs/lilv/sord-0.10.4/src/zix/tree.h → source/libs/lilv/sord-0.12.0/src/zix/tree.h View File


source/libs/lilv/sord-0.10.4/tests/README.txt → source/libs/lilv/sord-0.12.0/tests/README.txt View File


source/libs/lilv/sord-0.10.4/tests/UTF-8.ttl → source/libs/lilv/sord-0.12.0/tests/UTF-8.ttl View File


source/libs/lilv/sord-0.10.4/tests/manifest.ttl → source/libs/lilv/sord-0.12.0/tests/manifest.ttl View File


source/libs/lilv/sord-0.10.4/tests/rdf-schema.out → source/libs/lilv/sord-0.12.0/tests/rdf-schema.out View File


source/libs/lilv/sord-0.10.4/tests/rdf-schema.ttl → source/libs/lilv/sord-0.12.0/tests/rdf-schema.ttl View File


source/libs/lilv/sord-0.10.4/tests/rdfq-results.out → source/libs/lilv/sord-0.12.0/tests/rdfq-results.out View File


source/libs/lilv/sord-0.10.4/tests/rdfq-results.ttl → source/libs/lilv/sord-0.12.0/tests/rdfq-results.ttl View File


source/libs/lilv/sord-0.10.4/tests/rdfs-namespace.out → source/libs/lilv/sord-0.12.0/tests/rdfs-namespace.out View File


source/libs/lilv/sord-0.10.4/tests/rdfs-namespace.ttl → source/libs/lilv/sord-0.12.0/tests/rdfs-namespace.ttl View File


source/libs/lilv/sord-0.10.4/tests/test-00.out → source/libs/lilv/sord-0.12.0/tests/test-00.out View File


source/libs/lilv/sord-0.10.4/tests/test-00.ttl → source/libs/lilv/sord-0.12.0/tests/test-00.ttl View File


source/libs/lilv/sord-0.10.4/tests/test-01.out → source/libs/lilv/sord-0.12.0/tests/test-01.out View File


Some files were not shown because too many files changed in this diff

Loading…
Cancel
Save