ChatParameterCode.cs 4.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. // ----------------------------------------------------------------------------------------------------------------------
  2. // <summary>The Photon Chat Api enables clients to connect to a chat server and communicate with other clients.</summary>
  3. // <remarks>ChatClient is the main class of this api.</remarks>
  4. // <copyright company="Exit Games GmbH">Photon Chat Api - Copyright (C) 2014 Exit Games GmbH</copyright>
  5. // ----------------------------------------------------------------------------------------------------------------------
  6. namespace Photon.Chat
  7. {
  8. /// <summary>
  9. /// Wraps up codes for parameters (in operations and events) used internally in Photon Chat. You don't have to use them directly usually.
  10. /// </summary>
  11. public class ChatParameterCode
  12. {
  13. /// <summary>(0) Array of chat channels.</summary>
  14. public const byte Channels = 0;
  15. /// <summary>(1) Name of a single chat channel.</summary>
  16. public const byte Channel = 1;
  17. /// <summary>(2) Array of chat messages.</summary>
  18. public const byte Messages = 2;
  19. /// <summary>(3) A single chat message.</summary>
  20. public const byte Message = 3;
  21. /// <summary>(4) Array of names of the users who sent the array of chat messages.</summary>
  22. public const byte Senders = 4;
  23. /// <summary>(5) Name of a the user who sent a chat message.</summary>
  24. public const byte Sender = 5;
  25. /// <summary>(6) Not used.</summary>
  26. public const byte ChannelUserCount = 6;
  27. /// <summary>(225) Name of user to send a (private) message to.</summary><remarks>The code is used in LoadBalancing and copied over here.</remarks>
  28. public const byte UserId = 225;
  29. /// <summary>(8) Id of a message.</summary>
  30. public const byte MsgId = 8;
  31. /// <summary>(9) Not used.</summary>
  32. public const byte MsgIds = 9;
  33. /// <summary>(221) Secret token to identify an authorized user.</summary><remarks>The code is used in LoadBalancing and copied over here.</remarks>
  34. public const byte Secret = 221;
  35. /// <summary>(15) Subscribe operation result parameter. A bool[] with result per channel.</summary>
  36. public const byte SubscribeResults = 15;
  37. /// <summary>(10) Status</summary>
  38. public const byte Status = 10;
  39. /// <summary>(11) Friends</summary>
  40. public const byte Friends = 11;
  41. /// <summary>(12) SkipMessage is used in SetOnlineStatus and if true, the message is not being broadcast.</summary>
  42. public const byte SkipMessage = 12;
  43. /// <summary>(14) Number of message to fetch from history. 0: no history. 1 and higher: number of messages in history. -1: all history.</summary>
  44. public const byte HistoryLength = 14;
  45. public const byte DebugMessage = 17;
  46. /// <summary>(21) WebFlags object for changing behaviour of webhooks from client.</summary>
  47. public const byte WebFlags = 21;
  48. /// <summary>(22) WellKnown or custom properties of channel or user.</summary>
  49. /// <remarks>
  50. /// In event <see cref="ChatEventCode.Subscribe"/> it's always channel properties,
  51. /// in event <see cref="ChatEventCode.UserSubscribed"/> it's always user properties,
  52. /// in event <see cref="ChatEventCode.PropertiesChanged"/> it's channel properties unless <see cref="UserId"/> parameter value is not null
  53. /// </remarks>
  54. public const byte Properties = 22;
  55. /// <summary>(23) Array of UserIds of users already subscribed to a channel.</summary>
  56. /// <remarks>Used in Subscribe event when PublishSubscribers is enabled.
  57. /// Does not include local user who just subscribed.
  58. /// Maximum length is (<see cref="ChatChannel.MaxSubscribers"/> - 1).</remarks>
  59. public const byte ChannelSubscribers = 23;
  60. /// <summary>(24) Optional data sent in ErrorInfo event from Chat WebHooks. </summary>
  61. public const byte DebugData = 24;
  62. /// <summary>(25) Code for values to be used for "Check And Swap" (CAS) when changing properties.</summary>
  63. public const byte ExpectedValues = 25;
  64. /// <summary>(26) Code for broadcast parameter of <see cref="ChatOperationCode.SetProperties"/> method.</summary>
  65. public const byte Broadcast = 26;
  66. /// <summary>
  67. /// WellKnown and custom user properties.
  68. /// </summary>
  69. /// <remarks>
  70. /// Used only in event <see cref="ChatEventCode.Subscribe"/>
  71. /// </remarks>
  72. public const byte UserProperties = 28;
  73. /// <summary>
  74. /// Generated unique reusable room id
  75. /// </summary>
  76. public const byte UniqueRoomId = 29;
  77. }
  78. }