mplog.hpp 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  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. // Documentation for this file can be found at http://mgweb.mg.seisint.com/WebHelp/mp/html/mplog_hpp.html
  14. #ifndef MPLOG_HPP
  15. #define MPLOG_HPP
  16. #ifndef mp_decl
  17. #define mp_decl DECL_IMPORT
  18. #endif
  19. #include "jlog.hpp"
  20. #include "mpbase.hpp"
  21. // PARENT-SIDE HELPER FUNCTIONS
  22. extern mp_decl bool connectLogMsgManagerToChild(INode * childNode);
  23. extern mp_decl bool connectLogMsgManagerToChildOwn(INode * childNode);
  24. extern mp_decl bool disconnectLogMsgManagerFromChild(INode * childNode);
  25. extern mp_decl bool disconnectLogMsgManagerFromChildOwn(INode * childNode);
  26. extern mp_decl void startLogMsgChildReceiver();
  27. // CHILD-SIDE HELPER FUNCTIONS
  28. extern mp_decl bool connectLogMsgManagerToParent(INode * parentNode);
  29. extern mp_decl bool connectLogMsgManagerToParentOwn(INode * parentNode);
  30. extern mp_decl bool disconnectLogMsgManagerFromParent(INode * parentNode);
  31. extern mp_decl bool disconnectLogMsgManagerFromParentOwn(INode * parentNode);
  32. extern mp_decl void startLogMsgParentReceiver();
  33. extern mp_decl void stopLogMsgReceivers();
  34. /*
  35. Order of operations on start-up and shut-down:
  36. startMPServer(port);
  37. startLogMsgChildReceiver(); (if manager will have children)
  38. startLogMsgParentReceiver(); (if manager will have parents)
  39. ...
  40. stopMPServer();
  41. */
  42. // LISTENER HELPER FUNCTIONS
  43. extern mp_decl ILogMsgListener * startLogMsgListener();
  44. extern mp_decl void stopLogMsgListener();
  45. extern mp_decl bool connectLogMsgListenerToChild(INode * childNode);
  46. extern mp_decl bool connectLogMsgListenerToChildOwn(INode * childNode);
  47. extern mp_decl bool disconnectLogMsgListenerFromChild(INode * childNode);
  48. extern mp_decl bool disconnectLogMsgListenerFromChildOwn(INode * childNode);
  49. #endif