39 lines
1.1 KiB
C
39 lines
1.1 KiB
C
#ifndef __SBOT_H__
|
|
# define __SBOT_H__
|
|
|
|
# include <glib-object.h>
|
|
# include <gio/gio.h>
|
|
|
|
# define SSB_TYPE_SCUTTLER ssb_scuttler_get_type()
|
|
G_DECLARE_FINAL_TYPE(SsbScuttler, ssb_scuttler, SSB, SCUTTLER, GInitiallyUnowned)
|
|
|
|
typedef enum {
|
|
SSB_SCUTTLER_ERROR_KEYGEN,
|
|
SSB_SCUTTLER_ERROR_KEYAUTH,
|
|
SSB_SCUTTLER_ERROR_KEYVERIFY,
|
|
SSB_SCUTTLER_ERROR_AUTH,
|
|
SSB_SCUTTLER_ERROR_REQUEST_TOO_LARGE,
|
|
SSB_SCUTTLER_ERROR_SEND,
|
|
} SsbScuttlerError;
|
|
|
|
G_BEGIN_DECLS
|
|
|
|
gpointer scuttle(gchar *ssb_dir);
|
|
void stop_scuttling(void);
|
|
|
|
# define SSB_SCUTTLER_ERROR (ssb_scuttler_error_quark())
|
|
GQuark ssb_scuttler_error_quark(void);
|
|
gboolean ssb_scuttler_ensure(const gchar *ssb_dir);
|
|
SsbScuttler *ssb_scuttler_get(void);
|
|
void ssb_scuttler_connect_async(SsbScuttler *scuttler,
|
|
GCancellable *cancellable,
|
|
GAsyncReadyCallback callback,
|
|
gpointer user_data);
|
|
gboolean ssb_scuttler_connect_finish(SsbScuttler *scuttler,
|
|
GAsyncResult *result,
|
|
GError **error);
|
|
|
|
G_END_DECLS
|
|
|
|
#endif /* __SBOT_H__ */
|