/* * This file is a part of CMSLU -- Content Management System like Unix * and is not publicly distributed * * Copyright (c) 2008-2009, Tomasz Sowa * All rights reserved. * */ #ifndef headerfilecmslucoreitem #define headerfilecmslucoreitem #include struct Item { long id; long user_id; long group_id; int privileges; tm date_creation; tm date_modification; 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; time_t t = std::time(0); date_creation = *std::localtime( &t ); date_modification = date_creation; } }; #endif