IUserManagement.cs 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. using System;
  2. using System.Collections.Generic;
  3. using OpenMetaverse;
  4. namespace OpenSim.Region.Framework.Interfaces
  5. {
  6. /// <summary>
  7. /// This maintains the relationship between a UUID and a user name.
  8. /// </summary>
  9. public interface IUserManagement
  10. {
  11. string GetUserName(UUID uuid);
  12. string GetUserHomeURL(UUID uuid);
  13. string GetUserUUI(UUID uuid);
  14. string GetUserServerURL(UUID uuid, string serverType);
  15. /// <summary>
  16. /// Get user ID by the given name.
  17. /// </summary>
  18. /// <param name="name"></param>
  19. /// <returns>UUID.Zero if no user with that name is found or if the name is "Unknown User"</returns>
  20. UUID GetUserIdByName(string name);
  21. /// <summary>
  22. /// Get user ID by the given name.
  23. /// </summary>
  24. /// <param name="firstName"></param>
  25. /// <param name="lastName"></param>
  26. /// <returns>UUID.Zero if no user with that name is found or if the name is "Unknown User"</returns>
  27. UUID GetUserIdByName(string firstName, string lastName);
  28. /// <summary>
  29. /// Add a user.
  30. /// </summary>
  31. /// <remarks>
  32. /// If an account is found for the UUID, then the names in this will be used rather than any information
  33. /// extracted from creatorData.
  34. /// </remarks>
  35. /// <param name="uuid"></param>
  36. /// <param name="creatorData">The creator data for this user.</param>
  37. void AddUser(UUID uuid, string creatorData);
  38. /// <summary>
  39. /// Add a user.
  40. /// </summary>
  41. /// <remarks>
  42. /// The UUID is related to the name without any other checks being performed, such as user account presence.
  43. /// </remarks>
  44. /// <param name="uuid"></param>
  45. /// <param name="firstName"></param>
  46. /// <param name="lastName"></param>
  47. void AddUser(UUID uuid, string firstName, string lastName);
  48. /// <summary>
  49. /// Add a user.
  50. /// </summary>
  51. /// <remarks>
  52. /// The arguments apart from uuid are formed into a creatorData string and processing proceeds as for the
  53. /// AddUser(UUID uuid, string creatorData) method.
  54. /// </remarks>
  55. /// <param name="uuid"></param>
  56. /// <param name="firstName"></param>
  57. /// <param name="profileURL"></param>
  58. void AddUser(UUID uuid, string firstName, string lastName, string homeURL);
  59. bool IsLocalGridUser(UUID uuid);
  60. }
  61. }