usb_moded 0.86.0+mer64
usb_moded-worker.h File Reference

Go to the source code of this file.

Functions

const char * worker_get_kernel_module (void)
 
bool worker_set_kernel_module (const char *module)
 
const modedata_tworker_get_usb_mode_data (void)
 
modedata_tworker_dup_usb_mode_data (void)
 
void worker_set_usb_mode_data (const modedata_t *data)
 

Detailed Description

Copyright (c) 2013 - 2021 Jolla Ltd. Copyright (c) 2020 Open Mobile Platform LLC.

Author
Philippe De Swert phili.nosp@m.ppe..nosp@m.deswe.nosp@m.rt@j.nosp@m.ollam.nosp@m.obil.nosp@m.e.com
Simo Piiroinen simo..nosp@m.piir.nosp@m.oinen.nosp@m.@jol.nosp@m.lamob.nosp@m.ile..nosp@m.com

This program is free software; you can redistribute it and/or modify it under the terms of the Lesser GNU General Public License version 2 as published by the Free Software Foundation.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the Lesser GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA

Definition in file usb_moded-worker.h.

Function Documentation

◆ worker_dup_usb_mode_data()

modedata_t * worker_dup_usb_mode_data ( void )

get clone of the usb mode data

Caller must release the returned object via modedata_free().

Returns
a pointer to the usb mode data

Definition at line 555 of file usb_moded-worker.c.

◆ worker_get_kernel_module()

const char * worker_get_kernel_module ( void )

get the supposedly loaded module

Returns
The name of the loaded module

Definition at line 477 of file usb_moded-worker.c.

◆ worker_get_usb_mode_data()

const modedata_t * worker_get_usb_mode_data ( void )

get the usb mode data

Note: This function should be called only from the worker thread.

Returns
a pointer to the usb mode data

Definition at line 542 of file usb_moded-worker.c.

◆ worker_set_kernel_module()

bool worker_set_kernel_module ( const char * module)

set the loaded module

Parameters
moduleThe module name for the requested mode

Definition at line 489 of file usb_moded-worker.c.

◆ worker_set_usb_mode_data()

void worker_set_usb_mode_data ( const modedata_t * data)

set the modedata_t data

Note: This function should be called only from the worker thread,

Parameters
datamode_list_element pointer

Definition at line 574 of file usb_moded-worker.c.