diff options
author | Jonny Lamb <jonny.lamb@collabora.co.uk> | 2010-03-11 13:32:24 +0000 |
---|---|---|
committer | Jonny Lamb <jonny.lamb@collabora.co.uk> | 2010-03-11 13:32:24 +0000 |
commit | bec4146bf881332763cd6a5c10226edd717c212d (patch) | |
tree | c1c2ae4e68b04d8946a2a2ef7f88aa77e918213d /src | |
parent | 34c888574d847e0e5957a6dcd0e72c23238f3a1f (diff) |
handle: add NoneHandle to represent HANDLE_TYPE_NONE
Signed-off-by: Jonny Lamb <jonny.lamb@collabora.co.uk>
Diffstat (limited to 'src')
-rw-r--r-- | src/server/handle.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/server/handle.py b/src/server/handle.py index a7771b0..ec31b9a 100644 --- a/src/server/handle.py +++ b/src/server/handle.py @@ -1,6 +1,6 @@ # telepathy-python - Base classes defining the interfaces of the Telepathy framework # -# Copyright (C) 2005,2006 Collabora Limited +# Copyright (C) 2005,2006,2009,2010 Collabora Limited # Copyright (C) 2005,2006 Nokia Corporation # # This library is free software; you can redistribute it and/or @@ -17,6 +17,8 @@ # License along with this library; if not, write to the Free Software # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +from telepathy.constants import HANDLE_TYPE_NONE + class Handle(object): def __init__(self, id, handle_type, name): self._id = id @@ -43,3 +45,7 @@ class Handle(object): def __ne__(self, other): return not self.__eq__(other) + +class NoneHandle(Handle): + def __init__(self): + Handle.__init__(self, 0, HANDLE_TYPE_NONE, '') |