File: libpconn.3

package info (click to toggle)
coldsync 3.0%2Bpre3-1
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 3,180 kB
  • ctags: 2,036
  • sloc: ansic: 20,386; perl: 2,302; cpp: 1,640; yacc: 1,102; lex: 802; makefile: 586; sh: 177
file content (259 lines) | stat: -rw-r--r-- 8,026 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
.\" libpconn.3
.\" 
.\" Copyright 2001, Andrew Arensburger.
.\" You may distribute this file under the terms of the Artistic
.\" License, as specified in the README file.
.\"
.\" $Id: libpconn.3,v 1.2 2001/11/12 00:08:56 arensb Exp $
.\"
.\" This man page uses the 'mdoc' formatting macros. If your 'man' uses
.\" the old 'man' package, you may run into problems.
.\"
.Dd July 10, 2001
.Dt LIBPCONN 3
.Os POSIX
.Sh NAME
.Nm libpconn
.Nd library for communicating with PalmOS devices
.Sh SYNOPSIS
.Fd #include <palm.h>
.Fd #include <pconn/pconn.h>
.Pp
Function prototypes are given in their respective man pages.
.Pp
If
.Nm
was built with I18N support, you may need to link with
.Ar -lintl
.Sh DESCRIPTION
The
.Nm
library provides functions for communicating with PalmOS devices. It
supports serial, USB (under FreeBSD), and TCP connections, though the
latter are still greatly experimental.
.Sh VARIABLES
.Nm
defines the following variables:
.Bl -tag -width 1em
.It Dv int palm_errno
Very similar to
.Dv errno ,
.Dv int palm_errno
is set whenever an error occurs in a
.Nm
function. The value indicates the error. Possible values are the
.Dv PALMERR_*
values defined in
.Pa <pconn/palm_errno.h> .
.Pp
.It Dv const char *palm_errlist[]
An array of strings giving error messages corresponding to the
.Dv PALMERR_*
values.
.It Dv const int palm_numerrs
The number of entries in
.Dv palm_errlist .
.El
.Sh FUNCTIONS
.Nm
includes the following functions, which are described in their
respective manual pages:
.Pp
.Ft PConnection *
.Fn new_PConnection "char *fname" "int listenType" "const unsigned short flags"

.Ft int
.Fn PConnClose "PConnection *pconn"

.Ft int
.Fn PConn_bind "PConnection *pconn" "const void *addr" "const int addrlen"

.Ft int
.Fn DlpReadUserInfo "PConnection *pconn" "struct dlp_userinfo *userinfo"

.Ft int
.Fn DlpWriteUserInfo "PConnection *pconn" "const struct dlp_setuserinfo *userinfo"

.Ft int
.Fn DlpReadSysInfo "PConnection *pconn" "struct dlp_sysinfo *sysinfo"

.Ft int
.Fn DlpGetSysDateTime "PConnection *pconn" "struct dlp_time *ptime"

.Ft int
.Fn DlpSetSysDateTime "PConnection *pconn" "const struct dlp_time *ptime"

.Ft int
.Fn DlpReadStorageInfo "PConnection *pconn" "const ubyte card" "ubyte *last_card" "ubyte *more" "struct dlp_cardinfo *cinfo"

.Ft int
.Fn DlpReadDBList "PConnection *pconn" "const ubyte iflags" "const int card" "const uword start" "uword *last_index" "ubyte *oflags" "ubyte *num" "struct dlp_dbinfo *dbs"

.Ft int
.Fn DlpOpenDB "PConnection *pconn" "int card" "const char *name" "ubyte mode" "ubyte *dbhandle"

.Ft int
.Fn DlpCreateDB "PConnection *pconn" "const struct dlp_createdbreq *newdb" "ubyte *dbhandle"

.Ft int
.Fn DlpCloseDB "PConnection *pconn" "ubyte dbhandle"

.Ft int
.Fn DlpDeleteDB "PConnection *pconn" "const int card" "const char *name"

.Ft int
.Fn DlpReadAppBlock "PConnection *pconn" "const ubyte handle" "const uword offset" "const uword len" "uword *size" "const ubyte **data"

.Ft int
.Fn DlpWriteAppBlock "PConnection *pconn" "const ubyte handle" "const uword len" "const ubyte *data"

.Ft int
.Fn DlpReadSortBlock "PConnection *pconn" "const ubyte handle" "const uword offset" "const uword len" "uword *size" "const ubyte **data"

.Ft int
.Fn DlpWriteSortBlock "PConnection *pconn" "const ubyte handle" "const uword len" "const ubyte *data"

.Ft int
.Fn DlpReadNextModifiedRec "PConnection *pconn" "const ubyte handle" "struct dlp_recinfo *recinfo" "const ubyte **data"

.Ft int
.Fn DlpReadRecordByID "PConnection *pconn" "const ubyte handle" "const udword id" "const uword offset" "const uword len" "struct dlp_recinfo *recinfo" "const ubyte **data"

.Ft int
.Fn DlpReadRecordByIndex "PConnection *pconn" "const ubyte handle" "const uword index" "struct dlp_recinfo *recinfo"

.Ft int
.Fo DlpWriteRecord
.Fa "PConnection *pconn"
.Fa "const ubyte handle"
.Fa "const ubyte flags"
.Fa "const udword id"
.Fa "const ubyte attributes"
.Fa "const ubyte category"
.Fa "const udword len"
.Fa "const ubyte *data"
.Fa "udword *recid"
.Fc

