Check for SYS/GL during library init. Reason is that
[AROS.git] / workbench / network / smbfs / source_code / smb_abstraction.h
blobbb258fefda367492d3de2c5dc490b0d4121e274a
1 /*
2 * $Id$
4 * :ts=4
6 * Name: smb_abstraction.h
7 * Description: Interface to the smb abstraction layer.
8 * Author: Christian Starkjohann <cs -at- hal -dot- kph -dot- tuwien -dot- ac -dot- at>
9 * Date: 1996-12-31
10 * Copyright: GNU-GPL
12 * Modified for use with AmigaOS by Olaf Barthel <obarthel -at- gmx -dot- net>
13 * Modified to support record locking by Peter Riede <Noster-Riede -at- T-Online -dot- de>
16 #ifndef _SMB_ABSTRACTION_H
17 #define _SMB_ABSTRACTION_H 1
19 /****************************************************************************/
21 /* Forward declaration to keep the compiler happy. */
22 #ifndef _SMB_FS_SB
23 struct smb_server;
24 #endif /* _SMB_FS_SB */
26 /****************************************************************************/
28 typedef struct smba_connect_parameters
30 char server_ipname[64];
31 char service[64];
32 char *server_name;
33 char *client_name;
34 char *username;
35 char *password;
36 } smba_connect_parameters_t;
38 typedef struct smba_stat
40 unsigned is_dir:1;
41 unsigned is_wp:1;
42 unsigned is_hidden:1;
43 unsigned is_system:1;
44 unsigned is_archive:1;
45 int size;
46 long atime;
47 long ctime;
48 long mtime;
49 } smba_stat_t;
51 /****************************************************************************/
53 typedef struct smba_server smba_server_t;
54 typedef struct smba_file smba_file_t;
56 /****************************************************************************/
58 typedef int (*smba_callback_t) (void *d, int fpos, int nextpos, char *name, int eof, smba_stat_t * st);
60 /****************************************************************************/
62 int smba_open(smba_server_t *s, char *name, size_t name_size, smba_file_t **file);
63 void smba_close(smba_file_t *f);
64 int smba_read(smba_file_t *f, char *data, long len, long offset);
65 int smba_write(smba_file_t *f, char *data, long len, long offset);
66 long smba_seek (smba_file_t *f, long offset, long mode, off_t * new_position_ptr);
67 int smba_lockrec (smba_file_t *f, long offset, long len, long mode, int unlocked, long timeout);
68 int smba_getattr(smba_file_t *f, smba_stat_t *data);
69 int smba_setattr(smba_file_t *f, smba_stat_t *data);
70 int smba_readdir(smba_file_t *f, long offs, void *d, smba_callback_t callback);
71 int smba_create(smba_file_t *dir, const char *name, smba_stat_t *attr);
72 int smba_mkdir(smba_file_t *dir, const char *name);
73 int smba_remove(smba_server_t *s, char *path);
74 int smba_rmdir(smba_server_t *s, char *path);
75 int smba_rename(smba_server_t *s, char *from, char *to);
76 int smba_statfs(smba_server_t *s, long *bsize, long *blocks, long *bfree);
77 void smb_invalidate_all_inodes(struct smb_server *server);
78 int smba_start(char *service, char *opt_workgroup, char *opt_username, char *opt_password, char *opt_clientname, char *opt_servername, int opt_cachesize, int opt_max_transmit, int opt_raw_smb, smba_server_t **result);
79 void smba_disconnect(smba_server_t *server);
80 int smba_get_dircache_size(struct smba_server * server);
81 int smba_change_dircache_size(struct smba_server * server,int cache_size);
83 /****************************************************************************/
85 #endif /* _SMB_ABSTRACTION_H */