Please consider a donation to the Higher Intellect project. See https://preterhuman.net/donate.php or the Donate to Higher Intellect page for more info. |
SharedInfoServer AppleEvent Suite
Add Entity: Add an entity to the database
<<event AWARaden>> string
- Add Entity string
Use this event to construct a new Entity in the database. All clients known to the database will receive an Add Entity message, notifying them of the new Entity's name. The Server will note when a client cannot be reached and, after three failures, will remove it from the Server and send no further messages to it. Creation of a new Entity results in creation of a "creation date" Attribute for the new entity. The value of "creation date" is the time when the Entity was created,
in standard unsigned long form.
Error codes:
- -24000 "No database attached"
- The Server is running, but no database has been opened
- -24007 "Redundant request ignored"
- The Entity already exists
- -24008 "Internal Error"
- The Server is experiencing difficulty and may need to be restarted
Remove Entity: Remove entity from database
<<event AWARrmen>> string
- Remove Entity string
Use this event to remove a new Entity from the database. All clients known to the database will receive a Remove Entity message, notifying them of the Entity's demise. The Server will note when a client cannot be reached and, after three failures, will remove it from the Server and send no further messages to it. All the Entity's Attributes will be removed, and clients of those Attributes will be unregistered. If, after unregistering for this Entity's Attributes, a client isn't registered for any Attributes, it will be
removed from the Server.
Error codes:
- -24000 "No database attached"
- The Server is running, but no database has been opened
- -24002 "Database item not found"
- The Entity to be removed was not found in the database
- -24008 "Internal Error"
- The Server is experiencing difficulty and may need to be restarted
Add Attribute To: Add an attribute to an entity already in the database
<<event AWARadat>> string given <<class attr>>: string
- Add Attribute To string
- attribute name string
Use this event to add an Attribute to an existing Entity. All clients known to the database will receive an Add Attribute message, notifying them of the Attribute's creation. The Server will note when a client cannot be reached and, after three failures, will remove it from the Server and send no further messages to it. The Attribute's initial value is the string "Uninitialized". At present, the Server doesn't check to see whether the Entity has already been created before adding an Attribute. In other words, constructing both the Entity and its first Attribute can be accomplished
by simply sending a single Add Attribute message.
Error codes:
- -24000 "No database attached"
- The Server is running, but no database has been opened
- -24007 "Redundant request ignored"
- The Attribute already exists
- -24008 "Internal Error"
- The Server is experiencing difficulty and may need to be restarted
Remove Attribute From: Remove an attribute from an entity already in the database
<<event AWARrmat>> string given <<class attr>>: string
- Remove Attribute From string
- attribute name string
Use this event to remove an Attribute from an existing Entity. All clients known to the database will receive a Remove Attribute message, notifying them of the Attribute's demise. The Server will note when a client cannot be reached and, after three failures, will remove it from the Server and send no further messages to it. Clients of the Attribute will be unregistered. If, after unregistering for this Attribute, a client isn't registered for any Attributes, it will be
removed from the Server.
Error codes:
- -24000 "No database attached"
- The Server is running, but no database has been opened
- -24002 "Database item not found"
- The Attribute to be removed was not found in the database
- -24008 "Internal Error"
- The Server is experiencing difficulty and may need to be restarted
Change Value For: Change Value for an Entity's Attribute
<<event AWARchvl>> string given <<class attr>>: string, <<class data>>: string
- Change Value For string
- attribute name string
- attribute value anything
Use this event to change the value for an Attribute of an existing Entity. All clients registered to receive changes to this Attribute will receive a Change Value message, containing the Attribute's new value. The Server will note when a client cannot be reached and, after three failures, will remove it from the Server and send no further messages to it. Clients of the Attribute will be unregistered. If, after unregistering for this Attribute, a client isn't registered for any Attributes, it will be
removed from the Server.
Error codes:
- -24000 "No database attached"
- The Server is running, but no database has been opened
- -24002 "Database item not found"
- The Attribute to be changed was not found in the database
- -24008 "Internal Error"
- The Server is experiencing difficulty and may need to be restarted
Register For: Register for notification of changes in an attribute's value
<<event AWARregi>> string given <<class attr>>: string
- Register For string
- attribute name string
Use this event to register to receive changes to the value of an Attribute of an existing Entity.
Error codes:
- -24000 "No database attached"
- The Server is running, but no database has been opened
- -24002 "Database item not found"
- The Attribute to register for was not found in the database
- -24007 "Redundant request ignored"
- The Entity already exists
- -24008 "Internal Error"
- The Server is experiencing difficulty and may need to be restarted
Unregister For: Unregister for notification of changes to an attribute's value
<<event AWARunrg>> string given <<class attr>>: string
- Unregister For string
- attribute name string
Use this event to register to stop receiving changes to the value of an Attribute of an existing Entity.
Error codes:
- -24000 "No database attached"
- The Server is running, but no database has been opened
- -24002 "Database item not found"
- The Attribute to unregister from was not found in the database
- -24008 "Internal Error"
- The Server is experiencing difficulty and may need to be restarted
Get Attributes For: Get a list of attributes for a given Entity
<<event AWARgtat>> string
- Get Attributes For string
- Result: list
Retrieve a list of Attributes for a given Entity.
Error codes:
- -24000 "No database attached"
- The Server is running, but no database has been opened
- -24002 "Database item not found"
- The Entity was not found in the database
- -24008 "Internal Error"
- The Server is experiencing difficulty and may need to be restarted
Get Entity Names: Get a list of all the Entity names the server knowns
<<event AWARgten>>
- Get Entity Names
- Result: list
Use this event to get a list of Entities known to the Server.
Error codes:
- -24000 "No database attached"
- The Server is running, but no database has been opened
- -24008 "Internal Error"
- The Server is experiencing difficulty and may need to be restarted
Get Entity Names between: Get the names of entities in an inclusive alphabetical range
<<event AWARgeb>> string given <<class enty>>: string
- Get Entity Names between string
- and string
- Result: list
Use this event to get a list of Entities whose names fall within the given range.
Error codes:
- -24000 "No database attached"
- The Server is running, but no database has been opened
- -24008 "Internal Error"
- The Server is experiencing difficulty and may need to be restarted
Get Value For: Get the value of a particular Attribute
<<event AWARgtvl>> string given <<class attr>>: string
- Get Value For string
- attribute name string
- Result: anything
Use this event to retrieve the value of an Attribute of an existing Entity. This event is intended for limited use only. Please don't poll the server --
register to receive updates!
Error codes:
- -24000 "No database attached"
- The Server is running, but no database has been opened
- -24002 "Database item not found"
- The Attribute was not found in the database
- -24008 "Internal Error"
- The Server is experiencing difficulty and may need to be restarted
Unregister: Unregister for all Attributes
<<event AWARunal>>
- Unregister
- Result: anything
Use this event to unregister from everything you previously registered for. This is a
good thing to do as your client application is quitting.
Error codes:
- -24000 "No database attached"
- The Server is running, but no database has been opened
- -24002 "Database item not found"
- This client was not registered for to receive any updates.
- -24008 "Internal Error"
- The Server is experiencing difficulty and may need to be restarted
Register: Register for all Attributes
<<event AWARrgal>>
- Register
- Result: anything
Use this event to register for the "All Change Value" attribute of the "Special Clients" entity. Doing so means you will receive every Change Value message for every attribute
in the server. Use Unregister to stop receiving the notifications.
Error codes:
- -24000 "No database attached"
- The Server is running, but no database has been opened
- -24008 "Internal Error"
- The Server is experiencing difficulty and may need to be restarted
Status Report: Give a status report about the Server
<<event AWARstat>>
- Status Report
- Result: string
This event returns a string formatted like this: "attributes 681 readers 6 server started 18:00 04/28/97 incoming events 6 last incoming 18:06 04/29/97 outgoing events 6 last outgoing 18:05 04/29/97"
Error codes:
- -24000 "No database attached"
- The Server is running, but no database has been opened
- -24008 "Internal Error"
- The Server is experiencing difficulty and may need to be restarted
Get Readers For: Get the names of all the Reader Clients for this Attribute
<<event AWARgtrd>> string given <<class attr>>: string
- Get Readers For string
- attribute name string
- Result: list
This event returns the names of clients registered to receive updates for a particular attribute. Aside from its value as a debugging tool, this event is intended to make clients more socially
accountable for the fact that they're watching.
Error codes:
- -24000 "No database attached"
- The Server is running, but no database has been opened
- -24002 "Database item not found"
- The Attribute was not found in the database
- -24008 "Internal Error"
- The Server is experiencing difficulty and may need to be restarted