vfs: check userland buffers before reading them.
[haiku.git] / headers / private / storage / RemoveEngine.h
blob1ca78b188c8e76e879aefcbe41ac4109385ab167
1 /*
2 * Copyright 2013, Haiku, Inc. All Rights Reserved.
3 * Distributed under the terms of the MIT License.
5 * Authors:
6 * Ingo Weinhold <ingo_weinhold@gmx.de>
7 */
8 #ifndef _REMOVE_ENGINE_H
9 #define _REMOVE_ENGINE_H
12 #include <stdarg.h>
14 #include <EntryOperationEngineBase.h>
17 namespace BPrivate {
20 class BRemoveEngine : public BEntryOperationEngineBase {
21 public:
22 class BController;
24 public:
25 BRemoveEngine();
26 ~BRemoveEngine();
28 BController* Controller() const;
29 void SetController(BController* controller);
31 status_t RemoveEntry(const Entry& entry);
33 private:
34 status_t _RemoveEntry(const char* path);
36 void _NotifyErrorVarArgs(status_t error,
37 const char* format, va_list args);
38 status_t _HandleEntryError(const char* path,
39 status_t error, const char* format, ...);
41 private:
42 BController* fController;
46 class BRemoveEngine::BController {
47 public:
48 BController();
49 virtual ~BController();
51 virtual bool EntryStarted(const char* path);
52 virtual bool EntryFinished(const char* path, status_t error);
54 virtual void ErrorOccurred(const char* message,
55 status_t error);
59 } // namespace BPrivate
62 using ::BPrivate::BRemoveEngine;
65 #endif // _REMOVE_ENGINE_H