nx_server_plugin_sdk  1.0
Server Plugin SDK
vfs.h
1 // Copyright 2018-present Network Optix, Inc. Licensed under MPL 2.0: www.mozilla.org/MPL/2.0/
2 
3 #pragma once
4 
5 #include <functional>
6 #include <string>
7 
8 #include <common.h>
9 #include <stdint.h>
10 
11 #include "detail/fs_stub.h"
12 
13 namespace utils {
14 
15 std::string fsJoin(const std::string& subPath1, const std::string& subPath2);
16 
17 struct VfsPair
18 {
19  std::string sampleFilePath;
20  int64_t sampleFileSize;
21  FsStubNode* root;
22 
23  VfsPair() : root(nullptr) {}
24 };
25 
26 /*
27 Json object should have the following structure:
28 {
29  "sample": "/path/to/sample/file",
30  "cameras": [
31  {
32  "id": "someCameraId",
33  "hi": [
34  {
35  "durationMs": "429626247",
36  "startTimeMs": "1453550461075"
37  },
38  ...
39  ],
40  "low": [
41  {
42  "durationMs": "429626247",
43  "startTimeMs": "1453550461075"
44  },
45  ...
46  ]
47  }
48  ]
49 }
50 */
51 
52 bool buildVfsFromJson(const char* jsonString, const char* rootPath, VfsPair* outVfsPair);
53 
54 } // namespace utils
Definition: fs_stub.h:15
Definition: url.cpp:6
Definition: vfs.h:17