1 // Copyright 2014 Google Inc. All Rights Reserved.
2 
3 package android.service.media;
4 
5 import android.content.pm.ParceledListSlice;
6 import android.media.session.MediaSession;
7 import android.os.Bundle;
8 
9 /**
10  * Media API allows clients to browse through hierarchy of a user’s media collection,
11  * playback a specific media entry and interact with the now playing queue.
12  * @hide
13  */
14 oneway interface IMediaBrowserServiceCallbacks {
15     /**
16      * Invoked when the connected has been established.
17      * @param root The root media id for browsing.
18      * @param session The {@link MediaSession.Token media session token} that can be used to control
19      *         the playback of the media app.
20      * @param extra Extras returned by the media service.
21      */
22     @UnsupportedAppUsage
onConnect(String root, in MediaSession.Token session, in Bundle extras)23     void onConnect(String root, in MediaSession.Token session, in Bundle extras);
24     @UnsupportedAppUsage
onConnectFailed()25     void onConnectFailed();
onLoadChildren(String mediaId, in ParceledListSlice list)26     void onLoadChildren(String mediaId, in ParceledListSlice list);
onLoadChildrenWithOptions(String mediaId, in ParceledListSlice list, in Bundle options)27     void onLoadChildrenWithOptions(String mediaId, in ParceledListSlice list,
28             in Bundle options);
29 }
30