Contains interfaces, classes, and enums related to the Directory SubjectType.
Defines the key interfaces concerning the subscription to a directory
(IDirectorySubscription, IDirectorySubscriptionListener,
and IDirectoryElement),
the interface that provides access to the parameters used to request directories,
(IDirectorySubscriptionParameters),
and the interface for handling directory events (IDirectoryEvent).
Declaration Syntax
C# | Visual Basic | Visual C++ |
namespace Caplin.StreamLink.Subscription.Directory
Namespace Caplin.StreamLink.Subscription.Directory
namespace Caplin.StreamLink.Subscription.Directory
Types
All Types | Interfaces |
Icon | Type | Description |
---|---|---|
IDirectoryElement |
Represents an element in a directory on the Liberator.
When updates are received for an IDirectorySubscription,
one or more IDirectoryElements within the directory will have been updated.
| |
IDirectoryEvent |
Provides information about a subscribed directory and the latest changes to its structure.
| |
IDirectorySubscription |
Represents a subscription to a directory on the Liberator.
| |
IDirectorySubscriptionListener |
The IDirectorySubscriptionListener interface allows applications to receive events
raised for a directory subscription.
| |
IDirectorySubscriptionParameters |
Provides access to the parameters used for a subscription to a directory on the Liberator.
|
Remarks
Directory subscriptions are created through the IStreamLinkProvider interface using one of the CreateDirectorySubscription(IDirectorySubscriptionListener, String) or CreateDirectorySubscription(IDirectorySubscriptionListener, String, IDirectorySubscriptionParameters) methods. In all cases an IDirectorySubscriptionListener must be passed along with the name of the directory being subscribed to.
CopyC#
using System; using Caplin.StreamLink; using Caplin.StreamLink.Authentication; using Caplin.StreamLink.Subscription.Directory; namespace StreamLinkExamples.Directory { /// <summary> /// Examples of how to create an IDirectorySubscription using the /// IStreamLinkProvider interface. /// </summary> public class CreateDirectorySubscriptionBasic { /// <summary> /// Creates a simple directory subscription with no parameters. /// </summary> public static void CreateDirectorySubscriptionBasicExample() { // Set up StreamLink and login credentials IStreamLink myStreamLink = new StreamLink(); myStreamLink.CredentialsProvider = new PasswordCredentialsProvider("admin", "admin"); // Finally, connect to the Liberator myStreamLink.StreamLinkProvider.Connect(); // Set up listener and created the subscription for /DEMO IDirectorySubscriptionListener listener = new ExampleDirectorySubscriptionListener(); IDirectorySubscription subscription = myStreamLink.StreamLinkProvider.CreateDirectorySubscription(listener, "/DEMO"); // Subscribe the subscription, this will be queued until we // login to the Liberator subscription.Subscribe(); } } }
The object implementing IDirectorySubscriptionListener will then be informed of all subscription status, error, and directory contents change events. (Also see ISubscriptionListener.)