snackamp_control.c File Reference
`#include "snackamp_control.h"`
Include dependency graph for snackamp_control.c:

Go to the source code of this file.

## Macros

#define | _WIN32_WINNT 0x0501

## Functions

gint | connect_snackamp (gint port, ui_state *ui)
gint | disconnect_snackamp (ui_state *ui)
void | snackamp_add_files (GList *list, ui_state *ui)
gchar * | snackamp_get_filename (ui_state *ui)
gint | snackamp_get_playlist_number (ui_state *ui)
void | snackamp_get_song_infos (gchar *total_infos, ui_state *ui)
gint | snackamp_get_time_elapsed (ui_state *ui)
gchar * | snackamp_get_title_song (ui_state *ui)
gint | snackamp_get_total_time (ui_state *ui)
gint | snackamp_get_volume (ui_state *ui)
gint | snackamp_is_paused (ui_state *ui)
gint | snackamp_is_playing (ui_state *ui)
gint | snackamp_is_running (ui_state *ui)
void | snackamp_jump (gint position, ui_state *ui)
void | snackamp_next (ui_state *ui)
void | snackamp_pause (ui_state *ui)
void | snackamp_play (ui_state *ui)
void | snackamp_play_last_file (ui_state *ui)
void | snackamp_prev (ui_state *ui)
void | snackamp_select_last_file (ui_state *ui)
void | snackamp_set_volume (gint volume, ui_state *ui)
void | snackamp_start (ui_state *ui)
void | snackamp_start_with_songs (GList *list, ui_state *ui)
void | snackamp_stop (ui_state *ui)

## Detailed Description

Snackamp control

this file contains functions to control the snackamp player

Definition in file snackamp_control.c.

## Function Documentation

gint connect_snackamp | ( | gint | port,
|  | ui_state * | ui
| ) |  |

connecting to the player to the port port

Might possibley return an error

Definition at line 48 of file snackamp_control.c.

References disconnect_snackamp().

Referenced by connect_button_event(), and snackamp_is_running().

Here is the call graph for this function:

Here is the caller graph for this function:

gint disconnect_snackamp | ( | ui_state * | ui | ) |

disconnecting with the player possibly returns an error

Definition at line 200 of file snackamp_control.c.

Referenced by connect_snackamp(), and disconnect_button_event().

Here is the caller graph for this function:

void snackamp_add_files | ( | GList * | list,
|  | ui_state * | ui
| ) |  |

add files to the snackamp playlist

Definition at line 475 of file snackamp_control.c.

Referenced by player_add_files(), player_add_files_and_select(), and snackamp_start_with_songs().

Here is the caller graph for this function:

gchar* snackamp_get_filename | ( | ui_state * | ui | ) |

returns the filename

The result of this query must be freed after use.

Definition at line 364 of file snackamp_control.c.

Referenced by player_get_filename().

Here is the caller graph for this function:

gint snackamp_get_playlist_number | ( | ui_state * | ui | ) |

returns the number of songs of the playlist

Definition at line 386 of file snackamp_control.c.

References snackamp_stop().

Referenced by player_get_playlist_number(), and snackamp_select_last_file().

Here is the call graph for this function:

Here is the caller graph for this function:

void snackamp_get_song_infos | ( | gchar * | total_infos,
|  | ui_state * | ui
| ) |  |

gets informations about the song

Definition at line 286 of file snackamp_control.c.

Referenced by player_get_song_infos().

Here is the caller graph for this function:

gint snackamp_get_time_elapsed | ( | ui_state * | ui | ) |

returns elapsed time

Definition at line 418 of file snackamp_control.c.

Referenced by player_get_elapsed_time().

Here is the caller graph for this function:

gchar* snackamp_get_title_song | ( | ui_state * | ui | ) |

returns the title of the song

The return value must be g_free'd after use.

Definition at line 404 of file snackamp_control.c.

Referenced by player_get_title().

Here is the caller graph for this function:

gint snackamp_get_total_time | ( | ui_state * | ui | ) |

