/[de-setf-amqp]/AMQP-1-1-0-9-0/device-level.lisp
ViewVC logotype

Contents of /AMQP-1-1-0-9-0/device-level.lisp

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3 - (show annotations)
Tue Feb 23 09:05:39 2010 UTC (4 years, 1 month ago) by janderson
File size: 2103 byte(s)
Merge commit 'remotes/github/master' into remotes/git-svn
1 ;;; -*- Package: de.setf.amqp.implementation; -*-
2
3 (in-package :de.setf.amqp.implementation)
4
5
6 (document :file
7 (description "This file defines version-specific connecttion and channel operators for AMPQ version 0.9r0
8 of the `de.setf.amqp` library.")
9 (copyright
10 "Copyright 2010 [james anderson](mailto:james.anderson@setf.de) All Rights Reserved"
11 "'de.setf.amqp' is free software: you can redistribute it and/or modify it under the terms of version 3
12 of the GNU Affero General Public License as published by the Free Software Foundation.
13
14 'setf.amqp' is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the
15 implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
16 See the Affero General Public License for more details.
17
18 A copy of the GNU Affero General Public License should be included with 'de.setf.amqp' as `AMQP:agpl.txt`.
19 If not, see the GNU [site](http://www.gnu.org/licenses/)."))
20
21
22 (defmethod shared-initialize ((instance amqp-1-1-0-9-0:connection) (slots t) &key)
23 ;; set circumspectly in order to allow update for changed class
24 (call-next-method)
25 (flet ((conditionally-set (name value)
26 (unless (slot-boundp instance name)
27 (setf (slot-value instance name) value))))
28 (conditionally-set 'input-frame-class '7-byte-header-input-frame)
29 (conditionally-set 'output-frame-class '7-byte-header-output-frame)))
30
31
32 (defmethod connection-frame-type-class-name ((connection amqp-1-1-0-9-0:connection) code)
33 (ecase code
34 (0 nil)
35 (1 'amqp:method)
36 (2 'amqp:header)
37 (3 'amqp:body)
38 (4 'amqp:oob-method)
39 (5 'amqp:oob-header)
40 (6 'amqp:oob-body)
41 (7 'amqp:trace)
42 (8 'amqp:heartbeat)
43 (9 'amqp:request)
44 (10 'amqp:response)))
45
46 (defmethod connection-class-name-frame-type ((connection amqp-1-1-0-9-0::connection) name)
47 (ecase name
48 ((nil) 0)
49 (amqp:method 1)
50 (amqp:header 2)
51 (amqp:body 3)
52 (amqp:oob-method 4)
53 (amqp:oob-header 5)
54 (amqp:oob-body 6)
55 (amqp:trace 7)
56 (amqp:heartbeat 8)
57 (amqp:request 9)
58 (amqp:response 10)))
59

  ViewVC Help
Powered by ViewVC 1.1.5