Important: The information in this document is obsolete and should not be used for new development.
CyberService
An object of the
- Superclasses
ODObject
- Subclasses
- none
CyberService
class represents a network service or protocol.Description
ACyberService
object represents a Cyberdog service, an object that, along with companion objects, provides support for accessing data using a particular network protocol. TheCyberService
class is an abstract superclass that you subclass and implement to provide a service. Cyberdog includesCyberService
subclasses to support common network protocols, such as HTTP, Gopher, and FTP. You can use the existingCyberService
subclasses or create a newCyberService
subclass to support a new service.Cyberdog determines which services are supported by checking for
'srvc'
resources. When a Cyberdog session is initialized, it creates a Cyberdog service for each'srvc'
resource in your shared library. The'srvc'
resource identifies the SOM class of the Cyberdog service to create as well as other configuration attributes of the service. Cyberdog selects the appropriate service object as needed to access network data. Cyberdog services are deleted when the Cyberdog session is deleted.If you are developing a Cyberdog display part, you should not need to access service objects directly. In most cases, other classes in Cyberdog mediate between Cyberdog display parts and service objects. For example, to create a Cyberdog item from a URL, a display part calls the
CyberSession::CreateCyberItemFromURL
method. This method iterates over all of theCyberService
objects, determines which service owns the particular URL scheme, and asks that service to create a Cyberdog item for the URL.A
CyberService
subclass may have companionCyberItem
andCyberStream
subclasses that address and download data using the protocol. Each service may have its own Connect To and Preferences panels, displayed in the Connect To and Preferences dialog boxes, respectively.In addition, the Cyberdog service interacts with Cyberdog service menu objects (page 341) to display its service-related menu items for Cyberdog display parts. A service's menu commands are specified as offsets from a service menu object's base command ID. As a display part developer, you specify the base menu command ID to be used for a service menu object when you call
CyberServiceMenu::ICyberServiceMenu
to initialize the object. For more information on registering menu command IDs with OpenDoc, see the chapter on windows and menus in OpenDoc Programmer's Guide.Methods
This section presents summary descriptions of theCyberService
methods grouped according to purpose, followed by detailed descriptions.Initialization and Cleanup
Creating Cyberdog Items
ICyberService
- Initializes this Cyberdog service.
Managing Menus
CreateCyberItem
- Creates a Cyberdog item for the specified URL.
OwnsURL
- Tests whether this Cyberdog service can create a Cyberdog item for the specified URL.
Accessing Display Information
AdjustCyberMenu
- Adjusts the menu items of this Cyberdog service.
AppendCyberMenuCommands
- Appends the menu items of this Cyberdog service to a Cyberdog service menu object.
CyberMenuFocusAcquired
- Notifies this Cyberdog service that the part associated with a Cyberdog service menu object has acquired the focus.
CyberMenuFocusLost
- Notifies this Cyberdog service that the part associated with a Cyberdog service menu object has lost the focus.
DoCyberMenuCommand
- Performs a menu command.
Preferences and Connect To Panels
GetIconSuite
- Retrieves the icon suite for this Cyberdog service.
GetName
- Retrieves the name of this Cyberdog service.
GetConnectPartKind
- Retrieves the part kind of the Connect To panel for this Cyberdog service.
GetPrefsPartKind
- Retrieves the part kind of the Preferences panel for this Cyberdog service.
Methods
- AdjustCyberMenu
- AppendCyberMenuCommands
- CreateCyberItem
- CyberMenuFocusAcquired
- CyberMenuFocusLost
- DoCyberMenuCommand
- GetConnectPartKind
- GetIconSuite
- GetName
- GetPrefsPartKind
- ICyberService
- OwnsURL