-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathNowPlayingItem.cpp
More file actions
32 lines (26 loc) · 932 Bytes
/
Copy pathNowPlayingItem.cpp
File metadata and controls
32 lines (26 loc) · 932 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#include "NowPlayingItem.h"
#include <Message.h>
namespace {
void
AddString(BMessage& message, const char* field, const std::string& value)
{
message.AddString(field, value.c_str());
}
}
void
NowPlayingItem::AddToMessage(BMessage& message) const
{
AddString(message, "title", displayTitle);
message.AddInt32("duration_ms", durationMs);
AddString(message, "track_uri", itemUri);
AddString(message, "artist", displaySubtitle);
AddString(message, "album_id", albumId);
AddString(message, "artist_id", artistId);
AddString(message, "artwork_url", imageUrl);
AddString(message, kNowPlayingItemKindField, itemKind);
AddString(message, kNowPlayingPrimaryOpenUriField, primaryOpenUri);
AddString(message, kNowPlayingParentUriField, parentUri);
AddString(message, kNowPlayingParentKindField, parentKind);
AddString(message, kNowPlayingShowIdField, showId);
AddString(message, kNowPlayingAudiobookIdField, audiobookId);
}