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