blob: 8f0b21d82b8b6b734cac4b870ee760c2405eeb13 (
plain) (
blame)
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
|
;;; rudel-transport.el --- Rudel transport interface and backend
;;
;; Copyright (C) 2009 Jan Moringen
;;
;; Author: Jan Moringen <scymtym@users.sourceforge.net>
;; Keywords: Rudel, backend, transport
;; X-RCS: $Id:$
;;
;; This program is free software: you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation, either version 3 of the License, or
;; (at your option) any later version.
;;
;; This program is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU General Public License for more details.
;;
;; You should have received a copy of the GNU General Public License
;; along with this program. If not, see <http://www.gnu.org/licenses>.
;;; Commentary:
;;
;; This file contains the interface for Rudel transport backends.
;;; History:
;;
;; 0.1 - Initial revision
;;; Code:
;;
(require 'eieio)
(require 'rudel-backend)
;;; Class rudel-transport
;;
(defclass rudel-transport ()
()
"Interface for transport objects.")
(defgeneric rudel-transport-send ((this rudel-transport) data)
"Send DATA through THIS transport object.")
(defgeneric rudel-transport-set-handler ((this rudel-transport)
handler)
"Install HANDLER as dispatcher for messages received by THIS.")
;;; Class rudel-transport-backend
;;
(defclass rudel-transport-backend (rudel-backend)
()
"Interface implemented by transport backends."
:abstract t)
(defgeneric rudel-make-connection ((this rudel-transport-backend) info)
"Create a transport object according to INFO.")
(defgeneric rudel-wait-for-connections ((this rudel-transport-backend)
info)
"Create a transport object according to INFO.")
(provide 'rudel-transport)
;;; rudel-transport.el ends here
|