dalienv.hpp 3.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  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. #ifndef DALIENV_HPP
  14. #define DALIENV_HPP
  15. #ifdef _WIN32
  16. #ifdef ENVIRONMENT_EXPORTS
  17. #define ENVIRONMENT_API __declspec(dllexport)
  18. #else
  19. #define ENVIRONMENT_API __declspec(dllimport)
  20. #endif
  21. #else
  22. #define ENVIRONMENT_API
  23. #endif
  24. #include "environment.hpp"
  25. interface IFile;
  26. class RemoteFilename;
  27. extern ENVIRONMENT_API EnvMachineOS queryOS(const IpAddress & ip);
  28. extern "C" ENVIRONMENT_API void __stdcall setPasswordsFromSDS();
  29. extern "C" ENVIRONMENT_API void __stdcall resetPasswordsFromSDS();
  30. extern "C" ENVIRONMENT_API void __stdcall clearPasswordsFromSDS();
  31. extern ENVIRONMENT_API bool canAccessFilesDirectly(const RemoteFilename & file);
  32. extern ENVIRONMENT_API bool canAccessFilesDirectly(const IpAddress & ip);
  33. extern ENVIRONMENT_API bool canAccessFilesDirectly(const char * ipText);
  34. extern ENVIRONMENT_API const char * querySlaveExecutable(const char * keyName, const char * exeName, const char * version, const IpAddress &ip, StringBuffer &progpath, StringBuffer &workdir);
  35. extern ENVIRONMENT_API void setCanAccessDirectly(RemoteFilename & file);
  36. extern ENVIRONMENT_API bool canSpawnChildProcess(const IpAddress & ip);
  37. extern ENVIRONMENT_API bool getRemoteRunInfo(const char * keyName, const char * exeName, const char * version, const IpAddress &ip, StringBuffer &progpath, StringBuffer &workdir,INode *remotedali, unsigned timeout);
  38. extern ENVIRONMENT_API bool envGetConfigurationDirectory(const char *category, const char *component,const char *instance, StringBuffer &dirout);
  39. extern ENVIRONMENT_API IPropertyTree *envGetNASConfiguration(); // return NAS config from environment
  40. extern ENVIRONMENT_API IPropertyTree *envGetNASConfiguration(IPropertyTree *source);
  41. // These methods filter the NAS hooks based on the callers IP, unless 'myEp' is supplied.
  42. extern ENVIRONMENT_API void envInstallNASHooks(SocketEndpoint *myEp=NULL); // gets NAS config and sets up NAS hooks from it
  43. extern ENVIRONMENT_API void envInstallNASHooks(IPropertyTree *nasPTree, SocketEndpoint *myEp=NULL); // Sets NAS hooks from user-supplied info
  44. // like envInstallNASHooks but also returns which filters were installed
  45. extern ENVIRONMENT_API IPropertyTree *envGetInstallNASHooks(SocketEndpoint *myEp=NULL);
  46. extern ENVIRONMENT_API IPropertyTree *envGetInstallNASHooks(IPropertyTree *nasPTree, SocketEndpoint *myEp=NULL);
  47. #endif