View on GitHub

Vistle

Distributed Data-parallel Scientific Visualization in VR

filequery.h
Go to the documentation of this file.
1#ifndef VISTLE_FILEQUERY_H
2#define VISTLE_FILEQUERY_H
3
4#include <cstdint>
5#include <string>
6#include <vector>
7
8#include "archives_config.h"
9#include "export.h"
10
11#include <vistle/util/buffer.h>
12
13namespace vistle {
14
17 std::string username;
18 std::string homepath;
19 std::string currentdir;
20
22 template<class Archive>
23 void serialize(Archive &ar)
24 {
25 ar &iswindows;
26 ar &username;
27 ar &homepath;
28 ar &currentdir;
29 }
30};
31
33 enum FileType {
37 };
38
39 std::string name;
40 bool status = false;
41 bool exists = false;
42 int32_t permissions = 0;
43 FileType type = System;
44 bool symlink = false;
45 bool hidden = false;
46 bool casesensitive = true;
47 int64_t size = -1;
48 double lastmod = 0.;
49
51 template<class Archive>
52 void serialize(Archive &ar)
53 {
54 ar &name;
55 ar &status;
56 ar &exists;
57 ar &permissions;
58 ar &type;
59 ar &symlink;
60 ar &hidden;
61 ar &casesensitive;
62 ar &size;
63 ar &lastmod;
64 }
65};
66
67buffer V_COREEXPORT createPayload(const std::vector<FileInfo> &info);
68std::vector<FileInfo> V_COREEXPORT unpackFileInfos(const buffer &payload);
69
70buffer V_COREEXPORT createPayload(const SystemInfo &info);
71SystemInfo V_COREEXPORT unpackSystemInfo(const buffer &payload);
72
73buffer V_COREEXPORT packFileList(const std::vector<std::string> &files);
74std::vector<std::string> V_COREEXPORT unpackFileList(const buffer &payload);
75
76} // namespace vistle
77#endif
#define ARCHIVE_ACCESS
Definition: archives_config.h:465
#define V_COREEXPORT
Definition: export.h:9
Definition: allobjects.cpp:30
std::vector< char, allocator< char > > buffer
Definition: buffer.h:9
std::vector< std::string > unpackFileList(const buffer &payload)
Definition: filequery.cpp:66
buffer createPayload(const std::vector< FileInfo > &info)
Definition: filequery.cpp:8
SystemInfo unpackSystemInfo(const buffer &payload)
Definition: filequery.cpp:43
buffer packFileList(const std::vector< std::string > &files)
Definition: filequery.cpp:56
std::vector< FileInfo > unpackFileInfos(const buffer &payload)
Definition: filequery.cpp:18
Definition: filequery.h:32
FileType
Definition: filequery.h:33
@ System
Definition: filequery.h:36
@ File
Definition: filequery.h:34
@ Directory
Definition: filequery.h:35
ARCHIVE_ACCESS void serialize(Archive &ar)
Definition: filequery.h:52
std::string name
Definition: filequery.h:39
Definition: filequery.h:15
std::string username
Definition: filequery.h:17
std::string currentdir
Definition: filequery.h:19
std::string homepath
Definition: filequery.h:18
bool iswindows
Definition: filequery.h:16
ARCHIVE_ACCESS void serialize(Archive &ar)
Definition: filequery.h:23