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

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

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.5 by ihatchondo, Thu Apr 8 21:19:12 2004 UTC revision 1.6 by ihatchondo, Tue Dec 14 17:58:18 2004 UTC
# Line 1  Line 1 
1  ;;; -*- Mode: Lisp; Syntax: Common-Lisp; Package: COMMON-LISP; -*-  ;;; -*- Mode: Lisp; Syntax: Common-Lisp; Package: COMMON-LISP; -*-
2  ;;; $Id$  ;;; $Id$
3  ;;; ---------------------------------------------------------------------------  ;;; ---------------------------------------------------------------------------
4  ;;;     Title: SM Library  ;;;     Title: SM Library
5  ;;;   Created: 2004 01 15 15:28  ;;;   Created: 2004 01 15 15:28
6  ;;;    Author: Iban Hatchondo <hatchond@labri.fr>  ;;;    Author: Iban Hatchondo <hatchond@labri.fr>
7  ;;; ---------------------------------------------------------------------------  ;;; ---------------------------------------------------------------------------
8  ;;;  (c) copyright 2004 by Iban Hatchondo  ;;;  (c) copyright 2004 by Iban Hatchondo
9    
10  ;;;  ;;;
11  ;;; Permission is granted to any individual or institution to use,  ;;; Permission is granted to any individual or institution to use,
12  ;;; copy, modify, and distribute this software, provided that this  ;;; copy, modify, and distribute this software, provided that this
13  ;;; complete copyright and permission notice is maintained, intact, in  ;;; complete copyright and permission notice is maintained, intact, in
14  ;;; all copies and supporting documentation.  ;;; all copies and supporting documentation.
15  ;;;  ;;;
16  ;;; This program is distributed in the hope that it will be useful,  ;;; This program is distributed in the hope that it will be useful,
17  ;;; but WITHOUT ANY WARRANTY; without even the implied warranty of  ;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
18  ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
19    
20  ;;; NOTE: All comments below are from the original, modified only for  ;;; NOTE: All comments below are from the original, modified only for
21  ;;; readability. (added for package doc).  ;;; readability. (added for package doc).
22  ;;;  ;;;
23  ;;; Permission is hereby granted, free of charge, to any person obtaining a  ;;; Permission is hereby granted, free of charge, to any person obtaining a
24  ;;; copy of this software and associated documentation files (the ``Software'')  ;;; copy of this software and associated documentation files (the ``Software'')
25  ;;; to deal in the Software without restriction, including without limitation  ;;; to deal in the Software without restriction, including without limitation
26  ;;; the rights to use, copy, modify, merge, publish, distribute, sublicense,  ;;; 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  ;;; 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:  ;;; 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  ;;; The above copyright notice and this permission notice shall be included in
31  ;;; all copies or substantial portions of the Software.  ;;; all copies or substantial portions of the Software.
32  ;;;  ;;;
33  ;;; THE SOFTWARE IS PROVIDED ``AS IS'', WITHOUT WARRANTY OF ANY KIND, EXPRESS  ;;; THE SOFTWARE IS PROVIDED ``AS IS'', WITHOUT WARRANTY OF ANY KIND, EXPRESS
34  ;;; OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,  ;;; OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
35  ;;; FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL  ;;; FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
36  ;;; THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,  ;;; 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  ;;; 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  ;;; OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
39  ;;; SOFTWARE.  ;;; SOFTWARE.
40  ;;; Except as contained in this notice, the name of the X Consortium shall not  ;;; 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  ;;; 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  ;;; dealings in this Software without prior written authorization from the X
43  ;;; Consortium.  ;;; Consortium.
44  ;;; (X Window System is a trademark of X Consortium, Inc.)  ;;; (X Window System is a trademark of X Consortium, Inc.)
45    
46  (common-lisp:in-package :common-lisp-user)  (common-lisp:in-package :common-lisp-user)
47    
48  (defpackage "SM-LIB"  (defpackage "SM-LIB"
49    (:use common-lisp ice-lib)    (:use common-lisp ice-lib)
50    (:documentation    (:documentation
51     "The purpose of the X Session Management Protocol (XSMP) is to provide a     "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      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.      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.      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.      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      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      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      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      never been terminated.  A client's state might include information about
60      the file currently being edited, the current position of the insertion      the file currently being edited, the current position of the insertion
61      point within the file, or the start of an uncommitted transaction. The      point within the file, or the start of an uncommitted transaction. The
62      means by which clients are restarted is unspecified by this protocol.      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      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,      defined as a connection to the session manager. A client is typically,
66      though not necessarily, a process running an application program connected      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      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.      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      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      relies on the ICE protocol to handle connection management and
72      authentication.      authentication.
73    
74      This a small implementation of the protocol specification that contains      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      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      SM server you'll need to implement some functionalities describe in the
77      specification.      specification.
78    
79      protocol specification can be found at:      protocol specification can be found at:
80       <ftp://ftp.xfree86.org/X.Org/pub/R6.6/xc/doc/hardcopy/SM/xsmp.PS.gz>")       <ftp://ftp.xfree86.org/X.Org/pub/R6.6/xc/doc/hardcopy/SM/xsmp.PS.gz>")
81    (:import-from :ice-lib    (:import-from :ice-lib
82      #:make-default-versions      #:make-default-versions
83      #:authentication-protocol-index      #:authentication-protocol-index
84      #:protocol-major-opcode      #:protocol-major-opcode
85      #:major-opcode #:offending-minor-opcode      #:major-opcode #:offending-minor-opcode
86      #:version-index #:vendor-name #:release-name      #:version-index #:vendor-name #:release-name
87      #:sintern      #:sintern #:index+
88      )      )
89    (:shadow    (:shadow
90      #:get-properties      #:get-properties
91      #:string-length #:strings-length      #:string-length #:strings-length
92      #:buffer-read-string #:buffer-write-string      #:buffer-read-string #:buffer-write-string
93      #:buffer-read-strings #:buffer-write-strings)      #:buffer-read-strings #:buffer-write-strings)
94    (:size 90)    (:size 90)
95    (:export    (:export
96     ;; classes.                      minor opcode     ;; classes.                      minor opcode
97     #:register-client              ; 1     #:register-client              ; 1
98     #:register-client-reply        ; 2     #:register-client-reply        ; 2
99     #:save-yourself                ; 3     #:save-yourself                ; 3
100     #:save-yourself-request        ; 4     #:save-yourself-request        ; 4
101     #:interact-request             ; 5     #:interact-request             ; 5
102     #:interact                     ; 6     #:interact                     ; 6
103     #:interact-done                ; 7     #:interact-done                ; 7
104     #:save-yourself-done           ; 8     #:save-yourself-done           ; 8
105     #:die                          ; 9     #:die                          ; 9
106     #:shutdown-cancelled           ; 10     #:shutdown-cancelled           ; 10
107     #:connection-closed            ; 11     #:connection-closed            ; 11
108     #:set-properties               ; 12     #:set-properties               ; 12
109     #:delete-properties            ; 13     #:delete-properties            ; 13
110     #:get-properties               ; 14     #:get-properties               ; 14
111     #:get-properties-reply         ; 15     #:get-properties-reply         ; 15
112     #:save-yourself-phase2-request ; 16     #:save-yourself-phase2-request ; 16
113     #:save-yourself-phase2         ; 17     #:save-yourself-phase2         ; 17
114     #:save-complete                ; 18     #:save-complete                ; 18
115    
116     ;; structures.     ;; structures.
117     #:property     #:property
118    
119     ;; condition     ;; condition
120     #:session-manager-unavailable     #:session-manager-unavailable
121    
122     ;; sm lib classes     ;; sm lib classes
123     #:sm-connection     #:sm-connection
124    
125     ;; types     ;; types
126     #:interact-style     #:interact-style
127     #:dialog-type     #:dialog-type
128     #:save-type     #:save-type
129     #:array8     #:array8
130     #:array8s     #:array8s
131     #:properties     #:properties
132    
133     ;; constants & vars     ;; constants & vars
134     #:+sm-proto-major+     #:+sm-proto-major+
135     #:+sm-proto-minor+     #:+sm-proto-minor+
136    
137     ;; macros.     ;; macros.
138     #:buffer-read-array8     #:buffer-read-array8
139     #:buffer-read-array8s     #:buffer-read-array8s
140     #:buffer-read-client-id     #:buffer-read-client-id
141     #:buffer-read-dialog-type     #:buffer-read-dialog-type
142     #:buffer-read-interact-style     #:buffer-read-interact-style
143     #:buffer-read-properties     #:buffer-read-properties
144     #:buffer-read-property     #:buffer-read-property
145     #:buffer-read-save-type     #:buffer-read-save-type
146     #:buffer-write-array8     #:buffer-write-array8
147     #:buffer-write-array8s     #:buffer-write-array8s
148     #:buffer-write-client-id     #:buffer-write-client-id
149     #:buffer-write-dialog-type     #:buffer-write-dialog-type
150     #:buffer-write-interact-style     #:buffer-write-interact-style
151     #:buffer-write-properties     #:buffer-write-properties
152     #:buffer-write-property     #:buffer-write-property
153     #:buffer-write-save-type     #:buffer-write-save-type
154     #:signal-sm-error     #:signal-sm-error
155    
156     ;; functions     ;; functions
157     #:connection-closed-p     #:connection-closed-p
158     #:delete-properties-p     #:delete-properties-p
159     #:die-p     #:die-p
160     #:get-properties-p     #:get-properties-p
161     #:get-properties-reply-p     #:get-properties-reply-p
162     #:interact-done-p     #:interact-done-p
163     #:interact-p     #:interact-p
164     #:interact-request-p     #:interact-request-p
165     #:property-p     #:property-p
166     #:register-client-p     #:register-client-p
167     #:register-client-reply-p     #:register-client-reply-p
168     #:register-xsmp-protocol     #:register-xsmp-protocol
169     #:save-complete-p     #:save-complete-p
170     #:save-yourself-done-p     #:save-yourself-done-p
171     #:save-yourself-p     #:save-yourself-p
172     #:save-yourself-request-p     #:save-yourself-request-p
173     #:save-yourself-phase2-p     #:save-yourself-phase2-p
174     #:save-yourself-phase2-request-p     #:save-yourself-phase2-request-p
175     #:set-properties-p     #:set-properties-p
176     #:shutdown-cancelled-p     #:shutdown-cancelled-p
177    
178     #:array8-length     #:array8-length
179     #:array8s-length     #:array8s-length
180     #:client-id-length     #:client-id-length
181     #:dialog-type-length     #:dialog-type-length
182     #:interact-style-length     #:interact-style-length
183     #:properties-length     #:properties-length
184     #:property-length     #:property-length
185     #:save-type-length     #:save-type-length
186    
187     #:array8->string     #:array8->string
188     #:array8s->strings     #:array8s->strings
189     #:string->array8     #:string->array8
190     #:strings->array8s     #:strings->array8s
191    
192     #:copy-property     #:copy-property
193     #:make-property     #:make-property
194     #:property-name     #:property-name
195     #:property-type     #:property-type
196     #:property-values     #:property-values
197     #:make-array8     #:make-array8
198    
199     #:close-sm-connection     #:close-sm-connection
200     #:connection-closed-reason     #:connection-closed-reason
201     #:open-sm-connection     #:open-sm-connection
202     #:session-manager-unavailable-reason     #:session-manager-unavailable-reason
203    
204     ;; methods     ;; methods
205     #:delete-properties-properties     #:delete-properties-properties
206     #:get-properties-reply-properties     #:get-properties-reply-properties
207     #:interact-done-cancel-shutdown-p     #:interact-done-cancel-shutdown-p
208     #:interact-request-dialog-type     #:interact-request-dialog-type
209     #:register-client-previous-id     #:register-client-previous-id
210     #:register-client-reply-client-id     #:register-client-reply-client-id
211     #:save-yourself-done-success-p     #:save-yourself-done-success-p
212     #:save-yourself-fast-p     #:save-yourself-fast-p
213     #:save-yourself-interact-style     #:save-yourself-interact-style
214     #:save-yourself-request-fast-p     #:save-yourself-request-fast-p
215     #:save-yourself-request-global-p     #:save-yourself-request-global-p
216     #:save-yourself-request-interact-style     #:save-yourself-request-interact-style
217     #:save-yourself-request-shutdown-p     #:save-yourself-request-shutdown-p
218     #:save-yourself-request-type     #:save-yourself-request-type
219     #:save-yourself-shutdown-p     #:save-yourself-shutdown-p
220     #:save-yourself-type     #:save-yourself-type
221     #:set-properties-properties     #:set-properties-properties
222     #:sm-client-id     #:sm-client-id
223     #:sm-protocol-revision     #:sm-protocol-revision
224     #:sm-protocol-version     #:sm-protocol-version
225     #:sm-release     #:sm-release
226     #:sm-vendor     #:sm-vendor
227     ))     ))

Legend:
Removed from v.1.5  
changed lines
  Added in v.1.6

  ViewVC Help
Powered by ViewVC 1.1.5