dev-updates-profile.h
Go to the documentation of this file.
1 // License: Apache 2.0. See LICENSE file in root directory.
2 // Copyright(c) 2020 Intel Corporation. All Rights Reserved.
3 
4 #pragma once
5 #include <map>
6 #include <regex>
7 
8 #include <librealsense2/rs.hpp>
9 
10 #include "versions-db-manager.h"
11 
12 namespace rs2
13 {
14  namespace sw_update
15  {
16  // The dev_updates_profile class builds and holds a specific device versions profile.
17  // It queries the versions DB according to the desired components
18  // and supply a complete profile of the device software & firmware available update.
20  {
21  public:
22 
23  struct version_info
24  {
31  };
32 
34  {
37 
40 
41  typedef std::map< sw_update::version, version_info > version_to_info;
42  version_to_info software_versions;
43  version_to_info firmware_versions;
44 
46  bool dev_active;
47 
48  update_profile() :dev_active(true){};
49 
50  bool get_sw_update(update_policy_type policy, version_info& info) const;
51  bool get_fw_update(update_policy_type policy, version_info& info) const;
52 
53  };
54 
55  explicit dev_updates_profile(const device& dev, const std::string &url, const bool use_url_as_local_path = false, http::user_callback_func_type download_callback = http::user_callback_func_type());
56 
58 
61 
62  private:
63  bool try_parse_update(versions_db_manager& up_handler,
64  const std::string& dev_name,
68 
69 
73  };
74  }
75 }
std::map< sw_update::version, version_info > version_to_info
Definition: cah-model.h:10
GLsizei const GLchar *const * string
def info(name, value, persistent=False)
Definition: test.py:301
std::function< callback_result(uint64_t dl_current_bytes, uint64_t dl_total_bytes)> user_callback_func_type
bool try_parse_update(versions_db_manager &up_handler, const std::string &dev_name, update_policy_type policy, component_part_type part, version_info &result)
dev_updates_profile(const device &dev, const std::string &url, const bool use_url_as_local_path=false, http::user_callback_func_type download_callback=http::user_callback_func_type())
bool retrieve_updates(component_part_type comp)
GLuint64EXT * result
Definition: glext.h:10921


librealsense2
Author(s): Sergey Dorodnicov , Doron Hirshberg , Mark Horn , Reagan Lopez , Itay Carpis
autogenerated on Mon May 3 2021 02:47:12