Contains interfaces, classes, and enums related to the Permission SubjectType.
Defines the key interfaces concerning the subscription to a permission subjects
(IPermissionSubscription, IPermissionSubscriptionListener,
the interface that provides access to the parameters used to request permission objects,
(IPermissionSubscriptionParameters),
and the interface for handling permission events (IPermissionEvent).
![](../icons/collapse_all.gif)
C# | Visual Basic | Visual C++ |
namespace Caplin.StreamLink.Subscription.Permission
Namespace Caplin.StreamLink.Subscription.Permission
namespace Caplin.StreamLink.Subscription.Permission
![](../icons/collapse_all.gif)
All Types | Interfaces |
Icon | Type | Description |
---|---|---|
![]() | IPermissionEvent |
Provides information about a change to
permission data (simple fieldname+data pairs) in a Permission
(SubjectType Permission).
|
![]() | IPermissionSubscription |
Represents a subscription to a permission subject
|
![]() | IPermissionSubscriptionListener |
The IPermissionSubscriptionListener interface allows applications to receive events
raised for a permission subscription.
|
![]() | IPermissionSubscriptionParameters |
Provides access to the parameters used for a subscription to a Permission on the Liberator.
|
![](../icons/collapse_all.gif)
Permission subscriptions are created through the IStreamLinkProvider interface using one of the CreatePermissionSubscription(IPermissionSubscriptionListener, String) methods. In all cases an IPermissionSubscriptionListener must be passed along with the name of the directory being subscribed to.
![](../icons/CopyCode.gif)
using System; using Caplin.StreamLink; using Caplin.StreamLink.Authentication; using Caplin.StreamLink.Subscription.Permission; using Caplin.StreamLink.Configuration; using Caplin.StreamLink.Logging; namespace StreamLinkExamples.Permission { /// <summary> /// Examples of how to create an IPermissionSubscription using the /// IStreamLinkProvider interface. /// </summary> public class CreatePermissionSubscriptionBasic { /// <summary> /// Creates a simple permission subscription with no parameters. /// </summary> public static void CreatePermissionSubscriptionBasicExample() { // Set up StreamLink and login credentials IStreamLinkConfiguration config = SimpleConfiguration.CreateType2HttpConnection("localvm", 8080); StreamLink myStreamLink = new StreamLink(config); myStreamLink.CredentialsProvider = new PasswordCredentialsProvider("admin", "admin"); myStreamLink.Logger = new ConsoleLogger(); // Finally, connect to the Liberator myStreamLink.StreamLinkProvider.Connect(); // Set up listener and created the subscription for /PERMS/USER IPermissionSubscriptionListener listener = new ExamplePermissionSubscriptionListener(); IPermissionSubscription subscription = myStreamLink.StreamLinkProvider.CreatePermissionSubscription(listener, "/PERMS/USER"); // Subscribe the subscription, this will be queued until we // login to the Liberator subscription.Subscribe(); } } }
The object implementing IPermissionSubscriptionListener will then be informed of all subscription status, error, and directory contents change events. (Also see ISubscriptionListener.)