vfs: check userland buffers before reading them.
[haiku.git] / src / apps / icon-o-matic / generic / command / Command.cpp
blob5728d5142fd8188bd41c4d59b2d53b52b41c5f78
1 /*
2 * Copyright 2006, Haiku.
3 * Distributed under the terms of the MIT License.
5 * Authors:
6 * Stephan Aßmus <superstippi@gmx.de>
7 */
9 #include "Command.h"
11 #include <stdio.h>
13 #include <OS.h>
15 // constructor
16 Command::Command()
17 : fTimeStamp(system_time())
21 // destructor
22 Command::~Command()
26 // InitCheck
27 status_t
28 Command::InitCheck()
30 return B_NO_INIT;
33 // Perform
34 status_t
35 Command::Perform()
37 return B_ERROR;
40 // Undo
41 status_t
42 Command::Undo()
44 return B_ERROR;
47 // Redo
48 status_t
49 Command::Redo()
51 return Perform();
54 // GetName
55 void
56 Command::GetName(BString& name)
58 name << "Name of action goes here.";
61 // UndoesPrevious
62 bool
63 Command::UndoesPrevious(const Command* previous)
65 return false;
68 // CombineWithNext
69 bool
70 Command::CombineWithNext(const Command* next)
72 return false;
75 // CombineWithPrevious
76 bool
77 Command::CombineWithPrevious(const Command* previous)
79 return false;
83 // _GetString
84 const char*
85 Command::_GetString(uint32 key, const char* defaultString) const
87 // if (LanguageManager* manager = LanguageManager::Default())
88 // return manager->GetString(key, defaultString);
89 // else
90 return defaultString;