IUserService.cs 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  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. using System.Collections.Generic;
  28. using libsecondlife;
  29. namespace OpenSim.Framework
  30. {
  31. public interface IUserService
  32. {
  33. /// <summary>
  34. /// Loads a user profile by name
  35. /// </summary>
  36. /// <param name="fname">First name</param>
  37. /// <param name="lname">Last name</param>
  38. /// <returns>A user profile. Returns null if no profile is found</returns>
  39. UserProfileData GetUserProfile(string firstName, string lastName);
  40. //UserProfileData GetUserProfile(string name);
  41. /// <summary>
  42. /// Loads a user profile from a database by UUID
  43. /// </summary>
  44. /// <param name="uuid">The target UUID</param>
  45. /// <returns>A user profile. Returns null if no user profile is found.</returns>
  46. UserProfileData GetUserProfile(LLUUID userId);
  47. void clearUserAgent(LLUUID avatarID);
  48. List<AvatarPickerAvatar> GenerateAgentPickerRequestResponse(LLUUID QueryID, string Query);
  49. UserProfileData SetupMasterUser(string firstName, string lastName);
  50. UserProfileData SetupMasterUser(string firstName, string lastName, string password);
  51. UserProfileData SetupMasterUser(LLUUID userId);
  52. /// <summary>
  53. ///
  54. /// </summary>
  55. /// <param name="user"></param>
  56. LLUUID AddUserProfile(string firstName, string lastName, string pass, uint regX, uint regY);
  57. /// <summary>
  58. /// Adds a new friend to the database for XUser
  59. /// </summary>
  60. /// <param name="friendlistowner">The agent that who's friends list is being added to</param>
  61. /// <param name="friend">The agent that being added to the friends list of the friends list owner</param>
  62. /// <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>
  63. void AddNewUserFriend(LLUUID friendlistowner, LLUUID friend, uint perms);
  64. /// <summary>
  65. /// Delete 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 Ex-friend agent</param>
  69. void RemoveUserFriend(LLUUID friendlistowner, LLUUID friend);
  70. /// <summary>
  71. /// Update permissions for friend on friendlistowner's friendlist.
  72. /// </summary>
  73. /// <param name="friendlistowner">The agent that who's friends list is being updated</param>
  74. /// <param name="friend">The agent that is getting or loosing permissions</param>
  75. /// <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>
  76. void UpdateUserFriendPerms(LLUUID friendlistowner, LLUUID friend, uint perms);
  77. /// <summary>
  78. /// Updates a user profile
  79. /// </summary>
  80. /// <param name="UserProfile">Profile to update</param>
  81. /// <returns></returns>
  82. bool UpdateUserProfileProperties(UserProfileData UserProfile);
  83. /// <summary>
  84. /// Logs off a user on the user server
  85. /// </summary>
  86. /// <param name="UserID">UUID of the user</param>
  87. /// <param name="regionData">UUID of the Region</param>
  88. /// <param name="posx">final position x</param>
  89. /// <param name="posy">final position y</param>
  90. /// <param name="posz">final position z</param>
  91. void LogOffUser(LLUUID userid, LLUUID regionid, ulong regionhandle, float posx, float posy, float posz);
  92. /// <summary>
  93. /// Returns a list of FriendsListItems that describe the friends and permissions in the friend relationship for LLUUID friendslistowner
  94. /// </summary>
  95. /// <param name="friendlistowner">The agent that we're retreiving the friends Data.</param>
  96. List<FriendListItem> GetUserFriendList(LLUUID friendlistowner);
  97. }
  98. }