PebbleOS
Loading...
Searching...
No Matches
Data Structures | Enumerations | Functions
music_internal.h File Reference
#include "music.h"
#include <kernel/events.h>
#include <stdbool.h>

Data Structures

struct  MusicServerImplementation
 Operations implemented by a music backend. More...
 
struct  MusicPlayerStateUpdate
 Playback state update. More...
 

Enumerations

enum  MusicServerCapability { MusicServerCapabilityNone = 0 , MusicServerCapabilityPlaybackStateReporting = (1 << 0) , MusicServerCapabilityProgressReporting = (1 << 1) , MusicServerCapabilityVolumeReporting = (1 << 2) }
 Optional features of a music backend, as a bitset. More...
 

Functions

void music_init (void)
 Initialize the music service.
 
void music_handle_media_event (const PebbleMediaEvent *event)
 Mark a media event as taken by KernelMain.
 
bool music_set_connected_server (const MusicServerImplementation *implementation, bool connected)
 Report that a backend connected or disconnected.
 
void music_update_now_playing (const char *title, size_t title_length, const char *artist, size_t artist_length, const char *album, size_t album_length)
 Update the current track metadata.
 
void music_update_player_name (const char *player_name, size_t player_name_length)
 Update the name of the current player.
 
void music_update_player_playback_state (const MusicPlayerStateUpdate *state)
 Update playback state, rate and track position at once.
 
void music_update_player_volume_percent (uint8_t volume_percent)
 Update the volume of the current player.
 
void music_update_track_title (const char *title, size_t title_length)
 Update the title of the current track.
 
void music_update_track_artist (const char *artist, size_t artist_length)
 Update the artist of the current track.
 
void music_update_track_album (const char *album, size_t album_length)
 Update the album of the current track.
 
void music_update_track_position (uint32_t track_pos_ms)
 Update the position in the current track.
 
void music_update_track_duration (uint32_t track_duration_ms)
 Update the duration of the current track.
 
void music_set_album_art (struct GBitmap *bitmap, uint8_t token)
 Hand the album art of the current track to the service.
 
void music_album_art_transfer_failed (uint8_t token)
 Report that an album art transfer ended without an image.