summaryrefslogtreecommitdiffstats
path: root/src/policy.h
AgeCommit message (Collapse)AuthorFilesLines
2020-06-26policy: Add a new policy hook to restrict access to private extensionsMarius Vlad1-0/+2
In this manner we can control which clients can bind to which interface (either the agl_shell one or the agl_shell_desktop one). Bug-AGL: SPEC-3394 Signed-off-by: Marius Vlad <marius.vlad@collabora.com> Change-Id: I9da4b3596dc5980b325aada8f8fcc7a11431c755
2020-05-12policy: Add another hook for controlling the application state changeMarius Vlad1-0/+1
event With the introduction of the events that notify regular applications of others' application state we require some way of controlling that. This patch adds another hook for controlling just that. Bug-AGL: SPEC-3269 Signed-off-by: Marius Vlad <marius.vlad@collabora.com> Change-Id: I2ade01eb5dfa454e360edd2e3943df91975da88f
2020-05-12policy: Add a new policy hook for deactivating appsMarius Vlad1-0/+1
Bug-AGL: SPEC-3269 Signed-off-by: Marius Vlad <marius.vlad@collabora.com> Change-Id: I7260626819b78ff7e2a245dc0a5ef566919220f7
2020-03-11policy: Init policy framework APIMarius Vlad1-0/+170
This patch adds the policy framework, comprised from hooks which a policy engine can further customize, and which are checked upon surface creation, commit and activation. Users should create specialized versions of these callbacks when creating/desining a policy engine. Further more, it adds the posibility to further customize the policy engine by adding new states, events and policy rules. By default, the policy API is aware of known states like 'start' or 'stop', but also 'show' and 'hide' as events. A policy rule would allow to define the setup in which an event can happen based on the state of the rule compared to that of the system, the action event itself, the application and (optional) an timeout. The policy rules are there to specify the state, the event, and application, but it is ultimately handled by a hook which will be called to handle the event. The compositor will arrange to pass all that information back to the handler, so the policy engine is in control to check in what circumstances the policy can be satisfied. These policy rules allow to handle transitional states which are common in AGL. For instance: If one would want to display the application 'navigation' in 3 seconds after and state has been changed to 'start', it should do add the following rule: ('navigation', STATE_START, EVENT_SHOW, timeout, main_output) Then, when a 'STATE_START' state is propagated to the compositor the policy API will trigger a state change signal which in turn wil arm an timer to execute the event handler after a timeout 'timeout'. Bug-AGL: SPEC-3217 Signed-off-by: Marius Vlad <marius.vlad@collabora.com> Change-Id: Ie03c5f9b1ddb964949e4f9797cbbe2dd2b32a6b6