MT5APIConfigCommon.h 3.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. //+------------------------------------------------------------------+
  2. //| MetaTrader 5 API |
  3. //| Copyright 2000-2019, MetaQuotes Software Corp. |
  4. //| http://www.metaquotes.net |
  5. //+------------------------------------------------------------------+
  6. #pragma once
  7. //+------------------------------------------------------------------+
  8. //| Common MetaTrader 5 Platform config |
  9. //+------------------------------------------------------------------+
  10. class IMTConCommon
  11. {
  12. public:
  13. //--- LiveUpdate modes
  14. enum EnUpdateMode
  15. {
  16. UPDATE_DISABLE =0, // disable LiveUpdate
  17. UPDATE_ENABLE =1, // enable LiveUpdate
  18. UPDATE_ENABLE_BETA=2, // enable LiveUpdate, including beta releases
  19. //--- enumeration borders
  20. UPDATE_FIRST =UPDATE_DISABLE,
  21. UPDATE_LAST =UPDATE_ENABLE_BETA
  22. };
  23. //--- common methods
  24. virtual void Release(void)=0;
  25. virtual MTAPIRES Assign(const IMTConCommon* param)=0;
  26. virtual MTAPIRES Clear(void)=0;
  27. //--- server name
  28. virtual LPCWSTR Name(void) const=0;
  29. virtual MTAPIRES Name(LPCWSTR name)=0;
  30. //--- server full name
  31. virtual LPCWSTR NameFull(void) const=0;
  32. //--- owner full name (from license)
  33. virtual LPCWSTR Owner(void) const=0;
  34. //--- owner short name (from license)
  35. virtual LPCWSTR OwnerID(void) const=0;
  36. //--- owner host (from license)
  37. virtual LPCWSTR OwnerHost(void) const=0;
  38. //--- owner email (from license)
  39. virtual LPCWSTR OwnerEmail(void) const=0;
  40. //--- product full name (from license)
  41. virtual LPCWSTR Product(void) const=0;
  42. //--- license expiration date
  43. virtual INT64 ExpirationLicense(void) const=0;
  44. //--- license support date
  45. virtual INT64 ExpirationSupport(void) const=0;
  46. //--- max. trade servers count (from license)
  47. virtual UINT LimitTradeServers(void) const=0;
  48. //--- max. web servers count (from license)
  49. virtual UINT LimitWebServers(void) const=0;
  50. //--- max. real accounts count (from license)
  51. virtual UINT LimitAccounts(void) const=0;
  52. //--- max. trade deals count (from license)
  53. virtual UINT LimitDeals(void) const=0;
  54. //--- max. client groups count (from license)
  55. virtual UINT LimitGroups(void) const=0;
  56. //--- LiveUpdate mode
  57. virtual UINT LiveUpdateMode(void) const=0;
  58. virtual MTAPIRES LiveUpdateMode(const UINT mode)=0;
  59. //--- Total users
  60. virtual UINT TotalUsers(void) const=0;
  61. //--- Total real users
  62. virtual UINT TotalUsersReal(void) const=0;
  63. //--- Total deals
  64. virtual UINT TotalDeals(void) const=0;
  65. //--- Total orders
  66. virtual UINT TotalOrders(void) const=0;
  67. //--- Total history orders
  68. virtual UINT TotalOrdersHistory(void) const=0;
  69. //--- Total positions
  70. virtual UINT TotalPositions(void) const=0;
  71. //--- max. symbols count (from license)
  72. virtual UINT LimitSymbols(void) const=0;
  73. //--- Account Allocation URL
  74. virtual LPCWSTR AccountURL(void) const=0;
  75. virtual MTAPIRES AccountURL(LPCWSTR url)=0;
  76. //--- Account Deposit URL
  77. virtual LPCWSTR AccountDepositURL(void) const=0;
  78. virtual MTAPIRES AccountDepositURL(LPCWSTR url)=0;
  79. //--- Account Withdrawal URL
  80. virtual LPCWSTR AccountWithdrawalURL(void) const=0;
  81. virtual MTAPIRES AccountWithdrawalURL(LPCWSTR url)=0;
  82. };
  83. //+------------------------------------------------------------------+
  84. //| Common config events notification interface |
  85. //+------------------------------------------------------------------+
  86. class IMTConCommonSink
  87. {
  88. public:
  89. virtual void OnCommonUpdate(const IMTConCommon* /*config*/) { }
  90. virtual void OnCommonSync(void) { }
  91. };
  92. //+------------------------------------------------------------------+