Syphon
Instance Methods | Class Methods | Properties | List of all members
SyphonServerDirectory Class Reference

Inherits NSObject.

Instance Methods

(NSArray *) - serversMatchingName:appName:
 

Class Methods

(SyphonServerDirectory *) + sharedDirectory
 

Properties

NSArray * servers
 

Server Description Dictionary Key Constants

NSString *const SyphonServerDescriptionUUIDKey
 
NSString *const SyphonServerDescriptionNameKey
 
NSString *const SyphonServerDescriptionAppNameKey
 
NSString *const SyphonServerDescriptionIconKey
 

Notifications

NSString *const SyphonServerAnnounceNotification
 
NSString *const SyphonServerUpdateNotification
 
NSString *const SyphonServerRetireNotification
 

Detailed Description

SyphonServerDirectory provides information on available Syphon Servers. Servers are represented by dictionaries. Generally you can expect to find some or all of the keys listed in Constants.

Method Documentation

◆ sharedDirectory()

+ (SyphonServerDirectory *) sharedDirectory

Returns the shared server directory instance. This object is KVO complaint, and can be used to observe changes in server availability, server names and statuses.

Returns
the shared server instance

◆ serversMatchingName:appName:()

- (NSArray *) serversMatchingName: (NSString *)  name
appName: (NSString *)  appname 

Use this method to discover servers based soley on their name, or application host name. Both parameters are optional. If you do not specify either, all available SyphonServers will be returned.

Parameters
nameOptional (pass nil to not specify) Name of the published SyphonServer, matches the key value for SyphonServerDescriptionNameKey
appnameOptional (pass nil to not specify) Application Name of the published SyphonServer, matches the key value for SyphonServerDescriptionAppNameKey
Returns
An array of NSDictionaries matching the query you specified.

Friends And Related Function Documentation

◆ SyphonServerDescriptionUUIDKey

- (NSString* const) SyphonServerDescriptionUUIDKey
related

The object for this key is a NSString which uniquely identifies a SyphonServer instance. If two dictionaries contain the same string for this key, they represent the same server. This is provided solely to allow you to programmatically determine the identity of a server, and should never be displayed to users in interface elements. This key is not guaranteed to exist in the dictionary.

◆ SyphonServerDescriptionNameKey

- (NSString* const) SyphonServerDescriptionNameKey
related

The object for this key is a NSString which is the human-readable non-unique name for the SyphonServer. If this string exists and is non-empty, you should use it in interface elements to identify the server, usually in combination with the name of the server's application (see SyphonServerDescriptionAppNameKey). This key is not guaranteed to exist in the dictionary.

◆ SyphonServerDescriptionAppNameKey

- (NSString* const) SyphonServerDescriptionAppNameKey
related

The object for this key is a NSString with the localized name of the application in which the SyphonServer is running. Use this in combination with the server's name (if present) to identify the server in interface elements. This key is not guaranteed to exist in the dictionary.

◆ SyphonServerDescriptionIconKey

- (NSString* const) SyphonServerDescriptionIconKey
related

The object for this key is a NSImage representation of the icon of the application in which the SyphonServer is running. This key is not guaranteed to exist in the dictionary.

◆ SyphonServerAnnounceNotification

- (NSString* const) SyphonServerAnnounceNotification
related

A new SyphonServer is available on the system. The notification object is the shared SyphonServerDirectory instance. The user info dictionary describes the server and may contain SyphonServerDescription keys.

◆ SyphonServerUpdateNotification

- (NSString* const) SyphonServerUpdateNotification
related

An existing SyphonServer instance has changed its description. The notification object is the shared SyphonServerDirectory instance. The user info dictionary describes the server and may contain SyphonServerDescription keys.

◆ SyphonServerRetireNotification

- (NSString* const) SyphonServerRetireNotification
related

A SyphonServer instance will no longer be available. The notification object is the shared SyphonServerDirectory instance. The user info dictionary describes the retiring server and may contain SyphonServerDescription keys.

Property Documentation

◆ servers

- (NSArray*) servers
readatomicassign

NSArray of NSDictionaries that describe (using the keys above) currently available SyphonServer instances on the system.