Files
winix/plugins/ticket/showtickets.h
Tomasz Sowa 4ed535a3b7 added: to plugin ticket: message WINIX_PL_TICKET_LOAD_TICKETS
someone can send this message with a directory id
       and tickets will be loaded from the directory
       (and to display them you can use ezc functions)



git-svn-id: svn://ttmath.org/publicrep/winix/trunk@889 e52654a7-88a9-db11-a3e9-0013d4bc506e
2012-09-14 23:48:39 +00:00

61 lines
1002 B
C++
Executable File

/*
* This file is a part of Winix
* and is not publicly distributed
*
* Copyright (c) 2010-2012, Tomasz Sowa
* All rights reserved.
*
*/
#ifndef headerfile_winix_plugins_ticket_showtickets
#define headerfile_winix_plugins_ticket_showtickets
#include "tdb.h"
#include "ticketinfo.h"
#include "core/item.h"
#include "functions/functionbase.h"
namespace Ticket
{
class ShowTickets : public FunctionBase
{
public:
ShowTickets();
void SetTDb(TDb * ptdb);
void SetTicketInfo(TicketInfo * pinfo);
bool HasAccess();
void MakeGet();
void ShowTicketsFromDir(long dir_id);
private:
TDb * tdb;
TicketInfo * ticket_info;
std::vector<long> file_id_tab;
void ReadFiles(long dir_id);
void CreatePointers();
void SortPointers();
void ReadTickets();
struct Sort
{
ShowTickets * show_tickets;
int sort_type;
Sort(ShowTickets * show, int type) : show_tickets(show), sort_type(type) {}
bool operator()(const Item * item1, const Item * item2);
};
};
} // namespace
#endif