ESL.py 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177
  1. # This file was automatically generated by SWIG (https://www.swig.org).
  2. # Version 4.2.1
  3. #
  4. # Do not make changes to this file unless you know what you are doing - modify
  5. # the SWIG interface file instead.
  6. from sys import version_info as _swig_python_version_info
  7. # Import the low-level C/C++ module
  8. if __package__ or "." in __name__:
  9. from . import _ESL
  10. else:
  11. import _ESL
  12. try:
  13. import builtins as __builtin__
  14. except ImportError:
  15. import __builtin__
  16. def _swig_repr(self):
  17. try:
  18. strthis = "proxy of " + self.this.__repr__()
  19. except __builtin__.Exception:
  20. strthis = ""
  21. return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,)
  22. def _swig_setattr_nondynamic_instance_variable(set):
  23. def set_instance_attr(self, name, value):
  24. if name == "this":
  25. set(self, name, value)
  26. elif name == "thisown":
  27. self.this.own(value)
  28. elif hasattr(self, name) and isinstance(getattr(type(self), name), property):
  29. set(self, name, value)
  30. else:
  31. raise AttributeError("You cannot add instance attributes to %s" % self)
  32. return set_instance_attr
  33. def _swig_setattr_nondynamic_class_variable(set):
  34. def set_class_attr(cls, name, value):
  35. if hasattr(cls, name) and not isinstance(getattr(cls, name), property):
  36. set(cls, name, value)
  37. else:
  38. raise AttributeError("You cannot add class attributes to %s" % cls)
  39. return set_class_attr
  40. def _swig_add_metaclass(metaclass):
  41. """Class decorator for adding a metaclass to a SWIG wrapped class - a slimmed down version of six.add_metaclass"""
  42. def wrapper(cls):
  43. return metaclass(cls.__name__, cls.__bases__, cls.__dict__.copy())
  44. return wrapper
  45. class _SwigNonDynamicMeta(type):
  46. """Meta class to enforce nondynamic attributes (no new attributes) for a class"""
  47. __setattr__ = _swig_setattr_nondynamic_class_variable(type.__setattr__)
  48. class ESLevent(object):
  49. thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
  50. __repr__ = _swig_repr
  51. event = property(_ESL.ESLevent_event_get, _ESL.ESLevent_event_set)
  52. serialized_string = property(_ESL.ESLevent_serialized_string_get, _ESL.ESLevent_serialized_string_set)
  53. mine = property(_ESL.ESLevent_mine_get, _ESL.ESLevent_mine_set)
  54. def __init__(self, *args):
  55. _ESL.ESLevent_swiginit(self, _ESL.new_ESLevent(*args))
  56. __swig_destroy__ = _ESL.delete_ESLevent
  57. def serialize(self, format=None):
  58. return _ESL.ESLevent_serialize(self, format)
  59. def setPriority(self, *args):
  60. return _ESL.ESLevent_setPriority(self, *args)
  61. def getHeader(self, header_name, idx=-1):
  62. return _ESL.ESLevent_getHeader(self, header_name, idx)
  63. def getBody(self):
  64. return _ESL.ESLevent_getBody(self)
  65. def getType(self):
  66. return _ESL.ESLevent_getType(self)
  67. def addBody(self, value):
  68. return _ESL.ESLevent_addBody(self, value)
  69. def addHeader(self, header_name, value):
  70. return _ESL.ESLevent_addHeader(self, header_name, value)
  71. def pushHeader(self, header_name, value):
  72. return _ESL.ESLevent_pushHeader(self, header_name, value)
  73. def unshiftHeader(self, header_name, value):
  74. return _ESL.ESLevent_unshiftHeader(self, header_name, value)
  75. def delHeader(self, header_name):
  76. return _ESL.ESLevent_delHeader(self, header_name)
  77. def firstHeader(self):
  78. return _ESL.ESLevent_firstHeader(self)
  79. def nextHeader(self):
  80. return _ESL.ESLevent_nextHeader(self)
  81. # Register ESLevent in _ESL:
  82. _ESL.ESLevent_swigregister(ESLevent)
  83. class ESLconnection(object):
  84. thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
  85. __repr__ = _swig_repr
  86. def __init__(self, *args):
  87. _ESL.ESLconnection_swiginit(self, _ESL.new_ESLconnection(*args))
  88. __swig_destroy__ = _ESL.delete_ESLconnection
  89. def socketDescriptor(self):
  90. return _ESL.ESLconnection_socketDescriptor(self)
  91. def connected(self):
  92. return _ESL.ESLconnection_connected(self)
  93. def getInfo(self):
  94. return _ESL.ESLconnection_getInfo(self)
  95. def send(self, cmd):
  96. return _ESL.ESLconnection_send(self, cmd)
  97. def sendRecv(self, cmd):
  98. return _ESL.ESLconnection_sendRecv(self, cmd)
  99. def api(self, cmd, arg=None):
  100. return _ESL.ESLconnection_api(self, cmd, arg)
  101. def bgapi(self, cmd, arg=None, job_uuid=None):
  102. return _ESL.ESLconnection_bgapi(self, cmd, arg, job_uuid)
  103. def sendEvent(self, send_me):
  104. return _ESL.ESLconnection_sendEvent(self, send_me)
  105. def sendMSG(self, send_me, uuid=None):
  106. return _ESL.ESLconnection_sendMSG(self, send_me, uuid)
  107. def recvEvent(self):
  108. return _ESL.ESLconnection_recvEvent(self)
  109. def recvEventTimed(self, ms):
  110. return _ESL.ESLconnection_recvEventTimed(self, ms)
  111. def filter(self, header, value):
  112. return _ESL.ESLconnection_filter(self, header, value)
  113. def events(self, etype, value):
  114. return _ESL.ESLconnection_events(self, etype, value)
  115. def execute(self, app, arg=None, uuid=None):
  116. return _ESL.ESLconnection_execute(self, app, arg, uuid)
  117. def executeAsync(self, app, arg=None, uuid=None):
  118. return _ESL.ESLconnection_executeAsync(self, app, arg, uuid)
  119. def setAsyncExecute(self, val):
  120. return _ESL.ESLconnection_setAsyncExecute(self, val)
  121. def setEventLock(self, val):
  122. return _ESL.ESLconnection_setEventLock(self, val)
  123. def disconnect(self):
  124. return _ESL.ESLconnection_disconnect(self)
  125. # Register ESLconnection in _ESL:
  126. _ESL.ESLconnection_swigregister(ESLconnection)
  127. def eslSetLogLevel(level):
  128. return _ESL.eslSetLogLevel(level)