MethodResponseServerInfo.cs 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131
  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. namespace OpenSubtitlesHandler
  17. {
  18. [MethodResponseDescription("ServerInfo method response",
  19. "ServerInfo method response hold all expected values from server.")]
  20. public class MethodResponseServerInfo : IMethodResponse
  21. {
  22. public MethodResponseServerInfo()
  23. : base()
  24. { }
  25. public MethodResponseServerInfo(string name, string message)
  26. : base(name, message)
  27. { }
  28. private string _xmlrpc_version;
  29. private string _xmlrpc_url;
  30. private string _application;
  31. private string _contact;
  32. private string _website_url;
  33. private int _users_online_total;
  34. private int _users_online_program;
  35. private int _users_loggedin;
  36. private string _users_max_alltime;
  37. private string _users_registered;
  38. private string _subs_downloads;
  39. private string _subs_subtitle_files;
  40. private string _movies_total;
  41. private string _movies_aka;
  42. private string _total_subtitles_languages;
  43. private List<string> _last_update_strings = new List<string>();
  44. /// <summary>
  45. /// Version of server's XML-RPC API implementation
  46. /// </summary>
  47. [Description("Version of server's XML-RPC API implementation"), Category("OS")]
  48. public string xmlrpc_version { get { return _xmlrpc_version; } set { _xmlrpc_version = value; } }
  49. /// <summary>
  50. /// XML-RPC interface URL
  51. /// </summary>
  52. [Description("XML-RPC interface URL"), Category("OS")]
  53. public string xmlrpc_url { get { return _xmlrpc_url; } set { _xmlrpc_url = value; } }
  54. /// <summary>
  55. /// Server's application name and version
  56. /// </summary>
  57. [Description("Server's application name and version"), Category("OS")]
  58. public string application { get { return _application; } set { _application = value; } }
  59. /// <summary>
  60. /// Contact e-mail address for server related quuestions and problems
  61. /// </summary>
  62. [Description("Contact e-mail address for server related quuestions and problems"), Category("OS")]
  63. public string contact { get { return _contact; } set { _contact = value; } }
  64. /// <summary>
  65. /// Main server URL
  66. /// </summary>
  67. [Description("Main server URL"), Category("OS")]
  68. public string website_url { get { return _website_url; } set { _website_url = value; } }
  69. /// <summary>
  70. /// Number of users currently online
  71. /// </summary>
  72. [Description("Number of users currently online"), Category("OS")]
  73. public int users_online_total { get { return _users_online_total; } set { _users_online_total = value; } }
  74. /// <summary>
  75. /// Number of users currently online using a client application (XML-RPC API)
  76. /// </summary>
  77. [Description("Number of users currently online using a client application (XML-RPC API)"), Category("OS")]
  78. public int users_online_program { get { return _users_online_program; } set { _users_online_program = value; } }
  79. /// <summary>
  80. /// Number of currently logged-in users
  81. /// </summary>
  82. [Description("Number of currently logged-in users"), Category("OS")]
  83. public int users_loggedin { get { return _users_loggedin; } set { _users_loggedin = value; } }
  84. /// <summary>
  85. /// Maximum number of users throughout the history
  86. /// </summary>
  87. [Description("Maximum number of users throughout the history"), Category("OS")]
  88. public string users_max_alltime { get { return _users_max_alltime; } set { _users_max_alltime = value; } }
  89. /// <summary>
  90. /// Number of registered users
  91. /// </summary>
  92. [Description("Number of registered users"), Category("OS")]
  93. public string users_registered { get { return _users_registered; } set { _users_registered = value; } }
  94. /// <summary>
  95. /// Total number of subtitle downloads
  96. /// </summary>
  97. [Description("Total number of subtitle downloads"), Category("OS")]
  98. public string subs_downloads { get { return _subs_downloads; } set { _subs_downloads = value; } }
  99. /// <summary>
  100. /// Total number of subtitle files stored on the server
  101. /// </summary>
  102. [Description("Total number of subtitle files stored on the server"), Category("OS")]
  103. public string subs_subtitle_files { get { return _subs_subtitle_files; } set { _subs_subtitle_files = value; } }
  104. /// <summary>
  105. /// Total number of movies in the database
  106. /// </summary>
  107. [Description("Total number of movies in the database"), Category("OS")]
  108. public string movies_total { get { return _movies_total; } set { _movies_total = value; } }
  109. /// <summary>
  110. /// Total number of movie A.K.A. titles in the database
  111. /// </summary>
  112. [Description("Total number of movie A.K.A. titles in the database"), Category("OS")]
  113. public string movies_aka { get { return _movies_aka; } set { _movies_aka = value; } }
  114. /// <summary>
  115. /// Total number of subtitle languages supported
  116. /// </summary>
  117. [Description("Total number of subtitle languages supported"), Category("OS")]
  118. public string total_subtitles_languages { get { return _total_subtitles_languages; } set { _total_subtitles_languages = value; } }
  119. /// <summary>
  120. /// Structure containing information about last updates of translations.
  121. /// </summary>
  122. [Description("Structure containing information about last updates of translations"), Category("OS")]
  123. public List<string> last_update_strings { get { return _last_update_strings; } set { _last_update_strings = value; } }
  124. }
  125. }