EvEmu
0.8.4
11 September 2021
|
#include "MailDB.h"
Public Member Functions | |
PyRep * | GetLabels (int characterID) const |
PyString * | GetMailBody (int id) const |
void | SetMailUnread (int id) |
void | SetMailRead (int id) |
void | SetMailsUnread (std::vector< int32 > ids) |
void | SetMailsRead (std::vector< int32 > ids) |
void | MarkAllAsRead (uint32 characterID) |
void | MarkAllAsUnread (uint32 characterID) |
bool | CreateLabel (int characterID, Call_CreateLabel &args, uint32 &newID) const |
void | DeleteLabel (int characterID, int labelID) const |
void | EditLabel (int characterID, Call_EditLabel &args) const |
void | ApplyLabel (int32 messageID, int labelID) |
void | ApplyLabels (std::vector< int32 > messageIDs, int labelID) |
void | MarkAllAsReadByLabel (uint32 characterID, int labelID) |
void | MarkAllAsUnreadByLabel (uint32 characterID, int labelID) |
void | RemoveLabels (std::vector< int32 > messageIDs, int labelID) |
void | DeleteMail (int32 messageID) |
void | EmptyTrash (uint32 characterID) |
void | MoveAllFromTrash (uint32 characterID) |
void | MoveAllToTrash (uint32 characterID) |
void | MoveFromTrash (int32 messageID) |
void | MoveToTrash (int32 messageID) |
void | MoveToTrashByLabel (int32 characterID, int32 labelID) |
PyDict * | GetJoinedMailingLists (uint32 characterID) |
uint32 | CreateMailingList (uint32 creator, std::string name, int32 defaultAccess, int32 defaultMemberAccess, int32 cost) |
void | JoinMailingList (uint32 characterID, std::string name) |
void | LeaveMailingList (uint32 characterID, int32 listID) |
void | DeleteMailingList (uint32 characterID, int32 listID) |
PyDict * | GetMailingListMembers (int32 listID) |
void | MailingListSetEntityAccess (int32 entity, int32 access, int32 listID) |
void | MailingListClearEntityAccess (int32 entity, int32 listID) |
void | SetMailingListDefaultAccess (int32 listID, int32 defaultAccess, int32 defaultMemberAccess, int32 cost) |
PyObject * | MailingListGetSettings (int32 listID) |
void | ApplyStatusMasks (std::vector< int32 > messageIDs, int mask) |
void | RemoveStatusMasks (std::vector< int32 > messageIDs, int mask) |
void | ApplyStatusMask (int32 messageID, int mask) |
void | RemoveStatusMask (int32 messageID, int mask) |
void | ApplyLabelMask (int32 messageID, int mask) |
void | ApplyLabelMasks (std::vector< int32 > messageIDs, int mask) |
void | RemoveLabelMask (int32 messageID, int mask) |
void | RemoveLabelMasks (std::vector< int32 > messageIDs, int mask) |
int | SendMail (int sender, std::vector< int > &toCharacterIDs, int toListID, int toCorpOrAllianceID, std::string &title, std::string &body, int isReplyTo, int isForwardedFrom) |
PyRep * | GetNewMail (int charId) |
PyRep * | GetMailStatus (int charId) |
![]() | |
uint32 | GetStationOwner (uint32 stationID) |
Static Protected Member Functions | |
static int | BitFromLabelID (int id) |
![]() | |
static uint32 | CreateNewAccount (const char *login, const char *pass, const char *passHash, int64 role) |
Additional Inherited Members | |
![]() | |
static bool | GetAccountInformation (CryptoChallengePacket &ccp, AccountData &aData, std::string &failMsg) |
static bool | UpdateAccountHash (const char *username, std::string &hash) |
static bool | IncrementLoginCount (uint32 accountID) |
static void | UpdatePassword (uint32 accountID, const char *pass) |
static void | SaveKillOrLoss (CharKillData &data) |
static bool | GetConstant (const char *name, uint32 &into) |
static void | SetServerOnlineStatus (bool online=false) |
static void | SetCharacterOnlineStatus (uint32 char_id, bool online=false) |
static void | SetAccountOnlineStatus (uint32 accountID, bool online=false) |
static void | SetAccountBanStatus (uint32 accountID, bool banned=false) |
static void | SaveServerStats (double threads, float rss, float vm, float user, float kernel, uint32 items, uint32 bubbles) |
static uint32 | SetClientSeed () |
static PyRep * | LookupChars (const char *match, bool exact=false) |
static PyRep * | LookupOwners (const char *match, bool exact=false) |
static PyRep * | LookupCorporations (const std::string &) |
static PyRep * | LookupFactions (const std::string &) |
static PyRep * | LookupCorporationTickers (const std::string &) |
static PyRep * | LookupStations (const std::string &) |
static PyRep * | LookupKnownLocationsByGroup (const std::string &, uint32) |
static PyRep * | PrimeOwners (std::vector< int32 > &itemIDs) |
static bool | ValidateAccountName (CryptoChallengePacket &ccp, std::string &failMsg) |
static void | GetCorpHangarNames (uint32 corpID, std::map< uint8, std::string > &hangarNames) |
![]() | |
void | ProcessStringChange (const char *key, const std::string &oldValue, std::string newValue, PyDict *notif, std::vector< std::string > &dbQ) |
void | ProcessRealChange (const char *key, double oldValue, double newValue, PyDict *notif, std::vector< std::string > &dbQ) |
void | ProcessIntChange (const char *key, uint32 oldValue, uint32 newValue, PyDict *notif, std::vector< std::string > &dbQ) |
void | ProcessLongChange (const char *key, int64 oldValue, int64 newValue, PyDict *notif, std::vector< std::string > &dbQ) |
void MailDB::ApplyLabel | ( | int32 | messageID, |
int | labelID | ||
) |
Definition at line 368 of file MailDB.cpp.
References ApplyLabelMask(), and BitFromLabelID().
void MailDB::ApplyLabelMask | ( | int32 | messageID, |
int | mask | ||
) |
Definition at line 514 of file MailDB.cpp.
References codelog, and sDatabase.
Referenced by ApplyLabel().
void MailDB::ApplyLabelMasks | ( | std::vector< int32 > | messageIDs, |
int | mask | ||
) |
Definition at line 540 of file MailDB.cpp.
References _log, DBerror::c_str(), codelog, and sDatabase.
Referenced by ApplyLabels().
void MailDB::ApplyLabels | ( | std::vector< int32 > | messageIDs, |
int | labelID | ||
) |
Definition at line 276 of file MailDB.cpp.
References ApplyLabelMasks(), and BitFromLabelID().
void MailDB::ApplyStatusMask | ( | int32 | messageID, |
int | mask | ||
) |
Definition at line 490 of file MailDB.cpp.
References codelog, and sDatabase.
Referenced by SetMailRead().
void MailDB::ApplyStatusMasks | ( | std::vector< int32 > | messageIDs, |
int | mask | ||
) |
Definition at line 448 of file MailDB.cpp.
References DBerror::c_str(), codelog, and sDatabase.
Referenced by SetMailsRead().
|
staticprotected |
Definition at line 595 of file MailDB.cpp.
References sLog.
Referenced by ApplyLabel(), ApplyLabels(), DeleteLabel(), EditLabel(), MarkAllAsReadByLabel(), MarkAllAsUnreadByLabel(), MoveToTrashByLabel(), and RemoveLabels().
bool MailDB::CreateLabel | ( | int | characterID, |
Call_CreateLabel & | args, | ||
uint32 & | newID | ||
) | const |
Definition at line 304 of file MailDB.cpp.
References DBerror::c_str(), codelog, DBResultRow::GetInt(), DBQueryResult::GetRow(), DBQueryResult::GetRowCount(), and sDatabase.
uint32 MailDB::CreateMailingList | ( | uint32 | creator, |
std::string | name, | ||
int32 | defaultAccess, | ||
int32 | defaultMemberAccess, | ||
int32 | cost | ||
) |
Definition at line 659 of file MailDB.cpp.
References DBerror::c_str(), codelog, mailingListAllowed, mailingListMemberOwner, and sDatabase.
void MailDB::DeleteLabel | ( | int | characterID, |
int | labelID | ||
) | const |
Definition at line 335 of file MailDB.cpp.
References BitFromLabelID(), codelog, and sDatabase.
void MailDB::DeleteMail | ( | int32 | messageID | ) |
Definition at line 374 of file MailDB.cpp.
References codelog, and sDatabase.
Definition at line 773 of file MailDB.cpp.
void MailDB::EditLabel | ( | int | characterID, |
Call_EditLabel & | args | ||
) | const |
Definition at line 354 of file MailDB.cpp.
References BitFromLabelID(), DBerror::c_str(), and sDatabase.
void MailDB::EmptyTrash | ( | uint32 | characterID | ) |
Definition at line 386 of file MailDB.cpp.
References codelog, mailStatusMaskTrashed, and sDatabase.
Definition at line 607 of file MailDB.cpp.
References codelog, DBResultRow::GetInt(), DBQueryResult::GetRow(), DBResultRow::GetText(), mailingListMemberMuted, mailingListMemberOperator, mailingListMemberOwner, sDatabase, PyDict::SetItem(), and PyDict::SetItemString().
PyRep * MailDB::GetLabels | ( | int | characterID | ) | const |
Definition at line 282 of file MailDB.cpp.
References DBResultRow::GetInt(), DBQueryResult::GetRow(), DBResultRow::GetText(), sDatabase, and PyDict::SetItem().
PyString * MailDB::GetMailBody | ( | int | id | ) | const |
Definition at line 151 of file MailDB.cpp.
References DBResultRow::ColumnLength(), DBQueryResult::GetRow(), DBQueryResult::GetRowCount(), DBResultRow::GetText(), DBResultRow::IsNull(), and sDatabase.
Definition at line 688 of file MailDB.cpp.
References codelog, DBResultRow::GetInt(), DBQueryResult::GetRow(), sDatabase, and PyDict::SetItem().
PyRep * MailDB::GetMailStatus | ( | int | charId | ) |
Definition at line 34 of file MailDB.cpp.
References codelog, DBResultToCRowset(), and sDatabase.
PyRep * MailDB::GetNewMail | ( | int | charId | ) |
Definition at line 47 of file MailDB.cpp.
References DBResultToCRowset(), and sDatabase.
void MailDB::JoinMailingList | ( | uint32 | characterID, |
std::string | name | ||
) |
Definition at line 777 of file MailDB.cpp.
Definition at line 781 of file MailDB.cpp.
Definition at line 785 of file MailDB.cpp.
Definition at line 710 of file MailDB.cpp.
References codelog, DBResultRow::GetInt(), DBQueryResult::GetRow(), sDatabase, PyDict::SetItem(), and PyDict::SetItemString().
Definition at line 789 of file MailDB.cpp.
void MailDB::MarkAllAsRead | ( | uint32 | characterID | ) |
Definition at line 200 of file MailDB.cpp.
References codelog, mailStatusMaskRead, and sDatabase.
void MailDB::MarkAllAsReadByLabel | ( | uint32 | characterID, |
int | labelID | ||
) |
Definition at line 230 of file MailDB.cpp.
References BitFromLabelID(), codelog, and sDatabase.
void MailDB::MarkAllAsUnread | ( | uint32 | characterID | ) |
Definition at line 186 of file MailDB.cpp.
References codelog, mailStatusMaskRead, and sDatabase.
void MailDB::MarkAllAsUnreadByLabel | ( | uint32 | characterID, |
int | labelID | ||
) |
Definition at line 213 of file MailDB.cpp.
References BitFromLabelID(), codelog, and sDatabase.
void MailDB::MoveAllFromTrash | ( | uint32 | characterID | ) |
Definition at line 397 of file MailDB.cpp.
References codelog, mailStatusMaskTrashed, and sDatabase.
void MailDB::MoveAllToTrash | ( | uint32 | characterID | ) |
Definition at line 408 of file MailDB.cpp.
References codelog, mailStatusMaskTrashed, and sDatabase.
void MailDB::MoveFromTrash | ( | int32 | messageID | ) |
Definition at line 793 of file MailDB.cpp.
void MailDB::MoveToTrash | ( | int32 | messageID | ) |
Definition at line 419 of file MailDB.cpp.
References codelog, mailStatusMaskTrashed, and sDatabase.
Definition at line 432 of file MailDB.cpp.
References BitFromLabelID(), codelog, and sDatabase.
void MailDB::RemoveLabelMask | ( | int32 | messageID, |
int | mask | ||
) |
Definition at line 528 of file MailDB.cpp.
References codelog, and sDatabase.
void MailDB::RemoveLabelMasks | ( | std::vector< int32 > | messageIDs, |
int | mask | ||
) |
Definition at line 567 of file MailDB.cpp.
References _log, DBerror::c_str(), codelog, and sDatabase.
void MailDB::RemoveLabels | ( | std::vector< int32 > | messageIDs, |
int | labelID | ||
) |
Definition at line 246 of file MailDB.cpp.
References _log, BitFromLabelID(), DBerror::c_str(), codelog, and sDatabase.
void MailDB::RemoveStatusMask | ( | int32 | messageID, |
int | mask | ||
) |
Definition at line 502 of file MailDB.cpp.
References codelog, and sDatabase.
Referenced by SetMailUnread().
void MailDB::RemoveStatusMasks | ( | std::vector< int32 > | messageIDs, |
int | mask | ||
) |
Definition at line 469 of file MailDB.cpp.
References DBerror::c_str(), codelog, and sDatabase.
Referenced by SetMailsUnread().
int MailDB::SendMail | ( | int | sender, |
std::vector< int > & | toCharacterIDs, | ||
int | toListID, | ||
int | toCorpOrAllianceID, | ||
std::string & | title, | ||
std::string & | body, | ||
int | isReplyTo, | ||
int | isForwardedFrom | ||
) |
Definition at line 59 of file MailDB.cpp.
References Buffer::begin(), codelog, DeflateData(), Buffer::end(), DBResultRow::GetInt(), DBQueryResult::GetRow(), mailLabelInbox, PRIu64, sDatabase, and Win32TimeNow().
void MailDB::SetMailingListDefaultAccess | ( | int32 | listID, |
int32 | defaultAccess, | ||
int32 | defaultMemberAccess, | ||
int32 | cost | ||
) |
Definition at line 759 of file MailDB.cpp.
References codelog, and sDatabase.
void MailDB::SetMailRead | ( | int | id | ) |
Definition at line 171 of file MailDB.cpp.
References ApplyStatusMask(), and mailStatusMaskRead.
void MailDB::SetMailsRead | ( | std::vector< int32 > | ids | ) |
Definition at line 181 of file MailDB.cpp.
References ApplyStatusMasks(), and mailStatusMaskRead.
void MailDB::SetMailsUnread | ( | std::vector< int32 > | ids | ) |
Definition at line 176 of file MailDB.cpp.
References mailStatusMaskRead, and RemoveStatusMasks().
void MailDB::SetMailUnread | ( | int | id | ) |
Definition at line 166 of file MailDB.cpp.
References mailStatusMaskRead, and RemoveStatusMask().