dalienv.hpp 2.8 KB

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