MethodResponseServerInfo.cs 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132
  1. /* This file is part of OpenSubtitles Handler
  2. A library that handle OpenSubtitles.org XML-RPC methods.
  3. Copyright © Ala Ibrahim Hadid 2013
  4. This program is free software: you can redistribute it and/or modify
  5. it under the terms of the GNU General Public License as published by
  6. the Free Software Foundation, either version 3 of the License, or
  7. (at your option) any later version.
  8. This program is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. GNU General Public License for more details.
  12. You should have received a copy of the GNU General Public License
  13. along with this program. If not, see <http://www.gnu.org/licenses/>.
  14. */
  15. using System.Collections.Generic;
  16. using System.ComponentModel;
  17. namespace OpenSubtitlesHandler
  18. {
  19. [MethodResponseDescription("ServerInfo method response",
  20. "ServerInfo method response hold all expected values from server.")]
  21. public class MethodResponseServerInfo : IMethodResponse
  22. {
  23. public MethodResponseServerInfo()
  24. : base()
  25. { }
  26. public MethodResponseServerInfo(string name, string message)
  27. : base(name, message)
  28. { }
  29. private string _xmlrpc_version;
  30. private string _xmlrpc_url;
  31. private string _application;
  32. private string _contact;
  33. private string _website_url;
  34. private int _users_online_total;
  35. private int _users_online_program;
  36. private int _users_loggedin;
  37. private string _users_max_alltime;
  38. private string _users_registered;
  39. private string _subs_downloads;
  40. private string _subs_subtitle_files;
  41. private string _movies_total;
  42. private string _movies_aka;
  43. private string _total_subtitles_languages;
  44. private List<string> _last_update_strings = new List<string>();
  45. /// <summary>
  46. /// Version of server's XML-RPC API implementation
  47. /// </summary>
  48. [Description("Version of server's XML-RPC API implementation"), Category("OS")]
  49. public string xmlrpc_version { get { return _xmlrpc_version; } set { _xmlrpc_version = value; } }
  50. /// <summary>
  51. /// XML-RPC interface URL
  52. /// </summary>
  53. [Description("XML-RPC interface URL"), Category("OS")]
  54. public string xmlrpc_url { get { return _xmlrpc_url; } set { _xmlrpc_url = value; } }
  55. /// <summary>
  56. /// Server's application name and version
  57. /// </summary>
  58. [Description("Server's application name and version"), Category("OS")]
  59. public string application { get { return _application; } set { _application = value; } }
  60. /// <summary>
  61. /// Contact e-mail address for server related quuestions and problems
  62. /// </summary>
  63. [Description("Contact e-mail address for server related quuestions and problems"), Category("OS")]
  64. public string contact { get { return _contact; } set { _contact = value; } }
  65. /// <summary>
  66. /// Main server URL
  67. /// </summary>
  68. [Description("Main server URL"), Category("OS")]
  69. public string website_url { get { return _website_url; } set { _website_url = value; } }
  70. /// <summary>
  71. /// Number of users currently online
  72. /// </summary>
  73. [Description("Number of users currently online"), Category("OS")]
  74. public int users_online_total { get { return _users_online_total; } set { _users_online_total = value; } }
  75. /// <summary>
  76. /// Number of users currently online using a client application (XML-RPC API)
  77. /// </summary>
  78. [Description("Number of users currently online using a client application (XML-RPC API)"), Category("OS")]
  79. public int users_online_program { get { return _users_online_program; } set { _users_online_program = value; } }
  80. /// <summary>
  81. /// Number of currently logged-in users
  82. /// </summary>
  83. [Description("Number of currently logged-in users"), Category("OS")]
  84. public int users_loggedin { get { return _users_loggedin; } set { _users_loggedin = value; } }
  85. /// <summary>
  86. /// Maximum number of users throughout the history
  87. /// </summary>
  88. [Description("Maximum number of users throughout the history"), Category("OS")]
  89. public string users_max_alltime { get { return _users_max_alltime; } set { _users_max_alltime = value; } }
  90. /// <summary>
  91. /// Number of registered users
  92. /// </summary>
  93. [Description("Number of registered users"), Category("OS")]
  94. public string users_registered { get { return _users_registered; } set { _users_registered = value; } }
  95. /// <summary>
  96. /// Total number of subtitle downloads
  97. /// </summary>
  98. [Description("Total number of subtitle downloads"), Category("OS")]
  99. public string subs_downloads { get { return _subs_downloads; } set { _subs_downloads = value; } }
  100. /// <summary>
  101. /// Total number of subtitle files stored on the server
  102. /// </summary>
  103. [Description("Total number of subtitle files stored on the server"), Category("OS")]
  104. public string subs_subtitle_files { get { return _subs_subtitle_files; } set { _subs_subtitle_files = value; } }
  105. /// <summary>
  106. /// Total number of movies in the database
  107. /// </summary>
  108. [Description("Total number of movies in the database"), Category("OS")]
  109. public string movies_total { get { return _movies_total; } set { _movies_total = value; } }
  110. /// <summary>
  111. /// Total number of movie A.K.A. titles in the database
  112. /// </summary>
  113. [Description("Total number of movie A.K.A. titles in the database"), Category("OS")]
  114. public string movies_aka { get { return _movies_aka; } set { _movies_aka = value; } }
  115. /// <summary>
  116. /// Total number of subtitle languages supported
  117. /// </summary>
  118. [Description("Total number of subtitle languages supported"), Category("OS")]
  119. public string total_subtitles_languages { get { return _total_subtitles_languages; } set { _total_subtitles_languages = value; } }
  120. /// <summary>
  121. /// Structure containing information about last updates of translations.
  122. /// </summary>
  123. [Description("Structure containing information about last updates of translations"), Category("OS")]
  124. public List<string> last_update_strings { get { return _last_update_strings; } set { _last_update_strings = value; } }
  125. }
  126. }