Commit graph

26 commits

Author SHA1 Message Date
Wim Taymans
f115646bcd core: remove permission callback
Remove the core permission check callback. We can now use the per
client permission configuration.
Rework the flatpak module to use the permissions. When a client
connects, do the portal call and iterate all globals, updating the
permissions. Also update the permissions of newly added globals.
The client is owner of itself.
2018-01-24 16:17:13 +01:00
Wim Taymans
67b06d4ad2 core: remove create-link
Make a link factory and use create-object to make links. That way
we can have different kinds of links based on the factory and we
can also hide the factory when link creation should be blocked.
2018-01-16 16:53:08 +01:00
Wim Taymans
82ea32bcdf flatpak: use support dbus connection 2017-12-18 13:16:42 +01:00
Wim Taymans
4d6ac37398 Use int instead of bool as result
Prefer to use an int return from a function instead of bool because
it can contain more info about failures.
2017-12-18 11:38:30 +01:00
Wim Taymans
1f4d1d071c modules: make events structure static
They are only used locally and otherwise we might get symbol clashes.
2017-12-14 18:28:03 +01:00
Wim Taymans
440f681f4b Improve enum_param
Add an argument to pass the result param to the caller instead of
having the caller have to pick it up from the builder.
Improve docs for node, clock and monitor
Pass spa_pod everywhere instead of spa_pod_object.
Pass result argument to spa_pod_filter to make things a little
nicer.
2017-11-13 17:57:38 +01:00
Wim Taymans
6fb0f580ea Use errno for result errors
Make new enumeration for data transport status and use errno
style error numbers for errors.
2017-11-13 09:41:41 +01:00
Wim Taymans
f3bca48398 Unify props, params and formats
Make enum_params and set_param to configure properties, format
and other parameters. This allows us to remove some duplicate
code and make the properties and parameters much more extensible.
Use the object id to mark the id of the parameter.
Remove the spa_format and spa_props.
We can now make the client-node easier by merging the various
format methods into the params.
Make the stream API more powerful now that we can pass params
around.
2017-11-07 17:48:40 +01:00
Wim Taymans
a691d07531 use spa_list_append when we can 2017-10-24 12:58:10 +02:00
Wim Taymans
82129a65b9 flatpak: use new way to check for flatpak 2017-09-18 13:25:15 +02:00
Wim Taymans
7f20e04803 node_factory -> factory
Rename the node-factory to a more generic object factory.
Add type and version to create objects from a factory
Start on factory introspection
2017-09-17 16:47:03 +02:00
Wim Taymans
d26d7a8040 flatpak: fix resource override
Make sure we chain up to the same resource that we override, for this
keep a per resource info that we pass around.
2017-09-15 14:52:17 +02:00
PrasannaKumar Muralidharan
f6d480fdfd Fix memory issues reported by clang static analyzer (#7)
* Fix use after free in error path

Memory pointed by 'handle' is used in error path but it is freed before jumping to interface_failed. Remove the wrong free. Memory pointed by 'handle' gets freed in the error handling path.

* Free 'bus' when dbus_bus_get_private fails

If dbus_bus_get_private fails memory pointed by 'bus' is never freed. Free it.

* Free 'impl' if dbus_bus_get_private fails

When dbus_bus_get_private fails the memory pointed by 'impl' is not freed. Free it.
2017-09-04 11:09:45 +02:00
Wim Taymans
c25834a692 Work on cleanup
Add signal handlers for daemon to shut down
Add destroy listeners for modules and do cleanup
Fix some leaks
Simplify port registration in new nodes
Hide some more data structures
Let the node implementation take care of the reuse_buffer signal because
then we can get to the graph nodes to find the destination port.
Destroy modules in core cleanup. Modules should undo everything they
have done.
Activate the link after we negotiated format and buffers.
2017-08-22 18:30:10 +02:00
Wim Taymans
2cb1590859 cleanups 2017-08-16 12:39:13 +02:00
Wim Taymans
9ad1f911b2 Improve loop callbacks
Pass just one data item to the callbacks.
Add properties to port.
Add user data to link
Handle autolink with multiple ports
More work on jack support
2017-08-11 19:21:31 +02:00
Wim Taymans
db15225b51 Fix includes 2017-08-08 19:55:14 +02:00
Wim Taymans
600055bd68 Move listeners to spa and rename to hooks
The listeners are generally useful in spa, move it there and rename
to hooks. Implement loop hooks with it.
Fix some cleanup issues in stream and remote
2017-08-08 16:56:29 +02:00
Wim Taymans
6b6b827a3b Add resource override method
Add an easy way to override a resource implementation and use this in
the flatpak module.
Add more methods
2017-08-08 15:03:30 +02:00
Wim Taymans
0602d76b9e Cleanups
Only pass data to callbacks.
Rename some structs
Provide methods to access structs
2017-08-06 06:42:26 +02:00
Wim Taymans
1b79419554 cleanups
Remove signals.
Rename callbacks -> events, use listeners to listen for events.
Callbacks are still used in spa for things you can listen to only
once.
2017-08-04 16:49:13 +02:00
Wim Taymans
b898eb46cd Make structure private
Make structs private. Expose methods for things we need.
Signals only work on exposed structures so make a new callback helper to
signal events.
2017-08-04 10:18:54 +02:00
Wim Taymans
4f08dbcd24 Use more fine grained access control
Make it possible to add more permissions to an object than just visible
or not. Pass these permissions to the client. This way we can make a
difference between being able to see and read, modify or query an
object. More permissions can be added later when needed. Because the
permissions is set on the resource by the access control module, the
implementations can check if the right permission is set before doing
anything.
2017-08-01 17:09:57 +02:00
Wim Taymans
1acba78234 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
2017-07-18 10:06:40 +02:00
Wim Taymans
4f9d631910 Add version to more methods 2017-07-11 19:50:26 +02:00
Wim Taymans
d1655196c3 move things around 2017-07-11 16:08:22 +02:00
Renamed from pipewire/modules/module-flatpak.c (Browse further)