--- Cannot embed stylesheet: [Errno 2] No such file or directory: '../../../aros.css' --->
| AddService() | FindServiceA() | FindServiceByName() | GetServiceAttrsA() |
| LockServiceList() | LoseService() | MarkServiceTemp() | NextService() |
| SetServiceAttrsA() | UnlockServiceList() |
BOOL AddService(
CONST_STRPTR name,
CONST_STRPTR path,
struct TagItem * tagList );
BOOL AddServiceTags(
CONST_STRPTR name,
CONST_STRPTR path,
TAG tag, ... );
Append a service to the list: name, library path and the attributes of SetServiceAttrsA(). The node is never temporary on return. Locks the list itself.
TRUE on success.
struct Entity * FindServiceA(
CONST_STRPTR remoteHost,
CONST_STRPTR serviceName,
struct Entity * srcEntity,
struct TagItem * tagList );
struct Entity * FindService(
CONST_STRPTR remoteHost,
CONST_STRPTR serviceName,
struct Entity * srcEntity,
TAG tag, ... );
Connect to a service: ask the Services Manager of remoteHost (NULL for this machine) to start serviceName for the user given by the tags, then FindEntity() the entity it names, from srcEntity.
remoteHost - host name, or NULL for the local host
serviceName - name of the service as configured on that host
srcEntity - the caller's entity; the returned link belongs to it
tagList - FSVC_UserName (STRPTR), FSVC_PassWord (STRPTR),
FSVC_Error (ULONG *)
The connected entity, or NULL. On failure the ULONG pointed to by FSVC_Error receives: the FindEntity() error if the Services Manager could not be reached (521/522/523), the Services Manager's reply (560 unknown service, 561 service library cannot be opened, 562 bad request, or the service's own StartServiceA() error), the error of the final FindEntity(), or 501 for a resource failure.
Every successful call needs a LoseService().
struct ServiceNode * FindServiceByName(
CONST_STRPTR name );
Case-insensitive lookup of a non-temporary node. The list must be locked.
void GetServiceAttrsA(
struct ServiceNode * node,
struct TagItem * tagList );
void GetServiceAttrs(
struct ServiceNode * node,
TAG tag, ... );
Read attributes of a node: SVCL_Flags, SVCL_Name, SVCL_Path, SVCL_Active, SVCL_Temp. ti_Data points to the IPTR receiving the value; string pointers stay valid while the list is locked.
struct ServiceNode * LockServiceList();
Lock the service list and return its first node, or NULL when it is empty. Every call needs an UnlockServiceList().
void LoseService(
struct Entity * entity );
Give up an entity obtained from FindServiceA().
void MarkServiceTemp(
struct ServiceNode * node );
Mark a node for release by the next UnlockServiceList(); it is no longer found or iterated. The list must be locked.
struct ServiceNode * NextService(
struct ServiceNode * node );
The node after node, skipping temporary ones; NULL at the end.
void SetServiceAttrsA(
struct ServiceNode * node,
struct TagItem * tagList );
void SetServiceAttrs(
struct ServiceNode * node,
TAG tag, ... );
Change attributes of a node: SVCL_Flags (ULONG), SVCL_Active (BOOL), SVCL_Temp (BOOL). The list must be locked.
void UnlockServiceList();
Release nodes marked with MarkServiceTemp(), then unlock the list.