Commit 73b72100 authored by spiiroin's avatar spiiroin

[usb-moded] Normalize prototype listing

Update function declaration lists.

Fix some misnomers / typos in function names.

No functional changes.
Signed-off-by: spiiroin's avatarSimo Piiroinen <simo.piiroinen@jollamobile.com>
parent b6f0fdad
......@@ -316,10 +316,24 @@ endif
# ----------------------------------------------------------------------------
.SUFFIXES: .q .p .g
%.q : %.c ; $(CC) -o $@ -E $< $(CPPFLAGS) $(MCE_CFLAGS)
%.p : %.q ; cproto -s < $< | prettyproto.py > $@
%.g : %.q ; cproto < $< | prettyproto.py > $@
.PRECIOUS: .q
PROTO_CPPFLAGS += -DAPP_SYNC
PROTO_CPPFLAGS += -DAPP_SYNC_DBUS
PROTO_CPPFLAGS += -DCONNMAN
PROTO_CPPFLAGS += -DDEAD_CODE
PROTO_CPPFLAGS += -DDEBIAN
PROTO_CPPFLAGS += -DMEEGOLOCK
PROTO_CPPFLAGS += -DOFONO
PROTO_CPPFLAGS += -DSYSTEMD
PROTO_CPPFLAGS += -DUSE_MER_SSU
PROTO_CPPFLAGS += -DCONNMAN_WORKS_BETTER=1
PROTO_CPPFLAGS += -DVERBOSE_WAKELOCKING=1
%.q : CPPFLAGS += $(PROTO_CPPFLAGS)
%.q : %.c ; $(CC) -o $@ -E $< $(CPPFLAGS) -O
%.p : %.q prettyproto.groups ; cproto -s < $< | prettyproto.py > $@
%.g : %.q prettyproto.groups ; cproto < $< | prettyproto.py > $@
clean::
$(RM) *.[qpg] src/*.[qpg] utils/*.[qpg]
......
/**
* @file usb_moded-android.c
*
* Copyright (C) 2013-2018 Jolla. All rights reserved.
* Copyright (C) 2013-2019 Jolla. All rights reserved.
*
* @author: Philippe De Swert <philippe.deswert@jollamobile.com>
* @author: Simo Piiroinen <simo.piiroinen@jollamobile.com>
......@@ -34,11 +34,14 @@
#include <stdlib.h>
/* ========================================================================= *
* Functions
* Prototypes
* ========================================================================= */
/* -- android -- */
/* ------------------------------------------------------------------------- *
* ANDROID
* ------------------------------------------------------------------------- */
static bool android_write_file (const char *path, const char *text);
bool android_in_use (void);
static bool android_probe (void);
gchar *android_get_serial (void);
......
/**
* @file usb_moded-android.h
*
* Copyright (C) 2013-2018 Jolla. All rights reserved.
* Copyright (C) 2013-2019 Jolla. All rights reserved.
*
* @author: Philippe De Swert <philippe.deswert@jollamobile.com>
* @author: Simo Piiroinen <simo.piiroinen@jollamobile.com>
......@@ -44,7 +44,9 @@
* Prototypes
* ========================================================================= */
/* -- android -- */
/* ------------------------------------------------------------------------- *
* ANDROID
* ------------------------------------------------------------------------- */
bool android_in_use (void);
gchar *android_get_serial (void);
......
/*
* Copyright (C) 2010 Nokia Corporation. All rights reserved.
* Copyright (C) 2018 Jolla Ltd.
* Copyright (C) 2018-2019 Jolla Ltd.
*
* Author: Philippe De Swert <philippe.de-swert@nokia.com>
* Author: Philippe De Swert <phdeswer@lumi.maa>
......@@ -33,7 +33,9 @@
* Prototypes
* ========================================================================= */
/* -- dbusappsync -- */
/* ------------------------------------------------------------------------- *
* DBUSAPPSYNC
* ------------------------------------------------------------------------- */
gboolean dbusappsync_init_connection(void);
gboolean dbusappsync_init (void);
......
......@@ -2,7 +2,7 @@
* @file usb_moded-dbus.c
*
* Copyright (C) 2010 Nokia Corporation. All rights reserved.
* Copyright (C) 2013-2018 Jolla Ltd.
* Copyright (C) 2013-2019 Jolla Ltd.
*
* @author: Philippe De Swert <philippe.de-swert@nokia.com>
* @author: Philippe De Swert <phdeswer@lumi.maa>
......@@ -38,7 +38,9 @@
* Prototypes
* ========================================================================= */
/* -- dbusappsync -- */
/* ------------------------------------------------------------------------- *
* DBUSAPPSYNC
* ------------------------------------------------------------------------- */
static void dbusappsync_release_name (void);
static gboolean dbusappsync_obtain_name (void);
......
......@@ -2,7 +2,7 @@
* @file usb_moded-appsync.c
*
* Copyright (C) 2010 Nokia Corporation. All rights reserved.
* Copyright (C) 2013-2018 Jolla Ltd.
* Copyright (C) 2013-2019 Jolla Ltd.
*
* @author: Philippe De Swert <philippe.de-swert@nokia.com>
* @author: Philippe De Swert <phdeswer@lumi.maa>
......@@ -40,27 +40,27 @@
* Prototypes
* ========================================================================= */
/* -- appsync -- */
static void appsync_free_elem (list_elem_t *elem);
static void appsync_free_elem_cb (gpointer elem, gpointer user_data);
void appsync_free_appsync_list (void);
static gint appsync_list_sort_func (gconstpointer a, gconstpointer b);
void appsync_read_list (int diag);
static list_elem_t *appsync_read_file (const gchar *filename, int diag);
int appsync_activate_sync (const char *mode);
int appsync_activate_sync_post (const char *mode);
int appsync_mark_active (const gchar *name, int post);
/* ------------------------------------------------------------------------- *
* APPSYNC
* ------------------------------------------------------------------------- */
static void appsync_free_elem (list_elem_t *elem);
static void appsync_free_elem_cb (gpointer elem, gpointer user_data);
void appsync_free_appsync_list (void);
static gint appsync_list_sort_func (gconstpointer a, gconstpointer b);
void appsync_read_list (int diag);
static list_elem_t *appsync_read_file (const gchar *filename, int diag);
int appsync_activate_sync (const char *mode);
int appsync_activate_sync_post (const char *mode);
int appsync_mark_active (const gchar *name, int post);
#ifdef APP_SYNC_DBUS
static gboolean appsync_enumerate_usb_cb (gpointer data);
static void appsync_start_enumerate_usb_timer (void);
static void appsync_cancel_enumerate_usb_timer(void);
static void appsync_enumerate_usb (void);
#endif
void appsync_stop_apps (int post);
int appsync_stop (gboolean force);
static gboolean appsync_enumerate_usb_cb (gpointer data);
static void appsync_start_enumerate_usb_timer (void);
static void appsync_cancel_enumerate_usb_timer(void);
static void appsync_enumerate_usb (void);
#endif // APP_SYNC_DBUS
void appsync_stop_apps (int post);
int appsync_stop (gboolean force);
/* ========================================================================= *
* Data
......
/*
* Copyright (C) 2010 Nokia Corporation. All rights reserved.
* Copyright (C) 2013-2018 Jolla Ltd.
* Copyright (C) 2013-2019 Jolla Ltd.
*
* author: Philippe De Swert <philippe.de-swert@nokia.com>
* author: Philippe De Swert <phdeswer@lumi.maa>
......@@ -74,14 +74,16 @@ typedef struct list_elem_t
* Prototypes
* ========================================================================= */
/* -- appsync -- */
/* ------------------------------------------------------------------------- *
* APPSYNC
* ------------------------------------------------------------------------- */
void appsync_free_appsync_list (void);
void appsync_read_list (int diag);
int appsync_activate_sync (const char *mode);
int appsync_activate_sync_post(const char *mode);
int appsync_mark_active (const gchar *name, int post);
int appsync_stop (gboolean force);
void appsync_stop_apps (int post);
int appsync_stop (gboolean force);
#endif /* USB_MODED_APPSYNC_H_ */
......@@ -35,11 +35,15 @@ typedef struct modemapping_t
* Prototypes
* ========================================================================= */
/* -- cable -- */
/* ------------------------------------------------------------------------- *
* CABLE_STATE
* ------------------------------------------------------------------------- */
const char *cable_state_repr(cable_state_t state);
/* -- common -- */
/* ------------------------------------------------------------------------- *
* COMMON
* ------------------------------------------------------------------------- */
const char *common_map_mode_to_hardware (const char *internal_mode);
const char *common_map_mode_to_external (const char *internal_mode);
......
......@@ -34,14 +34,18 @@ typedef enum waitres_t
} waitres_t;
/* ========================================================================= *
* Functions
* Prototypes
* ========================================================================= */
/* -- cable -- */
/* ------------------------------------------------------------------------- *
* CABLE_STATE
* ------------------------------------------------------------------------- */
const char *cable_state_repr(cable_state_t state);
/* -- common -- */
/* ------------------------------------------------------------------------- *
* COMMON
* ------------------------------------------------------------------------- */
const char *common_map_mode_to_hardware (const char *internal_mode);
const char *common_map_mode_to_external (const char *internal_mode);
......
/*
* Copyright (C) 2010 Nokia Corporation. All rights reserved.
* Copyright (C) 2012-2018 Jolla. All rights reserved.
* Copyright (C) 2012-2019 Jolla. All rights reserved.
*
* Author: Philippe De Swert <philippe.de-swert@nokia.com>
* Author: Philippe De Swert <philippedeswert@gmail.com>
......@@ -53,7 +53,9 @@
* Prototypes
* ========================================================================= */
/* -- config -- */
/* ------------------------------------------------------------------------- *
* CONFIG
* ------------------------------------------------------------------------- */
char *config_find_mounts (void);
int config_find_sync (void);
......@@ -65,8 +67,8 @@ char *config_get_trigger_subsystem (void);
char *config_get_trigger_mode (void);
char *config_get_trigger_property (void);
char *config_get_trigger_value (void);
char *config_get_conf_string (const gchar *entry, const gchar *key);
char *config_get_mode_setting (void);
int config_value_changed (GKeyFile *settingsfile, const char *entry, const char *key, const char *new_value);
set_config_result_t config_set_config_setting (const char *entry, const char *key, const char *value);
set_config_result_t config_set_mode_setting (const char *mode);
set_config_result_t config_set_hide_mode_setting (const char *mode);
......@@ -83,7 +85,6 @@ char *config_get_android_product_id (void);
char *config_get_hidden_modes (void);
char *config_get_mode_whitelist (void);
int config_is_roaming_not_allowed (void);
char *config_get_conf_string (const gchar *entry, const gchar *key);
/* ========================================================================= *
* Macros
......
......@@ -2,7 +2,7 @@
* @file usb_moded-config.c
*
* Copyright (C) 2010 Nokia Corporation. All rights reserved.
* Copyright (C) 2012-2018 Jolla. All rights reserved.
* Copyright (C) 2012-2019 Jolla. All rights reserved.
*
* @author: Philippe De Swert <philippe.de-swert@nokia.com>
* @author: Philippe De Swert <phdeswer@lumi.maa>
......@@ -57,7 +57,9 @@
* Prototypes
* ========================================================================= */
/* -- config -- */
/* ------------------------------------------------------------------------- *
* CONFIG
* ------------------------------------------------------------------------- */
static int config_validate_ip (const char *ipadd);
char *config_find_mounts (void);
......
/**
* @file usb_moded-configfs.c
*
* Copyright (C) 2018 Jolla. All rights reserved.
* Copyright (C) 2018-2019 Jolla. All rights reserved.
*
* @author: Simo Piiroinen <simo.piiroinen@jollamobile.com>
*
......@@ -64,7 +64,9 @@
* Prototypes
* ========================================================================= */
/* -- configfs -- */
/* ------------------------------------------------------------------------- *
* CONFIGFS
* ------------------------------------------------------------------------- */
static gchar *configfs_get_conf (const char *key, const char *def);
static void configfs_read_configuration (void);
......@@ -75,6 +77,9 @@ static const char *configfs_config_path (char *buff, size_t size, con
static bool configfs_mkdir (const char *path);
static bool configfs_rmdir (const char *path);
static const char *configfs_register_function (const char *function);
#ifdef DEAD_CODE
static bool configfs_unregister_function (const char *function);
#endif //DEAD_CODE
static const char *configfs_add_unit (const char *function, const char *unit);
static bool configfs_remove_unit (const char *function, const char *unit);
static bool configfs_enable_function (const char *function);
......@@ -86,6 +91,9 @@ static bool configfs_probe (void);
static const char *configfs_udc_enable_value (void);
static bool configfs_write_file (const char *path, const char *text);
static bool configfs_read_file (const char *path, char *buff, size_t size);
#ifdef DEAD_CODE
static bool configfs_read_udc (char *buff, size_t size);
#endif // DEAD_CODE
static bool configfs_write_udc (const char *text);
bool configfs_set_udc (bool enable);
bool configfs_init (void);
......
/**
* @file usb_moded-configfs.h
*
* Copyright (C) 2018 Jolla. All rights reserved.
* Copyright (C) 2018-2019 Jolla. All rights reserved.
*
* @author: Simo Piiroinen <simo.piiroinen@jollamobile.com>
*
......@@ -29,7 +29,9 @@
* Prototypes
* ========================================================================= */
/* -- configfs -- */
/* ------------------------------------------------------------------------- *
* CONFIGFS
* ------------------------------------------------------------------------- */
bool configfs_in_use (void);
bool configfs_set_udc (bool enable);
......
......@@ -37,7 +37,9 @@
* Prototypes
* ========================================================================= */
/* -- usbmoded -- */
/* ------------------------------------------------------------------------- *
* CONTROL
* ------------------------------------------------------------------------- */
void control_rethink_usb_charging_fallback(void);
const char *control_get_external_mode (void);
......
......@@ -27,7 +27,13 @@
# include "usb_moded.h"
# include "usb_moded-common.h"
/* -- usbmoded -- */
/* ========================================================================= *
* Prototypes
* ========================================================================= */
/* ------------------------------------------------------------------------- *
* CONTROL
* ------------------------------------------------------------------------- */
void control_rethink_usb_charging_fallback(void);
const char *control_get_external_mode (void);
......@@ -37,7 +43,7 @@ void control_clear_target_mode (void);
const char *control_get_usb_mode (void);
void control_clear_internal_mode (void);
void control_set_usb_mode (const char *mode);
void control_mode_switched (const char *override);
void control_mode_switched (const char *mode);
void control_select_usb_mode (void);
void control_set_cable_state (cable_state_t cable_state);
cable_state_t control_get_cable_state (void);
......
......@@ -53,7 +53,9 @@ typedef void (*usb_moded_get_name_owner_fn)(const char *owner);
* Prototypes
* ========================================================================= */
/* -- umdbus -- */
/* ------------------------------------------------------------------------- *
* UMDBUS
* ------------------------------------------------------------------------- */
DBusConnection *umdbus_get_connection (void);
gboolean umdbus_init_connection (void);
......
......@@ -55,7 +55,9 @@
* Prototypes
* ========================================================================= */
/* -- umdbus -- */
/* ------------------------------------------------------------------------- *
* UMDBUS
* ------------------------------------------------------------------------- */
static void umdbus_send_config_signal (const char *section, const char *key, const char *value);
static DBusHandlerResult umdbus_msg_handler (DBusConnection *const connection, DBusMessage *const msg, gpointer const user_data);
......@@ -68,9 +70,9 @@ static DBusMessage *umdbus_new_signal (const char *signa
static int umdbus_send_signal_ex (const char *signal_name, const char *content);
static void umdbus_send_legacy_signal (const char *state_ind);
void umdbus_send_current_state_signal (const char *state_ind);
static bool umsdbus_append_basic_entry (DBusMessageIter *iter, const char *key, int type, const void *val);
static bool umsdbus_append_int32_entry (DBusMessageIter *iter, const char *key, int val);
static bool umsdbus_append_string_entry (DBusMessageIter *iter, const char *key, const char *val);
static bool umdbus_append_basic_entry (DBusMessageIter *iter, const char *key, int type, const void *val);
static bool umdbus_append_int32_entry (DBusMessageIter *iter, const char *key, int val);
static bool umdbus_append_string_entry (DBusMessageIter *iter, const char *key, const char *val);
static bool umdbus_append_mode_details (DBusMessage *msg, const char *mode_name);
static void umdbus_send_mode_details_signal (const char *mode_name);
void umdbus_send_target_state_signal (const char *state_ind);
......@@ -933,7 +935,7 @@ void umdbus_send_current_state_signal(const char *state_ind)
* @return true on success, false on failure
*/
static bool
umsdbus_append_basic_entry(DBusMessageIter *iter, const char *key,
umdbus_append_basic_entry(DBusMessageIter *iter, const char *key,
int type, const void *val)
{
LOG_REGISTER_CONTEXT;
......@@ -993,12 +995,12 @@ bailout_message:
* @return true on success, false on failure
*/
static bool
umsdbus_append_int32_entry(DBusMessageIter *iter, const char *key, int val)
umdbus_append_int32_entry(DBusMessageIter *iter, const char *key, int val)
{
LOG_REGISTER_CONTEXT;
dbus_int32_t arg = val;
return umsdbus_append_basic_entry(iter, key, DBUS_TYPE_INT32, &arg);
return umdbus_append_basic_entry(iter, key, DBUS_TYPE_INT32, &arg);
}
/** Append string key, variant:string value dict entry to dbus iterator
......@@ -1010,14 +1012,14 @@ umsdbus_append_int32_entry(DBusMessageIter *iter, const char *key, int val)
* @return true on success, false on failure
*/
static bool
umsdbus_append_string_entry(DBusMessageIter *iter, const char *key,
umdbus_append_string_entry(DBusMessageIter *iter, const char *key,
const char *val)
{
LOG_REGISTER_CONTEXT;
if( !val )
val = "";
return umsdbus_append_basic_entry(iter, key, DBUS_TYPE_STRING, &val);
return umdbus_append_basic_entry(iter, key, DBUS_TYPE_STRING, &val);
}
/** Append dynamic mode configuration to dbus message
......@@ -1059,7 +1061,7 @@ umdbus_append_mode_details(DBusMessage *msg, const char *mode_name)
/* Note: mode_name is special case: It needs to be valid even
* if the mode does not have dynamic configuration.
*/
if( !umsdbus_append_string_entry(&dict, "mode_name", mode_name) )
if( !umdbus_append_string_entry(&dict, "mode_name", mode_name) )
goto bailout_dict;
/* For the rest of the mode attrs we use fallback data if there
......@@ -1067,10 +1069,10 @@ umdbus_append_mode_details(DBusMessage *msg, const char *mode_name)
*/
#define ADD_STR(name) \
if( !umsdbus_append_string_entry(&dict, #name, data ? data->name : 0) )\
if( !umdbus_append_string_entry(&dict, #name, data ? data->name : 0) )\
goto bailout_dict;
#define ADD_INT(name) \
if( !umsdbus_append_int32_entry(&dict, #name, data ? data->name : 0) )\
if( !umdbus_append_int32_entry(&dict, #name, data ? data->name : 0) )\
goto bailout_dict;
/* Attributes that we presume to be needed */
......
......@@ -2,7 +2,7 @@
* @file: usb_moded-devicelock.c
*
* Copyright (C) 2010 Nokia Corporation. All rights reserved.
* Copyright (C) 2013-2018 Jolla Ltd.
* Copyright (C) 2013-2019 Jolla Ltd.
*
* @author: Philippe De Swert <philippe.de-swert@nokia.com>
* @author: Philippe De Swert <philippe.deswert@jollamobile.com>
......@@ -61,7 +61,9 @@ typedef enum devicelock_state_t
* Prototypes
* ========================================================================= */
/* -- devicelock -- */
/* ------------------------------------------------------------------------- *
* DEVICELOCK
* ------------------------------------------------------------------------- */
static const char *devicelock_state_repr (devicelock_state_t state);
bool devicelock_have_export_permission(void);
......
/*
* Copyright (C) 2010 Nokia Corporation. All rights reserved.
* Copyright (C) 2013-2018 Jolla Ltd.
* Copyright (C) 2013-2019 Jolla Ltd.
*
* Author: Philippe De Swert <philippe.de-swert@nokia.com>
* Author: Vesa Halttunen <vesa.halttunen@jollamobile.com>
......@@ -57,10 +57,12 @@
* Prototypes
* ========================================================================= */
/* -- devicelock -- */
/* ------------------------------------------------------------------------- *
* DEVICELOCK
* ------------------------------------------------------------------------- */
bool devicelock_have_export_permission(void);
bool devicelock_start_listener (void);
void devicelock_stop_listener (void);
bool devicelock_have_export_permission(void);
bool devicelock_start_listener (void);
void devicelock_stop_listener (void);
#endif /* USB_MODED_DEVICELOCK_H_ */
/**
* @file usb_moded-dsme.c
*
* Copyright (C) 2013-2018 Jolla. All rights reserved.
* Copyright (C) 2013-2019 Jolla. All rights reserved.
*
* @author: Philippe De Swert <philippe.deswert@jollamobile.com>
* @author: Jonni Rainisto <jonni.rainisto@jollamobile.com>
......@@ -62,64 +62,59 @@
",arg0='"DSME_DBUS_SERVICE"'"
/* ========================================================================= *
* Functionality
* Prototypes
* ========================================================================= */
/* ------------------------------------------------------------------------- *
* DSME_STATE_TRACKING
* DSME_STATE
* ------------------------------------------------------------------------- */
static const char *dsme_state_repr (dsme_state_t state);
static dsme_state_t dsme_state_parse (const char *name);
static void dsme_state_update (dsme_state_t state);
static bool dsme_state_is_shutdown (void);
static bool dsme_state_is_user (void);
static const char *dsme_state_repr (dsme_state_t state);
static dsme_state_t dsme_state_parse (const char *name);
static void dsme_state_update (dsme_state_t state);
static bool dsme_state_is_shutdown(void);
static bool dsme_state_is_user (void);
/* ------------------------------------------------------------------------- *
* DSME_SOCKET_IPC
* DSME_SOCKET
* ------------------------------------------------------------------------- */
static bool dsme_socket_send_message (void *msg);
static void dsme_socket_processwd_pong (void);
static void dsme_socket_processwd_init (void);
static void dsme_socket_processwd_quit (void);
static void dsme_socket_query_state (void);
static gboolean dsme_socket_recv_cb (GIOChannel *source, GIOCondition condition, gpointer data);
static bool dsme_socket_is_connected (void);
static bool dsme_socket_connect (void);
static void dsme_socket_disconnect (void);
static bool dsme_socket_send_message (gpointer msg);
static void dsme_socket_processwd_pong(void);
static void dsme_socket_processwd_init(void);
static void dsme_socket_processwd_quit(void);
static void dsme_socket_query_state (void);
static gboolean dsme_socket_recv_cb (GIOChannel *source, GIOCondition condition, gpointer data);
static bool dsme_socket_is_connected (void);
static bool dsme_socket_connect (void);
static void dsme_socket_disconnect (void);
/* ------------------------------------------------------------------------- *
* DSME_DBUS_IPC
* DSME_DBUS
* ------------------------------------------------------------------------- */
static void dsme_dbus_device_state_update (const char *state);
static void dsme_dbus_device_state_query_cb (DBusPendingCall *pending, void *aptr);
static void dsme_dbus_device_state_query (void);
static void dsme_dbus_device_state_cancel (void);
static void dsme_dbus_device_state_signal (DBusMessage *msg);
static bool dsme_dbus_name_owner_available (void);
static void dsme_dbus_name_owner_update (const char *owner);
static void dsme_dbus_name_owner_query_cb (const char *owner);
static void dsme_dbus_name_owner_query (void);
static void dsme_dbus_name_owner_cancel (void);
static void dsme_dbus_name_owner_signal (DBusMessage *msg);
static DBusHandlerResult dsme_dbus_filter_cb (DBusConnection *con, DBusMessage *msg, void *user_data);
static bool dsme_dbus_init (void);
static void dsme_dbus_quit (void);
static void dsme_dbus_device_state_update (const char *state);
static void dsme_dbus_device_state_query_cb(DBusPendingCall *pending, void *aptr);
static void dsme_dbus_device_state_query (void);
static void dsme_dbus_device_state_cancel (void);
static void dsme_dbus_device_state_signal (DBusMessage *msg);
static bool dsme_dbus_name_owner_available (void);
static void dsme_dbus_name_owner_update (const char *owner);
static void dsme_dbus_name_owner_query_cb (const char *owner);
static void dsme_dbus_name_owner_query (void);
static void dsme_dbus_name_owner_cancel (void);
static void dsme_dbus_name_owner_signal (DBusMessage *msg);
static DBusHandlerResult dsme_dbus_filter_cb (DBusConnection *con, DBusMessage *msg, void *user_data);
static bool dsme_dbus_init (void);
static void dsme_dbus_quit (void);
/* ------------------------------------------------------------------------- *
* MODULE_API
* DSME
* ------------------------------------------------------------------------- */
gboolean dsme_listener_start (void);
void dsme_listener_stop (void);
gboolean dsme_in_user_state (void);
gboolean dsme_start_listener(void);
void dsme_stop_listener(void);
gboolean dsme_in_user_state(void);
/* ========================================================================= *
* DSME_STATE_TRACKING
......@@ -858,7 +853,7 @@ dsme_dbus_quit(void)
* ========================================================================= */
gboolean
dsme_listener_start(void)
dsme_start_listener(void)
{
LOG_REGISTER_CONTEXT;
......@@ -866,7 +861,7 @@ dsme_listener_start(void)
}
void
dsme_listener_stop(void)
dsme_stop_listener(void)
{
LOG_REGISTER_CONTEXT;
......
/**
* @file usb_moded-dsme.h
*
* Copyright (C) 2013-2018 Jolla. All rights reserved.
* Copyright (C) 2013-2019 Jolla. All rights reserved.
*
* @author: Philippe De Swert <philippe.deswert@jollamobile.com>
* @author: Simo Piiroinen <simo.piiroinen@jollamobile.com>
......@@ -34,10 +34,12 @@
* Prototypes
* ========================================================================= */
/* -- dsme -- */
/* ------------------------------------------------------------------------- *
* DSME
* ------------------------------------------------------------------------- */
gboolean dsme_listener_start(void);
void dsme_listener_stop (void);
gboolean dsme_in_user_state (void);
gboolean dsme_start_listener(void);
void dsme_stop_listener(void);
gboolean dsme_in_user_state(void);
#endif /* USB_MODED_DSME_H_ */
......@@ -2,7 +2,7 @@
* @file usb_moded-dyn-mode.c
*
* Copyright (C) 2011 Nokia Corporation. All rights reserved.
* Copyright (C) 2013-2018 Jolla. All rights reserved.
* Copyright (C) 2013-2019 Jolla. All rights reserved.
*
* @author: Philippe De Swert <philippe.de-swert@nokia.com>
* @author: Philippe De Swert <philippedeswert@gmail.com>
......@@ -36,13 +36,15 @@
* Prototypes
* ========================================================================= */
/* -- dynconfig -- */
/* ------------------------------------------------------------------------- *
* UTILITY
* ------------------------------------------------------------------------- */
void dynconfig_free_list_item(mode_list_elem_t *list_item);
void dynconfig_free_mode_list(GList *modelist);
static gint dynconfig_compare_modes (gconstpointer a, gconstpointer b);
GList *dynconfig_read_mode_list(int diag);
static mode_list_elem_t *dynconfig_read_mode_file(const gchar *filename);
void dynconfig_free_list_item(mode_list_elem_t *list_item);
void dynconfig_free_mode_list(GList *modelist);
static gint dynconfig_compare_modes (gconstpointer a, gconstpointer b);
GList *dynconfig_read_mode_list(int diag);
static mode_list_elem_t *dynconfig_read_mode_file(const gchar *filename);
/* ========================================================================= *
* Functions
......
/*
*
* Copyright (C) 2011 Nokia Corporation. All rights reserved.
* Copyright (C) 2013-2018 Jolla Ltd.
* Copyright (C) 2013-2019 Jolla Ltd.
*
* author: Philippe De Swert <philippe.de-swert@nokia.com>
* author: Philippe De Swert <phdeswer@lumi.maa>
......@@ -125,7 +125,9 @@ typedef struct mode_list_elem_t
* Prototypes
* ========================================================================= */