80 lines
1.0 KiB
C++
Executable File
80 lines
1.0 KiB
C++
Executable File
/*
|
|
* This file is a part of CMSLU -- Content Management System like Unix
|
|
* and is not publicly distributed
|
|
*
|
|
* Copyright (c) 2008, Tomasz Sowa
|
|
* All rights reserved.
|
|
*
|
|
*/
|
|
|
|
#ifndef headerfilefunction
|
|
#define headerfilefunction
|
|
|
|
#include <iostream>
|
|
#include "log.h"
|
|
#include "item.h"
|
|
|
|
|
|
#define FUN_NONE 0
|
|
#define FUN_LS 1
|
|
#define FUN_CAT 2
|
|
#define FUN_NODE 3
|
|
#define FUN_EMACS 4
|
|
#define FUN_MKDIR 5
|
|
#define FUN_DEFAULT 6
|
|
#define FUN_PRIV 7
|
|
#define FUN_RM 8
|
|
#define FUN_LOGIN 9
|
|
#define FUN_LOGOUT 10
|
|
#define FUN_RUN 11
|
|
#define FUN_WHO 12
|
|
|
|
|
|
|
|
|
|
class Function
|
|
{
|
|
|
|
public:
|
|
|
|
/*
|
|
enum Code
|
|
{
|
|
none,
|
|
ls,
|
|
cat,
|
|
node,
|
|
emacs,
|
|
mkdir,
|
|
default,
|
|
priv,
|
|
rm,
|
|
login,
|
|
logout,
|
|
run,
|
|
who
|
|
};
|
|
|
|
|
|
Code code;
|
|
*/
|
|
/*
|
|
we do not use enum etc. because the code will be used with an application too
|
|
(application can set others values)
|
|
*/
|
|
int code;
|
|
Item item;
|
|
|
|
void Clear();
|
|
|
|
Function();
|
|
Function(const Function & f);
|
|
Function & operator=(const Function & f);
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
#endif
|