QofSession, QofBackend: Change book_id to uri.

It's more descriptive and less likely to be confused with the book:id value
in XML files that is the book's GUID.
Also changed the QofSessionImpl::begin new_uri parameter from std::string to
const char*. There's no point in allocating a string just to call
new_uri.c_str() all over the place.
This commit is contained in:
John Ralls
2020-06-02 11:48:33 -07:00
parent 65e2639de4
commit a320035f42
9 changed files with 89 additions and 90 deletions

View File

@@ -106,11 +106,11 @@ GncXmlBackend::check_path (const char* fullpath, bool create)
}
void
GncXmlBackend::session_begin(QofSession* session, const char* book_id,
GncXmlBackend::session_begin(QofSession* session, const char* new_uri,
bool ignore_lock, bool create, bool force)
{
/* Make sure the directory is there */
m_fullpath = gnc_uri_get_path (book_id);
m_fullpath = gnc_uri_get_path (new_uri);
if (m_fullpath.empty())
{

View File

@@ -35,7 +35,7 @@ public:
GncXmlBackend(const GncXmlBackend&&) = delete;
GncXmlBackend operator=(const GncXmlBackend&&) = delete;
~GncXmlBackend() = default;
void session_begin(QofSession* session, const char* book_id,
void session_begin(QofSession* session, const char* new_uri,
bool ignore_lock, bool create, bool force) override;
void session_end() override;
void load(QofBook* book, QofBackendLoadType loadType) override;