.Ft int
.Fn DlpDeleteRecord "PConnection *pconn" "const ubyte handle" "const ubyte flags" "const udword recid"

.Ft int
.Fn DlpReadResourceByIndex "PConnection *pconn" "const ubyte handle" "const uword index" "const uword offset" "const uword len" "struct dlp_resource *value" "const ubyte **data"

.Ft int
.Fn DlpReadResourceByType "PConnection *pconn" "const ubyte handle" "const udword type" "const uword id" "const uword offset" "const uword len" "struct dlp_resource *value" "ubyte *data"

.Ft int
.Fn DlpWriteResource "PConnection *pconn" "const ubyte handle" "const udword type" "const uword id" "const uword size" "const ubyte *data"

.Ft int
.Fn DlpDeleteResource "PConnection *pconn" "const ubyte handle" "const ubyte flags" "const udword type" "const uword id"

.Ft int
.Fn DlpCleanUpDatabase "PConnection *pconn" "const ubyte handle"

.Ft int
.Fn DlpResetSyncFlags "PConnection *pconn" "const ubyte handle"

.Ft int
.Fn DlpCallApplication "PConnection *pconn" "const udword version" "const struct dlp_appcall *appcall" "const udword paramsize" "const ubyte *param" "struct dlp_appresult *appresult"

.Ft int
.Fn DlpResetSystem "PConnection *pconn"

.Ft int
.Fn DlpAddSyncLogEntry "PConnection *pconn" "const char *msg"

.Ft int
.Fn DlpReadOpenDBInfo "PConnection *pconn" "ubyte handle" "struct dlp_opendbinfo *dbinfo"

.Ft int
.Fn DlpMoveCategory "PConnection *pconn" "const ubyte handle" "const ubyte from" "const ubyte to"

.Ft int
.Fn DlpOpenConduit "PConnection *pconn"

.Ft int
.Fn DlpEndOfSync "PConnection *pconn" "const ubyte status"

.Ft int
.Fn DlpResetRecordIndex "PConnection *pconn" "const ubyte handle"

.Ft int
.Fn DlpReadRecordIDList "PConnection *pconn" "const ubyte handle" "const ubyte flags" "const uword start" "const uword max" "uword *numread" "udword recids[]"

.Ft int
.Fn DlpReadNextRecInCategory "PConnection *pconn" "const ubyte handle" "const ubyte category" "struct dlp_recinfo *recinfo" "const ubyte **data"

.Ft int
.Fn DlpReadNextModifiedRecInCategory "PConnection *pconn" "const ubyte handle" "const ubyte category" "struct dlp_recinfo *recinfo" "const ubyte **data"

.Ft int
.Fn DlpReadAppPreference "PConnection *pconn" "const udword creator" "const uword id" "const uword len" "const ubyte flags" "struct dlp_apppref *pref" "ubyte *data"

.Ft int
.Fn DlpWriteAppPreference "PConnection *pconn" "const udword creator" "const uword id" "const ubyte flags" "const struct dlp_apppref *pref" "const ubyte *data"

.Ft int
.Fn DlpReadNetSyncInfo "PConnection *pconn" "struct dlp_netsyncinfo *netsyncinfo"

.Ft int
.Fn DlpWriteNetSyncInfo "PConnection *pconn" "const ubyte modflags" "const struct dlp_netsyncinfo *newinfo"

.Ft int
.Fn DlpReadFeature "PConnection *pconn" "const udword creator" "const word featurenum" "udword *value"

.Ft int
.Fn DlpRPC "PConnection *pconn" "uword trap" "udword *D0" "udword *A0" "int argc" "struct DLPRPC_param *argv"

.Ft int
.Fn RDLP_Backlight "PConnection *pconn" "Bool set" "Bool newState"

.Ft int
.Fn RDLP_BatteryLevel "PConnection *pconn"

.Ft int
.Fn RDLP_PluggedIn "PConnection *pconn"

.Ft int
.Fn RDLP_ROMToken "PConnection *pconn" "uword cardno" "udword token" "udword *data_ptr" "uword *data_len"

.Ft int
.Fn RDLP_MemHandleNew "PConnection *pconn" "udword size"

.Ft int
.Fn RDLP_GetOSVersionString "PConnection *pconn"

.Ft int
.Fn RDLP_BatteryDialog "PConnection *pconn"

.Ft int
.Fn RDLP_MemMove "PConnection *pconn" "ubyte *dst" "const udword src" "const udword len"

.Ft int
.Fn RDLP_MemReadable "PConnection *pconn" "udword addr"

.Ft time_t
.Fn time_dlp2time_t "const struct dlp_time *dlpt"

.Ft udword
.Fn time_dlp2palmtime "const struct dlp_time *dlpt"

.Ft void
.Fn time_time_t2dlp "const time_t t" "struct dlp_time *dlpt"

.Ft void
.Fn time_palmtime2dlp "const udword palmt" "struct dlp_time *dlpt"

.Sh RETURN VALUES
When a
.Nm
function encounters an error, it sets
.Dv palm_errno
to one of the
.Dv PALMERR_*
values defined in
.Pa <pconn/palm_errno.h> .
.Sh AUTHORS
.An Andrew Arensburger Aq arensb@ooblick.com