summaryrefslogtreecommitdiff
path: root/sleekxmpp/xmlstream/handler/base.py
blob: 720846d6aa3e90fe54bb9794e6284cc55f181307 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
"""
    SleekXMPP: The Sleek XMPP Library
    Copyright (C) 2010  Nathanael C. Fritz
    This file is part of SleekXMPP.

    See the file LICENSE for copying permission.
"""

class BaseHandler(object):


	def __init__(self, name, matcher):
		self.name = name
		self._destroy = False
		self._payload = None
		self._matcher = matcher
	
	def match(self, xml):
		return self._matcher.match(xml)
	
	def prerun(self, payload):
		self._payload = payload

	def run(self, payload):
		self._payload = payload
	
	def checkDelete(self):
		return self._destroy