C/C++ User's Journal STLSoft - ... Robust, Lightweight, Cross-platform, Template Software ... ATLSTL - where the Standard Template Library meets the Active Template Library COMSTL - where the Standard Template Library meets the Component Object Model
Synesis Software InetSTL - where the Standard Template Library meets the Internet UNIXSTL - Template Software for the UNIX Operating System WinSTL - where the Standard Template Library meets the Win32 API

recls/recls.h

Go to the documentation of this file.
00001 /* /////////////////////////////////////////////////////////////////////////////
00002  * File:        recls/recls.h
00003  *
00004  * Purpose:     Main header file for the recls API.
00005  *
00006  * Created:     15th August 2003
00007  * Updated:     16th April 2007
00008  *
00009  * Home:        http://recls.org/
00010  *
00011  * Copyright (c) 2003-2007, Matthew Wilson and Synesis Software
00012  * All rights reserved.
00013  *
00014  * Redistribution and use in source and binary forms, with or without
00015  * modification, are permitted provided that the following conditions are met:
00016  *
00017  * - Redistributions of source code must retain the above copyright notice, this
00018  *   list of conditions and the following disclaimer.
00019  * - Redistributions in binary form must reproduce the above copyright notice,
00020  *   this list of conditions and the following disclaimer in the documentation
00021  *   and/or other materials provided with the distribution.
00022  * - Neither the name(s) of Matthew Wilson and Synesis Software nor the names of
00023  *   any contributors may be used to endorse or promote products derived from
00024  *   this software without specific prior written permission.
00025  *
00026  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
00027  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00028  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
00029  * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
00030  * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
00031  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
00032  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
00033  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
00034  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
00035  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
00036  * POSSIBILITY OF SUCH DAMAGE.
00037  *
00038  * ////////////////////////////////////////////////////////////////////////// */
00039 
00040 
00046 #ifndef RECLS_INCL_RECLS_H_RECLS
00047 #define RECLS_INCL_RECLS_H_RECLS
00048 
00049 /* File version */
00050 #ifndef RECLS_DOCUMENTATION_SKIP_SECTION
00051 # define RECLS_VER_RECLS_H_RECLS_MAJOR      3
00052 # define RECLS_VER_RECLS_H_RECLS_MINOR      8
00053 # define RECLS_VER_RECLS_H_RECLS_REVISION   4
00054 # define RECLS_VER_RECLS_H_RECLS_EDIT       78
00055 #endif /* !RECLS_DOCUMENTATION_SKIP_SECTION */
00056 
00078 /* recls version */
00079 #define RECLS_VER_MAJOR     1
00080 #define RECLS_VER_MINOR     8
00081 #define RECLS_VER_REVISION  7
00082 #define RECLS_VER_1_0_1     0x01000100
00083 #define RECLS_VER_1_1_1     0x01010100
00084 #define RECLS_VER_1_2_1     0x01020100
00085 #define RECLS_VER_1_3_1     0x01030100
00086 #define RECLS_VER_1_4_1     0x01040100
00087 #define RECLS_VER_1_4_2     0x01040200
00088 #define RECLS_VER_1_5_1     0x01050100
00089 #define RECLS_VER_1_5_2     0x01050200
00090 #define RECLS_VER_1_5_3     0x01050300
00091 #define RECLS_VER_1_6_1     0x01060100
00092 #define RECLS_VER_1_6_2     0x01060200
00093 #define RECLS_VER_1_6_3     0x01060300
00094 #define RECLS_VER_1_6_4     0x01060400
00095 #define RECLS_VER_1_6_5     0x01060500
00096 #define RECLS_VER_1_7_1     0x01070100
00097 #define RECLS_VER_1_7_2     0x01070200
00098 #define RECLS_VER_1_8_1     0x01080100
00099 #define RECLS_VER_1_8_2     0x01080200
00100 #define RECLS_VER_1_8_3     0x01080300
00101 #define RECLS_VER_1_8_4     0x01080400
00102 #define RECLS_VER_1_8_5     0x01080500
00103 #define RECLS_VER_1_8_6     0x01080600
00104 #define RECLS_VER_1_8_7     0x01080700
00105 #define RECLS_VER           RECLS_VER_1_8_7
00106 
00107 /* /////////////////////////////////////////////////////////////////////////////
00108  * Strictness
00109  */
00110 
00111 #ifndef RECLS_NO_STRICT
00112 # define RECLS_STRICT
00113 #endif /* !RECLS_NO_STRICT */
00114 
00115 /* /////////////////////////////////////////////////////////////////////////////
00116  * Includes
00117  */
00118 
00119 /* Detects C & C++ things, such as namespace support */
00120 #include <recls/internal/language.h>
00121 /* Includes platform-specific headers */
00122 #include <recls/internal/platform.h>
00123 /* Includes stddef.h / cstddef, and defines the recls types: recls_s/uint8/16/32/64_t */
00124 #include <recls/internal/compiler.h>
00125 /* Defines recls_filesize_t, recls_time_t */
00126 #include <recls/internal/platform_types.h>
00127 
00128 /* /////////////////////////////////////////////////////////////////////////////
00129  * Namespace
00130  */
00131 
00132 #if !defined(RECLS_NO_NAMESPACE)
00133 namespace recls
00134 {
00135 #endif /* !RECLS_NO_NAMESPACE */
00136 
00137 #if !defined(RECLS_NO_NAMESPACE)
00138 #  define RECLS_QUAL(x)                 ::recls::x
00139 #else
00140 # define RECLS_QUAL(x)                  x
00141 #endif /* !RECLS_NO_NAMESPACE */
00142 
00143 /* /////////////////////////////////////////////////////////////////////////////
00144  * Constants and definitions
00145  */
00146 
00153 #if defined(RECLS_DOCUMENTATION_SKIP_SECTION)
00154 # define RECLS_ROOT_NAME_LEN            (1) or (3)
00155 #elif defined(RECLS_PLATFORM_IS_WIN32)
00156 # define RECLS_ROOT_NAME_LEN            (3)
00157 #elif defined(RECLS_PLATFORM_IS_UNIX)
00158 # define RECLS_ROOT_NAME_LEN            (1)
00159 #elif defined(RECLS_OVERRIDE_PLATFORM)
00160   /* Assume that the appropriate inclusions are made */
00161 #else
00162 # error Platform not recognised
00163 #endif /* platform */
00164 
00165 /* /////////////////////////////////////////////////////////////////////////////
00166  * Function specifications
00167  */
00168 
00173 #define RECLS_FNDECL(rt)    RECLS_LINKAGE_C rt RECLS_CALLCONV_DEFAULT
00174 
00175 /* /////////////////////////////////////////////////////////////////////////////
00176  * Typedefs
00177  */
00178 
00179 /* recls_rc_t */
00180 #ifdef __cplusplus
00181 
00186 typedef recls_sint32_t                      recls_rc_t;
00187 
00192 const recls_rc_t                            RECLS_RC_OK(0);
00197 const recls_rc_t                            RECLS_RC_FAIL(-1);
00198 
00203 inline bool RECLS_FAILED(recls_rc_t const &rc)
00204 {
00205     return rc < 0;
00206 }
00207 
00212 inline bool RECLS_SUCCEEDED(recls_rc_t const &rc)
00213 {
00214     return !RECLS_FAILED(rc);
00215 }
00216 
00217 #else /* ? __cplusplus */
00218 
00223 typedef recls_sint32_t                      recls_rc_t;
00224 
00229 # define RECLS_RC_OK                        (0)
00230 
00234 # define RECLS_RC_FAIL                      (-1)
00235 
00240 # define RECLS_FAILED(rc)                   ((rc) < 0)
00241 
00245 # define RECLS_SUCCEEDED(rc)                (!RECLS_FAILED(rc))
00246 
00247 #endif /* __cplusplus */
00248 
00249 /* hrecls_t */
00250 #if !defined(RECLS_DOCUMENTATION_SKIP_SECTION) && \
00251     defined(RECLS_COMPILER_IS_BORLAND) && \
00252     __BORLANDC__ < 0x0560
00253 struct hrecls_t_
00254 {
00255     int dummy;
00256 };
00257 #else /* ? compiler */
00258 struct hrecls_t_;
00259 #endif /* compiler */
00260 
00265 typedef struct hrecls_t_ const *            hrecls_t;
00266 
00267 /* /////////////////////////////////////////////////////////////////////////////
00268  * Namespace
00269  */
00270 
00271 #if !defined(RECLS_NO_NAMESPACE)
00272 } /* namespace recls */
00273 #endif /* !RECLS_NO_NAMESPACE */
00274 
00275 /* /////////////////////////////////////////////////////////////////////////////
00276  * Includes
00277  */
00278 
00279 /* Defines result codes */
00280 #include <recls/internal/retcodes.h>
00281 
00282 /* /////////////////////////////////////////////////////////////////////////////
00283  * Namespace
00284  */
00285 
00286 #if !defined(RECLS_NO_NAMESPACE)
00287 namespace recls
00288 {
00289 #endif /* !RECLS_NO_NAMESPACE */
00290 
00291 /* /////////////////////////////////////////////////////////////////////////////
00292  * Enumerations
00293  */
00294 
00302 enum RECLS_FLAG
00303 {
00304         RECLS_F_FILES                       =   0x00000001  
00305     ,   RECLS_F_DIRECTORIES                 =   0x00000002  
00306     ,   RECLS_F_LINKS                       =   0x00000004  
00307     ,   RECLS_F_DEVICES                     =   0x00000008  
00308     ,   RECLS_F_TYPEMASK                    =   0x00000FFF
00309     ,   RECLS_F_DIR_PROGRESS                =   0x00001000  
00310     ,   RECLS_F_RECURSIVE                   =   0x00010000  
00311     ,   RECLS_F_NO_FOLLOW_LINKS             =   0x00020000  
00312     ,   RECLS_F_DIRECTORY_PARTS             =   0x00040000  
00313     ,   RECLS_F_DETAILS_LATER               =   0x00080000  
00314     ,   RECLS_F_PASSIVE_FTP                 =   0x00100000  
00315     ,   RECLS_F_MARK_DIRS                   =   0x00200000  
00316     ,   RECLS_F_ALLOW_REPARSE_DIRS          =   0x00400000  
00317 #if 0
00318     ,   RECLS_F_CALC_CHECKSUM               =   0x00800000
00319 #endif /* 0 */
00320     ,   RECLS_F_CALLBACKS_STDCALL_ON_WIN32  =   0x01000000  
00321     ,   RECLS_F_USE_TILDE_ON_NO_SEARCHROOT  =   0x04000000  
00322 #if 0
00323     ,   RECLS_F_DIR_SIZE_IS_NUM_FILES       =   0x02000000  
00324 #endif /* 0 */
00325     ,   RECLS_F_IGNORE_HIDDEN_ENTRIES_ON_WIN32   =   0x08000000  
00327 #if !defined(FILES)
00328     ,   FILES = RECLS_F_FILES 
00329 #endif /* !FILES */
00330 #if !defined(DIRECTORIES)
00331     ,   DIRECTORIES = RECLS_F_DIRECTORIES 
00332 #endif /* !DIRECTORIES */
00333 #if !defined(LINKS)
00334     ,   LINKS = RECLS_F_LINKS 
00335 #endif /* !LINKS */
00336 #if !defined(DEVICES)
00337     ,   DEVICES = RECLS_F_DEVICES 
00338 #endif /* !DEVICES */
00339 #if !defined(TYPEMASK)
00340     ,   TYPEMASK = RECLS_F_TYPEMASK 
00341 #endif /* !TYPEMASK */
00342 #if !defined(DIR_PROGRESS)
00343     ,   DIR_PROGRESS = RECLS_F_DIR_PROGRESS 
00344 #endif /* !DIR_PROGRESS */
00345 #if !defined(RECURSIVE)
00346     ,   RECURSIVE = RECLS_F_RECURSIVE 
00347 #endif /* !RECURSIVE */
00348 #if !defined(NO_FOLLOW_LINKS)
00349     ,   NO_FOLLOW_LINKS = RECLS_F_NO_FOLLOW_LINKS 
00350 #endif /* !NO_FOLLOW_LINKS */
00351 #if !defined(DIRECTORY_PARTS)
00352     ,   DIRECTORY_PARTS = RECLS_F_DIRECTORY_PARTS 
00353 #endif /* !DIRECTORY_PARTS */
00354 #if !defined(DETAILS_LATER)
00355     ,   DETAILS_LATER = RECLS_F_DETAILS_LATER 
00356 #endif /* !DETAILS_LATER */
00357 #if !defined(PASSIVE_FTP)
00358     ,   PASSIVE_FTP = RECLS_F_PASSIVE_FTP 
00359 #endif /* !PASSIVE_FTP */
00360 #if !defined(MARK_DIRS)
00361     ,   MARK_DIRS = RECLS_F_MARK_DIRS 
00362 #endif /* !MARK_DIRS */
00363 #if !defined(ALLOW_REPARSE_DIRS)
00364     ,   ALLOW_REPARSE_DIRS = RECLS_F_ALLOW_REPARSE_DIRS 
00365 #endif /* !ALLOW_REPARSE_DIRS */
00366 #if 0
00367 #if !defined(CALC_CHECKSUM)
00368     ,   CALC_CHECKSUM = RECLS_F_CALC_CHECKSUM 
00369 #endif /* !CALC_CHECKSUM */
00370 #endif /* 0 */
00371 #if !defined(CALLBACKS_STDCALL_ON_WIN32)
00372     ,   CALLBACKS_STDCALL_ON_WIN32 = RECLS_F_CALLBACKS_STDCALL_ON_WIN32 
00373 #endif /* !CALLBACKS_STDCALL_ON_WIN32 */
00374 /*  ,   DIR_SIZE_IS_NUM_CHILDREN    =   RECLS_F_DIR_SIZE_IS_NUM_CHILDREN    */
00375 #if !defined(F_USE_TILDE_ON_NO_SEARCHROOT)
00376     ,   USE_TILDE_ON_NO_SEARCHROOT = RECLS_F_USE_TILDE_ON_NO_SEARCHROOT 
00377 #endif /* !RECLS_F_USE_TILDE_ON_NO_SEARCHROOT */
00378     ,   IGNORE_HIDDEN_ENTRIES_ON_WIN32 = RECLS_F_IGNORE_HIDDEN_ENTRIES_ON_WIN32 
00379 #if !defined(IGNORE_HIDDEN_ENTRIES_ON_WIN32)
00380 #endif /* !IGNORE_HIDDEN_ENTRIES_ON_WIN32 */
00381 #if 0
00382 #if !defined(RECLS_F_DIR_SIZE_IS_NUM_FILES)
00383     ,   DIR_SIZE_IS_NUM_FILES = RECLS_F_DIR_SIZE_IS_NUM_FILES 
00384 #endif /* !RECLS_F_DIR_SIZE_IS_NUM_FILES */
00385 #endif /* 0 */
00386 };
00387 
00396 enum RECLS_ROOTS_FLAG
00397 {
00398         RECLS_ROOTS_F_FIXED_DRIVES      =   0x0001  
00399     ,   RECLS_ROOTS_F_NETWORK_DRIVES    =   0x0002  
00400     ,   RECLS_ROOTS_F_CDROM_DRIVES      =   0x0004  
00401     ,   RECLS_ROOTS_F_REMOVABLE_DRIVES  =   0x0008  
00402     ,   RECLS_ROOTS_F_RAM_DRIVES        =   0x0010  
00404 #ifdef __cplusplus
00405     ,   FixedDrives                     =   RECLS_ROOTS_F_FIXED_DRIVES      
00406     ,   NetworkDrives                   =   RECLS_ROOTS_F_NETWORK_DRIVES    
00407     ,   CDRomDrives                     =   RECLS_ROOTS_F_CDROM_DRIVES      
00408     ,   RemovableDrives                 =   RECLS_ROOTS_F_REMOVABLE_DRIVES  
00409     ,   RamDrives                       =   RECLS_ROOTS_F_RAM_DRIVES        
00410 #endif /* __cplusplus */
00411 
00412 #ifndef RECLS_DOCUMENTATION_SKIP_SECTION
00413     ,   RECLS_F_FIXED_DRIVES            =   RECLS_ROOTS_F_FIXED_DRIVES
00414     ,   RECLS_F_NETWORK_DRIVES          =   RECLS_ROOTS_F_NETWORK_DRIVES
00415     ,   RECLS_F_CDROM_DRIVES            =   RECLS_ROOTS_F_CDROM_DRIVES
00416     ,   RECLS_F_REMOVABLE_DRIVES        =   RECLS_ROOTS_F_REMOVABLE_DRIVES
00417     ,   RECLS_F_RAM_DRIVES              =   RECLS_ROOTS_F_RAM_DRIVES
00418 #endif /* !RECLS_DOCUMENTATION_SKIP_SECTION */
00419 };
00420 
00421 #if !defined(__cplusplus) && \
00422     !defined(RECLS_DOCUMENTATION_SKIP_SECTION)
00423 typedef enum RECLS_FLAG         RECLS_FLAG;
00424 typedef enum RECLS_ROOTS_FLAG   RECLS_ROOTS_FLAG;
00425 #endif /* !__cplusplus && !RECLS_DOCUMENTATION_SKIP_SECTION */
00426 
00427 /* /////////////////////////////////////////////////////////////////////////////
00428  * Typedefs
00429  */
00430 
00431 /* #if defined(RECLS_PLATFORM_IS_WIN32)
00432 # define RECLS_ROOT_NAME_LEN            (3)
00433 #elif defined(RECLS_PLATFORM_IS_UNIX)
00434  */
00435 #ifndef RECLS_COMPILER_IS_CH
00436 
00440 struct recls_root_t
00441 {
00449     recls_char_t    name[1 + RECLS_ROOT_NAME_LEN];
00450 };
00451 
00452 # ifdef __cplusplus
00453 typedef recls_root_t                    root_t;
00454 # else /* ? __cplusplus */
00455 typedef struct recls_root_t             recls_root_t;
00456 # endif /* __cplusplus */
00457 #endif /* !RECLS_COMPILER_IS_CH */
00458 
00459 #ifndef RECLS_COMPILER_IS_CH
00460 struct recls_fileinfo_t;
00461 #endif /* !RECLS_COMPILER_IS_CH */
00462 
00467 typedef struct recls_fileinfo_t const   *recls_info_t;
00468 
00473 typedef void                            *recls_process_fn_param_t;
00474 
00486 typedef int (RECLS_CALLCONV_DEFAULT *hrecls_process_fn_t)(  recls_info_t                hEntry
00487                                                         ,   recls_process_fn_param_t    param);
00488 
00502 typedef int (RECLS_CALLCONV_DEFAULT *hrecls_progress_fn_t)( recls_char_t const          *dir
00503                                                         ,   size_t                      dirLen
00504                                                         ,   recls_process_fn_param_t    param
00505                                                         ,   void                        *reserved0
00506                                                         ,   recls_uint32_t              reserved1);
00507 
00508 /* /////////////////////////////////////////////////////////////////////////////
00509  * Namespace typedefs
00510  */
00511 
00512 #if !defined(RECLS_NO_NAMESPACE)
00513 typedef recls_info_t                info_t;
00514 typedef recls_process_fn_param_t    process_fn_param_t;
00515 #endif /* !RECLS_NO_NAMESPACE */
00516 
00517 /* /////////////////////////////////////////////////////////////////////////////
00518  * Functions
00519  */
00520 
00521 /***************************************
00522  * File system
00523  */
00524 
00531 #ifndef RECLS_COMPILER_IS_CH
00532 
00558 RECLS_FNDECL(size_t)                Recls_GetRoots(     recls_root_t    *roots
00559                                                     ,   size_t          cRoots);
00560 
00573 RECLS_FNDECL(size_t)                Recls_GetSelectedRoots( recls_root_t    *roots
00574                                                         ,   size_t          cRoots
00575                                                         ,   recls_uint32_t  flags);
00576 
00577 #endif /* !RECLS_COMPILER_IS_CH */
00578 
00579 #if 0
00580 /* New Recls1 API. */
00581 RECLS_FNDECL(size_t)    Recls1_FileSystem_GetRoots(     recls_root_t    *roots
00582                                                     ,   size_t          cRoots
00583                                                     ,   recls_uint32_t  flags);
00584 #endif /* 0 */
00585 
00586 
00601 RECLS_FNDECL(recls_char_t const*)   Recls_GetPathNameSeparator(void);
00602 
00603 #if 0
00604 /* New Recls1 API. */
00605 RECLS_FNDECL(recls_char_t const*)   Recls1_FileSystem_GetPathNameSeparator(void);
00606 #endif /* 0 */
00607 
00622 RECLS_FNDECL(recls_char_t const*)   Recls_GetPathSeparator(void);
00623 
00624 #if 0
00625 /* New Recls1 API. */
00626 RECLS_FNDECL(recls_char_t const*)   Recls1_FileSystem_GetPathSeparator(void);
00627 #endif /* 0 */
00628 
00643 RECLS_FNDECL(recls_char_t const*)   Recls_GetWildcardsAll(void);
00644 
00645 #if 0
00646 /* New Recls1 API. */
00647 RECLS_FNDECL(recls_char_t const*)   Recls1_FileSystem_GetWildcardsAll(void);
00648 #endif /* 0 */
00649 
00652 /***************************************
00653  * Search control
00654  */
00655 
00681 RECLS_FNDECL(recls_rc_t) Recls_Search(          recls_char_t const          *searchRoot
00682                                     ,           recls_char_t const          *pattern
00683                                     ,           recls_uint32_t              flags
00684                                     ,           hrecls_t                    *phSrch);
00685 
00702 RECLS_FNDECL(recls_rc_t) Recls_SearchFeedback(  recls_char_t const          *searchRoot
00703                                     ,           recls_char_t const          *pattern
00704                                     ,           recls_uint32_t              flags
00705                                     ,           hrecls_progress_fn_t        pfn
00706                                     ,           recls_process_fn_param_t    param
00707                                     ,           hrecls_t                    *phSrch);
00708 
00709 
00710 #if 0
00711 /* New Recls1 API. */
00712 RECLS_FNDECL(recls_rc_t) Recls1_FileSystem_StartSearch( recls_char_t const          *searchRoot
00713                                                     ,   recls_char_t const          *pattern
00714                                                     ,   recls_uint32_t              flags
00715                                                     ,   Recls1_progress_fn_t        pfnProgress
00716                                                     ,   Recls1_process_fn_param_t   paramProgress
00717                                                     ,   Recls1_filter_fn_t          pfnFilter
00718                                                     ,   Recls1_filter_fn_param_t    paramFilter
00719                                                     ,   hrecls_t                    *phSrch);
00720 #endif /* 0 */
00721 
00737 RECLS_FNDECL(recls_rc_t) Recls_SearchProcess(   recls_char_t const          *searchRoot
00738                                             ,   recls_char_t const          *pattern
00739                                             ,   recls_uint32_t              flags
00740                                             ,   hrecls_process_fn_t         pfn
00741                                             ,   recls_process_fn_param_t    param);
00742 
00749 RECLS_FNDECL(void) Recls_SearchClose(           hrecls_t                    hSrch);
00750 
00751 
00752 #if 0
00753 /* New Recls1 API. */
00754 RECLS_FNDECL(recls_rc_t) Recls1_FileSystem_CloseSearch(hrecls_t             hSrch);
00755 #endif /* 0 */
00756 
00757 
00771 RECLS_FNDECL(recls_rc_t) Recls_Stat(            recls_char_t const          *path
00772                                             ,   recls_uint32_t              flags
00773                                             ,   recls_info_t                *phEntry);
00774 
00775 #if 0
00776 /* New Recls1 API. */
00777 RECLS_FNDECL(recls_rc_t) Recls1_FileSystem_Stat(Recls1_char_t const         *path
00778                                             ,   Recls1_uint32_t             flags
00779                                             ,   Recls1_entry_t              *pentry);
00780 #endif /* 0 */
00781 
00782 
00785 /***************************************
00786  * Search enumeration
00787  */
00788 
00806 RECLS_FNDECL(recls_rc_t) Recls_GetNext(         hrecls_t                    hSrch);
00807 
00808 #if 0
00809 /* New Recls1 API. */
00810 RECLS_FNDECL(recls_rc_t) Recls1_Search_Next(    hrecls_t                    hSrch);
00811 #endif /* 0 */
00812 
00813 
00826 RECLS_FNDECL(recls_rc_t) Recls_GetDetails(      hrecls_t                    hSrch
00827                                             ,   recls_info_t                *phEntry);
00828 
00829 #if 0
00830 /* New Recls1 API. */
00831 #endif /* 0 */
00832 
00844 RECLS_FNDECL(recls_rc_t) Recls_GetNextDetails(  hrecls_t                    hSrch
00845                                             ,   recls_info_t                *phEntry);
00846 
00849 /***************************************
00850  * File entry information
00851  */
00852 
00865 RECLS_FNDECL(void) Recls_CloseDetails(          recls_info_t                hEntry);
00866 
00878 RECLS_FNDECL(recls_rc_t) Recls_CopyDetails(     recls_info_t                hEntry
00879                                             ,   recls_info_t                *phEntry);
00880 
00892 RECLS_FNDECL(recls_rc_t) Recls_OutstandingDetails(hrecls_t                  hSrch
00893                                             ,   recls_uint32_t              *count);
00894 
00897 /***************************************
00898  * Error handling
00899  */
00900 
00915 RECLS_FNDECL(recls_rc_t) Recls_GetLastError(    hrecls_t                    hSrch);
00916 
00927 RECLS_FNDECL(size_t) Recls_GetErrorString(      /* [in] */ recls_rc_t       rc
00928                                     ,           /* [in] */ recls_char_t     *buffer
00929                                     ,           /* [in] */ size_t           cchBuffer);
00930 
00941 RECLS_FNDECL(size_t) Recls_GetLastErrorString(  /* [in] */ hrecls_t         hSrch
00942                                         ,       /* [in] */ recls_char_t     *buffer
00943                                         ,       /* [in] */ size_t           cchBuffer);
00944 
00947 /***************************************
00948  * Property elicitation
00949  */
00950 
00967 RECLS_FNDECL(size_t) Recls_GetPathProperty(     recls_info_t                hEntry
00968                                         ,       recls_char_t                *buffer
00969                                         ,       size_t                      cchBuffer);
00970 
00981 RECLS_FNDECL(size_t) Recls_GetSearchRelativePathProperty(   recls_info_t    hEntry
00982                                                     ,       recls_char_t    *buffer
00983                                                     ,       size_t          cchBuffer);
00984 
00995 RECLS_FNDECL(size_t) Recls_GetDirectoryProperty(recls_info_t                hEntry
00996                                             ,   recls_char_t                *buffer
00997                                             ,   size_t                      cchBuffer);
00998 
01011 RECLS_FNDECL(size_t) Recls_GetDirectoryPathProperty(    recls_info_t        hEntry
01012                                                     ,   recls_char_t        *buffer
01013                                                     ,   size_t              cchBuffer);
01014 
01025 RECLS_FNDECL(size_t) Recls_GetSearchDirectoryProperty(  recls_info_t        hEntry
01026                                                     ,   recls_char_t        *buffer
01027                                                     ,   size_t              cchBuffer);
01028 
01041 RECLS_FNDECL(size_t) Recls_GetUNCDriveProperty(         recls_info_t        hEntry
01042                                                     ,   recls_char_t        *buffer
01043                                                     ,   size_t              cchBuffer);
01044 
01055 RECLS_FNDECL(size_t) Recls_GetFileProperty(     recls_info_t                hEntry
01056                                         ,       recls_char_t                *buffer
01057                                         ,       size_t                      cchBuffer);
01058 
01071 RECLS_FNDECL(size_t) Recls_GetShortFileProperty(recls_info_t                hEntry
01072                                             ,   recls_char_t                *buffer
01073                                             ,   size_t                      cchBuffer);
01074 
01085 RECLS_FNDECL(size_t) Recls_GetFileNameProperty( recls_info_t                hEntry
01086                                             ,   recls_char_t                *buffer
01087                                             ,   size_t                      cchBuffer);
01088 
01099 RECLS_FNDECL(size_t) Recls_GetFileExtProperty(  recls_info_t                hEntry
01100                                             ,   recls_char_t                *buffer
01101                                             ,   size_t                      cchBuffer);
01102 
01116 RECLS_FNDECL(size_t) Recls_GetDirectoryPartProperty(recls_info_t            hEntry
01117                                             ,   int                         part
01118                                             ,   recls_char_t                *buffer
01119                                             ,   size_t                      cchBuffer);
01120 
01121 
01132 RECLS_FNDECL(recls_bool_t) Recls_IsFileReadOnly(recls_info_t                hEntry);
01133 
01144 RECLS_FNDECL(recls_bool_t) Recls_IsFileDirectory(recls_info_t               hEntry);
01145 
01156 RECLS_FNDECL(recls_bool_t) Recls_IsFileLink(    recls_info_t                hEntry);
01157 
01168 RECLS_FNDECL(recls_bool_t) Recls_DoesEntryExist(recls_info_t                hEntry);
01169 
01180 RECLS_FNDECL(recls_bool_t) Recls_IsFileUNC(     recls_info_t                hEntry);
01181 
01191 RECLS_FNDECL(void)         Recls_GetSizeProperty(   recls_info_t            hEntry
01192                                                 ,   recls_filesize_t        *size);
01193 
01198 RECLS_FNDECL(recls_time_t) Recls_GetCreationTime(recls_info_t               hEntry);
01199 
01204 RECLS_FNDECL(recls_time_t) Recls_GetModificationTime(recls_info_t           hEntry);
01205 
01210 RECLS_FNDECL(recls_time_t) Recls_GetLastAccessTime(recls_info_t             hEntry);
01211 
01216 RECLS_FNDECL(recls_time_t) Recls_GetLastStatusChangeTime(recls_info_t       hEntry);
01217 
01218 #if 0
01219 
01226 RECLS_FNDECL(recls_uint32_t) Recls_GetChecksum(         recls_info_t        hEntry);
01227 #endif /* 0 */
01228 
01231 /***************************************
01232  * Extended API functions
01233  */
01234 
01247 RECLS_FNDECL(recls_bool_t) Recls_IsDirectoryEmpty(recls_char_t const        *dir);
01248 
01255 RECLS_FNDECL(recls_bool_t) Recls_IsDirectoryEntryEmpty(recls_info_t         hEntry);
01256 
01264 RECLS_FNDECL(recls_filesize_t) Recls_CalcDirectorySize(recls_char_t const   *dir);
01265 
01273 RECLS_FNDECL(recls_filesize_t) Recls_CalcDirectoryEntrySize(recls_info_t    hEntry);
01274 
01275 
01288 RECLS_FNDECL(recls_filesize_t) Recls_CalcDirectorySizeFeedback( recls_char_t const          *dir
01289                                                             ,   recls_uint32_t              flags
01290                                                             ,   hrecls_progress_fn_t        pfn
01291                                                             ,   recls_process_fn_param_t    param);
01292 
01295 /***************************************
01296  * Path functions
01297  */
01298 
01320 RECLS_FNDECL(size_t) Recls_CombinePaths(        recls_char_t const          *path1
01321                                             ,   recls_char_t const          *path2
01322                                             ,   recls_char_t                *result
01323                                             ,   size_t                      cchResult);
01324 
01336 RECLS_FNDECL(size_t) Recls_DeriveRelativePath(  recls_char_t const          *origin
01337                                             ,   recls_char_t const          *target
01338                                             ,   recls_char_t                *result
01339                                             ,   size_t                      cchResult);
01340 
01351 RECLS_FNDECL(size_t) Recls_SqueezePath(         recls_char_t const          *path
01352                                             ,   recls_char_t                *result
01353                                             ,   size_t                      cchResult);
01354 
01357 /* /////////////////////////////////////////////////////////////////////////////
01358  * Namespace
01359  */
01360 
01361 #if !defined(RECLS_NO_NAMESPACE)
01362 } /* namespace recls */
01363 #endif /* !RECLS_NO_NAMESPACE */
01364 
01365 #ifdef __cplusplus
01366 
01367 # ifndef _STLSOFT_NO_NAMESPACE
01368 namespace stlsoft
01369 {
01370 # endif /* !_STLSOFT_NO_NAMESPACE */
01371 
01372 # if defined(RECLS_NO_NAMESPACE)
01373 inline recls_char_t const *c_str_ptr(recls_root_t const &root)
01374 # else /* ? RECLS_NO_NAMESPACE */
01375 inline ::recls::recls_char_t const *c_str_ptr(::recls::recls_root_t const &root)
01376 # endif /* RECLS_NO_NAMESPACE */
01377 {
01378     return root.name;
01379 }
01380 
01381 #ifdef RECLS_CHAR_TYPE_IS_CHAR
01382 inline ::recls::recls_char_t const *c_str_ptr_a(::recls::recls_root_t const &root)
01383 {
01384     return c_str_ptr(root);
01385 }
01386 #endif /* RECLS_CHAR_TYPE_IS_CHAR */
01387 
01388 #ifdef RECLS_CHAR_TYPE_IS_WCHAR
01389 inline ::recls::recls_char_t const *c_str_ptr_w(::recls::recls_root_t const &root)
01390 {
01391     return c_str_ptr(root);
01392 }
01393 #endif /* RECLS_CHAR_TYPE_IS_WCHAR */
01394 
01395 
01396 # ifndef _STLSOFT_NO_NAMESPACE
01397 } /* namespace stlsoft */
01398 # endif /* !_STLSOFT_NO_NAMESPACE */
01399 
01400 #endif /* __cplusplus */
01401 
01402 /* /////////////////////////////////////////////////////////////////////////////
01403  * Platform-specific includes
01404  */
01405 
01415 #ifdef RECLS_PLATFORM_API_WIN32
01416 # undef RECLS_PLATFORM_API_WIN32
01417 #endif /* RECLS_PLATFORM_API_WIN32 */
01418 
01419 #ifdef RECLS_PLATFORM_API_UNIX
01420 # undef RECLS_PLATFORM_API_UNIX
01421 #endif /* RECLS_PLATFORM_API_UNIX */
01422 
01423 #if !defined(RECLS_PURE_API)
01424 # if defined(RECLS_PLATFORM_IS_WIN32)
01425 #  include <recls/win32.h>
01426 #  define RECLS_PLATFORM_API_WIN32
01427 # elif defined(RECLS_PLATFORM_IS_UNIX)
01428 #  include <recls/unix.h>
01429 #  define RECLS_PLATFORM_API_UNIX
01430 # else
01431 #  error Platform not recognised
01432 # endif /* platform */
01433 #endif /* !RECLS_PURE_API */
01434 
01435 /* /////////////////////////////////////////////////////////////////////////////
01436  * Inclusion
01437  */
01438 
01439 #ifdef RECLS_CF_PRAGMA_ONCE_SUPPORT
01440 # pragma once
01441 #endif /* RECLS_CF_PRAGMA_ONCE_SUPPORT */
01442 
01443 /* /////////////////////////////////////////////////////////////////////////////
01444  * Documentation
01445  */
01446 
01447 #ifdef RECLS_DOCUMENTATION_SKIP_SECTION
01448 # include <recls/internal/doc/includes.h>
01449 #endif /* RECLS_DOCUMENTATION_SKIP_SECTION */
01450 
01451 /* ////////////////////////////////////////////////////////////////////////// */
01452 
01453 #endif /* !RECLS_INCL_RECLS_H_RECLS */
01454 
01455 /* ////////////////////////////////////////////////////////////////////////// */

recls Library documentation © Synesis Software Pty Ltd, 2001-2006