DSCopyDialogController.h
Go to the documentation of this file.
1 /* Copyright (C) 2008 National Institute For Space Research (INPE) - Brazil.
2 
3  This file is part of the TerraLib - a Framework for building GIS enabled applications.
4 
5  TerraLib is free software: you can redistribute it and/or modify
6  it under the terms of the GNU Lesser General Public License as published by
7  the Free Software Foundation, either version 3 of the License,
8  or (at your option) any later version.
9 
10  TerraLib is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  GNU Lesser General Public License for more details.
14 
15  You should have received a copy of the GNU Lesser General Public License
16  along with TerraLib. See COPYING. If not, write to
17  TerraLib Team at <terralib-team@terralib.org>.
18  */
19 
20 /*!
21  \file terralib/tools/dscopy/qt/DSCopyDialogController.h
22 
23  \brief Data Source Copy GUI Controller
24  */
25 
26 #ifndef __TERRALIB_TOOLS_DSCOPY_DSCOPYDIALOGCONTROLLER_H
27 #define __TERRALIB_TOOLS_DSCOPY_DSCOPYDIALOGCONTROLLER_H
28 
29 // STL
30 #include <string>
31 #include <vector>
32 
33 namespace te
34 {
35 
36  // Forward declarations
37  namespace da
38  {
39  class DataSource;
40  }
41 
42  namespace tools
43  {
44  namespace dscopy
45  {
47  {
48 
49  public:
52 
53  bool setOriginConnectionInfo(std::string dstype, std::string path, std::string& errorMessage);
54  bool setOriginConnectionInfo(std::string dstype, std::string host, std::string port,
55  std::string dsname, std::string user, std::string pw, std::string& errorMessage);
56 
57  bool setDestinationConnectionInfo(std::string dstype, std::string path, std::string& errorMessage);
58  bool setDestinationConnectionInfo(std::string dstype, std::string host, std::string port,
59  std::string dsname, std::string user, std::string pw, std::string& errorMessage);
60 
61  void setDatasetsToCopy(std::vector<std::string> datasets);
62  std::vector<std::string> getDictionary();
63  std::vector<std::string*> getDatasetsName();
64 
65  bool copy(std::string& errorMessage);
66 
67  private:
68 
69  std::vector<std::string> m_datasets;
70  te::da::DataSource* m_dsOrigin; //!< The Origin Data Source Pointer
71  te::da::DataSource* m_dsDestination; //!< The Destination Data Source pointer
72 
73  };
74  }
75  }
76 }
77 
78 #endif // __TERRALIB_TOOLS_DSCOPY_DSCOPYDIALOGCONTROLLER_H
void setDatasetsToCopy(std::vector< std::string > datasets)
bool setOriginConnectionInfo(std::string dstype, std::string path, std::string &errorMessage)
bool setDestinationConnectionInfo(std::string dstype, std::string path, std::string &errorMessage)
te::da::DataSource * m_dsDestination
The Destination Data Source pointer.
std::vector< std::string * > getDatasetsName()
An abstract class for data providers like a DBMS, Web Services or a regular file. ...
Definition: DataSource.h:118
bool copy(std::string &errorMessage)
URI C++ Library.
std::vector< std::string > getDictionary()
te::da::DataSource * m_dsOrigin
The Origin Data Source Pointer.