environment.hpp 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175
  1. /*##############################################################################
  2. HPCC SYSTEMS software Copyright (C) 2012 HPCC Systems®.
  3. Licensed under the Apache License, Version 2.0 (the "License");
  4. you may not use this file except in compliance with the License.
  5. You may obtain a copy of the License at
  6. http://www.apache.org/licenses/LICENSE-2.0
  7. Unless required by applicable law or agreed to in writing, software
  8. distributed under the License is distributed on an "AS IS" BASIS,
  9. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  10. See the License for the specific language governing permissions and
  11. limitations under the License.
  12. ############################################################################## */
  13. // *** Include file generated by HIDL Version 1.3 from environment.scm ***
  14. // *** Not to be hand edited (changes will be lost on re-generation) ***
  15. #ifndef environment_SCM_INCL
  16. #define environment_SCM_INCL
  17. #include "jiface.hpp"
  18. #include "dasubs.hpp"
  19. #ifdef ENVIRONMENT_EXPORTS
  20. #define ENVIRONMENT_API DECL_EXPORT
  21. #else
  22. #define ENVIRONMENT_API DECL_IMPORT
  23. #endif
  24. interface IPropertyTree; // Not yet SCM-compliant
  25. interface IEnvironment; // Forward reference
  26. interface ISDSSubscription;// Forward reference
  27. interface IConstEnvBase : extends IInterface
  28. {
  29. virtual IStringVal & getXML(IStringVal & str) const = 0;
  30. virtual IStringVal & getName(IStringVal & str) const = 0;
  31. virtual IPropertyTree & getPTree() const = 0;
  32. };
  33. interface IConstDomainInfo : extends IConstEnvBase
  34. {
  35. virtual void getAccountInfo(IStringVal & name, IStringVal & pw) const = 0;
  36. virtual void getSnmpSecurityString(IStringVal & securityString) const = 0;
  37. virtual void getSSHAccountInfo(IStringVal & name, IStringVal & sshKeyFile, IStringVal& sshKeyPassphrase) const = 0;
  38. };
  39. enum EnvMachineState
  40. {
  41. MachineStateAvailable = 0,
  42. MachineStateUnavailable = 1,
  43. MachineStateUnknown = 2
  44. };
  45. enum EnvMachineOS
  46. {
  47. MachineOsW2K = 0,
  48. MachineOsSolaris = 1,
  49. MachineOsLinux = 2,
  50. MachineOsUnknown = 3,
  51. MachineOsSize = 4
  52. };
  53. interface IConstComputerTypeInfo : extends IConstEnvBase
  54. {
  55. virtual EnvMachineOS getOS() const = 0;
  56. virtual unsigned getNicSpeedMbitSec() const = 0;
  57. };
  58. interface IConstMachineInfo : extends IConstEnvBase
  59. {
  60. virtual IConstDomainInfo * getDomain() const = 0;
  61. virtual IStringVal & getNetAddress(IStringVal & str) const = 0;
  62. virtual unsigned getNicSpeedMbitSec() const = 0;
  63. virtual IStringVal & getDescription(IStringVal & str) const = 0;
  64. virtual EnvMachineOS getOS() const = 0;
  65. virtual EnvMachineState getState() const = 0;
  66. };
  67. interface IConstMachineInfoIterator : extends IIteratorOf<IConstMachineInfo>
  68. {
  69. virtual unsigned count() const = 0;
  70. };
  71. interface IConstInstanceInfo : extends IConstEnvBase
  72. {
  73. virtual IConstMachineInfo * getMachine() const = 0;
  74. virtual IStringVal & getEndPoint(IStringVal & str) const = 0;
  75. virtual unsigned getPort() const = 0;
  76. virtual IStringVal & getExecutableDirectory(IStringVal & str) const = 0;
  77. virtual bool getRunInfo(IStringVal & progpath, IStringVal & workdir, const char * defaultprogname) const = 0;
  78. };
  79. interface IConstDropZoneInfo : extends IConstEnvBase
  80. {
  81. virtual IStringVal & getComputerName(IStringVal & str) const = 0;
  82. virtual IStringVal & getDescription(IStringVal & str) const = 0;
  83. virtual IStringVal & getDirectory(IStringVal & str) const = 0;
  84. virtual IStringVal & getUMask(IStringVal & str) const = 0;
  85. virtual bool isECLWatchVisible() const = 0;
  86. };
  87. interface IConstDropZoneInfoIterator : extends IIteratorOf<IConstDropZoneInfo>
  88. {
  89. virtual unsigned count() const = 0;
  90. };
  91. interface IConstEnvironment : extends IConstEnvBase
  92. {
  93. virtual IConstDomainInfo * getDomain(const char * name) const = 0;
  94. virtual IConstMachineInfo * getMachine(const char * name) const = 0;
  95. virtual IConstMachineInfo * getMachineByAddress(const char * netaddress) const = 0;
  96. virtual IConstMachineInfo * getMachineForLocalHost() const = 0;
  97. virtual IConstDropZoneInfo * getDropZone(const char * name) const = 0;
  98. virtual IConstDropZoneInfo * getDropZoneByComputer(const char * computer) const = 0;
  99. virtual IConstInstanceInfo * getInstance(const char * type, const char * version, const char * domain) const = 0;
  100. virtual IConstComputerTypeInfo * getComputerType(const char * name) const = 0;
  101. virtual bool getRunInfo(IStringVal & path, IStringVal & dir, const char * type, const char * version, const char * machineaddr, const char * defaultprogname) const = 0;
  102. virtual IEnvironment & lock() const = 0;
  103. virtual bool isConstEnvironment() const = 0;
  104. virtual void clearCache() = 0;
  105. virtual IConstMachineInfoIterator * getMachineIterator() const = 0;
  106. virtual IConstDropZoneInfo * getDropZoneByComputer(const char * computer, const char * dzname) const = 0;
  107. virtual IConstDropZoneInfoIterator * getDropZoneIteratorByComputer(const char * computer) const = 0;
  108. // returns a drop zone that is defined on IP with the shortest path that's a parent of targetPath
  109. virtual IConstDropZoneInfo * getDropZoneByAddressPath(const char * netaddress, const char *targetPath) const = 0;
  110. virtual IConstDropZoneInfoIterator * getDropZoneIterator() const = 0;
  111. };
  112. interface IEnvironment : extends IConstEnvironment
  113. {
  114. virtual void commit() = 0;
  115. virtual void rollback() = 0;
  116. virtual void setXML(const char * (null)) = 0;
  117. virtual void preload() = 0;
  118. };
  119. interface IEnvironmentFactory : extends IInterface
  120. {
  121. virtual IConstEnvironment * openEnvironment() = 0;
  122. virtual IEnvironment * updateEnvironment() = 0;
  123. virtual IEnvironment * loadLocalEnvironmentFile(const char * filename) = 0;
  124. virtual IEnvironment * loadLocalEnvironment(const char * xml) = 0;
  125. virtual SubscriptionId subscribe(ISDSSubscription * pSubHandler) = 0;
  126. virtual void unsubscribe(SubscriptionId id) = 0;
  127. virtual void validateCache() = 0;
  128. };
  129. class StringBuffer;
  130. extern "C" ENVIRONMENT_API IEnvironmentFactory * getEnvironmentFactory();
  131. extern "C" ENVIRONMENT_API void closeEnvironment();
  132. #endif // _environment_SCM_INCL
  133. //end