2011-01-23 15:15:30 +01:00
|
|
|
/*
|
|
|
|
* This file is a part of Winix
|
|
|
|
* and is not publicly distributed
|
|
|
|
*
|
|
|
|
* Copyright (c) 2010, Tomasz Sowa
|
|
|
|
* All rights reserved.
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
2010-10-11 22:42:49 +02:00
|
|
|
#ifndef headerfile_winix_plugins_ticket_ticketconf
|
|
|
|
#define headerfile_winix_plugins_ticket_ticketconf
|
|
|
|
|
|
|
|
#include <vector>
|
|
|
|
#include <string>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
struct TicketConf
|
|
|
|
{
|
|
|
|
struct TicketItem
|
|
|
|
{
|
|
|
|
struct Select
|
|
|
|
{
|
2010-11-21 01:19:17 +01:00
|
|
|
std::wstring name;
|
2010-10-11 22:42:49 +02:00
|
|
|
int id;
|
|
|
|
};
|
|
|
|
|
|
|
|
TicketItem();
|
|
|
|
void Clear();
|
|
|
|
|
2011-01-05 22:24:11 +01:00
|
|
|
enum Type { TypeInteger, TypeProgress, TypeSelect, TypeString, TypeMultistring, TypeImages, TypeFiles };
|
2010-10-11 22:42:49 +02:00
|
|
|
|
|
|
|
int id;
|
|
|
|
|
2010-11-21 01:19:17 +01:00
|
|
|
std::wstring name;
|
2010-10-11 22:42:49 +02:00
|
|
|
Type type;
|
|
|
|
|
2011-01-05 22:24:11 +01:00
|
|
|
// used when type is TypeInteger or TypeProgress
|
2010-10-11 22:42:49 +02:00
|
|
|
int integer_min, integer_max;
|
|
|
|
|
|
|
|
// used when type is TypeSelect
|
|
|
|
std::vector<Select> select;
|
|
|
|
size_t select_default;
|
2011-01-05 22:24:11 +01:00
|
|
|
|
|
|
|
// used when type is TypeImages or TypeFiles
|
|
|
|
// 0 - unlimited
|
|
|
|
int max_files;
|
|
|
|
std::wstring upload_dir;
|
2010-10-11 22:42:49 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
typedef std::vector<TicketItem> Table;
|
|
|
|
Table tab;
|
|
|
|
|
|
|
|
void Clear();
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|