IUserService.cs 4.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. /*
  2. * Copyright (c) Contributors, http://opensimulator.org/
  3. * See CONTRIBUTORS.TXT for a full list of copyright holders.
  4. *
  5. * Redistribution and use in source and binary forms, with or without
  6. * modification, are permitted provided that the following conditions are met:
  7. * * Redistributions of source code must retain the above copyright
  8. * notice, this list of conditions and the following disclaimer.
  9. * * Redistributions in binary form must reproduce the above copyright
  10. * notice, this list of conditions and the following disclaimer in the
  11. * documentation and/or other materials provided with the distribution.
  12. * * Neither the name of the OpenSim Project nor the
  13. * names of its contributors may be used to endorse or promote products
  14. * derived from this software without specific prior written permission.
  15. *
  16. * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
  17. * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
  18. * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
  19. * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
  20. * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
  21. * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
  22. * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  23. * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  24. * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
  25. * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  26. *
  27. */
  28. using System.Collections.Generic;
  29. using libsecondlife;
  30. namespace OpenSim.Framework
  31. {
  32. public interface IUserService
  33. {
  34. UserProfileData GetUserProfile(string firstName, string lastName, string authAddr);
  35. UserProfileData GetUserProfile(string firstName, string authAddr); // must differentiate this from GetUserProfile call
  36. //UserProfileData GetUserProfile(string name);
  37. UserProfileData GetUserProfileByAccount(string account);
  38. UserProfileData GetUserProfile(LLUUID userId, string authAddr);
  39. void clearUserAgent(LLUUID avatarID, string authAddr);
  40. void UpdateUserAgentData(LLUUID agentId, bool agentOnline, LLVector3 currentPos, int logoutTime, string authAddr);
  41. List<AvatarPickerAvatar> GenerateAgentPickerRequestResponse(LLUUID QueryID, string Query);
  42. UserProfileData SetupMasterUser(string firstName, string lastName);
  43. UserProfileData SetupMasterUser(string firstName, string lastName, string password);
  44. UserProfileData SetupMasterUser(LLUUID userId);
  45. bool AuthenticateUser(LLUUID agentID, string sessionhash, out string asAddress);//rex
  46. /// <summary>
  47. ///
  48. /// </summary>
  49. /// <param name="user"></param>
  50. LLUUID AddUserProfile(string firstName, string lastName, string pass, uint regX, uint regY);
  51. /// <summary>
  52. /// Adds a new friend to the database for XUser
  53. /// </summary>
  54. /// <param name="friendlistowner">The agent that who's friends list is being added to</param>
  55. /// <param name="friend">The agent that being added to the friends list of the friends list owner</param>
  56. /// <param name="perms">A uint bit vector for set perms that the friend being added has; 0 = none, 1=This friend can see when they sign on, 2 = map, 4 edit objects </param>
  57. void AddNewUserFriend(LLUUID friendlistowner, LLUUID friend, uint perms);
  58. /// <summary>
  59. /// Delete friend on friendlistowner's friendlist.
  60. /// </summary>
  61. /// <param name="friendlistowner">The agent that who's friends list is being updated</param>
  62. /// <param name="friend">The Ex-friend agent</param>
  63. void RemoveUserFriend(LLUUID friendlistowner, LLUUID friend);
  64. /// <summary>
  65. /// Update permissions for friend on friendlistowner's friendlist.
  66. /// </summary>
  67. /// <param name="friendlistowner">The agent that who's friends list is being updated</param>
  68. /// <param name="friend">The agent that is getting or loosing permissions</param>
  69. /// <param name="perms">A uint bit vector for set perms that the friend being added has; 0 = none, 1=This friend can see when they sign on, 2 = map, 4 edit objects </param>
  70. void UpdateUserFriendPerms(LLUUID friendlistowner, LLUUID friend, uint perms);
  71. /// <summary>
  72. /// Returns a list of FriendsListItems that describe the friends and permissions in the friend relationship for LLUUID friendslistowner
  73. /// </summary>
  74. /// <param name="friendlistowner">The agent that we're retreiving the friends Data.</param>
  75. List<FriendListItem> GetUserFriendList(LLUUID friendlistowner);
  76. }
  77. }