aboutsummaryrefslogtreecommitdiffstats
path: root/src/bin/gravatar.c
diff options
context:
space:
mode:
authorBoris Faure <billiob@gmail.com>2014-10-05 21:00:14 +0200
committerBoris Faure <billiob@gmail.com>2014-10-15 21:44:58 +0200
commitf3a0e92e56d0cccc4e9dec37284b3a4cef509a77 (patch)
tree3117b1a67c82c56e176406a9816fc12641a8a135 /src/bin/gravatar.c
parenttermio: clean up _update_link() (diff)
downloadterminology-f3a0e92e56d0cccc4e9dec37284b3a4cef509a77.tar.gz
very early work on gravatar integration
Diffstat (limited to 'src/bin/gravatar.c')
-rw-r--r--src/bin/gravatar.c47
1 files changed, 47 insertions, 0 deletions
diff --git a/src/bin/gravatar.c b/src/bin/gravatar.c
new file mode 100644
index 0000000..3d6f741
--- /dev/null
+++ b/src/bin/gravatar.c
@@ -0,0 +1,47 @@
+#include "private.h"
+
+#include <Elementary.h>
+
+#include "gravatar.h"
+
+/* specific log domain to help debug the gravatar module */
+int _gravatar_log_dom = -1;
+
+#undef CRITICAL
+#undef ERR
+#undef WRN
+#undef INF
+#undef DBG
+
+#define CRIT(...) EINA_LOG_DOM_CRIT(_gravatar_log_dom, __VA_ARGS__)
+#define ERR(...) EINA_LOG_DOM_ERR (_gravatar_log_dom, __VA_ARGS__)
+#define WRN(...) EINA_LOG_DOM_WARN(_gravatar_log_dom, __VA_ARGS__)
+#define INF(...) EINA_LOG_DOM_INFO(_gravatar_log_dom, __VA_ARGS__)
+#define DBG(...) EINA_LOG_DOM_DBG (_gravatar_log_dom, __VA_ARGS__)
+
+void
+gravatar_tooltip(const char *email)
+{
+ DBG("need to show tooltip for email:%s", email);
+
+ /* TODO */
+}
+
+void
+gravatar_init(void)
+{
+ if (_gravatar_log_dom >= 0) return;
+
+ _gravatar_log_dom = eina_log_domain_register("gravatar", NULL);
+ if (_gravatar_log_dom < 0)
+ EINA_LOG_CRIT(_("Could not create logging domain '%s'."), "gravatar");
+}
+
+void
+gravatar_shutdown(void)
+{
+ if (_gravatar_log_dom < 0) return;
+ eina_log_domain_unregister(_gravatar_log_dom);
+ _gravatar_log_dom = -1;
+}
+