Merge branch '0.4' into next

This commit is contained in:
George Kiagiadakis 2023-09-01 19:12:20 +03:00
commit 67f9f63520
9 changed files with 50 additions and 19 deletions

View file

@ -195,9 +195,9 @@ class DoxyElement(object):
self.retval = kwargs.get('retval', None)
def is_documented(self):
if (normalize_text(self.brief)) != "":
return True
return False
return (normalize_text(self.brief) != "" or
normalize_text(self.detail) != "" or
normalize_text(self.since) != "")
def add_brief(self, xml):
proc = DoxygenProcess()
@ -271,6 +271,7 @@ class DoxyEnum(DoxyElement):
e = DoxyEnum(name, d)
e.add_brief(xml.find("briefdescription"))
e.add_detail(xml.find("detaileddescription"))
for p in xml.findall("enumvalue"):
e.add_member(p)
return e
@ -302,6 +303,7 @@ class DoxyStruct(DoxyElement):
d += "};\n"
e = DoxyStruct(name, d)
e.add_brief(xml.find("briefdescription"))
e.add_detail(xml.find("detaileddescription"))
for p in memberdefs:
e.add_member(p)
return e

View file

@ -668,6 +668,8 @@ wp_core_get_pw_core (WpCore * self)
* \returns (transfer full) (nullable): a comma separated string with all the
* virtual machine types that this core matches, or NULL if the core is not
* running in a virtual machine.
*
* \since 0.4.11
*/
gchar *
wp_core_get_vm_type (WpCore *self)

View file

@ -23,6 +23,8 @@ WP_DEFINE_LOCAL_LOG_TOPIC ("wp-factory")
* constructed factory objects are reported in by PipeWire registry
* and it is made available for wireplumber clients through the
* WpObjectManager API.
*
* \since 0.4.5
*/
struct _WpFactory

View file

@ -16,6 +16,8 @@ G_BEGIN_DECLS
/*!
* \brief The state of the link
* \ingroup wplink
*
* \since 0.4.11
*/
typedef enum {
WP_LINK_STATE_ERROR = -2, /*!< the link is in error */
@ -30,6 +32,8 @@ typedef enum {
/*!
* \brief An extension of WpProxyFeatures
* \ingroup wplink
*
* \since 0.4.11
*/
typedef enum { /*< flags >*/
/*! waits until the state of the link is >= PAUSED */

View file

@ -20,12 +20,18 @@ WP_DEFINE_LOCAL_LOG_TOPIC ("wp-spa-json")
/*! \defgroup wpspajson WpSpaJson */
/*!
* \struct WpSpaJson
*
* \since 0.4.8
*/
/*!
* \struct WpSpaJsonBuilder
*
* \since 0.4.8
*/
/*!
* \struct WpSpaJsonParser
*
* \since 0.4.8
*/
static void
@ -195,6 +201,8 @@ wp_spa_json_new_from_string (const gchar *json_str)
* \param len the specific length of the string
* \returns a new WpSpaJson that references the data in \a json_str. \a json_str
* is not copied, so it needs to stay alive.
*
* \since 0.4.10
*/
WpSpaJson *
wp_spa_json_new_from_stringn (const gchar *json_str, size_t len)

View file

@ -56,6 +56,8 @@ wp_init (WpInitFlags flags)
/*!
* \brief Gets the WirePlumber library version
* \returns WirePlumber library version
*
* \since 0.4.12
*/
const char *
wp_get_library_version (void)
@ -66,6 +68,8 @@ wp_get_library_version (void)
/*!
* \brief Gets the WirePlumber library API version
* \returns WirePlumber library API version
*
* \since 0.4.12
*/
const char *
wp_get_library_api_version (void)

View file

@ -126,13 +126,6 @@ push_luajson (lua_State *L, WpSpaJson *json)
lua_pushnumber (L, value);
}
/* String */
else if (wp_spa_json_is_string (json)) {
g_autofree gchar *value = wp_spa_json_parse_string (json);
g_warn_if_fail (value);
lua_pushstring (L, value);
}
/* Array */
else if (wp_spa_json_is_array (json)) {
g_auto (GValue) item = G_VALUE_INIT;
@ -166,11 +159,11 @@ push_luajson (lua_State *L, WpSpaJson *json)
}
}
/* syntax error */
/* Otherwise alwyas parse as String to allow parsing strings without quotes */
else {
g_autofree gchar *value = wp_spa_json_parse_string (json);
wp_warning ("unknown SPA JSON token type at '%s'", value);
lua_pushnil (L);
g_warn_if_fail (value);
lua_pushstring (L, value);
}
}

View file

@ -95,10 +95,7 @@ SimpleEventHook {
log:info (si, "... target not found, reconnect:" .. tostring (reconnect))
local node = si:get_associated_proxy ("node")
if not reconnect then
log:info (si, "... destroy node")
node:request_destroy ()
elseif si_flags.was_handled then
if reconnect and si_flags.was_handled then
log:info (si, "... waiting reconnect")
return
end
@ -109,9 +106,20 @@ SimpleEventHook {
local client = clients_om:lookup {
Constraint { "bound-id", "=", client_id, type = "gobject" }
}
if client then
client:send_error (node ["bound-id"], -2, "no node available")
local message
if reconnect then
message = "no target node available"
else
message = "target not found"
end
if client then
client:send_error (node ["bound-id"], -2, message)
end
end
if not reconnect then
log:info (si, "... destroy node")
node:request_destroy ()
end
end

View file

@ -186,6 +186,14 @@ val = json:parse ()
assert (val[1] == "foo")
assert (val[2] == "bar")
json = Json.Raw ("[foo, bar]")
assert (json:is_array())
assert (json:get_data() == "[foo, bar]")
assert (json:get_data() == json:to_string())
val = json:parse ()
assert (val[1] == "foo")
assert (val[2] == "bar")
json = Json.Raw ("{\"name\": \"wireplumber\", \"version\": [0, 4, 7]}")
assert (json:is_object())
assert (json:get_data() == "{\"name\": \"wireplumber\", \"version\": [0, 4, 7]}")