Files
haiku-beta6/src/kits/tracker/FSUndoRedo.h
T
Axel Dörfler 02be5353fd Added libtracker.so to the repository and the build.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12772 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-05-23 00:58:42 +00:00

66 lines
1.1 KiB
C++

#ifndef _FS_UNDO_REDO_H
#define _FS_UNDO_REDO_H
#include "ObjectList.h"
#include <Entry.h>
namespace BPrivate {
class UndoItem;
class Undo {
public:
~Undo();
void UpdateEntry(BEntry *entry, const char *destName);
void Remove();
protected:
UndoItem *fUndo;
};
class MoveCopyUndo : public Undo {
public:
MoveCopyUndo(BObjectList<entry_ref> *sourceList, BDirectory &dest,
BList *pointList, uint32 moveMode);
};
class NewFolderUndo : public Undo {
public:
NewFolderUndo(const entry_ref &ref);
};
class RenameUndo : public Undo {
public:
RenameUndo(BEntry &entry, const char *newName);
};
class RenameVolumeUndo : public Undo {
public:
RenameVolumeUndo(BVolume &volume, const char *newName);
};
static
inline bool FSIsUndoMoveMode(uint32 moveMode)
{
return (moveMode & '\xff\0\0\0') == 'U\0\0\0';
}
static
inline uint32 FSUndoMoveMode(uint32 moveMode)
{
return (moveMode & ~'\xff\0\0\0') | 'U\0\0\0';
}
static
inline uint32 FSMoveMode(uint32 moveMode)
{
return (moveMode & ~'\xff\0\0\0') | 'T\0\0\0';
}
extern void FSUndo();
extern void FSRedo();
} // namespace BPrivate
#endif /* _FS_UNDO_REDO_H */