2009-04-21 01:49:28 +02:00
|
|
|
/*
|
2010-02-28 01:08:10 +01:00
|
|
|
* This file is a part of Winix
|
2009-04-21 01:49:28 +02:00
|
|
|
* and is not publicly distributed
|
|
|
|
*
|
2011-01-05 22:24:11 +01:00
|
|
|
* Copyright (c) 2009-2010, Tomasz Sowa
|
2009-04-21 01:49:28 +02:00
|
|
|
* All rights reserved.
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
2011-01-05 22:24:11 +01:00
|
|
|
#ifndef headerfile_winix_plugins_thread_thread
|
|
|
|
#define headerfile_winix_plugins_thread_thread
|
2009-04-21 01:49:28 +02:00
|
|
|
|
|
|
|
#include <string>
|
2011-01-20 19:37:51 +01:00
|
|
|
#include <string.h>
|
2009-04-21 01:49:28 +02:00
|
|
|
|
|
|
|
|
2011-01-05 22:24:11 +01:00
|
|
|
namespace Thread
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-04-21 22:50:55 +02:00
|
|
|
|
2009-04-21 01:49:28 +02:00
|
|
|
class Thread
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
|
2011-01-05 22:24:11 +01:00
|
|
|
long file_id;
|
2011-01-20 19:37:51 +01:00
|
|
|
long replies;
|
2009-04-21 01:49:28 +02:00
|
|
|
bool closed;
|
|
|
|
|
2011-01-20 19:37:51 +01:00
|
|
|
// the last file in a thread
|
|
|
|
long last_item_id;
|
|
|
|
tm last_item_date_modification;
|
|
|
|
long last_item_user_id;
|
|
|
|
std::wstring last_item_guest_name;
|
|
|
|
|
|
|
|
|
2010-08-10 18:12:50 +02:00
|
|
|
|
2009-04-21 01:49:28 +02:00
|
|
|
void Clear()
|
|
|
|
{
|
2011-01-20 19:37:51 +01:00
|
|
|
file_id = -1;
|
|
|
|
closed = false;
|
|
|
|
replies = 0;
|
|
|
|
last_item_id = -1;
|
|
|
|
last_item_user_id = -1;
|
|
|
|
memset(&last_item_date_modification, 0, sizeof(tm));
|
|
|
|
last_item_guest_name.clear();
|
2009-04-21 01:49:28 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
Thread()
|
|
|
|
{
|
|
|
|
Clear();
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2011-01-05 22:24:11 +01:00
|
|
|
|
|
|
|
|
|
|
|
} // namespace
|
|
|
|
|
2009-04-21 01:49:28 +02:00
|
|
|
#endif
|
2011-01-05 22:24:11 +01:00
|
|
|
|
|
|
|
|