/[eclipse]/eclipse/lib/sm/package.lisp
ViewVC logotype

Contents of /eclipse/lib/sm/package.lisp

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (hide annotations)
Mon Jan 12 11:10:52 2004 UTC (10 years, 3 months ago) by ihatchondo
Branch: MAIN
implementation of ICE protocol and xsmp protocol.
1 ihatchondo 1.1 ;;; -*- Mode: Lisp; Syntax: Common-Lisp; Package: COMMON-LISP; -*-
2     ;;; $Id: package.lisp,v 1.1 2004/01/12 11:10:52 ihatchondo Exp $
3     ;;; ---------------------------------------------------------------------------
4     ;;; Title: SM Library
5     ;;; Created: 2004 01 15 15:28
6     ;;; Author: Iban Hatchondo <hatchond@labri.fr>
7     ;;; ---------------------------------------------------------------------------
8     ;;; (c) copyright 2004 by Iban Hatchondo
9    
10     ;;;
11     ;;; Permission is granted to any individual or institution to use,
12     ;;; copy, modify, and distribute this software, provided that this
13     ;;; complete copyright and permission notice is maintained, intact, in
14     ;;; all copies and supporting documentation.
15     ;;;
16     ;;; This program is distributed in the hope that it will be useful,
17     ;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
18     ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
19    
20     ;;; NOTE: All comments below are from the original, modified only for
21     ;;; readability. (added for package doc).
22     ;;;
23     ;;; Permission is hereby granted, free of charge, to any person obtaining a
24     ;;; copy of this software and associated documentation files (the ``Software'')
25     ;;; to deal in the Software without restriction, including without limitation
26     ;;; the rights to use, copy, modify, merge, publish, distribute, sublicense,
27     ;;; and/or sell copies of the Software, and to permit persons to whom the
28     ;;; Software is furnished to do so, subject to the following conditions:
29     ;;;
30     ;;; The above copyright notice and this permission notice shall be included in
31     ;;; all copies or substantial portions of the Software.
32     ;;;
33     ;;; THE SOFTWARE IS PROVIDED ``AS IS'', WITHOUT WARRANTY OF ANY KIND, EXPRESS
34     ;;; OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
35     ;;; FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
36     ;;; THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
37     ;;; WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
38     ;;; OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
39     ;;; SOFTWARE.
40     ;;; Except as contained in this notice, the name of the X Consortium shall not
41     ;;; be used in advertising or otherwise to promote the sale, use or other
42     ;;; dealings in this Software without prior written authorization from the X
43     ;;; Consortium.
44     ;;; (X Window System is a trademark of X Consortium, Inc.)
45    
46     (common-lisp:in-package :common-lisp-user)
47    
48     (defpackage "SM-LIB"
49     (:use common-lisp ice-lib)
50     (:documentation
51     "The purpose of the X Session Management Protocol (XSMP) is to provide a
52     uniform mechanism for users to save and restore their sessions. A
53     session is a group of clients, each of which has a particular state.
54     The session is controlled by a network service called the session manager.
55     The session manager issues commands to its clients on behalf of the user.
56     These commands may cause clients to save their state or to terminate. It is
57     expected that the client will save its state in such a way that the client
58     can be restarted at a later time and resume its operation as if it had
59     never been terminated. A client's state might include information about
60     the file currently being edited, the current position of the insertion
61     point within the file, or the start of an uncommitted transaction. The
62     means by which clients are restarted is unspecified by this protocol.
63    
64     For purposes of this protocol, a \fIclient\fP of the session manager is
65     defined as a connection to the session manager. A client is typically,
66     though not necessarily, a process running an application program connected
67     to an X Window System display. However, a client may be connected to more
68     than one X display or not be connected to any X displays at all.
69    
70     This protocol is layered on top of the X Consortium's ICE protocol and
71     relies on the ICE protocol to handle connection management and
72     authentication.
73    
74     This a small implementation of the protocol specification that contains
75     only the functions that are used on the client side. If you want to build a
76     SM server you'll need to implement some functionalities describe in the
77     specification.
78    
79     protocol specification can be found at:
80     <ftp://ftp.xfree86.org/X.Org/pub/R6.6/xc/doc/hardcopy/SM/xsmp.PS.gz>")
81     (:import-from :ice-lib
82     "MAKE-DEFAULT-VERSIONS"
83     "AUTHENTICATION-PROTOCOL-INDEX"
84     "PROTOCOL-MAJOR-OPCODE"
85     "MAJOR-OPCODE" "OFFENDING-MINOR-OPCODE"
86     "VERSION-INDEX" "VENDOR-NAME" "RELEASE-NAME"
87     "SINTERN"
88     )
89     (:shadow
90     "STRING-LENGTH" "BUFFER-READ-STRING" "BUFFER-WRITE-STRING"
91     "BUFFER-READ-STRINGS" "BUFFER-WRITE-STRINGS")
92     (:size 90)
93     (:export
94     ;; classes. minor opcode
95     "REGISTER-CLIENT" ; 1
96     "REGISTER-CLIENT-REPLY" ; 2
97     "SAVE-YOURSELF" ; 3
98     "SAVE-YOURSELF-REQUEST" ; 4
99     "INTERACT-REQUEST" ; 5
100     "INTERACT" ; 6
101     "INTERACT-DONE" ; 7
102     "SAVE-YOURSELF-DONE" ; 8
103     "DIE" ; 9
104     "SHUTDOWN-CANCELLED" ; 10
105     "CONNECTION-CLOSED" ; 11
106     "SET-PROPERTIES" ; 12
107     "DELETE-PROPERTIES" ; 13
108     "GET-PROPERTIES" ; 14
109     "GET-PROPERTIES-REPLY" ; 15
110     "SAVE-YOURSELF-PHASE2-REQUEST" ; 16
111     "SAVE-YOURSELF-PHASE2" ; 17
112     "SAVE-COMPLETE" ; 18
113    
114     ;; structures.
115     "PROPERTY"
116    
117     ;; condition
118     "SESSION-MANAGER-UNAVAILABLE"
119    
120     ;; sm lib classes
121     "SM-CONNECTION"
122    
123     ;; types
124     "INTERACT-STYLE"
125     "DIALOG-TYPE"
126     "SAVE-TYPE"
127     "ARRAY8"
128     "ARRAY8S"
129     "PROPERTIES"
130    
131     ;; constants & vars
132     "+SM-PROTO-MAJOR+"
133     "+SM-PROTO-MINOR+"
134    
135     ;; macros.
136     "BUFFER-READ-ARRAY8"
137     "BUFFER-READ-ARRAY8S"
138     "BUFFER-READ-CLIENT-ID"
139     "BUFFER-READ-DIALOG-TYPE"
140     "BUFFER-READ-INTERACT-STYLE"
141     "BUFFER-READ-PROPERTIES"
142     "BUFFER-READ-PROPERTY"
143     "BUFFER-READ-SAVE-TYPE"
144     "BUFFER-WRITE-ARRAY8"
145     "BUFFER-WRITE-ARRAY8S"
146     "BUFFER-WRITE-CLIENT-ID"
147     "BUFFER-WRITE-DIALOG-TYPE"
148     "BUFFER-WRITE-INTERACT-STYLE"
149     "BUFFER-WRITE-PROPERTIES"
150     "BUFFER-WRITE-PROPERTY"
151     "BUFFER-WRITE-SAVE-TYPE"
152     "SIGNAL-SM-ERROR"
153    
154     ;; functions
155     "CONNECTION-CLOSED-P"
156     "DELETE-PROPERTIES-P"
157     "DIE-P"
158     "GET-PROPERTIES-P"
159     "GET-PROPERTIES-REPLY-P"
160     "INTERACT-DONE-P"
161     "INTERACT-P"
162     "INTERACT-REQUEST-P"
163     "PROPERTY-P"
164     "REGISTER-CLIENT-P"
165     "REGISTER-CLIENT-REPLY-P"
166     "REGISTER-XSMP-PROTOCOL"
167     "SAVE-COMPLETE-P"
168     "SAVE-YOURSELF-DONE-P"
169     "SAVE-YOURSELF-P"
170     "SAVE-YOURSELF-REQUEST-P"
171     "SAVE-YOURSELF-PHASE2-P"
172     "SAVE-YOURSELF-PHASE2-REQUEST-P"
173     "SET-PROPERTIES-P"
174     "SHUTDOWN-CANCELLED-P"
175    
176     "ARRAY8-LENGTH"
177     "ARRAY8S-LENGTH"
178     "CLIENT-ID-LENGTH"
179     "DIALOG-TYPE-LENGTH"
180     "INTERACT-STYLE-LENGTH"
181     "PROPERTIES-LENGTH"
182     "PROPERTY-LENGTH"
183     "SAVE-TYPE-LENGTH"
184    
185     "COPY-PROPERTY"
186     "MAKE-PROPERTY"
187     "PROPERTY-NAME"
188     "PROPERTY-TYPE"
189     "PROPERTY-VALUES"
190     "MAKE-ARRAY8"
191    
192     "CONNECTION-CLOSED-REASON"
193     "OPEN-SM-CONNECTION"
194     "SESSION-MANAGER-UNAVAILABLE-REASON"
195    
196     ;; methods
197     "DELETE-PROPERTIES-PROPERTIES"
198     "GET-PROPERTIES-REPLY-PROPERTIES"
199     "INTERACT-DONE-CANCEL-SHUTDOWN-P"
200     "INTERACT-REQUEST-DIALOG-TYPE"
201     "REGISTER-CLIENT-PREVIOUS-ID"
202     "REGISTER-CLIENT-REPLY-CLIENT-ID"
203     "SAVE-YOURSELF-DONE-SUCCESS-P"
204     "SAVE-YOURSELF-FAST-P"
205     "SAVE-YOURSELF-INTERACT-STYLE"
206     "SAVE-YOURSELF-REQUEST-FAST-P"
207     "SAVE-YOURSELF-REQUEST-GLOBAL-P"
208     "SAVE-YOURSELF-REQUEST-INTERACT-STYLE"
209     "SAVE-YOURSELF-REQUEST-SHUTDOWN-P"
210     "SAVE-YOURSELF-REQUEST-TYPE"
211     "SAVE-YOURSELF-SHUTDOWN-P"
212     "SAVE-YOURSELF-TYPE"
213     "SET-PROPERTIES-PROPERTIES"
214     "SM-CLIENT-ID"
215     "SM-PROTOCOL-REVISION"
216     "SM-PROTOCOL-VERSION"
217     "SM-RELEASE"
218     "SM-VENDOR"
219     ))

  ViewVC Help
Powered by ViewVC 1.1.5