IDialogModule.cs 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230
  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 OpenSimulator 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 OpenMetaverse;
  28. using OpenSim.Framework;
  29. namespace OpenSim.Region.Framework.Interfaces
  30. {
  31. public interface IDialogModule
  32. {
  33. /// <summary>
  34. /// Send a non-modal alert message to a particular user. This can
  35. /// disappear from the user's view after a small interval.
  36. /// </summary>
  37. /// <param name="client">
  38. /// IClientAPI object representing the user.
  39. /// </param>
  40. /// <param name="message">Message text to send to the user.</param>
  41. void SendAlertToUser(IClientAPI client, string message);
  42. /// <summary>
  43. /// Send an alert message to a particular user.
  44. /// </summary>
  45. /// <param name="client">
  46. /// IClientAPI object representing the user.
  47. /// </param>
  48. /// <param name="message">Message text to send to the user.</param>
  49. /// <param name="modal">Flag to control modality.</param>
  50. void SendAlertToUser(IClientAPI client, string message, bool modal);
  51. /// <summary>
  52. /// Send a non-modal alert message to a particular user.
  53. /// </summary>
  54. /// <param name="agentID">UUID of agent representing the user.</param>
  55. /// <param name="message">Message text to send to the user.</param>
  56. void SendAlertToUser(UUID agentID, string message);
  57. /// <summary>
  58. /// Send an alert message to a particular user.
  59. /// </summary>
  60. /// <param name="agentID">UUID of agent representing the user.</param>
  61. /// <param name="message">Message text to send to the user.</param>
  62. /// <param name="modal">Flag to control modality.</param>
  63. void SendAlertToUser(UUID agentID, string message, bool modal);
  64. /// <summary>
  65. /// Send an alert message to a particular user.
  66. /// </summary>
  67. /// <param name="firstName">Account first name</param>
  68. /// <param name="lastName">Account last name</param>
  69. /// <param name="message">Message text to send to the user.</param>
  70. /// <param name="modal">Flag to control modality.</param>
  71. void SendAlertToUser(string firstName, string lastName,
  72. string message, bool modal);
  73. /// <summary>
  74. /// Send an alert message to all users in the scene.
  75. /// </summary>
  76. /// <param name="message">Message text to send to all users.</param>
  77. void SendGeneralAlert(string message);
  78. /// <summary>
  79. /// Send a dialog box to a particular user.
  80. /// </summary>
  81. /// <param name="avatarID">
  82. /// UUID of the avatar representing the user.
  83. /// </param>
  84. /// <param name="objectName">
  85. /// Name of the object sending the dialog.
  86. /// </param>
  87. /// <param name="objectID">
  88. /// UUID of the object sending the dialog.
  89. /// </param>
  90. /// <param name="ownerID">
  91. /// UUID of the user that owns the object.
  92. /// </param>
  93. /// <param name="message">Message text to send to the user.</param>
  94. /// <param name="textureID">
  95. /// Texture UUID to pass along with the dialog.
  96. /// </param>
  97. /// <param name="ch">
  98. /// Channel on which the selected button text should be broadcast.
  99. /// </param>
  100. /// <param name="buttonlabels">Dialog button text.</param>
  101. void SendDialogToUser(UUID avatarID, string objectName, UUID objectID,
  102. UUID ownerID, string message, UUID textureID, int ch,
  103. string[] buttonlabels);
  104. /// <summary>
  105. /// Send a dialog box to a particular user.
  106. /// </summary>
  107. /// <param name="avatarID">
  108. /// UUID of the avatar representing the user.
  109. /// </param>
  110. /// <param name="objectName">
  111. /// Name of the object sending the dialog.
  112. /// </param>
  113. /// <param name="objectID">
  114. /// UUID of the object sending the dialog.
  115. /// </param>
  116. /// <param name="ownerID">
  117. /// UUID of the user that owns the object.
  118. /// </param>
  119. /// <param name="ownerFirstName">
  120. /// first name of owner of the object, empty if group
  121. /// </param>
  122. /// <param name="ownerLastName">
  123. /// last name of owner of the object or group name
  124. /// </param>
  125. /// <param name="message">Message text to send to the user.</param>
  126. /// <param name="textureID">
  127. /// Texture UUID to pass along with the dialog.
  128. /// </param>
  129. /// <param name="ch">
  130. /// Channel on which the selected button text should be broadcast.
  131. /// </param>
  132. /// <param name="buttonlabels">Dialog button text.</param>
  133. void SendDialogToUser(UUID avatarID, string objectName,
  134. UUID objectID, UUID ownerID, string ownerFirstName, string ownerLastName, string message, UUID textureID,
  135. int ch, string[] buttonlabels);
  136. /// <summary>
  137. /// Send a url to a particular user.
  138. /// </summary>
  139. /// <param name="avatarID">
  140. /// UUID of the avatar representing the user.
  141. /// </param>
  142. /// <param name="objectName">
  143. /// Name of the object sending the dialog.
  144. /// </param>
  145. /// <param name="objectID">
  146. /// UUID of the object sending the dialog.
  147. /// </param>
  148. /// <param name="ownerID">
  149. /// UUID of the user that owns the object.
  150. /// </param>
  151. /// <param name="groupOwned">
  152. /// Flag indicating whether or not the object is group-owned.
  153. /// </param>
  154. /// <param name="message">Message text to send to the user.</param>
  155. /// <param name="url">Url to send to the user.</param>
  156. void SendUrlToUser(UUID avatarID, string objectName, UUID objectID,
  157. UUID ownerID, bool groupOwned, string message, string url);
  158. /// <summary>
  159. /// Send a notification to all users in the scene. This notification
  160. /// should remain around until the user explicitly dismisses it.
  161. /// </summary>
  162. /// <remarks>
  163. /// On the Linden Labs Second Client (as of 1.21), this is a big blue
  164. /// box message on the upper right of the screen.
  165. /// </remarks>
  166. /// <param name="fromAvatarID">The user sending the message</param>
  167. /// <param name="fromAvatarName">
  168. /// The name of the user doing the sending
  169. /// </param>
  170. /// <param name="message">The message being sent to the user</param>
  171. void SendNotificationToUsersInRegion(UUID fromAvatarID,
  172. string fromAvatarName, string message);
  173. /// <summary>
  174. /// Send a textbox entry for the client to respond to
  175. /// </summary>
  176. /// <param name="avatarID">
  177. /// UUID of the avatar representing the user.
  178. /// </param>
  179. /// <param name="message">Message text to send to the user.</param>
  180. /// <param name="chatChannel">
  181. /// Chat channel that the user's input should be broadcast on.
  182. /// </param>
  183. /// <param name="name">Name of the object sending the dialog.</param>
  184. /// <param name="objectid">
  185. /// UUID of the object sending the dialog.
  186. /// </param>
  187. /// <param name="ownerid">
  188. /// UUID of the user that owns the object.
  189. /// </param>
  190. void SendTextBoxToUser(UUID avatarid, string message, int chatChannel,
  191. string name, UUID objectid, UUID ownerid);
  192. /// <summary>
  193. /// Send a textbox entry for the client to respond to
  194. /// </summary>
  195. /// <param name="avatarID">
  196. /// UUID of the avatar representing the user.
  197. /// </param>
  198. /// <param name="message">Message text to send to the user.</param>
  199. /// <param name="chatChannel">
  200. /// Chat channel that the user's input should be broadcast on.
  201. /// </param>
  202. /// <param name="name">Name of the object sending the dialog.</param>
  203. /// <param name="objectid">
  204. /// UUID of the object sending the dialog.
  205. /// </param>
  206. /// <param name="ownerid">
  207. /// UUID of the user that owns the object.
  208. /// </param>
  209. /// <param name="ownerFirstName">
  210. /// first name of owner of the object, empty if group
  211. /// </param>
  212. /// <param name="ownerLastName">
  213. /// last name of owner of the object or group name
  214. /// </param>
  215. void SendTextBoxToUser(UUID avatarid, string message,
  216. int chatChannel, string name, UUID objectid, string ownerFirstName, string ownerLastName, UUID ownerID);
  217. }
  218. }