ConfiguratorAPI.hpp 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. /*##############################################################################
  2. HPCC SYSTEMS software Copyright (C) 2015 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 _CONFIGURATOR_API_HPP_
  14. #define _CONFIGURATOR_API_HPP_
  15. #define MAX_ARRAY_X 100
  16. #define MAX_ARRAY_Y 128
  17. const char* getTableDataModelName(int index);
  18. void deleteTableModels();
  19. namespace CONFIGURATOR_API
  20. {
  21. //#ifdef CONFIGURATOR_LIB
  22. extern "C" int initialize();
  23. //#endif // CONFIGURATOR_LIB
  24. extern "C" int getNumberOfAvailableComponents();
  25. extern "C" int getNumberOfAvailableServices();
  26. extern "C" const char* getServiceName(int idx, char *pName = 0);
  27. extern "C" const char* getComponentName(int idx, char *pName = 0);
  28. extern "C" int getValue(const char *pXPath, char *pValue);
  29. extern "C" bool setValue(const char *pXPath, const char *pValue);
  30. extern "C" int getIndex(const char *pXPath);
  31. extern "C" void setIndex(const char *pXPath, int newIndex);
  32. extern "C" const char* getTableValue(const char *pXPath, int nRow);
  33. extern "C" void setTableValue(const char *pXPath, int index, const char *pValue);
  34. extern "C" int getNumberOfUniqueColumns();
  35. extern "C" const char* getColumnName(int idx);
  36. extern "C" int getNumberOfRows(const char* pXPath);
  37. extern "C" int getNumberOfTables();
  38. extern "C" int openConfigurationFile(const char* pFile);
  39. extern "C" int getNumberOfComponentsInConfiguration(void *pData);
  40. extern "C" void* getComponentInConfiguration(int idx);
  41. extern "C" void* getComponentInstance(int idx, void *pData);
  42. extern "C" const void* getPointerToComponentTypeInConfiguration(void *pData);
  43. extern "C" const char* getComponentNameInConfiguration(int idx, void *pData);
  44. extern "C" const void* getPointerToComponentInConfiguration(int idx, void *pData, int compIdx = -1);
  45. extern "C" const void* getPointerToComponents();
  46. extern "C" int getIndexOfParent(void *pData);
  47. extern "C" int getNumberOfChildren(void *pData);
  48. extern "C" const char* getData(void *pData);
  49. extern "C" const char* getName(void *pData);
  50. extern "C" const char* getFileName(void *pData);
  51. extern "C" void* getParent(void *pData);
  52. extern "C" void* getChild(void *pData, int idx);
  53. extern "C" int getIndexFromParent(void *pData);
  54. extern "C" void* getRootNode(int idx = 0);
  55. extern "C" void* getModel();
  56. extern "C" void reload(const char *pFile);
  57. extern "C" void getJSON(void *pData, char **pOutput, int nIdx);
  58. extern "C" void getNavigatorJSON(char **pOutput);
  59. extern "C" void getJSONByComponentName(const char *pComponentName, char **pOutput, int nIdx);
  60. extern "C" void getJSONByComponentKey(const char *pKey, char **pOutput);
  61. extern "C" void getDocBookByIndex(int idx, char **pOutput);
  62. extern "C" bool saveConfigurationFile();
  63. extern "C" bool saveConfigurationFileAs(const char *pFilePath);
  64. extern "C" int getNumberOfNotificationTypes();
  65. extern "C" const char* getNotificationTypeName(int type);
  66. extern "C" int getNumberOfNotifications(int type);
  67. extern "C" const char* getNotification(int type, int idx);
  68. }
  69. #endif // _CONFIGURATOR_API_HPP_