Soletta™ Framework
Framework for making IoT devices

Full online documentation | C API Index
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Functions | Variables
sol-glib-integration.h File Reference

This file is to be included by GMainLoop users. More...

#include <stdlib.h>
#include <string.h>
#include <glib.h>
#include <sol-mainloop.h>
#include <sol-log.h>
#include <sol-util.h>
#include <sol-vector.h>

Go to the source code of this file.

Data Structures

struct  _sol_glib_integration_fd_handler
 
struct  _sol_glib_integration_source_data
 

Functions

static unsigned int _sol_glib_integration_align_power2 (unsigned int u)
 
static gushort _sol_glib_integration_fd_flags_to_gpoll_events (uint32_t sol_flags)
 
static void _sol_glib_integration_fd_handler_del (struct _sol_glib_integration_fd_handler *h)
 
static uint32_t _sol_glib_integration_gpoll_events_to_fd_flags (gushort gpoll_events)
 
static gboolean _sol_glib_integration_gsource_cb (gpointer user_data)
 
static gboolean _sol_glib_integration_gsource_check (GSource *source)
 
static gboolean _sol_glib_integration_gsource_dispatch (GSource *source, GSourceFunc cb, gpointer user_data)
 
static gboolean _sol_glib_integration_gsource_prepare (GSource *source, gint *timeout)
 
static bool _sol_glib_integration_on_source_fd (void *data, int fd, uint32_t active_flags)
 
static bool _sol_glib_integration_source_acquire (struct _sol_glib_integration_source_data *mdata)
 
static bool _sol_glib_integration_source_check (void *data)
 
static void _sol_glib_integration_source_dispatch (void *data)
 
static void _sol_glib_integration_source_dispose (void *data)
 
static struct
_sol_glib_integration_fd_handler
_sol_glib_integration_source_fd_handler_data_find (struct _sol_glib_integration_source_data *mdata, int fd)
 
static void _sol_glib_integration_source_fd_handlers_adjust (struct _sol_glib_integration_source_data *mdata)
 
static bool _sol_glib_integration_source_get_next_timeout (void *data, struct timespec *ts)
 
static GPollFD * _sol_glib_integration_source_gpollfd_find (struct _sol_glib_integration_source_data *mdata, int fd)
 
static bool _sol_glib_integration_source_prepare (void *data)
 
static void _sol_glib_integration_source_release (struct _sol_glib_integration_source_data *mdata)
 
static bool sol_glib_integration (void)
 

Variables

static GSourceFuncs _sol_glib_integration_gsource_funcs
 Source callbacks needed for the integration of the mainloops. More...
 
static const struct
sol_mainloop_source_type 
_sol_glib_integration_source_type
 Source type to integrate the mainloops (see sol_mainloop_source_type) More...
 

Detailed Description

This file is to be included by GMainLoop users.

It will make sure Glib's main loop is usable with Soletta in the case of Soletta being compiled with glib as mainloop or any other such as POSIX.

Include this file and call sol_glib_integration().

Function Documentation

static unsigned int _sol_glib_integration_align_power2 ( unsigned int  u)
inlinestatic
static gushort _sol_glib_integration_fd_flags_to_gpoll_events ( uint32_t  sol_flags)
static
static void _sol_glib_integration_fd_handler_del ( struct _sol_glib_integration_fd_handler h)
static
static uint32_t _sol_glib_integration_gpoll_events_to_fd_flags ( gushort  gpoll_events)
static
static gboolean _sol_glib_integration_gsource_cb ( gpointer  user_data)
static

Referenced by sol_glib_integration().

static gboolean _sol_glib_integration_gsource_check ( GSource *  source)
static
static gboolean _sol_glib_integration_gsource_dispatch ( GSource *  source,
GSourceFunc  cb,
gpointer  user_data 
)
static
static gboolean _sol_glib_integration_gsource_prepare ( GSource *  source,
gint *  timeout 
)
static
static bool _sol_glib_integration_on_source_fd ( void *  data,
int  fd,
uint32_t  active_flags 
)
static
static bool _sol_glib_integration_source_acquire ( struct _sol_glib_integration_source_data mdata)
static
static bool _sol_glib_integration_source_check ( void *  data)
static
static void _sol_glib_integration_source_dispatch ( void *  data)
static
static void _sol_glib_integration_source_dispose ( void *  data)
static
static struct _sol_glib_integration_fd_handler* _sol_glib_integration_source_fd_handler_data_find ( struct _sol_glib_integration_source_data mdata,
int  fd 
)
static
static void _sol_glib_integration_source_fd_handlers_adjust ( struct _sol_glib_integration_source_data mdata)
static
static bool _sol_glib_integration_source_get_next_timeout ( void *  data,
struct timespec *  ts 
)
static
static GPollFD* _sol_glib_integration_source_gpollfd_find ( struct _sol_glib_integration_source_data mdata,
int  fd 
)
static
static bool _sol_glib_integration_source_prepare ( void *  data)
static
static void _sol_glib_integration_source_release ( struct _sol_glib_integration_source_data mdata)
static
static bool sol_glib_integration ( void  )
static

Variable Documentation

GSourceFuncs _sol_glib_integration_gsource_funcs
static
Initial value:
= {
}
static gboolean _sol_glib_integration_gsource_check(GSource *source)
Definition: sol-glib-integration.h:45
static gboolean _sol_glib_integration_gsource_dispatch(GSource *source, GSourceFunc cb, gpointer user_data)
Definition: sol-glib-integration.h:51
static gboolean _sol_glib_integration_gsource_prepare(GSource *source, gint *timeout)
Definition: sol-glib-integration.h:39

Source callbacks needed for the integration of the mainloops.

Referenced by sol_glib_integration().

const struct sol_mainloop_source_type _sol_glib_integration_source_type
static
Initial value:
= {
}
static bool _sol_glib_integration_source_get_next_timeout(void *data, struct timespec *ts)
Definition: sol-glib-integration.h:311
static void _sol_glib_integration_source_dispose(void *data)
Definition: sol-glib-integration.h:358
static bool _sol_glib_integration_source_prepare(void *data)
Definition: sol-glib-integration.h:258
static bool _sol_glib_integration_source_check(void *data)
Definition: sol-glib-integration.h:324
#define SOL_MAINLOOP_SOURCE_TYPE_API_VERSION
Compile time API version to be checked during runtime.
Definition: sol-mainloop.h:669
static void _sol_glib_integration_source_dispatch(void *data)
Definition: sol-glib-integration.h:343

Source type to integrate the mainloops (see sol_mainloop_source_type)