Separating info out of the libsmbclient.h include file
Tom Jansen
tom at ninja.nl
Mon Oct 21 12:57:01 GMT 2002
Tom Jansen wrote:
> Hi Richard,
>
> Richard Sharpe wrote:
>
>> A problem has arrisen with libsmbclient in head, in that there is too
>> much
>> info exposed in libsmbclient.h.
New idea:
example for internal include file:
typedef struct _SMBCSRV {
struct cli_state cli;
dev_t dev;
BOOL no_pathinfo2;
int server_fd;
struct _SMBCSRV *next, *prev;
} SMBCSRV;
In the client include file we could just do:
typedef struct _SMBCSRV SMBCSRV;
The client _only_ uses pointers to this type of structs so size does not
matter. All the allocating of memory is done inside libsmbclient.
This is IMHO a quite nice solution. I ripped it from the FILE type glibc
offers.
Please let me know what you think about this solution.
Tom
More information about the samba-technical
mailing list