Skip to content

v0.2.47..v0.2.48 changeset OsmApiWriter.h

Garret Voltz edited this page Sep 27, 2019 · 1 revision
diff --git a/hoot-core/src/main/cpp/hoot/core/io/OsmApiWriter.h b/hoot-core/src/main/cpp/hoot/core/io/OsmApiWriter.h
index 68bfe08..cbe1337 100644
--- a/hoot-core/src/main/cpp/hoot/core/io/OsmApiWriter.h
+++ b/hoot-core/src/main/cpp/hoot/core/io/OsmApiWriter.h
@@ -54,20 +54,20 @@ class OsmApiWriterTest;
 
 class OsmApiWriter : public Configurable, public ProgressReporter
 {
+public:
   /** OSM API URL paths */
-  const QString API_PATH_CAPABILITIES = "/api/capabilities/";
-  const QString API_PATH_PERMISSIONS = "/api/0.6/permissions/";
-  const QString API_PATH_CREATE_CHANGESET = "/api/0.6/changeset/create/";
-  const QString API_PATH_CLOSE_CHANGESET = "/api/0.6/changeset/%1/close/";
-  const QString API_PATH_UPLOAD_CHANGESET = "/api/0.6/changeset/%1/upload/";
-  const QString API_PATH_GET_ELEMENT = "/api/0.6/%1/%2/";
+  const static char* API_PATH_CAPABILITIES;
+  const static char* API_PATH_PERMISSIONS;
+  const static char* API_PATH_CREATE_CHANGESET;
+  const static char* API_PATH_CLOSE_CHANGESET;
+  const static char* API_PATH_UPLOAD_CHANGESET;
+  const static char* API_PATH_GET_ELEMENT;
   /**
    *  Max number of jobs waiting in the work queue = multiplier * number of threads,
    *  this keeps the producer thread from creating too many sub-changesets too early
    *  that only consist of nodes after ways are blocked.
    */
   const int QUEUE_SIZE_MULTIPLIER = 2;
-public:
   /** Constructors with one or multiple files consisting of one large changeset */
   OsmApiWriter(const QUrl& url, const QString& changeset);
   OsmApiWriter(const QUrl& url, const QList<QString>& changesets);
@@ -194,6 +194,8 @@ private:
    * @return success Whether or not the function was able to find a resolvable issue
    */
   bool _resolveIssues(HootNetworkRequestPtr request, ChangesetInfoPtr changeset);
+
+  bool _fixConflict(HootNetworkRequestPtr request, ChangesetInfoPtr changeset, const QString& conflictExplanation);
   /**
    * @brief _getNode/Way/Relation Perform HTTP GET request to OSM API to get current node/way/relation by ID
    * @param request Network request object initialized with OSM API URL
@@ -264,10 +266,10 @@ private:
   QString _accessToken;
   /** OAuth 1.0 secret token granted through OAuth authorization */
   QString _secretToken;
-  /** Default constructor for testing purposes only */
-  OsmApiWriter() {}
   /** For white box testing */
   friend class OsmApiWriterTest;
+  /** Default constructor for testing purposes only */
+  OsmApiWriter() {}
 };
 
 }
Clone this wiki locally