DlpReadUserInfo3
Read and write user information to/from a palmos device
Usage
#include <palm.h>
#include <pconn/pconn.h>
int
DlpReadUserInfo(PConnection *pconn, struct dlp_userinfo *userinfo);
int
DlpWriteUserInfo(PConnection *pconn, const struct dlp_setuserinfo *userinfo);
Library
libpconn
Overview
DlpReadUserInfo() reads user information from pconn and stores it in userinfo. The dlp_userinfo structure is defined in <pconn/dlp_cmd.h> as
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];
};
DlpWriteUserInfo() writes user information to the Palm. The dlp_setuserinfo structure is defined as
struct dlp_setuserinfo
{
udword userid;
udword viewerid;
udword lastsyncPC;
struct dlp_time lastsync;
ubyte modflags;
ubyte usernamelen;
const char *username;
};
The 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:
- DLPCMD_MODUIFLAG_USERID
- DLPCMD_MODUIFLAG_SYNCPC
- DLPCMD_MODUIFLAG_SYNCDATE
- DLPCMD_MODUIFLAG_USERNAME
- DLPCMD_MODUIFLAG_VIEWERID
Return value
DlpReadUserInfo() and DlpWriteUserInfo() return 0 if successful, or a negative value in case of error.
Releases
Unchanged in 3 releases since Debian 3.0 (Woody).