should find the first item (can be more than one item with the same 'param') fixed: added sorting tickets params in ReadTicketParams() (in plugins/ticket/ticketinfo.cpp) fixed: plugin should have its own 'PluginInfo info' struct a plugin's function can call another plugin's functions added: removing tickets files/images added: removing threads changed: rm function will call WINIX_FILE_REMOVED now when deleting directories git-svn-id: svn://ttmath.org/publicrep/winix/trunk@710 e52654a7-88a9-db11-a3e9-0013d4bc506e
58 lines
1.2 KiB
C++
Executable File
58 lines
1.2 KiB
C++
Executable File
/*
|
|
* This file is a part of Winix
|
|
* and is not publicly distributed
|
|
*
|
|
* Copyright (c) 2010, Tomasz Sowa
|
|
* All rights reserved.
|
|
*
|
|
*/
|
|
|
|
#ifndef headerfile_winix_plugins_thread_tdb
|
|
#define headerfile_winix_plugins_thread_tdb
|
|
|
|
|
|
#include <vector>
|
|
#include "thread.h"
|
|
#include "db/dbbase.h"
|
|
#include "core/error.h"
|
|
|
|
|
|
|
|
namespace Thread
|
|
{
|
|
|
|
|
|
class TDb : public DbBase
|
|
{
|
|
public:
|
|
|
|
Error AddThread(const Thread & thread);
|
|
Error GetThreadByFileId(long file_id, Thread & thread);
|
|
Error GetThreads(const std::vector<long> & file_id_tab, std::vector<Thread> & thread_tab);
|
|
Error GetAnswers(long file_id, std::vector<long> & answer_id_tab);
|
|
Error EditThreadAddItem(long file_id, long answer_id);
|
|
Error EditThreadRemoveItem(long file_id);
|
|
Error RemoveThread(long file_id);
|
|
long FindLastItem(long file_id);
|
|
|
|
private:
|
|
|
|
DbTextStream query;
|
|
std::wstring list_id;
|
|
int cfile_id, creplies, cclosed, clast_item, cdate_modification, cuser_id, cguest;
|
|
Thread thread_temp;
|
|
std::vector<long> file_id_tab;
|
|
|
|
void SetThreadColumns(PGresult * r);
|
|
void SetThread(PGresult * r, int col, Thread & thread);
|
|
Error EditThreadRecalcFiles(const std::vector<long> & file_id_tab);
|
|
|
|
};
|
|
|
|
|
|
} // namespace
|
|
|
|
|
|
#endif
|
|
|