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
|
.\" DlpReadUserInfo.3
.\"
.\" Copyright 2001, Andrew Arensburger.
.\" You may distribute this file under the terms of the Artistic
.\" License, as specified in the README file.
.\"
.\" $Id: DlpReadUserInfo.3,v 1.1 2001/09/05 07:29:30 arensb Exp $
.\"
.\" This man page uses the 'mdoc' formatting macros. If your 'man' uses
.\" the old 'man' package, you may run into problems.
.\"
.Dd Aug 16, 2001
.Dt DlpReadUserInfo 3
.Sh NAME
.Nm DlpReadUserInfo ,
.Nm DlpWriteUserInfo
.Nd read and write user information to/from a PalmOS device
.Sh LIBRARY
.Pa libpconn
.Sh SYNOPSIS
.Fd #include <palm.h>
.Fd #include <pconn/pconn.h>
.Ft int
.Fn DlpReadUserInfo "PConnection *pconn" "struct dlp_userinfo *userinfo"
.Ft int
.Fn DlpWriteUserInfo "PConnection *pconn" "const struct dlp_setuserinfo *userinfo"
.Sh DESCRIPTION
.Fn DlpReadUserInfo
reads user information from
.Fa pconn
and stores it in
.Fa userinfo .
The
.Ft dlp_userinfo
structure is defined in
.Pa <pconn/dlp_cmd.h>
as
.Bd -literal -offset indent
struct dlp_userinfo
{
udword userid;
udword viewerid;
udword lastsyncPC;
struct dlp_time lastgoodsync;
struct dlp_time lastsync;
ubyte usernamelen;
ubyte passwdlen;
char username[DLPCMD_USERNAME_LEN];
ubyte passwd[256];
};
.Ed
.Pp
.Fn DlpWriteUserInfo
writes user information to the Palm. The
.Ft dlp_setuserinfo
structure is defined as
.Bd -literal -offset indent
struct dlp_setuserinfo
{
udword userid;
udword viewerid;
udword lastsyncPC;
struct dlp_time lastsync;
ubyte modflags;
ubyte usernamelen;
const char *username;
};
.Ed
.Pp
The
.Fa modflags
field specifies which fields contain values and should therefore be
uploaded. It should be the bitwise-or of zero or more of the
following:
.Bl -tag -width "LIS" -compact -offset indent
.It Dv DLPCMD_MODUIFLAG_USERID
.It Dv DLPCMD_MODUIFLAG_SYNCPC
.It Dv DLPCMD_MODUIFLAG_SYNCDATE
.It Dv DLPCMD_MODUIFLAG_USERNAME
.It Dv DLPCMD_MODUIFLAG_VIEWERID
.El
.Sh RETURN VALUE
.Fn DlpReadUserInfo
and
.Fn DlpWriteUserInfo
return 0 if successful, or a negative value in case of error.
.Sh SEE ALSO
.Xr libpconn 3 ,
.Xr new_PConnection 3 .
|