libgaminggear
Typedefs | Functions
profiles.h File Reference

Profiles. More...

Typedefs

typedef struct _GaminggearProfiles GaminggearProfiles
 

Functions

GaminggearProfileDatagaminggear_profiles_find_by_hardware_index (GaminggearProfiles *profiles, gint hardware_index)
 Find profile. More...
 
GaminggearProfileDatagaminggear_profiles_find_by_name (GaminggearProfiles *profiles, gchar const *name)
 Find profile. More...
 
void gaminggear_profiles_activate (GaminggearProfiles *profiles, GaminggearProfileData *target_profile, gint hardware_index)
 Switch profile. More...
 
gboolean gaminggear_profiles_activate_per_name (GaminggearProfiles *profiles, gchar const *name, gint hardware_index)
 Switch profile. More...
 
gboolean gaminggear_profiles_store (GaminggearProfiles *profiles, GaminggearDevice *device, GError **error)
 Save and write profiles. More...
 
gboolean gaminggear_profiles_fill (GaminggearProfiles *profiles, GaminggearDevice *device, guint count, GError **error)
 Fill profile list. More...
 
gboolean gaminggear_profiles_read (GaminggearProfiles *profiles, GaminggearDevice *device, GError **error)
 Read hardware data. More...
 
gboolean gaminggear_profiles_load (GaminggearProfiles *profiles, GError **error)
 Load filesystem data. More...
 
GaminggearProfilesgaminggear_profiles_new (GType type, gchar const *path)
 Create new profiles structure. More...
 
void gaminggear_profiles_free (GaminggearProfiles *profiles)
 Free profiles structure. More...
 
GSList * gaminggear_profiles_first (GaminggearProfiles *profiles)
 Get first profile in list. More...
 

Detailed Description

Profiles.

Typedef Documentation

◆ GaminggearProfiles

typedef struct _GaminggearProfiles GaminggearProfiles

Function Documentation

◆ gaminggear_profiles_activate()

void gaminggear_profiles_activate ( GaminggearProfiles profiles,
GaminggearProfileData target_profile,
gint  hardware_index 
)

Switch profile.

gaminggear_profiles_store needs to be called to apply the new settings.

Parameters
profilesInstance.
target_profileprofile to activate.
hardware_indexIndex to write to.
Since
1.0

◆ gaminggear_profiles_activate_per_name()

gboolean gaminggear_profiles_activate_per_name ( GaminggearProfiles profiles,
gchar const *  name,
gint  hardware_index 
)

Switch profile.

gaminggear_profiles_store needs to be called to apply the new settings.

Parameters
profilesInstance.
nameName of profile to activate.
hardware_indexIndex to write to.
Return values
boolTRUE if successful, else FALSE.
Since
1.0

◆ gaminggear_profiles_fill()

gboolean gaminggear_profiles_fill ( GaminggearProfiles profiles,
GaminggearDevice device,
guint  count,
GError **  error 
)

Fill profile list.

?

Parameters
profilesInstance.
deviceDevice to read from.
countProfile count to fill.
errorLocation to return an error.
Return values
boolTRUE if successful, else FALSE.
Since
1.0

◆ gaminggear_profiles_find_by_hardware_index()

GaminggearProfileData* gaminggear_profiles_find_by_hardware_index ( GaminggearProfiles profiles,
gint  hardware_index 
)

Find profile.

Parameters
profilesInstance.
hardware_indexIndex of profile to find.
Return values
profile_dataor NULL if not found.
Since
1.0

◆ gaminggear_profiles_find_by_name()

GaminggearProfileData* gaminggear_profiles_find_by_name ( GaminggearProfiles profiles,
gchar const *  name 
)

Find profile.

Parameters
profilesInstance.
nameName of profile to find.
Return values
profile_dataor NULL if not found.
Since
1.0

◆ gaminggear_profiles_first()

GSList* gaminggear_profiles_first ( GaminggearProfiles profiles)

Get first profile in list.

Parameters
profilesInstance
Return values
iteratorFirst element of single linked list.
Since
1.0

◆ gaminggear_profiles_free()

void gaminggear_profiles_free ( GaminggearProfiles profiles)

Free profiles structure.

Parameters
profilesInstance that should be freed.
Since
1.0

◆ gaminggear_profiles_load()

gboolean gaminggear_profiles_load ( GaminggearProfiles profiles,
GError **  error 
)

Load filesystem data.

Parameters
profilesInstance.
errorLocation to return an error.
Return values
boolTRUE if successful, else FALSE.
Since
1.0

◆ gaminggear_profiles_new()

GaminggearProfiles* gaminggear_profiles_new ( GType  type,
gchar const *  path 
)

Create new profiles structure.

Parameters
typeType of profile_data to handle.
pathPath to load files from.
Return values
profilesthat should be freed with gaminggear_profiles_free.
Since
1.0

◆ gaminggear_profiles_read()

gboolean gaminggear_profiles_read ( GaminggearProfiles profiles,
GaminggearDevice device,
GError **  error 
)

Read hardware data.

Parameters
profilesInstance.
deviceDevice to read from.
errorLocation to return an error.
Return values
boolTRUE if successful, else FALSE.
Since
1.0

◆ gaminggear_profiles_store()

gboolean gaminggear_profiles_store ( GaminggearProfiles profiles,
GaminggearDevice device,
GError **  error 
)

Save and write profiles.

Parameters
profilesInstance.
deviceDevice to write to.
errorLocation to return an error.
Return values
boolTRUE if successful, else FALSE.
Since
1.0