alsa.audio: build the bridge link lib only for linux architecture
[AROS.git] / workbench / network / smbfs / source_code / smb_abstraction.h
blob1e9ac1fccd011c85073d406ad41452a894677308
1 /*
2 * $Id$
4 * :ts=8
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 int max_xmit;
37 } smba_connect_parameters_t;
39 typedef struct smba_stat
41 unsigned is_dir:1;
42 unsigned is_wp:1;
43 unsigned is_hidden:1;
44 unsigned is_system:1;
45 unsigned is_archive:1;
46 int size;
47 long atime;
48 long ctime;
49 long mtime;
50 } smba_stat_t;
52 /****************************************************************************/
54 typedef struct smba_server smba_server_t;
55 typedef struct smba_file smba_file_t;
57 /****************************************************************************/
59 typedef int (*smba_callback_t) (void *d, int fpos, int nextpos, char *name, int eof, smba_stat_t * st);
61 /****************************************************************************/
63 int smba_open(smba_server_t *s, char *name, size_t name_size, smba_file_t **file);
64 void smba_close(smba_file_t *f);
65 int smba_read(smba_file_t *f, char *data, long len, long offset);
66 int smba_write(smba_file_t *f, char *data, long len, long offset);
67 long smba_seek (smba_file_t *f, long offset, long mode, off_t * new_position_ptr);
68 int smba_lockrec (smba_file_t *f, long offset, long len, long mode, int unlocked, long timeout);
69 int smba_getattr(smba_file_t *f, smba_stat_t *data);
70 int smba_setattr(smba_file_t *f, smba_stat_t *data);
71 int smba_readdir(smba_file_t *f, long offs, void *d, smba_callback_t callback);
72 int smba_create(smba_file_t *dir, const char *name, smba_stat_t *attr);
73 int smba_mkdir(smba_file_t *dir, const char *name);
74 int smba_remove(smba_server_t *s, char *path);
75 int smba_rmdir(smba_server_t *s, char *path);
76 int smba_rename(smba_server_t *s, char *from, char *to);
77 int smba_statfs(smba_server_t *s, long *bsize, long *blocks, long *bfree);
78 void smb_invalidate_all_inodes(struct smb_server *server);
79 int smba_start(char *service, char *opt_workgroup, char *opt_username, char *opt_password, char *opt_clientname, char *opt_servername, int opt_cachesize, smba_server_t **result);
80 void smba_disconnect(smba_server_t *server);
81 int smba_get_dircache_size(struct smba_server * server);
82 int smba_change_dircache_size(struct smba_server * server,int cache_size);
84 /****************************************************************************/
86 #endif /* _SMB_ABSTRACTION_H */