Skip to content
  • Marius Vlad's avatar
    weston-log: Introduce subscribe functionality · 9f71a4ad
    Marius Vlad authored
    As described in e10c9f89
    
    : "weston-debug: Introduce...", the
    subscriber object need further functionality to make use of it.
    
    Current form of the weston-debug protocol would not need this, as it
    creates underneath a new subscriber each time a client connects and
    subscriptions are created/destroyed automatically with the help of
    wayland protocol. For other types of streams, we require to manually
    create a subscriber and to subscribe to log scopes.
    
    This patch introduces the ability to create subscriptions, and
    implicitly to subscribe to (previously created) scopes.
    
    In the event the scope(s) are not created we temporary store the
    subscription as a pending one: a subscription for which a scope doesn't
    exist at the time of the subscription. When the scope for which the
    subscription has been created we take care to create the subscription as
    well.
    
    While at it the documentation bits are modified accommodate the subscribe
    method and its further functionality.
    
    Lastly, it removes an unlikely case when a scope is not created so we
    avoid any kind of dandling (pending) subscription in case there is
    subscription to it. We can only do something about in the destroy part
    of the scope.
    
    Signed-off-by: default avatarMarius Vlad <marius.vlad@collabora.com>
    Suggested-by: default avatarPekka Paalanen <pekka.paalanen@collabora.com>
    9f71a4ad