Resources | developer.brewmp.com Resources | developer.brewmp.com

Developer

resources

Service

The Service primitive is a system resource used to declare a Service class, which is uniquely identified by a 32-bit ID known as a Service ID that is specified in the serviceid field.

When the service is instantiated, the following occurs: the class that is specified by the servedclassid field is instantiated in either the kernel process or in a server process, as specified by the serverid field. The class must already have been declared using the Class primitive. If the class is a singleton, then the service is instantiated as a singleton service.

server host process service
Service { 
   serviceid = AEECLSID_Service_Foo, 
   iid = AEEIID_Service_Foo,
   serverid = 0, 
   required_privs = {0},
   servedclassid = AEECLSID_Foo 
}
  • serviceid: The ClassID of the applet class. A unique 32-bit ID that callers use to create an instance of this object.
  • iid: The ID of the default interface that this service supports.
  • serverid: Identifies the host process. A unique 32-bit ID. 0 (zero) identifies a kernel process. Information regarding the server process is to be provided with a server declaration, which will be available in Brew MP 1.1+.
  • required_privs: A list of privileges required by the caller to create this service. {0} (zero) indicates that no special privileges are required. {} indicates no privileges exist that could be used to create this service; creating this service will always fail with AEE_EPRIVLEVEL. If {} is specified, the service cannot be instantiated by any class. {} can be used for disabling the use of a service or for testing. If this field is not specified, the required privilege defaults to serviceid.
  • servedclassid: The ID of a class to be used and instantiated in a specific server process that is identified by the serverid element. This is the same class that implements the interface.

Refer to the Programming Model Technology Guide and OS Services Primer, which are available on the Brew MP website,