MCPcopy Create free account
hub / github.com/OpenVPN/openvpn3-linux / SessionManagerEvent

Class SessionManagerEvent

src/python/openvpn3/SessionManager.py:479–507  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

477# all information about the event
478#
479class SessionManagerEvent(object):
480 def __init__(self, path, type, owner):
481 self.__path = path
482 self.__type = SessionManagerEventType(type)
483 self.__owner = owner
484
485 def GetPath(self):
486 return self.__path
487
488 def GetType(self):
489 return self.__type
490
491 def GetOwner(self):
492 return self.__owner
493
494 def __repr__(self):
495 return '<SessionManagerEvent type="%s", path="%s", owner_uid=%i>' % (
496 self.__type.name, str(self.__path), self.__owner)
497
498 def __str__(self):
499 return '[SESSION] %s: %s (owner: %i)' % (
500 self.__type.name, str(self.__path), self.__owner)
501
502 def __eq__(self, other):
503 if isinstance(other, SessionManagerEventType):
504 return other == self.__type
505 elif isinstance(other, str) or isinstance(other, dbus.ObjectPath):
506 return str(other) == str(self.__path)
507 return False
508
509
510##

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected