root / trunk / twisted / pair / raw.py

Revision 17451, 0.8 kB (checked in by foom, 3 years ago)

Remove twisted.components.Interface completely.

Merges: killtpc-1636-2
Authors: glyph, therve, jknight
Reviewer: exarkun

Remove deprecated twisted.python.components functionality:
MetaInterface?, Interface, getAdapterClass, and
getAdapterClassWithInheritance.

Also convert all twisted interfaces to use zope.interface directly
(including removing "self" argument), and remove redundant tests.

Line 
1 # Copyright (c) 2001-2004 Twisted Matrix Laboratories.
2 # See LICENSE for details.
3
4 #
5
6 """Interface definitions for working with raw packets"""
7
8 from twisted.internet import protocol
9 from zope.interface import Interface
10
11 class IRawDatagramProtocol(Interface):
12     """An interface for protocols such as UDP, ICMP and TCP."""
13
14     def addProto():
15         """
16         Add a protocol on top of this one.
17         """
18
19     def datagramReceived():
20         """
21         An IP datagram has been received. Parse and process it.
22         """
23
24 class IRawPacketProtocol(Interface):
25     """An interface for low-level protocols such as IP and ARP."""
26
27     def addProto():
28         """
29         Add a protocol on top of this one.
30         """
31
32     def datagramReceived():
33         """
34         An IP datagram has been received. Parse and process it.
35         """
Note: See TracBrowser for help on using the browser.