C/C++ User's Journal Synesis Software 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 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

Main Page   Modules   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

/Mappings/Cpp/reclspp_ftpsearch.h

Go to the documentation of this file.
00001 /* 
00002  * File:        reclspp_ftpsearch.h
00003  *
00004  * Purpose:     recls C++ mapping - FtpSearch class.
00005  *
00006  * Created:     18th August 2003
00007  * Updated:     8th June 2004
00008  *
00009  * Author:      Matthew Wilson, Synesis Software Pty Ltd.
00010  *
00011  * License:     (Licensed under the Synesis Software Standard Source License)
00012  *
00013  *              Copyright (C) 2002-2004, Synesis Software Pty Ltd.
00014  *
00015  *              All rights reserved.
00016  *
00017  *              www:        http://www.synesis.com.au/software
00018  *                          http://www.recls.org/
00019  *
00020  *              email:      submissions@recls.org  for submissions
00021  *                          admin@recls.org        for other enquiries
00022  *
00023  *              Redistribution and use in source and binary forms, with or
00024  *              without modification, are permitted provided that the following
00025  *              conditions are met:
00026  *
00027  *              (i) Redistributions of source code must retain the above
00028  *              copyright notice and contact information, this list of
00029  *              conditions and the following disclaimer.
00030  *
00031  *              (ii) Any derived versions of this software (howsoever modified)
00032  *              remain the sole property of Synesis Software.
00033  *
00034  *              (iii) Any derived versions of this software (howsoever modified)
00035  *              remain subject to all these conditions.
00036  *
00037  *              (iv) Neither the name of Synesis Software nor the names of any
00038  *              subdivisions, employees or agents of Synesis Software, nor the
00039  *              names of any other contributors to this software may be used to
00040  *              endorse or promote products derived from this software without
00041  *              specific prior written permission.
00042  *
00043  *              This source code is provided by Synesis Software "as is" and any
00044  *              warranties, whether expressed or implied, including, but not
00045  *              limited to, the implied warranties of merchantability and
00046  *              fitness for a particular purpose are disclaimed. In no event
00047  *              shall the Synesis Software be liable for any direct, indirect,
00048  *              incidental, special, exemplary, or consequential damages
00049  *              (including, but not limited to, procurement of substitute goods
00050  *              or services; loss of use, data, or profits; or business
00051  *              interruption) however caused and on any theory of liability,
00052  *              whether in contract, strict liability, or tort (including
00053  *              negligence or otherwise) arising in any way out of the use of
00054  *              this software, even if advised of the possibility of such
00055  *              damage.
00056  *
00057  * 
00058 
00059 
00060 #ifndef RECLS_INCL_H_RECLSPP_FTPSEARCH
00061 #define RECLS_INCL_H_RECLSPP_FTPSEARCH
00062 
00063 /* File version */
00064 #ifndef RECLS_DOCUMENTATION_SKIP_SECTION
00065 # define RECLS_VER_H_RECLSPP_FTPSEARCH_MAJOR    1
00066 # define RECLS_VER_H_RECLSPP_FTPSEARCH_MINOR    0
00067 # define RECLS_VER_H_RECLSPP_FTPSEARCH_REVISION 1
00068 # define RECLS_VER_H_RECLSPP_FTPSEARCH_EDIT     3
00069 #endif /* !RECLS_DOCUMENTATION_SKIP_SECTION */
00070 
00075 /* 
00076  * Includes
00077  */
00078 
00079 #include "reclspp.h"
00080 #include "reclspp_search.h"
00081 #include <recls_ftp.h>
00082 #include <recls_assert.h>
00083 
00084 /* 
00085  * Namespace
00086  */
00087 
00088 #if !defined(RECLS_NO_NAMESPACE)
00089 namespace recls
00090 {
00091 
00092 namespace cpp
00093 {
00094 #endif /* !RECLS_NO_NAMESPACE */
00095 
00096 /* 
00097  * Classes
00098  */
00099 
00103 class FtpSearch
00104     : public Search
00105 {
00107 public:
00109     typedef FtpSearch   class_type;
00111 
00114 public:
00123     FtpSearch(recls_char_t const *host, recls_char_t const *username, recls_char_t const *password, recls_char_t const *rootDir, recls_char_t const *pattern, recls_uint32_t flags);
00125     ~FtpSearch();
00127 
00128 // Implementation
00129 private:
00130     static ctor_args_type CreateSearch_(recls_char_t const *host, recls_char_t const *username, recls_char_t const *password, char const *rootDir, char const *pattern, recls_uint32_t flags)
00131     {
00132         hrecls_t    hSrch;
00133         recls_rc_t  rc = Recls_SearchFtp(host, username, password, rootDir, pattern, flags, &hSrch);
00134 
00135         return Search::ctor_args_type(hSrch, rc);
00136     }
00137 
00138 // Not to be implemented
00139 private:
00140     FtpSearch(class_type const &rhs);
00141     class_type &operator =(class_type const &rhs);
00142 };
00143 
00144 /* 
00145  * Implementation
00146  */
00147 
00148 inline FtpSearch::FtpSearch(recls_char_t const *host, recls_char_t const *username, recls_char_t const *password, recls_char_t const *rootDir, recls_char_t const *pattern, recls_uint32_t flags)
00149     : Search(CreateSearch_(host, username, password, rootDir, pattern, flags))
00150 {}
00151 
00152 inline FtpSearch::~FtpSearch()
00153 {}
00154 
00155 /* 
00156  * Namespace
00157  */
00158 
00159 #if !defined(RECLS_NO_NAMESPACE)
00160 } /* namespace cpp */
00161 } /* namespace recls */
00162 #endif /* !RECLS_NO_NAMESPACE */
00163 
00164 /* 
00165 
00166 #endif /* !RECLS_INCL_H_RECLSPP_FTPSEARCH */
00167 
00168 /* 

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