xfercallback(3)
NAME
XferCallback - transfer callback for Nomad Jukebox library
LIBRARY
libnjb
SYNOPSIS
#include <sys/types.h> #include <libnjb.h> extern int njb_error typedef int XferCallback(u_int64_t sent, u_int64_t total,const char* buf,unsigned len,void *data);
DESCRIPTION
- The sent and total 64-bit integers may be used to deter
- mine how far this transfer has advanced in number of bytes, eg
- the ratio can easily be determined for updating progress bars and
- the like.
- The buf and len points to the current buffer and states
- its length, this is usually only used for debugging purposes and
- should normally not be dereferenced by the user program.
- The data parameter is a pointer to user data of any kind
- that the user of the library wants to associate with this trans
- fer. This pointer is used for example when accessing several dif
- ferent jukeboxes from withing one program. If it has been set to
- point to some meaningful data in the "NJB_Send..." or
- "NJB_Get..." functions preceding the callback, it may be derefer
- enced and cast to retrieve the data associated with this very
- transfer.
SEE ALSO
- NJB_Send_Track(3), NJB_Get_Track(3), NJB_Send_File(3),
- NJB_Get_File(3)
January 2003