returns total time of the current song

Definition at line 586 of file snackamp_control.c.

Referenced by player_get_total_time().

Here is the caller graph for this function:

gint snackamp_get_volume | ( | ui_state * | ui | ) |

returns volume

Definition at line 503 of file snackamp_control.c.

Referenced by player_get_volume().

Here is the caller graph for this function:

gint snackamp_is_paused | ( | ui_state * | ui | ) |

returns TRUE if snackamp is paused, else FALSE

not yet implemented in snackamp

Definition at line 619 of file snackamp_control.c.

Referenced by player_is_paused().

Here is the caller graph for this function:

gint snackamp_is_playing | ( | ui_state * | ui | ) |

returns TRUE if snackamp is playing, else FALSE

Definition at line 596 of file snackamp_control.c.

Referenced by player_is_playing().

Here is the caller graph for this function:

gint snackamp_is_running | ( | ui_state * | ui | ) |

returns TRUE if snackamp is running; if not, FALSE

Definition at line 520 of file snackamp_control.c.

References connect_snackamp().

Referenced by player_is_running(), and snackamp_start().

Here is the call graph for this function:

Here is the caller graph for this function:

void snackamp_jump | ( | gint | position,
|  | ui_state * | ui
| ) |  |

jump to time

Definition at line 565 of file snackamp_control.c.

Referenced by player_seek().

Here is the caller graph for this function:

void snackamp_next | ( | ui_state * | ui | ) |

changes to next song

Definition at line 543 of file snackamp_control.c.

Referenced by player_add_play_files(), and player_next().

Here is the caller graph for this function:

void snackamp_pause | ( | ui_state * | ui | ) |

pause a song

Definition at line 536 of file snackamp_control.c.

Referenced by player_pause().

Here is the caller graph for this function:

void snackamp_play | ( | ui_state * | ui | ) |

plays a song

Definition at line 461 of file snackamp_control.c.

Referenced by player_play(), and snackamp_play_last_file().

Here is the caller graph for this function:

void snackamp_play_last_file | ( | ui_state * | ui | ) |

plays the last file of the playlist

Definition at line 468 of file snackamp_control.c.

References snackamp_play(), and snackamp_select_last_file().

Referenced by player_start_play_with_songs(), and snackamp_prev().

Here is the call graph for this function:

Here is the caller graph for this function:

void snackamp_prev | ( | ui_state * | ui | ) |

changes to previous song

Definition at line 550 of file snackamp_control.c.

References snackamp_play_last_file().

Referenced by player_prev().

Here is the call graph for this function:

Here is the caller graph for this function:

void snackamp_select_last_file | ( | ui_state * | ui | ) |

selects the last file in the playlist

Definition at line 454 of file snackamp_control.c.

References snackamp_get_playlist_number().

Referenced by player_add_files_and_select(), and snackamp_play_last_file().

Here is the call graph for this function:

Here is the caller graph for this function:

void snackamp_set_volume | ( | gint | volume,
|  | ui_state * | ui
| ) |  |

sets volume

Definition at line 494 of file snackamp_control.c.

Referenced by player_set_volume().

Here is the caller graph for this function:

void snackamp_start | ( | ui_state * | ui | ) |

starts snackamp

Definition at line 428 of file snackamp_control.c.

References snackamp_is_running().

Referenced by player_start(), and snackamp_start_with_songs().

Here is the call graph for this function:

Here is the caller graph for this function:

void snackamp_start_with_songs | ( | GList * | list,
|  | ui_state * | ui
| ) |  |

starts snackamp with songs

Definition at line 513 of file snackamp_control.c.

References snackamp_add_files(), and snackamp_start().

Referenced by player_start_add_files(), and player_start_play_with_songs().

Here is the call graph for this function:

Here is the caller graph for this function:

void snackamp_stop | ( | ui_state * | ui | ) |

stops playing a song

Definition at line 379 of file snackamp_control.c.

Referenced by player_stop(), and snackamp_get_playlist_number().

Here is the caller graph for this function: