~ubuntu-branches/debian/lenny/fpc/lenny

« back to all changes in this revision

Viewing changes to packages/extra/os2units/clkdll/clkdll.pas

  • Committer: Bazaar Package Importer
  • Author(s): Mazen Neifer, Torsten Werner, Mazen Neifer
  • Date: 2008-05-17 17:12:11 UTC
  • mfrom: (3.1.9 intrepid)
  • Revision ID: james.westby@ubuntu.com-20080517171211-9qi33xhd9evfa0kg
Tags: 2.2.0-dfsg1-9
[ Torsten Werner ]
* Add Mazen Neifer to Uploaders field.

[ Mazen Neifer ]
* Moved FPC sources into a version dependent directory from /usr/share/fpcsrc
  to /usr/share/fpcsrc/${FPCVERSION}. This allow installing more than on FPC
  release.
* Fixed far call issue in compiler preventing building huge binearies.
  (closes: #477743)
* Updated building dependencies, recomennded and suggested packages.
* Moved fppkg to fp-utils as it is just a helper tool and is not required by
  compiler.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
{
2
 
    $Id: clkdll.pas,v 1.1 2003/10/14 14:42:09 yuri Exp $
3
 
    Copyright (c) 2002 by Mark Eckstein
4
 
    Copyright (c) 2003 by Yuri Prokushev (prokushev@freemail.ru)
5
 
 
6
 
    eCS Clock API (part of standard eCS installation)
7
 
 
8
 
    This program is free software; you can redistribute it and/or modify it
9
 
    under the terms of the GNU Library General Public License (LGPL) as
10
 
    published by the Free Software Foundation; either version 2 of the
11
 
    License, or (at your option) any later version. This program is
12
 
    distributed in the hope that it will be useful, but WITHOUT ANY
13
 
    WARRANTY; without even the implied warranty of MERCHANTABILITY or
14
 
    FITNESS FOR A PARTICULAR PURPOSE.
15
 
 
16
 
    See the GNU Library General Public License for more details. You should
17
 
    have received a copy of the GNU Library General Public License along
18
 
    with this program; if not, write to the Free Software Foundation, Inc.,
19
 
    59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
20
 
 
21
 
1 **********************************************************************}
22
 
 
23
 
{
24
 
The Clock API is a set of functions, which offer you a variety of
25
 
time-related operations. You can use it like any other DLL provided
26
 
with OS/2 and eComStation. However, the Clock API DLL is not Rexx
27
 
enabled.
28
 
}
29
 
 
30
 
Unit clkdll;
31
 
 
32
 
Interface
33
 
 
34
 
Uses
35
 
  DosCalls;
36
 
 
37
 
{
38
 
If you need to know the universal world time call this API. The
39
 
value it returns is updated every 250 ms, so it's rather meant
40
 
for not-too-high precision tasks.
41
 
Return values:   0 ... ok
42
 
               128 ... failed
43
 
}
44
 
Function ClkQueryUTC(var Value: TDateTime): Cardinal; cdecl;
45
 
    external 'clkdll' name 'ClkQueryUTC'; {index 00001}
46
 
 
47
 
{
48
 
You can obtain the time zone offset using this API.
49
 
Return values:   0 ... ok
50
 
               128 ... failed
51
 
}
52
 
 
53
 
Function ClkQueryUTCOffset(var Value: Longint): Cardinal; cdecl;
54
 
    external 'clkdll' name 'ClkQueryUTCOffset'; {index 00002}
55
 
 
56
 
{
57
 
Get the difference between standard time and summer time in
58
 
seconds by calling this API.
59
 
Return values:   0 ... ok
60
 
               128 ... failed
61
 
}
62
 
Function ClkQueryDSTAdvance(var Value: Integer): Cardinal; cdecl;
63
 
    external 'clkdll' name 'ClkQueryDSTAdvance'; {index 00003}
64
 
 
65
 
{
66
 
This returns the standard time zone identifier and date and
67
 
time of the next change to standard time.
68
 
Return values:   0 ... ok
69
 
                30 ... ID only
70
 
                40 ... Date only
71
 
               128 ... failed
72
 
}
73
 
Function ClkQuerySTData(ID: PChar; var NextDate: TDateTime): Cardinal; cdecl;
74
 
    external 'clkdll' name 'ClkQuerySTData'; {index 00004}
75
 
 
76
 
{
77
 
This returns the summer time zone identifier and date and
78
 
time of the next change to summer time.
79
 
Return values:   0 ... ok
80
 
                30 ... ID only
81
 
                40 ... Date only
82
 
               128 ... failed
83
 
}
84
 
Function ClkQueryDSTData(ID: PChar; var NextDate: TDateTime): Cardinal; cdecl;
85
 
    external 'clkdll' name 'ClkQueryDSTData'; {index 00005}
86
 
 
87
 
{
88
 
This returns the TZ string that is currently in use, independent
89
 
from the actual TZ environment setting.
90
 
Return values:   0 ... ok
91
 
               128 ... failed
92
 
}
93
 
Function ClkQueryTimeZone(value: PChar): Cardinal; cdecl;
94
 
    external 'clkdll' name 'ClkQueryTimeZone'; {index 00006}
95
 
 
96
 
{
97
 
If you want to know in which hemisphere the computer is located
98
 
call this API.
99
 
Value is either 0 for southern or 1 for northern hemisphere.
100
 
Return values:   0 ... ok
101
 
               128 ... failed
102
 
}
103
 
Function ClkQueryHemisphere(var Value: Integer): Cardinal; cdecl;
104
 
    external 'clkdll' name 'ClkQueryHemisphere'; {index 00007}
105
 
 
106
 
{
107
 
The system's uptime is returned when calling this API. Opposed
108
 
to the OS/2 API for the same purpose this one's rollover will
109
 
be after approximately 130 years (untested!).
110
 
Return values:   0 ... ok
111
 
               128 ... failed
112
 
}
113
 
Function ClkQueryUptime(var Days, Hours, Minutes, Seconds, Hundredths: Cardinal): Cardinal; cdecl;
114
 
    external 'clkdll' name 'ClkQueryUptime'; {index 00008}
115
 
 
116
 
{
117
 
Returns, whether a synchronization can be done (Value == 1) or
118
 
not (Value == 0). This depends on the chosen connection type and
119
 
the current connection status.
120
 
Return values:   0 ... ok
121
 
               128 ... failed
122
 
}
123
 
Function ClkCanSynchronize(var Value: Integer): Cardinal; cdecl;
124
 
    external 'clkdll' name 'ClkCanSynchronize'; {index 00015}
125
 
 
126
 
{
127
 
Triggers a time synchronization.
128
 
Return values:   0 ... ok
129
 
                64 ... writing to pipe failed
130
 
                70 ... can't synchronize
131
 
               128 ... clkbasic version could not be determined
132
 
               129 ... clkbasic version unknow
133
 
}
134
 
Function ClkDoSynchronize: Cardinal; cdecl;
135
 
    external 'clkdll' name 'ClkDoSynchronize'; {index 00013}
136
 
 
137
 
{
138
 
Queries, whether clkbasic is currently in the process of
139
 
synchronizing (Value == 1: yes, Value == 0: no)
140
 
Return values:   0 ... ok
141
 
               128 ... failed
142
 
}
143
 
Function ClkIsSynchronizing(var Value: Integer): Cardinal; cdecl;
144
 
    external 'clkdll' name 'ClkIsSynchronizing'; {index 00014}
145
 
 
146
 
{
147
 
Returns the synchronization data. Date and time of the last
148
 
attempted synchronization, date and time of the last successful
149
 
synchronization, indicator for success of last attempt and the host
150
 
from where the time could be synched successfully.
151
 
Return values:   0 ... ok
152
 
               128 ... failed
153
 
}
154
 
Function ClkGetSynchData(var Last, LastSuccess: TDateTime;
155
 
                         var LastWasSuccessful: Integer;
156
 
                         LastSuccessfulHost: PChar): Cardinal; cdecl;
157
 
    external 'clkdll' name 'ClkGetSynchData'; {index 00016}
158
 
 
159
 
{ not documented
160
 
    external 'clkdll' name 'ClkQueryBasePath'; {index 00009}
161
 
    external 'clkdll' name 'ClkQueryLanguagePath'; {index 00010}
162
 
    external 'clkdll' name 'ClkQueryDialupState'; {index 00011}
163
 
    external 'clkdll' name 'ClkQueryVersion'; {index 00012}
164
 
    external 'clkdll' name 'ClkCallSettings'; {index 00017}
165
 
    external 'clkdll' name 'ClkCallSchedulerHelper'; {index 00018}
166
 
}
167
 
 
168
 
Implementation
169
 
 
170
 
End.
171
 
 
172
 
{
173
 
$Log: clkdll.pas,v $
174
 
Revision 1.1  2003/10/14 14:42:09  yuri
175
 
+ Import
176
 
 
177
 
}
 
 
b'\\ No newline at end of file'