#include "CalendarDB.h"
|
static void | DeleteEvent (uint32 eventID) |
|
static uint32 | SaveSystemEvent (uint32 ownerID, uint32 creatorID, int64 startDateTime, uint8 autoEventType, std::string title, std::string description, bool important=false) |
|
static void | SaveEventResponse (uint32 charID, Call_SendEventResponse &args) |
|
static void | UpdateEventParticipants (Call_UpdateEventParticipants &args) |
|
static PyRep * | SaveNewEvent (uint32 ownerID, Call_CreateEventWithInvites &args) |
|
static PyRep * | SaveNewEvent (uint32 ownerID, uint32 creatorID, Call_CreateEvent &args) |
|
static PyRep * | GetEventList (uint32 ownerID, uint32 month, uint32 year) |
|
static PyRep * | GetEventDetails (uint32 eventID) |
|
static PyRep * | GetResponsesToEvent (uint32 eventID) |
|
static PyRep * | GetResponsesForCharacter (uint32 charID) |
|
Definition at line 16 of file CalendarDB.h.
void CalendarDB::DeleteEvent |
( |
uint32 |
eventID | ) |
|
|
static |
Definition at line 202 of file CalendarDB.cpp.
References DBerror::c_str(), codelog, DBQueryResult::error, DBResultRow::GetInt(), DBQueryResult::GetRow(), DBResultRow::GetText(), sDatabase, and PyDict::SetItemString().
209 "SELECT ownerID, creatorID, eventText"
210 " FROM sysCalendarEvents WHERE eventID = %u", eventID))
226 return new PyObject(
"util.KeyVal", dict);
const char * GetText(uint32 index) const
int32 GetInt(uint32 index) const
bool GetRow(DBResultRow &into)
const char * c_str() const
#define codelog(type, fmt,...)
void SetItemString(const char *key, PyRep *value)
SetItemString adds or sets a database entry.
Definition at line 162 of file CalendarDB.cpp.
References PyList::AddItem(), Calendar::Flag::Automated, DBerror::c_str(), codelog, DBQueryResult::error, DBResultRow::GetBool(), DBResultRow::GetInt(), DBResultRow::GetInt64(), DBQueryResult::GetRow(), DBQueryResult::GetRowCount(), DBResultRow::GetText(), DBResultRow::IsNull(), PyStatic, sDatabase, and PyDict::SetItemString().
169 "SELECT eventID, ownerID, eventDateTime, dateModified, eventDuration, importance, eventTitle, flag,"
170 " autoEventType, isDeleted"
171 " FROM sysCalendarEvents WHERE ownerID = %u AND month = %u AND year = %u", ownerID, month, year))
const char * GetText(uint32 index) const
int32 GetInt(uint32 index) const
bool GetRow(DBResultRow &into)
bool GetBool(uint32 index) const
const char * c_str() const
#define codelog(type, fmt,...)
bool IsNull(uint32 index) const
int64 GetInt64(uint32 index) const
void SetItemString(const char *key, PyRep *value)
SetItemString adds or sets a database entry.
PyRep * CalendarDB::GetResponsesForCharacter |
( |
uint32 |
charID | ) |
|
|
static |
Definition at line 237 of file CalendarDB.cpp.
References PyList::AddItem(), DBerror::c_str(), codelog, DBQueryResult::error, DBResultRow::GetInt(), DBQueryResult::GetRow(), sDatabase, and PyDict::SetItemString().
240 if (!
sDatabase.RunQuery(res,
"SELECT eventID, response FROM sysCalendarResponses WHERE charID = %u", charID)) {
int32 GetInt(uint32 index) const
bool GetRow(DBResultRow &into)
const char * c_str() const
#define codelog(type, fmt,...)
void SetItemString(const char *key, PyRep *value)
SetItemString adds or sets a database entry.
PyRep * CalendarDB::GetResponsesToEvent |
( |
uint32 |
eventID | ) |
|
|
static |
Definition at line 258 of file CalendarDB.cpp.
References PyList::AddItem(), DBerror::c_str(), codelog, DBQueryResult::error, DBResultRow::GetInt(), DBQueryResult::GetRow(), sDatabase, and PyDict::SetItemString().
261 if (!
sDatabase.RunQuery(res,
"SELECT charID, response FROM sysCalendarResponses WHERE eventID = %u", eventID)) {
int32 GetInt(uint32 index) const
bool GetRow(DBResultRow &into)
const char * c_str() const
#define codelog(type, fmt,...)
void SetItemString(const char *key, PyRep *value)
SetItemString adds or sets a database entry.
void CalendarDB::SaveEventResponse |
( |
uint32 |
charID, |
|
|
Call_SendEventResponse & |
args |
|
) |
| |
|
static |
Definition at line 229 of file CalendarDB.cpp.
References sDatabase.
233 "INSERT INTO `sysCalendarResponses`(`eventID`, `charID`, `response`)"
234 " VALUES (%u, %u, %u)",
args.eventID, charID,
args.response);
PyRep * CalendarDB::SaveNewEvent |
( |
uint32 |
ownerID, |
|
|
Call_CreateEventWithInvites & |
args |
|
) |
| |
|
static |
Definition at line 40 of file CalendarDB.cpp.
References PyList::begin(), DBerror::c_str(), codelog, GetTimeParts(), EvE::TimeParts::month, Calendar::Flag::Personal, PyStatic, sDatabase, and EvE::TimeParts::year.
46 if (!
args.invitees->empty()) {
48 std::ostringstream str;
62 "INSERT INTO `sysCalendarInvitees`(`eventID`, `inviteeList`)"
63 " VALUES %s", str.str().
c_str());
69 "INSERT INTO sysCalendarEvents(ownerID, creatorID, eventDateTime, eventDuration, importance,"
70 " eventTitle, eventText, flag, month, year)"
71 " VALUES (%u, %u, %li, %u, %u, '%s', '%s', %u, %u, %u)",
72 ownerID, ownerID,
args.startDateTime,
args.duration,
args.important,
args.title.c_str(),
75 codelog(DATABASE__ERROR,
"Error in SaveNewEvent query: %s", err.
c_str());
80 "INSERT INTO sysCalendarEvents(ownerID, creatorID, eventDateTime, importance,"
81 " eventTitle, eventText, flag, month, year)"
82 " VALUES (%u, %u, %li, %u, '%s', '%s', %u, %u, %u)",
83 ownerID, ownerID,
args.startDateTime,
args.important,
args.title.c_str(),
86 codelog(DATABASE__ERROR,
"Error in SaveNewEvent query: %s", err.
c_str());
91 return new PyInt(eventID);
const_iterator begin() const
storage_type::const_iterator const_iterator
const char * c_str() const
#define codelog(type, fmt,...)
EvE::TimeParts GetTimeParts(int64 filetime)
PyRep * CalendarDB::SaveNewEvent |
( |
uint32 |
ownerID, |
|
|
uint32 |
creatorID, |
|
|
Call_CreateEvent & |
args |
|
) |
| |
|
static |
Definition at line 95 of file CalendarDB.cpp.
References Calendar::Flag::Alliance, Calendar::Flag::Automated, DBerror::c_str(), Calendar::Flag::CCP, codelog, Calendar::Flag::Corp, GetTimeParts(), Calendar::Flag::Invalid, IsAlliance, IsCharacterID, IsCorp, EvE::TimeParts::month, Calendar::Flag::Personal, PyStatic, sDatabase, and EvE::TimeParts::year.
100 }
else if (
IsCorp(ownerID)) {
104 }
else if (ownerID == 1) {
117 "INSERT INTO sysCalendarEvents(ownerID, creatorID, eventDateTime, eventDuration, importance,"
118 " eventTitle, eventText, flag, month, year)"
119 " VALUES (%u, %u, %li, %u, %u, '%s', '%s', %u, %u, %u)",
120 ownerID, creatorID,
args.startDateTime,
args.duration,
args.important,
123 codelog(DATABASE__ERROR,
"Error in SaveNewEvent query: %s", err.
c_str());
128 "INSERT INTO sysCalendarEvents(ownerID, creatorID, eventDateTime, importance,"
129 " eventTitle, eventText, flag, month, year)"
130 " VALUES (%u, %u, %li, %u, '%s', '%s', %u, %u, %u)",
131 ownerID, creatorID,
args.startDateTime,
args.important,
134 codelog(DATABASE__ERROR,
"Error in SaveNewEvent query: %s", err.
c_str());
139 return new PyInt(eventID);
const char * c_str() const
#define codelog(type, fmt,...)
#define IsCharacterID(itemID)
EvE::TimeParts GetTimeParts(int64 filetime)
#define IsAlliance(itemID)
uint32 CalendarDB::SaveSystemEvent |
( |
uint32 |
ownerID, |
|
|
uint32 |
creatorID, |
|
|
int64 |
startDateTime, |
|
|
uint8 |
autoEventType, |
|
|
std::string |
title, |
|
|
std::string |
description, |
|
|
bool |
important = false |
|
) |
| |
|
static |
Definition at line 143 of file CalendarDB.cpp.
References Calendar::Flag::Automated, DBerror::c_str(), GetTimeParts(), EvE::TimeParts::month, sDatabase, and EvE::TimeParts::year.
152 "INSERT INTO sysCalendarEvents(ownerID, creatorID, eventDateTime, autoEventType,"
153 " eventTitle, eventText, flag, month, year, importance)"
154 " VALUES (%u, %u, %li, %u, '%s', '%s', %u, %u, %u, %u)",
155 ownerID, creatorID, startDateTime, autoEventType, title.
c_str(), description.c_str(),
const char * c_str() const
EvE::TimeParts GetTimeParts(int64 filetime)
void CalendarDB::UpdateEventParticipants |
( |
Call_UpdateEventParticipants & |
args | ) |
|
|
static |
The documentation for this class was generated from the following files:
- /backups/local/src/eve/EvEmu_Crucible/src/eve-server/system/CalendarDB.h
- /backups/local/src/eve/EvEmu_Crucible/src/eve-server/system/CalendarDB.cpp