-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathimage_burner_utils_interfaces.h
51 lines (41 loc) · 1.4 KB
/
image_burner_utils_interfaces.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
// Copyright 2011 The ChromiumOS Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef IMAGE_BURNER_IMAGE_BURNER_UTILS_INTERFACES_H_
#define IMAGE_BURNER_IMAGE_BURNER_UTILS_INTERFACES_H_
#include <stdint.h>
#include <string>
namespace imageburn {
class FileSystemWriter {
public:
virtual ~FileSystemWriter() {}
virtual int Write(const char* data_block, int data_size) = 0;
virtual bool Open(const char* path) = 0;
virtual bool Close() = 0;
};
class FileSystemReader {
public:
virtual ~FileSystemReader() {}
virtual bool Open(const char* path) = 0;
virtual bool Close() = 0;
virtual int Read(char* data_block, int data_size) = 0;
virtual int64_t GetSize() = 0;
};
class PathGetter {
public:
virtual ~PathGetter() {}
virtual bool GetRealPath(const char* path, std::string* real_path) = 0;
virtual bool GetRootPath(std::string* path) = 0;
};
class SignalSender {
public:
virtual ~SignalSender() {}
virtual void SendFinishedSignal(const char* target_path,
bool success,
const char* error_message) = 0;
virtual void SendProgressSignal(int64_t amount_burnt,
int64_t total_size,
const char* target_path) = 0;
};
} // namespace imageburn
#endif // IMAGE_BURNER_IMAGE_BURNER_UTILS_INTERFACES_H_