Difference between revisions of "IEntitySystem"

From Virtual World Web Wiki
Jump to: navigation, search
(Documentation for the IEntitySystem class)
(Documentation for the IEntitySystem class)
Line 2: Line 2:
  
 
===Remarks <nowiki>[</nowiki>[{{fullurl:IEntitySystem Remarks|action=edit}} edit]<nowiki>]</nowiki>===
 
===Remarks <nowiki>[</nowiki>[{{fullurl:IEntitySystem Remarks|action=edit}} edit]<nowiki>]</nowiki>===
{{:IEntitySystem Remarks}}
+
{{#ifexist:IEntitySystem Remarks|{{:IEntitySystem Remarks}}|}}
  
 
===Properties===
 
===Properties===
Line 15: Line 15:
  
 
:{{CSharp|void CompleteFriendshipRequest(Guid requestID, FriendRequestActionType actionType)}}
 
:{{CSharp|void CompleteFriendshipRequest(Guid requestID, FriendRequestActionType actionType)}}
 +
::
 +
::Completes a friendship request between two personas
  
 
:{{CSharp|Guid ConsumeWebTransferToken(Uri uri)}}
 
:{{CSharp|Guid ConsumeWebTransferToken(Uri uri)}}
Line 41: Line 43:
  
 
:{{CSharp|bool CreateFriendship(Guid personaID, Guid relationID)}}
 
:{{CSharp|bool CreateFriendship(Guid personaID, Guid relationID)}}
 +
::
 +
::Creates a friendship between two personas. Existing ignores will be removed.
  
 
:{{CSharp|void CreateFriendshipRequest(Guid personaID, Guid relationID)}}
 
:{{CSharp|void CreateFriendshipRequest(Guid personaID, Guid relationID)}}
 +
::
 +
::Creates a friendship request between two personas. If a request exists in the opposite direction the friendship request will be automatically completed successfully
  
 
:{{CSharp|bool CreateIgnore(Guid personaID, Guid relationID)}}
 
:{{CSharp|bool CreateIgnore(Guid personaID, Guid relationID)}}
 +
::
 +
::Creates an ignore between two personas. Existing friendships will be removed.
  
 
:{{CSharp|Guid CreateOrGetRootAccount(string emailaddress, string returnUrl {{=}} "", CultureInfo culture {{=}} NULL)}}
 
:{{CSharp|Guid CreateOrGetRootAccount(string emailaddress, string returnUrl {{=}} "", CultureInfo culture {{=}} NULL)}}
Line 167: Line 175:
  
 
:{{CSharp|bool IsFriend(Guid personaID, Guid relationID)}}
 
:{{CSharp|bool IsFriend(Guid personaID, Guid relationID)}}
 +
::
 +
::Tests if two personas are friends
  
 
:{{CSharp|bool IsIgnoring(Guid personaID, Guid relationID)}}
 
:{{CSharp|bool IsIgnoring(Guid personaID, Guid relationID)}}
 +
::
 +
::Tests if one persona is ignoring the other
  
 
:{{CSharp|bool IsPersonaNameAvailable(string name, Guid accountID, Guid worldID)}}
 
:{{CSharp|bool IsPersonaNameAvailable(string name, Guid accountID, Guid worldID)}}
Line 207: Line 219:
  
 
:{{CSharp|void RemoveFriend(Guid personaID, Guid relationID)}}
 
:{{CSharp|void RemoveFriend(Guid personaID, Guid relationID)}}
 +
::
 +
::Removes a friendship between two personas.
  
 
:{{CSharp|void RemoveIgnore(Guid personaID, Guid relationID)}}
 
:{{CSharp|void RemoveIgnore(Guid personaID, Guid relationID)}}
 +
::
 +
::Removes an ignore relationship between two personas.
  
 
:{{CSharp|void SetAccountEmailAddress(Guid accountID, string emailAddress)}}
 
:{{CSharp|void SetAccountEmailAddress(Guid accountID, string emailAddress)}}

Revision as of 21:05, 12 April 2017

The entity system is a primary layer one interface. There are methods here for creating, managing and getting information about all kinds of Entities

Remarks [edit]

Properties

int OnlineCount {get;}
Gets the service provider global online count

Methods

bool AccountExists(Guid accountID)
Checks for the existance of a local account stub.
void CompleteFriendshipRequest(Guid requestID, FriendRequestActionType actionType)
Completes a friendship request between two personas
Guid ConsumeWebTransferToken(Uri uri)
Extracts the "wt" query string parameter and calls the string version of this function with its value.
Guid ConsumeWebTransferToken(string token)
Consumes a web transfer token
bool CreateAccount(Guid accountID, string emailAddress, CultureInfo culture = NULL)
Creates a local account stub. The account must be created on Root first.
IConfirmationHandle CreateConfirmation(IConnectionIdentity identity, AutoString title, AutoString description, ConfirmationCallback callback, AutoString[] buttons = NULL, int defaultButton = 0, int replyTimeout = -1, bool cancelOnParticipantChange = true)
Creates and sends a new confirmation request to the specified client connection.
Guid CreateDynamicGroup(string name, Guid? dynamicGroupID = NULL)
Creates a new dynamic group. Dynamic groups have their membership set programatically at runtime
Guid CreateEntityGroup(string name, EntityType allowedEntityTypes = EntityType.AnyLeaf, Guid? entityGroupID = NULL)
Creates a new entity group
bool CreateFriendship(Guid personaID, Guid relationID)
Creates a friendship between two personas. Existing ignores will be removed.
void CreateFriendshipRequest(Guid personaID, Guid relationID)
Creates a friendship request between two personas. If a request exists in the opposite direction the friendship request will be automatically completed successfully
bool CreateIgnore(Guid personaID, Guid relationID)
Creates an ignore between two personas. Existing friendships will be removed.
Guid CreateOrGetRootAccount(string emailaddress, string returnUrl = "", CultureInfo culture = NULL)
Checks with root to either get or create an account for a given email address
Guid CreatePersona(string name, Guid accountID, Guid worldID)
Creates a new persona for an account
CreateAccountInfo CreateRootAccount(string emailaddress, string returnUrl = "", CultureInfo culture = NULL)
Attempts to create a new account on root. if the account already exists the function returns false
void DeleteAccount(Guid accountID, Action<PacketErrorStatus> onComplete = NULL)
Starts the deletion of a local account stub and all associated data, including personas, memberships etc.
void DeleteDynamicGroup(Guid dynamicGroupID, Action<PacketErrorStatus> onComplete = NULL)
Deletes a Dynamic Group
void DeleteEntityGroup(Guid entityGroupID, Action<PacketErrorStatus> onComplete = NULL)
Deletes an entity group
void DeletePersona(Guid personaID, Action<PacketErrorStatus> onComplete = NULL)
Starts the deletion of a persona and all associated data.
void DisconnectPersona(Guid personaID, AutoString message = NULL)
Disconnects a persona no matter which instance host it's on, sending a reason message as well
void DisconnectSession(Guid sessionID, AutoString message = NULL)
Disconnects a session no matter which instance host it's on, sending a reason message as well
bool EntityExists(Guid entityID, EntityType entityType = EntityType.None)
Checks for the existance of an entity.
Guid? FindPersona(string name, Guid worldID)
Finds a persona withing a given world by name
void FireEntityEvent(IConnectionIdentity identity, string identifier, Guid? context = NULL, Decimal? amount = NULL)
Sends a notification that an event has occourred for a connection. An L2 EntityEvent will result for this connection
void FireEntityEvent(Guid entityID, string identifier, Guid? context = NULL, Decimal? amount = NULL)
Sends a notification that an event has occoutted for an entity. An L2 EntityEvent will result for all connections in the system that have this entity.
string GetAccountEmailAddress(Guid accountID)
Gets the email address associated with an account
Guid GetAccountForSession(Guid sessionID)
Gets the account ID associated with a session
IConnectionIdentity GetConnectionForController(DOMController controller)
Tries to find an active connection represented by the specified controller (avatar)
IConnectionIdentity GetConnectionForSession(Guid sessionID)
Search for a connection identity by session ID
IConnectionIdentity[] GetConnectionsForEntity(Guid entityID)
Gets the set of connections currently online in a given entity. Only completely accurate on the service provider.
string GetDynamicGroupName(Guid dynamicGroupID)
Gets the name of a dynamic group
string GetEntityGroupName(Guid entityGroupID)
Gets the name of an entity group
Guid GetPersonaAccountId(Guid personaID)
Gets the acocunt ID for a given persona
PersonaInfo GetPersonaInfo(Guid personaID)
Gets a personaInfo structure for a given persona
IEnumerable<PersonaInfo> GetPersonaInfos(Guid accountID, Guid worldID)
Gets persona info structures for all of the personas belonging to a given account in a given world.
Guid[] GetPersonaList(Guid accountID, Guid worldID)
Gets the list of persona IDs in a given root world for a given account
string GetPersonaName(Guid personaID)
Gets the name of a persona
Guid GetPersonaRootWorld(Guid personaID)
Gets the root world (persona container) to which the specified persona belongs
ISecurableInfo GetSecurableInfo(Guid securableID)
Gets general information about a securable
string GetSecurableName(Guid securableID)
Gets the name of a securable
SecurableType GetSecurableType(Guid securableID)
Gets the type of a securable
Guid? GetSessionIDForPersona(Guid personaID)
Gets the sessionID for this persona if they're online. Guid.Empty otherwise
bool IsFriend(Guid personaID, Guid relationID)
Tests if two personas are friends
bool IsIgnoring(Guid personaID, Guid relationID)
Tests if one persona is ignoring the other
bool IsPersonaNameAvailable(string name, Guid accountID, Guid worldID)
Routes to the service provider and provides components an opportunity to validate persona name availability
bool IsPersonaOnline(Guid personaID)
Checks if the spcified persona is online
bool IsProtected(Guid entityID)
Tests if an entity is protected
void JoinEntityGroup(Guid entityGroupID, Guid entityID)
Adds an entity to an entity group
void LeaveEntityGroup(Guid entityGroupID, Guid entityID)
Removes an entity from an entity group
ILocationInfo LocatePersona(Guid personaID)
Gets location information for a persona
void NavigatePersona(Guid personaID, string vwwUri, bool designMode = false)
Navigates a persona no matter which instance host it's on
void NavigateSession(Guid sessionID, string vwwUri, bool designMode = false)
Navigates a session no matter which instance host it's on
void ProtectEntity(Guid entityID)
Marks an entity as a system entity so it cannot be deleted with layer 1 tools
void RemoveFriend(Guid personaID, Guid relationID)
Removes a friendship between two personas.
void RemoveIgnore(Guid personaID, Guid relationID)
Removes an ignore relationship between two personas.
void SetAccountEmailAddress(Guid accountID, string emailAddress)
Sets the email address associated with an account
void SetDynamicGroupName(Guid dynamicGroupID, string name)
Renames a dynamic group. Throws NameExistsException if name is in use
void SetEntityGroupName(Guid entityGroupID, string name)
Sets the name of an entity group
bool SetPersonaLayout(Guid personaID, DOMController layout)
Sets the DOM Layout for a persona
void SetPersonaName(Guid personaID, string name)
Renames a persona. Throws NameExistsException if name is in use
void SetSecurableMetadata(Guid securableID, string key, ProtoValue value)
Sets a securable metadata value. Values can be retrieved through GetSecurableInfo
void UnProtectEntity(Guid entityID)
Marks an entity as no longer a system entity so it can again be deleted