public void Startup(ConfigurationLoader loader) { m_InnerService = loader.GetService <GroupsServiceInterface>(m_GroupsServiceName); if (!m_InnerService.Invites.DoesSupportListGetters) { throw new ConfigurationLoader.ConfigurationErrorException("Inner service must support list getters"); } }
public void Startup(ConfigurationLoader loader) { IConfig config = loader.Config.Configs[GetType().FullName]; m_GroupsServiceName = config.GetString("GroupsService"); m_BackendGroupsServiceName = config.GetString("BackendGroupsService", m_GroupsServiceName); m_AvatarNameServiceName = config.GetString("AvatarNameService"); m_GroupsService = loader.GetService <GroupsServiceInterface>(m_GroupsServiceName); m_BackendGroupsService = loader.GetService <GroupsServiceInterface>(m_BackendGroupsServiceName); m_AvatarNameService = loader.GetService <AvatarNameServiceInterface>(m_AvatarNameServiceName); }
private bool TryGetGroupsService(UGUI principal, out GroupsServiceInterface groupsService) { groupsService = null; IAgent agent; UUID regionID; if (m_Scenes.TryFindRootAgent(principal.ID, out agent, out regionID)) { groupsService = agent.GroupsService; } return(groupsService != null); }
private GroupPowers GetGroupPowers(UGUI agent, GroupsServiceInterface groupsService, UGI group) { if (groupsService == null) { return(GroupPowers.None); } var roles = groupsService.Roles[agent, group, agent]; var powers = GroupPowers.None; foreach (var role in roles) { powers |= role.Powers; } return(GroupPowers.None); }
private bool TryGetGroupsService(UUID groupID, out GroupsServiceInterface groupsService) { UGI group; GroupsBrokerEntry entry; if (m_NameCache.TryGetValue(groupID, out entry) && m_ClockSource.TicksElapsed(m_ClockSource.TickCount, entry.ExpiryTickCount) < m_ClockSource.SecsToTicks(120)) { groupsService = entry; return(true); } if (!m_GroupsNameService.TryGetValue(groupID, out group)) { groupsService = default(GroupsServiceInterface); return(false); } bool result = TryGetGroupsService(group, out entry); groupsService = entry; return(result); }
public ViewerAgent( SceneList scenes, UUID agentID, string firstName, string lastName, Uri homeURI, UUID sessionID, UUID secureSessionID, ClientInfo clientInfo, UserAccount untrustedAccountInfo, AgentServiceList serviceList) : base(agentID, homeURI) { m_Scenes = scenes; m_TeleportServices = serviceList.GetAll <IAgentTeleportServiceInterface>(); foreach (IAgentTeleportServiceInterface service in m_TeleportServices) { service.Agent = this; } CollisionPlane = Vector4.UnitW; SessionID = sessionID; m_UntrustedAccountInfo = untrustedAccountInfo; m_SecureSessionID = secureSessionID; Client = clientInfo; m_AssetService = serviceList.Get <AssetServiceInterface>(); m_InventoryService = serviceList.Get <InventoryServiceInterface>(); m_GroupsService = serviceList.Get <GroupsServiceInterface>(); m_ExperienceService = serviceList.Get <ExperienceServiceInterface>(); m_ProfileService = serviceList.Get <ProfileServiceInterface>(); m_FriendsService = serviceList.Get <FriendsServiceInterface>(); m_UserAgentService = serviceList.Get <UserAgentServiceInterface>(); m_PresenceService = serviceList.Get <IPresenceServiceInterface>(); EconomyService = serviceList.Get <EconomyServiceInterface>(); OfflineIMService = serviceList.Get <OfflineIMServiceInterface>(); MuteListService = serviceList.Get <MuteListServiceInterface>(); FirstName = firstName; LastName = lastName; OnPositionChange += ChildUpdateOnPositionChange; OnAppearanceUpdate += HandleAppearanceUpdate; }
private bool TryGetGroupsService(UGI ugi, out GroupsBrokerEntry groupsService) { groupsService = default(GroupsBrokerEntry); Dictionary <string, string> cachedheaders; GroupsBrokerEntry entry; if (ugi.HomeURI == null) { return(false); } if (ugi.AuthorizationToken == null) { /* if unset, try fetching the authorization token */ UGI ugi2; if (m_GroupsNameService.TryGetValue(ugi.ID, out ugi2)) { ugi = ugi2; if (ugi.HomeURI == null) { return(false); } } } string groupsServerURI = ugi.HomeURI.ToString(); if (m_GroupsService != null && m_GroupsHomeURI == groupsServerURI) { entry = new GroupsBrokerEntry(m_GroupsService, m_GroupIMRouter, m_ClockSource.TickCount); m_NameCache[ugi.ID] = entry; groupsService = entry; return(true); } cachedheaders = ServicePluginHelo.HeloRequest(groupsServerURI); foreach (IGroupsServicePlugin plugin in m_GroupsServicePlugins) { if (plugin.IsProtocolSupported(groupsServerURI, cachedheaders)) { GroupsServiceInterface service = plugin.Instantiate(ugi); IGroupsChatServiceInterface chatService = service as IGroupsChatServiceInterface; if (chatService == null) { /* do not search for it if the groups connector has it integrated */ foreach (IGroupsChatServicePlugin chatplugin in m_GroupsChatServicePlugins) { if (chatplugin.IsProtocolSupported(groupsServerURI, cachedheaders)) { chatService = chatplugin.Instantiate(ugi); break; } } } entry = new GroupsBrokerEntry(service, chatService, m_ClockSource.TickCount); m_NameCache[ugi.ID] = entry; groupsService = entry; return(true); } } return(false); }
public GroupsBrokerEntry(GroupsServiceInterface innerGroupsService, IGroupsChatServiceInterface innerGroupsChatService, long expiryTickCount) { InnerGroupsService = innerGroupsService; InnerGroupsChatService = innerGroupsChatService; ExpiryTickCount = expiryTickCount; }
public DefaultPermissionsGroupsService(GroupsServiceInterface service) { m_InnerService = service; }