PageRenderTime 35ms CodeModel.GetById 16ms RepoModel.GetById 0ms app.codeStats 0ms

/sipsorcery-core/SIPSorcery.Web.Services/Provisioning/IProvisioningServiceREST.cs

https://github.com/thecc4re/sipsorcery-mono
C# | 87 lines | 67 code | 20 blank | 0 comment | 0 complexity | 0f0de6f4689ef66ae1a40d1cefe8353b MD5 | raw file
Possible License(s): CC-BY-SA-3.0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.ServiceModel;
  5. using System.ServiceModel.Web;
  6. using System.Text;
  7. using SIPSorcery.CRM;
  8. using SIPSorcery.SIP.App;
  9. namespace SIPSorcery.Web.Services {
  10. [ServiceContract(Namespace = "http://www.sipsorcery.com/provisioning/rest")]
  11. public interface IProvisioningServiceREST {
  12. [OperationContract]
  13. [WebGet(UriTemplate = "isalive")]
  14. bool IsAlive();
  15. [OperationContract]
  16. [WebGet(UriTemplate = "customer/login?username={username}&password={password}", ResponseFormat=WebMessageFormat.Json)]
  17. string Login(string username, string password);
  18. [OperationContract]
  19. [WebGet(UriTemplate = "customer/logout")]
  20. void Logout();
  21. [OperationContract]
  22. [WebGet(UriTemplate = "sipdomains?where={whereExpression}&offset={offset}&count={count}")]
  23. List<SIPDomain> GetSIPDomains(string whereExpression, int offset, int count);
  24. [OperationContract]
  25. [WebGet(UriTemplate = "sipaccounts/count?where={whereexpression}")]
  26. int GetSIPAccountsCount(string whereExpression);
  27. [OperationContract]
  28. [WebGet(UriTemplate = "sipaccounts?where={whereexpression}&offset={offset}&count={count}", ResponseFormat = WebMessageFormat.Json)]
  29. List<SIPAccount> GetSIPAccounts(string whereExpression, int offset, int count);
  30. [OperationContract]
  31. [WebGet(UriTemplate = "getsipregistrarbindingscount?whereexpression={whereexpression}")]
  32. int GetSIPRegistrarBindingsCount(string whereExpression);
  33. [OperationContract]
  34. [WebGet(UriTemplate = "getsipregistrarbindings?whereexpression={whereexpression}&offset={offset}&count={count}")]
  35. List<SIPRegistrarBinding> GetSIPRegistrarBindings(string whereExpression, int offset, int count);
  36. [OperationContract]
  37. [WebGet(UriTemplate = "getsipproviderscount?whereexpression={whereexpression}")]
  38. int GetSIPProvidersCount(string whereExpression);
  39. [OperationContract]
  40. [WebGet(UriTemplate = "getsipproviders?whereexpression={whereexpression}&offset={offset}&count={count}")]
  41. List<SIPProvider> GetSIPProviders(string whereExpression, int offset, int count);
  42. [OperationContract]
  43. [WebGet(UriTemplate = "getsipproviderbindingscount?whereexpression={whereexpression}")]
  44. int GetSIPProviderBindingsCount(string whereExpression);
  45. [OperationContract]
  46. [WebGet(UriTemplate = "getsipproviderbindings?whereexpression={whereexpression}&offset={offset}&count={count}")]
  47. List<SIPProviderBinding> GetSIPProviderBindings(string whereExpression, int offset, int count);
  48. [OperationContract]
  49. [WebGet(UriTemplate = "getdialplanscount?whereexpression={whereexpression}")]
  50. int GetDialPlansCount(string whereExpression);
  51. [OperationContract]
  52. [WebGet(UriTemplate = "getdialplans?whereexpression={whereexpression}&offset={offset}&count={count}")]
  53. List<SIPDialPlan> GetDialPlans(string whereExpression, int offset, int count);
  54. [OperationContract]
  55. [WebGet(UriTemplate = "getcallscount?whereexpression={whereexpression}")]
  56. int GetCallsCount(string whereExpression);
  57. [OperationContract]
  58. [WebGet(UriTemplate = "getcalls?whereexpression={whereexpression}&offset={offset}&count={count}")]
  59. List<SIPDialogueAsset> GetCalls(string whereExpression, int offset, int count);
  60. [OperationContract]
  61. [WebGet(UriTemplate = "getcdrscount?whereexpression={whereexpression}")]
  62. int GetCDRsCount(string whereExpression);
  63. [OperationContract]
  64. [WebGet(UriTemplate = "getcdrs?whereexpression={whereexpression}&offset={offset}&count={count}")]
  65. List<SIPCDRAsset> GetCDRs(string whereExpression, int offset, int count);
  66. }
  67. }