GeopackagePublisher.h
Go to the documentation of this file.
1 /* Copyright (C) 2011-2012 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 src/terraMobilePlugin/core/GeopackagePublisher.h
22 
23 \brief This file is used to Publisher operation.
24 */
25 
26 #ifndef __TE_QT_PLUGINS_TERRAMOBILE_INTERNAL_GEOPACKAGEPUBLISHER_H
27 #define __TE_QT_PLUGINS_TERRAMOBILE_INTERNAL_GEOPACKAGEPUBLISHER_H
28 
29 #include "../Config.h"
30 
31 //Qt
32 #include <QObject>
33 
34 // STL
35 #include <string>
36 #include <vector>
37 
38 namespace te
39 {
40  namespace qt
41  {
42  namespace plugins
43  {
44  namespace terramobile
45  {
46 
48  {
49  std::string m_name;
50  std::string m_status;
51  std::string m_objId;
52  std::string m_desc;
53  };
54 
55  typedef std::vector<GeopackageFile> GeopackageFiles;
56 
58  {
62  };
63 
64  /*!
65  \class GeoPackagePublisher
66 
67  \brief This file is used to Publisher operation.
68  */
69  class GeopackagePublisher : public QObject
70  {
71  Q_OBJECT
72 
73  public:
74 
76 
78 
79 
80  public:
81 
82  std::string getErrorMessage();
83 
85 
86  void downloadGeopackageFile(std::string url, GeopackageFile gpkgFile, std::string pathDir);
87 
88  void uploadGeopackageFile(std::string url, std::string filePath, std::string fileName);
89 
90  protected:
91 
92  GeopackageFiles readJSONInfo(std::string stream);
93 
94  public:
95 
96  void emitSignal(double curStep, double totalStep);
97 
98  signals:
99 
100  void setCurrentStep(double curStep, double totalStep, std::string msg);
101 
102  protected:
103 
104  std::string m_errorMessage;
105 
106  public:
107 
109 
111  };
112  } // end namespace thirdParty
113  } // end namespace plugins
114  } // end namespace qt
115 } // end namespace te
116 
117 #endif // __TE_QT_PLUGINS_TERRAMOBILE_INTERNAL_GEOPACKAGEPUBLISHER_H
118 
te
TerraLib.
Definition: AddressGeocodingOp.h:52
te::qt::plugins::terramobile::GeopackagePublisherOperation
GeopackagePublisherOperation
Definition: GeopackagePublisher.h:58
te::qt::plugins::terramobile::GeopackagePublisher::m_gpkgOpType
static GeopackagePublisherOperation m_gpkgOpType
Definition: GeopackagePublisher.h:110
te::qt::plugins::terramobile::GeopackagePublisher::downloadGeopackageFile
void downloadGeopackageFile(std::string url, GeopackageFile gpkgFile, std::string pathDir)
te::qt::plugins::terramobile::GeopackagePublisher::~GeopackagePublisher
~GeopackagePublisher()
te::qt::plugins::terramobile::GeopackagePublisher
Definition: GeopackagePublisher.h:70
te::qt::plugins::terramobile::GPKG_OP_UPLOAD
@ GPKG_OP_UPLOAD
Definition: GeopackagePublisher.h:60
te::qt::plugins::terramobile::GeopackageFile::m_objId
std::string m_objId
Definition: GeopackagePublisher.h:51
te::qt::plugins::terramobile::GeopackageFile::m_name
std::string m_name
Definition: GeopackagePublisher.h:49
te::qt::plugins::terramobile::GeopackagePublisher::setCurrentStep
void setCurrentStep(double curStep, double totalStep, std::string msg)
te::qt::plugins::terramobile::GeopackageFile::m_desc
std::string m_desc
Definition: GeopackagePublisher.h:52
te::qt::plugins::terramobile::GeopackagePublisher::GeopackagePublisher
GeopackagePublisher()
te::qt::plugins::terramobile::GeopackagePublisher::m_errorMessage
std::string m_errorMessage
Definition: GeopackagePublisher.h:104
te::qt::plugins::terramobile::GeopackageFile::m_status
std::string m_status
Definition: GeopackagePublisher.h:50
te::qt::plugins::terramobile::GeopackagePublisher::uploadGeopackageFile
void uploadGeopackageFile(std::string url, std::string filePath, std::string fileName)
te::qt::plugins::terramobile::GeopackagePublisher::getErrorMessage
std::string getErrorMessage()
te::qt::plugins::terramobile::GeopackageFile
Definition: GeopackagePublisher.h:48
te::qt::plugins::terramobile::GPKG_OP_DOWNLOAD
@ GPKG_OP_DOWNLOAD
Definition: GeopackagePublisher.h:59
te::qt::plugins::terramobile::GeopackagePublisher::readJSONInfo
GeopackageFiles readJSONInfo(std::string stream)
te::qt::plugins::terramobile::GPKG_OP_NONE
@ GPKG_OP_NONE
Definition: GeopackagePublisher.h:61
te::qt::plugins::terramobile::GeopackagePublisher::m_staticPointer
static GeopackagePublisher * m_staticPointer
Definition: GeopackagePublisher.h:108
te::qt::plugins::terramobile::GeopackageFiles
std::vector< GeopackageFile > GeopackageFiles
Definition: GeopackagePublisher.h:55
te::qt::plugins::terramobile::GeopackagePublisher::getGeopackageFiles
GeopackageFiles getGeopackageFiles(std::string url)
te::qt::plugins::terramobile::GeopackagePublisher::emitSignal
void emitSignal(double curStep, double totalStep)