diff options
author | Goraf <22941576+Goraf@users.noreply.github.com> | 2018-01-18 17:57:36 +0100 |
---|---|---|
committer | Goraf <22941576+Goraf@users.noreply.github.com> | 2018-01-19 01:39:33 +0100 |
commit | fb40ed2b6385b9e3a85b35ba27f3a42207d22234 (patch) | |
tree | 9de6415c9c28c68d2fe750abe2c95c3a89ba08ca /protocols/Gadu-Gadu/src/libgadu/debug.cpp | |
parent | 97bb7e79c15952e7f9bf47caef4e3c09dd63c8df (diff) |
Gadu-Gadu: update libgadu to 1.11.4
Diffstat (limited to 'protocols/Gadu-Gadu/src/libgadu/debug.cpp')
-rw-r--r-- | protocols/Gadu-Gadu/src/libgadu/debug.cpp | 70 |
1 files changed, 68 insertions, 2 deletions
diff --git a/protocols/Gadu-Gadu/src/libgadu/debug.cpp b/protocols/Gadu-Gadu/src/libgadu/debug.cpp index 5b7c0c6577..fcadfe3ed1 100644 --- a/protocols/Gadu-Gadu/src/libgadu/debug.cpp +++ b/protocols/Gadu-Gadu/src/libgadu/debug.cpp @@ -268,8 +268,74 @@ const char *gg_debug_state(enum gg_state_t state) GG_DEBUG_STATE(GG_STATE_CONNECTING_RELAY) GG_DEBUG_STATE(GG_STATE_READING_RELAY) GG_DEBUG_STATE(GG_STATE_DISCONNECTING) +#undef GG_DEBUG_STATE - // Celowo nie ma default, żeby kompilator wyłapał brakujące stany + /* Celowo nie ma default, żeby kompilator wyłapał brakujące stany */ + + } + + return NULL; +} + +/** + * \internal Zwraca ciąg z nazwą podanego zdarzenia. + * + * \param event Zdarzenie. + * + * \return Ciąg z nazwą zdarzenia + * + * \ingroup debug + */ +const char *gg_debug_event(enum gg_event_t event) +{ + switch (event) { +#define GG_DEBUG_EVENT(x) case x: return #x; + GG_DEBUG_EVENT(GG_EVENT_NONE) + GG_DEBUG_EVENT(GG_EVENT_MSG) + GG_DEBUG_EVENT(GG_EVENT_NOTIFY) + GG_DEBUG_EVENT(GG_EVENT_NOTIFY_DESCR) + GG_DEBUG_EVENT(GG_EVENT_STATUS) + GG_DEBUG_EVENT(GG_EVENT_ACK) + GG_DEBUG_EVENT(GG_EVENT_PONG) + GG_DEBUG_EVENT(GG_EVENT_CONN_FAILED) + GG_DEBUG_EVENT(GG_EVENT_CONN_SUCCESS) + GG_DEBUG_EVENT(GG_EVENT_DISCONNECT) + GG_DEBUG_EVENT(GG_EVENT_DCC_NEW) + GG_DEBUG_EVENT(GG_EVENT_DCC_ERROR) + GG_DEBUG_EVENT(GG_EVENT_DCC_DONE) + GG_DEBUG_EVENT(GG_EVENT_DCC_CLIENT_ACCEPT) + GG_DEBUG_EVENT(GG_EVENT_DCC_CALLBACK) + GG_DEBUG_EVENT(GG_EVENT_DCC_NEED_FILE_INFO) + GG_DEBUG_EVENT(GG_EVENT_DCC_NEED_FILE_ACK) + GG_DEBUG_EVENT(GG_EVENT_DCC_NEED_VOICE_ACK) + GG_DEBUG_EVENT(GG_EVENT_DCC_VOICE_DATA) + GG_DEBUG_EVENT(GG_EVENT_PUBDIR50_SEARCH_REPLY) + GG_DEBUG_EVENT(GG_EVENT_PUBDIR50_READ) + GG_DEBUG_EVENT(GG_EVENT_PUBDIR50_WRITE) + GG_DEBUG_EVENT(GG_EVENT_STATUS60) + GG_DEBUG_EVENT(GG_EVENT_NOTIFY60) + GG_DEBUG_EVENT(GG_EVENT_USERLIST) + GG_DEBUG_EVENT(GG_EVENT_IMAGE_REQUEST) + GG_DEBUG_EVENT(GG_EVENT_IMAGE_REPLY) + GG_DEBUG_EVENT(GG_EVENT_DCC_ACK) + GG_DEBUG_EVENT(GG_EVENT_DCC7_NEW) + GG_DEBUG_EVENT(GG_EVENT_DCC7_ACCEPT) + GG_DEBUG_EVENT(GG_EVENT_DCC7_REJECT) + GG_DEBUG_EVENT(GG_EVENT_DCC7_CONNECTED) + GG_DEBUG_EVENT(GG_EVENT_DCC7_ERROR) + GG_DEBUG_EVENT(GG_EVENT_DCC7_DONE) + GG_DEBUG_EVENT(GG_EVENT_DCC7_PENDING) + GG_DEBUG_EVENT(GG_EVENT_XML_EVENT) + GG_DEBUG_EVENT(GG_EVENT_DISCONNECT_ACK) + GG_DEBUG_EVENT(GG_EVENT_TYPING_NOTIFICATION) + GG_DEBUG_EVENT(GG_EVENT_USER_DATA) + GG_DEBUG_EVENT(GG_EVENT_MULTILOGON_MSG) + GG_DEBUG_EVENT(GG_EVENT_MULTILOGON_INFO) + GG_DEBUG_EVENT(GG_EVENT_USERLIST100_VERSION) + GG_DEBUG_EVENT(GG_EVENT_USERLIST100_REPLY) +#undef GG_DEBUG_EVENT + + /* Celowo nie ma default, żeby kompilator wyłapał brakujące zdarzenia */ } @@ -294,7 +360,7 @@ void gg_debug_session(struct gg_session *gs, int level, const char *format, ...) } #undef gg_debug_dump -void gg_debug_dump(struct gg_session *gs, int level, const char *buf, int len) +void gg_debug_dump(struct gg_session *gs, int level, const char *buf, size_t len) { } |