97 lines
879 B
C++
Executable File
97 lines
879 B
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 headerfileitem
|
|
#define headerfileitem
|
|
|
|
#include <string>
|
|
|
|
|
|
|
|
|
|
struct Item
|
|
{
|
|
long id;
|
|
|
|
|
|
long user_id;
|
|
long group_id;
|
|
int privileges;
|
|
|
|
|
|
std::string subject;
|
|
std::string content;
|
|
std::string url;
|
|
|
|
|
|
int content_type;
|
|
|
|
|
|
enum Type
|
|
{
|
|
dir = 0,
|
|
file = 1,
|
|
|
|
|
|
|
|
none = 1000
|
|
};
|
|
|
|
Type type;
|
|
|
|
//item_type;
|
|
|
|
long parent_id;
|
|
long default_item;
|
|
|
|
|
|
// used by the database
|
|
// !! moze da sie w ogole z tego zrezygnowac?
|
|
long content_id;
|
|
|
|
|
|
Item()
|
|
{
|
|
Clear();
|
|
}
|
|
|
|
|
|
|
|
void Clear()
|
|
{
|
|
id = -1;
|
|
|
|
user_id = -1;
|
|
group_id = -1;
|
|
privileges = 0;
|
|
|
|
subject.clear();
|
|
content.clear();
|
|
url.clear();
|
|
|
|
content_type = 0;
|
|
|
|
type = none;
|
|
parent_id = -1;
|
|
default_item = -1;
|
|
|
|
content_id = -1;
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|