API cleanups

Fix docs
Add some more versions to interfaces
Make types for the various proxy object + inline methods that does type
checking and create proxys etc.
Set owner client of client-nodes in the properties
Pass type to bind to in create-node
Don't place global id in the info structs
Improve registration of marshal functions
Pass more types around as ids
This commit is contained in:
Wim Taymans 2017-07-13 15:21:52 +02:00
parent 465f12241e
commit 1acba78234
45 changed files with 963 additions and 764 deletions

View file

@ -116,13 +116,13 @@ process_messages(struct pw_client *client)
client->protocol, id);
continue;
}
if (opcode >= resource->iface->n_methods) {
if (opcode >= resource->marshal->n_methods) {
pw_log_error("protocol-native %p: invalid method %u %u", client->protocol,
id, opcode);
pw_client_destroy(client);
break;
}
demarshal = resource->iface->methods;
demarshal = resource->marshal->method_demarshal;
if (!demarshal[opcode] || !demarshal[opcode] (resource, message, size)) {
pw_log_error("protocol-native %p: invalid message received %u %u",
client->protocol, id, opcode);
@ -449,13 +449,13 @@ on_remote_data(struct spa_loop_utils *utils,
pw_log_error("protocol-native %p: could not find proxy %u", this, id);
continue;
}
if (opcode >= proxy->iface->n_events) {
if (opcode >= proxy->marshal->n_events) {
pw_log_error("protocol-native %p: invalid method %u for %u", this, opcode,
id);
continue;
}
demarshal = proxy->iface->events;
demarshal = proxy->marshal->event_demarshal;
if (demarshal[opcode]) {
if (!demarshal[opcode] (proxy, message, size))
pw_log_error