Loading...
Searching...
No Matches
music_track.h
Go to the documentation of this file.
1
14#pragma once
15#include <stdbool.h>
16
17// MUSIC_TEXT_LEN is generated from the phone's cap table, so the two sides cannot drift
18#include "wire/wire_caps.g.h"
19
24
28typedef struct
29{
32 bool playing;
34
47bool music_track_set(MusicTrack *track, const char *title, const char *artist, bool playing);
48
57bool music_track_has(const MusicTrack *track);
58
bool music_track_has(const MusicTrack *track)
Whether there is a track to show, which is a title or an artist.
Definition music_track.c:28
bool music_track_set(MusicTrack *track, const char *title, const char *artist, bool playing)
Takes in the track the phone sent, and says whether anything changed.
Definition music_track.c:11
One track. Zeroed is nothing playing.
Definition music_track.h:29
char artist[MUSIC_TEXT_LEN]
Who it is by, or empty for none.
Definition music_track.h:31
char title[MUSIC_TEXT_LEN]
The song's title, or empty for none.
Definition music_track.h:30
bool playing
True while it plays, false while paused or with nothing playing.
Definition music_track.h:32
Strip caps and marker values shared by the phone and the watch.
#define MUSIC_TEXT_LEN
A now playing title or artist, 32 characters plus its terminator.
Definition wire_caps.g.h:27