bes Updated for version 3.20.10
history_utils.h
1// -*- mode: c++; c-basic-offset:4 -*-
2
3// This file is part of the Hyrax data server.
4
5// Copyright (c) 2021 OPeNDAP, Inc.
6// Author: Nathan Potter <ndp@opendap.org>
7//
8// This library is free software; you can redistribute it and/or
9// modify it under the terms of the GNU Lesser General Public
10// License as published by the Free Software Foundation; either
11// version 2.1 of the License, or (at your option) any later version.
12//
13// This library is distributed in the hope that it will be useful,
14// but WITHOUT ANY WARRANTY; without even the implied warranty of
15// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16// Lesser General Public License for more details.
17//
18// You should have received a copy of the GNU Lesser General Public
19// License along with this library; if not, write to the Free Software
20// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
21//
22// You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
23
24#ifndef HYRAX_GIT_HISTORY_UTILS_H
25#define HYRAX_GIT_HISTORY_UTILS_H
26
27#include <libdap/DDS.h>
28#include <libdap/DMR.h>
29#include <libdap/D4Attributes.h>
30
31// OLD
32void updateHistoryAttributes(libdap::DDS *dds, const string &ce);
33
34// NEW
35void updateHistoryAttributes(libdap::DMR *dmr, const std::string &ce);
36
37void update_cf_history_attr(libdap::D4Attribute *global_attribute, const std::string &request_url);
38void update_history_json_attr(libdap::D4Attribute *global_attribute, const std::string &request_url);
39
40std::string create_cf_history_txt(const std::string &request_url);
41std::string get_cf_history_entry (const std::string &request_url);
42
43std::string get_history_json_entry (const std::string &request_url);
44
45std::string json_append_entry_to_array(const std::string &current_doc_str, const std::string &new_entry_str);
46#endif //HYRAX_GIT_HISTORY_UTILS_H