Add observeExistence for request until porting request to shared_ptr
This commit is contained in:
parent
cbe5aad3d9
commit
ca039b13ff
@ -43,6 +43,7 @@ namespace Online
|
||||
m_info = "";
|
||||
m_success = false;
|
||||
m_xml_data = NULL;
|
||||
m_exists = std::make_shared<bool>(true);
|
||||
} // XMLRequest
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
|
@ -30,8 +30,10 @@
|
||||
#endif
|
||||
#include <curl/curl.h>
|
||||
#include <assert.h>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
||||
|
||||
namespace Online
|
||||
{
|
||||
/** A http request expecting a xml return value.
|
||||
@ -42,6 +44,7 @@ namespace Online
|
||||
/** On a successful download contains the converted XML tree. */
|
||||
XMLNode *m_xml_data;
|
||||
|
||||
std::shared_ptr<bool> m_exists;
|
||||
protected:
|
||||
|
||||
/** Additional info contained the downloaded data (or an error
|
||||
@ -89,6 +92,8 @@ namespace Online
|
||||
assert(hasBeenExecuted());
|
||||
return m_success;
|
||||
} // isSuccess
|
||||
// --------------------------------------------------------------------
|
||||
std::weak_ptr<bool> observeExistence() const { return m_exists; }
|
||||
|
||||
}; // class XMLRequest
|
||||
} //namespace Online
|
||||
|
Loading…
Reference in New Issue
Block a user