2010-07-10 08:37:58 -05:00
|
|
|
/*
|
|
|
|
* Copyright 2010, Andrea Anzani. All rights reserved.
|
|
|
|
* Distributed under the terms of the MIT License.
|
|
|
|
*/
|
|
|
|
#ifndef _ACTION_H
|
|
|
|
#define _ACTION_H
|
|
|
|
|
|
|
|
#include <Message.h>
|
|
|
|
#include <String.h>
|
|
|
|
|
|
|
|
#define ActionID bigtime_t
|
|
|
|
|
|
|
|
class Action
|
|
|
|
{
|
|
|
|
public:
|
2013-01-04 07:52:14 -06:00
|
|
|
Action() { fActionID = 0; }
|
|
|
|
virtual ~Action() {}
|
2010-07-10 08:37:58 -05:00
|
|
|
|
|
|
|
virtual status_t Perform(BMessage* errors) = 0;
|
|
|
|
virtual BString GetDescription() = 0;
|
|
|
|
|
2013-01-04 07:52:14 -06:00
|
|
|
void SetActionID(const ActionID id) { fActionID = id; }
|
|
|
|
ActionID GetActionID() const { return fActionID; }
|
2010-07-10 08:37:58 -05:00
|
|
|
|
|
|
|
private:
|
|
|
|
ActionID fActionID;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif //_ACTION_H
|