Commit graph

32 commits

Author SHA1 Message Date
Barnabás Pőcze
934ab3036e treewide: use SPDX tags to specify copyright information
SPDX tags make the licensing information easy to understand and clear,
and they are machine parseable.

See https://spdx.dev for more information.
2023-02-16 10:54:48 +00:00
Quentin Wenger
22fc9eec35 Cleanup argument names in methods and events interfaces
First method argument is object, first event argument is data.

Closes !963
2022-04-15 10:11:49 +02:00
Pauli Virtanen
3b94345bbe module-metadata: set object.serial on new client metadata
Client-created metadata should also set object.serial.
2022-02-28 20:11:01 +02:00
Wim Taymans
d19ab798be module-metadata: allow create without client
Which will create a new impl-metadata object.
2022-01-18 12:42:23 +01:00
George Kiagiadakis
59407d2f08 includes: update all references to extensions to point to pipewire/extensions
This also brings the advantage that all tools, examples, modules, components
can also be compiled standalone out-of-tree using libpipewire from the system
2021-06-18 17:54:18 +03:00
Wim Taymans
22bb2666c4 metadata: remove metadata when the global is removed
So that we can ensure the metadata only contains valid subject
ids.
2021-06-16 12:17:35 +02:00
Wim Taymans
f15d585f8d metadata: check M permissions before changing metadata
To change a metadata, we need to be able to read the subject and also
have the M permission on it.
2021-06-16 12:17:25 +02:00
Peter Hutterer
2405f0942b spa/buffer: rename SPA_MEMBER to SPA_PTROFF
SPA_MEMBER is misleading, all we're doing here is pointer+offset and a
type-casting the result. Rename to SPA_PTROFF which is more expressive (and
has the same number of characters so we don't need to re-indent).
2021-05-06 09:39:39 +00:00
Wim Taymans
1570e62635 remove hooks from objects
Remove the hooks we installed on objects in the destroy/free event
or before calling _destroy. This is not really needed but it is
a nice thing to do because it calls the hook removed callbacks.
2020-11-06 15:53:32 +01:00
George Kiagiadakis
613824ab0b metadata: set bound id on the exporting resource 2020-08-31 15:57:52 +03:00
Emmanuel Gil Peyrot
14fdf07e8f Run codespell on the entire codebase
This tool detects and fixes common English spelling mistakes, with
generally very few mistakes.

Here is the command I used to generate this commit.  There were a few
changes that had to be done manually, and of course adding the ignore
file:
```shell
codespell -I .codespell-ignore -x .codespell-ignore -w
```

I didn’t add it to the CI, but this would be a good place for it.
2020-08-17 17:16:31 +00:00
Wim Taymans
8db9a2741b metadata: only allow setting metadata on objects we can see
Allow a client to only set metadata on objects that it has
read access to.
2020-07-30 15:30:13 +02:00
Wim Taymans
a5ec68e61c metadata: only set default name when not already set 2020-07-30 14:28:11 +02:00
Wim Taymans
ba8522aac9 metadata: we need W permission to set and clear properties 2020-07-30 14:27:35 +02:00
Wim Taymans
62dd58a604 client: remove busy state from client in resource destroy
When a resource is doing an operation that sets the client in the busy
state, make sure we unblock the client again when the resource is
destroyed before we could complete the operation or else the client
is stuck forever.
2020-06-09 10:59:58 +02:00
Wim Taymans
09913ca4ab metadata: free when the global is destroyed 2020-06-02 17:16:09 +02:00
Wim Taymans
0b68d65ebf metadata: trigger emission of properties
When the resource does add_listener, send a message to the proxy
to trigger an emission of properties.
Block the client until all properties have been notified, track
this with a ping event to the implementation.
2020-04-20 11:51:20 +02:00
Wim Taymans
0d3aa1fd30 Fix export type prototype
Pass the type as provided by the export type. This way we can
look up the owner of the export type later.
2020-03-19 18:12:07 +01:00
Wim Taymans
847ee8f064 metadata: fix cleanup
When the global is destroyed, free the resource.
When the resource is freed, destroy the global.
Make sure any bound resources are freed when the global is destroyed
by calling pw_global_add_resource().
2020-03-02 10:49:04 +01:00
Wim Taymans
df519ee3b3 avoid including private.h
Expose some more methods to make it possible to build without
including the private.h header, especially in modules.
2020-01-02 13:48:50 +01:00
Wim Taymans
1317ca140c pass spa_dict around as config
Don't pass pw_properties around when we simply need to pass around
config info, only use pw_properties when used to construct an object
that keeps the properties.
2019-12-13 11:26:05 +01:00
Wim Taymans
d99b1918ed small cleanups 2019-12-11 16:51:38 +01:00
Wim Taymans
73900eea1b pw_device -> pw_impl_device 2019-12-11 11:34:02 +01:00
Wim Taymans
95688939bf pw_client -> pw_impl_client 2019-12-11 11:21:43 +01:00
Wim Taymans
d70a47b7fe move proxy implementations in their own file
Rearrange headers
2019-12-11 10:58:51 +01:00
Wim Taymans
ecc6b27cd7 rename core_proxy -> core
Rename core_proxy to core and move the introspect and interface
contents to core.h

In an effort to promote the proxy API.
2019-12-11 07:46:59 +01:00
Wim Taymans
8ea78c2e3f pw_core -> pw_context
The proxy API is the one that we would like to expose for applications
and the other API is used internally when implementing modules or
factories.

The current pw_core object is really a context for all objects so
name it that way. It also makes it possible to rename pw_core_proxy
to pw_proxy later.
2019-12-10 18:19:56 +01:00
Wim Taymans
af605cdda2 use opaque types for proxies
This makes it easier to implement the proxies
2019-12-06 17:37:41 +01:00
Wim Taymans
7594eabdc8 remote: pass core_proxy to export function
We want to remove the need for the pw_remote in most cases.
2019-12-05 11:15:04 +01:00
Wim Taymans
8acae9db7d Make sure we bind before registering the global
Bind to the resource in create_object before we register the global.
This ensure a client gets to see the resource global id associated
with the resource before it appears in the registry, which makes it
easier to patch the local proxy to the global object.
2019-11-25 16:33:53 +01:00
Wim Taymans
68e94a2e7e system: use spa_system functions for fds 2019-11-19 13:41:40 +01:00
Wim Taymans
0a81a982f7 metadata: Add metadata API
Metadata allows apps to attach properties to objects that can be
read by other apps.
Not complete yet, properties should be removed when the object is
removed.
2019-11-03 10:31:14 +01:00