48 lines
769 B
C++
Executable File
48 lines
769 B
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_ticket_tdb
|
|
#define headerfile_winix_plugins_ticket_tdb
|
|
|
|
|
|
#include <vector>
|
|
#include "ticket.h"
|
|
#include "db/dbbase.h"
|
|
#include "core/error.h"
|
|
|
|
|
|
namespace Ticket
|
|
{
|
|
|
|
|
|
class TDb : public DbBase
|
|
{
|
|
public:
|
|
|
|
Error GetTicket(long dir_id, Ticket & ticket);
|
|
Error GetTickets(const std::vector<long> & dir_id_tab, std::vector<Ticket> & ticket_tab);
|
|
Error AddTicket(const Ticket & ticket);
|
|
Error RemoveAddTicket(const Ticket & ticket); // first removing and then adding a ticket
|
|
Error RemoveTicket(long dir_id);
|
|
|
|
|
|
private:
|
|
|
|
DbTextStream query;
|
|
std::string dir_list;
|
|
|
|
};
|
|
|
|
|
|
} // namespace
|
|
|
|
|
|
#endif
|
|
|