~vcs-imports/samba/main

« back to all changes in this revision

Viewing changes to source/include/libsmb_internal.h

  • Committer: jerry
  • Date: 2006-07-14 21:48:39 UTC
  • Revision ID: vcs-imports@canonical.com-20060714214839-586d8c489a8fcead
gutting trunk to move to svn:externals

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#ifndef _LIBSMB_INTERNAL_H_
2
 
#define _LIBSMB_INTERNAL_H_
3
 
 
4
 
#define SMBC_MAX_NAME  1023
5
 
#define SMBC_FILE_MODE (S_IFREG | 0444)
6
 
#define SMBC_DIR_MODE  (S_IFDIR | 0555)
7
 
 
8
 
 
9
 
#include "include/libsmbclient.h"
10
 
 
11
 
 
12
 
struct _SMBCSRV {
13
 
        struct cli_state *cli;
14
 
        dev_t dev;
15
 
        BOOL no_pathinfo;
16
 
        BOOL no_pathinfo2;
17
 
        BOOL no_nt_session;
18
 
 
19
 
        SMBCSRV *next, *prev;
20
 
        
21
 
};
22
 
 
23
 
/* 
24
 
 * Keep directory entries in a list 
25
 
 */
26
 
struct smbc_dir_list {
27
 
        struct smbc_dir_list *next;
28
 
        struct smbc_dirent *dirent;
29
 
};
30
 
 
31
 
 
32
 
/*
33
 
 * Structure for open file management
34
 
 */ 
35
 
struct _SMBCFILE {
36
 
        int cli_fd; 
37
 
        char *fname;
38
 
        SMB_OFF_T offset;
39
 
        struct _SMBCSRV *srv;
40
 
        BOOL file;
41
 
        struct smbc_dir_list *dir_list, *dir_end, *dir_next;
42
 
        int dir_type, dir_error;
43
 
 
44
 
        SMBCFILE *next, *prev;
45
 
};
46
 
 
47
 
 
48
 
struct smbc_internal_data {
49
 
 
50
 
        /*
51
 
         * Is this handle initialized ? 
52
 
         */
53
 
        BOOL    _initialized;
54
 
 
55
 
        /* dirent pointer location
56
 
         *
57
 
         * Leave room for any urlencoded filename and the comment field.
58
 
         *
59
 
         * We really should use sizeof(struct smbc_dirent) plus (NAME_MAX * 3)
60
 
         * plus whatever the max length of a comment is, plus a couple of null
61
 
         * terminators (one after the filename, one after the comment).
62
 
         *
63
 
         * According to <linux/limits.h>, NAME_MAX is 255.  Is it longer
64
 
         * anyplace else?
65
 
         */
66
 
        char    _dirent[1024];
67
 
 
68
 
        /*
69
 
         * server connection list
70
 
         */
71
 
        SMBCSRV * _servers;
72
 
        
73
 
        /*
74
 
         * open file/dir list
75
 
         */
76
 
        SMBCFILE * _files;
77
 
 
78
 
        /*
79
 
         * Log to standard error instead of the more typical standard output
80
 
         */
81
 
        BOOL _debug_stderr;
82
 
 
83
 
        /*
84
 
         * Authentication function which includes the context.  This will be
85
 
         * used if set; otherwise context->callbacks.auth_fn() will be used.
86
 
         */
87
 
        smbc_get_auth_data_with_context_fn _auth_fn_with_context;
88
 
 
89
 
        /*
90
 
         * An opaque (to this library) user data handle which can be set
91
 
         * and retrieved with smbc_option_set() and smbc_option_get().
92
 
         */
93
 
        void * _user_data;
94
 
};      
95
 
 
96
 
 
97
 
#endif