author | Claus Gittinger <cg@exept.de> |
Wed, 26 Jun 2019 22:06:12 +0200 | |
changeset 24369 | e796791ea838 |
parent 17699 | 7e6dc4c76306 |
child 18120 | e3a375d5f6a8 |
permissions | -rw-r--r-- |
7593 | 1 |
" |
2 |
COPYRIGHT (c) 1999 by eXept Software AG |
|
3 |
All Rights Reserved |
|
4 |
||
5 |
This software is furnished under a license and may be used |
|
6 |
only in accordance with the terms of that license and with the |
|
7 |
inclusion of the above copyright notice. This software may not |
|
8 |
be provided or otherwise made available to, or used by, any |
|
9 |
other person. No title to or ownership of the software is |
|
10 |
hereby transferred. |
|
11 |
" |
|
5409 | 12 |
"{ Package: 'stx:libbasic' }" |
13 |
||
17699 | 14 |
"{ NameSpace: Smalltalk }" |
15 |
||
4763 | 16 |
ExternalAddress subclass:#OSHandle |
17 |
instanceVariableNames:'' |
|
9103 | 18 |
classVariableNames:'Lobby' |
4763 | 19 |
poolDictionaries:'' |
17699 | 20 |
category:'Compatibility-VisualWorks' |
4763 | 21 |
! |
22 |
||
6226 | 23 |
!OSHandle class methodsFor:'documentation'! |
24 |
||
7593 | 25 |
copyright |
26 |
" |
|
27 |
COPYRIGHT (c) 1999 by eXept Software AG |
|
28 |
All Rights Reserved |
|
29 |
||
30 |
This software is furnished under a license and may be used |
|
31 |
only in accordance with the terms of that license and with the |
|
32 |
inclusion of the above copyright notice. This software may not |
|
33 |
be provided or otherwise made available to, or used by, any |
|
34 |
other person. No title to or ownership of the software is |
|
35 |
hereby transferred. |
|
36 |
" |
|
37 |
! |
|
38 |
||
6226 | 39 |
documentation |
40 |
" |
|
9103 | 41 |
Ongoing work: |
42 |
extract handle specific operations and rewrite Streams, Sockets etc. |
|
43 |
to pass all work to these handles. |
|
6226 | 44 |
|
45 |
[author:] |
|
46 |
Claus Gittinger |
|
47 |
" |
|
48 |
! ! |
|
4763 | 49 |
|
9103 | 50 |
!OSHandle class methodsFor:'initialization'! |
51 |
||
52 |
initialize |
|
53 |
Lobby := Registry new. |
|
54 |
! ! |
|
55 |
||
7298 | 56 |
!OSHandle class methodsFor:'Compatibility-VW'! |
5740 | 57 |
|
58 |
currentOS |
|
59 |
"ST-80 compatibility." |
|
60 |
||
61 |
"/ mhmh what does ST80/VW returned here ? |
|
62 |
||
63 |
OperatingSystem isUNIXlike ifTrue:[^ #unix]. |
|
64 |
OperatingSystem isOS2like ifTrue:[^ #os2]. |
|
65 |
OperatingSystem isMSWINDOWSlike ifTrue:[^ #windows]. |
|
66 |
^ #unknown |
|
6295 | 67 |
|
68 |
" |
|
69 |
OSHandle currentOS |
|
70 |
" |
|
6124
81baa6b991c3
currentProcessID - for VW compatibility
Claus Gittinger <cg@exept.de>
parents:
5966
diff
changeset
|
71 |
! |
81baa6b991c3
currentProcessID - for VW compatibility
Claus Gittinger <cg@exept.de>
parents:
5966
diff
changeset
|
72 |
|
81baa6b991c3
currentProcessID - for VW compatibility
Claus Gittinger <cg@exept.de>
parents:
5966
diff
changeset
|
73 |
currentProcessID |
81baa6b991c3
currentProcessID - for VW compatibility
Claus Gittinger <cg@exept.de>
parents:
5966
diff
changeset
|
74 |
"ST-80 compatibility." |
81baa6b991c3
currentProcessID - for VW compatibility
Claus Gittinger <cg@exept.de>
parents:
5966
diff
changeset
|
75 |
|
81baa6b991c3
currentProcessID - for VW compatibility
Claus Gittinger <cg@exept.de>
parents:
5966
diff
changeset
|
76 |
^ OperatingSystem getProcessId |
81baa6b991c3
currentProcessID - for VW compatibility
Claus Gittinger <cg@exept.de>
parents:
5966
diff
changeset
|
77 |
|
6295 | 78 |
" |
79 |
OSHandle currentProcessID |
|
80 |
" |
|
81 |
||
6124
81baa6b991c3
currentProcessID - for VW compatibility
Claus Gittinger <cg@exept.de>
parents:
5966
diff
changeset
|
82 |
"Created: / 30.10.2001 / 17:31:55 / cg" |
5740 | 83 |
! ! |
84 |
||
4763 | 85 |
!OSHandle methodsFor:'finalization'! |
86 |
||
9103 | 87 |
finalizationLobby |
88 |
"answer a Registry used for finalization." |
|
89 |
||
90 |
^ Lobby |
|
91 |
! |
|
92 |
||
6439
0f841258ec4a
Use #finalize instead of #disposed
Stefan Vogel <sv@exept.de>
parents:
6295
diff
changeset
|
93 |
finalize |
4763 | 94 |
self subclassResponsibility |
95 |
! ! |
|
96 |
||
9103 | 97 |
!OSHandle methodsFor:'queries'! |
98 |
||
16344 | 99 |
handleType |
100 |
^ self subclassResponsibility |
|
101 |
! |
|
102 |
||
9103 | 103 |
isValid |
16341 | 104 |
^ self address ~~ 0 |
105 |
! ! |
|
106 |
||
107 |
!OSHandle methodsFor:'testing'! |
|
108 |
||
16343 | 109 |
isOsHandle |
110 |
^ true |
|
111 |
! |
|
112 |
||
16341 | 113 |
isSocketHandle |
114 |
^ false |
|
9103 | 115 |
! ! |
116 |
||
4763 | 117 |
!OSHandle class methodsFor:'documentation'! |
118 |
||
119 |
version |
|
17699 | 120 |
^ '$Header: /cvs/stx/stx/libbasic/OSHandle.st,v 1.15 2015-03-27 13:24:38 cg Exp $' |
16343 | 121 |
! |
122 |
||
123 |
version_CVS |
|
17699 | 124 |
^ '$Header: /cvs/stx/stx/libbasic/OSHandle.st,v 1.15 2015-03-27 13:24:38 cg Exp $' |
4763 | 125 |
! ! |
9103 | 126 |
|
16341 | 127 |
|
9103 | 128 |
OSHandle initialize! |