#include <glib.h>
#include <libedataserver/libedataserver.h>

#include <stdio.h>

int main(int argc, char **argv)
{
    g_type_init();
    // g_thread_init(NULL);
    g_set_prgname("source");

    GError *gerror = NULL;
    ESourceRegistry *registry = e_source_registry_new_sync(NULL, &gerror);
    if (!registry) {
        printf("failed: %s\n", gerror->message);
        return 1;
    } else {
        printf("success\n");
        g_object_unref(registry);
        return 0;
    }
}
