2010-08-10 18:12:50 +02:00
|
|
|
/*
|
|
|
|
* This file is a part of Winix
|
|
|
|
* and is not publicly distributed
|
|
|
|
*
|
|
|
|
* Copyright (c) 2010, Tomasz Sowa
|
|
|
|
* All rights reserved.
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
2010-09-30 00:41:34 +02:00
|
|
|
#ifndef headerfile_winix_plugins_ticket_createticket
|
|
|
|
#define headerfile_winix_plugins_ticket_createticket
|
2010-08-10 18:12:50 +02:00
|
|
|
|
2010-09-29 23:24:34 +02:00
|
|
|
#include "tdb.h"
|
|
|
|
#include "functions/functionbase.h"
|
2010-10-19 02:31:20 +02:00
|
|
|
#include "ticketinfo.h"
|
2010-12-06 01:25:46 +01:00
|
|
|
#include "notify/notify.h"
|
2010-08-10 18:12:50 +02:00
|
|
|
|
|
|
|
|
2010-09-29 23:24:34 +02:00
|
|
|
namespace Ticket
|
2010-08-10 18:12:50 +02:00
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
class CreateTicket : public FunctionBase
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
|
|
|
|
CreateTicket();
|
2010-09-29 23:24:34 +02:00
|
|
|
void SetTDb(TDb * ptdb);
|
|
|
|
void SetTicketInfo(TicketInfo * pinfo);
|
|
|
|
|
2010-08-10 18:12:50 +02:00
|
|
|
bool HasAccess();
|
|
|
|
void MakePost();
|
2010-10-19 02:31:20 +02:00
|
|
|
void MakeGet();
|
2010-08-10 18:12:50 +02:00
|
|
|
|
|
|
|
private:
|
|
|
|
|
2011-01-05 22:24:11 +01:00
|
|
|
void AddTicket(Ticket & ticket, Item & item);
|
|
|
|
void Submit(Ticket & ticket, Item & item);
|
2011-01-24 00:23:24 +01:00
|
|
|
void RemoveTmpTicket();
|
2011-01-05 22:24:11 +01:00
|
|
|
Ticket & PrepareTicket();
|
2011-01-24 00:23:24 +01:00
|
|
|
std::vector<long> & PrepareFileMap();
|
2010-08-10 18:12:50 +02:00
|
|
|
|
2010-09-29 23:24:34 +02:00
|
|
|
TDb * tdb;
|
|
|
|
TicketInfo * ticket_info;
|
2010-12-06 01:25:46 +01:00
|
|
|
NotifyMsg notify_msg;
|
2010-08-10 18:12:50 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
} // namespace
|
|
|
|
|
|
|
|
#endif
|