deltachat / deltachat-core

Delta.Chat C-Library with e2e chat-over-email functionality & Python bindings
https://c.delta.chat
Other
304 stars 26 forks source link

refined event emission #293

Open hpk42 opened 6 years ago

hpk42 commented 6 years ago

Currently delta-core emits useful information (for testing and i think also for UIs/bindings) as DC_EVENT_INFO callback items. Also it emits all kinds of debugging information you only sometimes need (smtp/connectivity checking etc.) as the same event.

For example, regarding messages I suggest as new events in the format eventname, data1, data2:

I guess it's also ok to stick to the DC_EVENT_ prefix for all of the mentioned events.

These all can mostly just replace existing DC_EVENT_INFO messages, but use the same c-machinery for emitting events.

I suggest to introduce these renamings step by step, along with python tests so we not only document their behaviour/emission but also ensure they continously work.

r10s commented 6 years ago

I guess it's also ok to stick to the DCEVENT prefix for all of the mentioned events.

i would leave the prefix as otherwise there may be easy confusion with related flags, types and so on. also it is easier to write a script that greps for all events to put them to other language defines.