2010-08-10 18:12:50 +02:00
|
|
|
/*
|
|
|
|
* This file is a part of Winix
|
|
|
|
* and is not publicly distributed
|
|
|
|
*
|
|
|
|
* Copyright (c) 2008-2010, Tomasz Sowa
|
|
|
|
* All rights reserved.
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
2010-10-24 01:12:47 +02:00
|
|
|
#include "funticket.h"
|
2011-01-20 19:37:51 +01:00
|
|
|
#include "core/plugin.h"
|
|
|
|
#include "plugins/thread/pluginmsg.h"
|
2010-10-19 02:31:20 +02:00
|
|
|
|
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
|
|
|
{
|
|
|
|
|
2010-09-29 23:24:34 +02:00
|
|
|
|
|
|
|
|
2010-08-10 18:12:50 +02:00
|
|
|
FunTicket::FunTicket()
|
|
|
|
{
|
2010-11-21 01:19:17 +01:00
|
|
|
fun.url = L"ticket";
|
2010-08-10 22:43:38 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2010-09-29 23:24:34 +02:00
|
|
|
void FunTicket::SetTDb(TDb * ptdb)
|
2010-08-10 22:43:38 +02:00
|
|
|
{
|
2010-09-29 23:24:34 +02:00
|
|
|
tdb = ptdb;
|
|
|
|
}
|
2010-08-10 22:43:38 +02:00
|
|
|
|
2010-09-29 23:24:34 +02:00
|
|
|
|
|
|
|
void FunTicket::SetTicketInfo(TicketInfo * pinfo)
|
|
|
|
{
|
|
|
|
ticket_info = pinfo;
|
2010-08-10 22:43:38 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2010-09-29 23:24:34 +02:00
|
|
|
bool FunTicket::HasAccess()
|
2010-08-10 22:43:38 +02:00
|
|
|
{
|
2011-01-23 15:15:30 +01:00
|
|
|
return cur->request->is_item && system->HasReadAccess(cur->request->item);
|
2010-08-10 18:12:50 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2010-10-19 02:31:20 +02:00
|
|
|
void FunTicket::MakeGet()
|
2010-08-10 18:12:50 +02:00
|
|
|
{
|
2011-01-05 22:24:11 +01:00
|
|
|
ticket_info->Clear();
|
2010-10-19 02:31:20 +02:00
|
|
|
ticket_info->FindCurrentConf();
|
2011-01-05 22:24:11 +01:00
|
|
|
ticket_info->ticket = &ticket;
|
2010-08-10 18:12:50 +02:00
|
|
|
|
2011-01-23 15:15:30 +01:00
|
|
|
tdb->GetTicket(cur->request->item.id, ticket);
|
2011-01-20 19:37:51 +01:00
|
|
|
|
2011-01-23 15:15:30 +01:00
|
|
|
plugin.Call(WINIX_PL_THREAD_PREPARE_THREAD, cur->request->item.id);
|
2010-10-19 02:31:20 +02:00
|
|
|
}
|
2010-08-10 18:12:50 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} // namespace
|