Ignore:
Timestamp:
Dec 13, 2010, 5:10:38 PM (15 years ago)
Author:
Silvan Scherrer
Message:

samba client 2.1: caching

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/client/src/smbwrp.h

    r472 r499  
    125125#endif
    126126
     127struct DirectoryCache;
     128
    127129typedef struct _Resource
    128130{
     
    133135        int easupport;
    134136        int krb5support;
     137        struct DirectoryCache *pdc;
    135138} Resource;
    136139
     
    157160        void *plist;
    158161        unsigned long ulAttribute;
     162        const char *fullpath;
    159163} filelist_state;
    160164
     
    186190int _System smbwrp_dskattr(cli_state * cli, FSALLOCATE *pfsa);
    187191
     192/* Directory cache helpers. */
     193int dircache_create(struct DirectoryCache **ppdc, unsigned long ulExpirationTime, int cMaxEntries);
     194void dircache_delete(struct DirectoryCache *pdc);
     195
     196typedef void FNADDDIRENTRY(const char*, smbwrp_fileinfo *, const char *, void *);
     197typedef FNADDDIRENTRY *PFNADDDIRENTRY;
     198
     199/* Note: dircache_list_files or dircache_write_begin construct the directory path
     200 *       using information in the filelist_state structure.
     201 */
     202int dircache_list_files(PFNADDDIRENTRY fn,
     203                        filelist_state *state,
     204                        int *ptotal_received);
     205
     206void *dircache_write_begin(filelist_state *state,
     207                           int cFiles);
     208void dircache_write_entry(void *dircachectx, const smbwrp_fileinfo *finfo);
     209void dircache_write_end(void *dircachectx);
     210
     211void dircache_invalidate(const char *path,
     212                         struct DirectoryCache *pdc,
     213                         int fParent);
     214
     215int dircache_find_path(struct DirectoryCache *pdc,
     216                       const char *path,
     217                       smbwrp_fileinfo *finfo,
     218                       unsigned long *pulAge);
     219
     220/* Prototype the debug log helper. */
     221void debuglocal(int level, const char * fmt, ...);
     222
    188223#endif /* _SMBWRP_H */
Note: See TracChangeset for help on using the changeset viewer.