mirror of
https://github.com/TeamVanced/VancedMicroG
synced 2024-12-11 21:27:46 +01:00
Improve new Cast bindings
This commit is contained in:
parent
718b9071a9
commit
0fe3c09adb
@ -24,7 +24,7 @@ import org.microg.safeparcel.SafeParceled;
|
||||
public class WebImage extends AutoSafeParcelable {
|
||||
public static final Creator<WebImage> CREATOR = new AutoCreator<WebImage>(WebImage.class);
|
||||
|
||||
public WebImage (Uri uri) {
|
||||
public WebImage(Uri uri) {
|
||||
this.uri = uri;
|
||||
}
|
||||
|
||||
@ -40,23 +40,19 @@ public class WebImage extends AutoSafeParcelable {
|
||||
@SafeParceled(4)
|
||||
private final int height = 0;
|
||||
|
||||
public Uri getUrl()
|
||||
{
|
||||
public Uri getUrl() {
|
||||
return uri;
|
||||
}
|
||||
|
||||
public int getWidth()
|
||||
{
|
||||
public int getWidth() {
|
||||
return width;
|
||||
}
|
||||
|
||||
public int getHeight()
|
||||
{
|
||||
public int getHeight() {
|
||||
return height;
|
||||
}
|
||||
|
||||
public String toString()
|
||||
{
|
||||
return String.format("Image %dx%d %s", new Object[] { Integer.valueOf(width), Integer.valueOf(height), uri.toString() });
|
||||
public String toString() {
|
||||
return String.format("Image %dx%d %s", new Object[]{Integer.valueOf(width), Integer.valueOf(height), uri.toString()});
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,10 @@
|
||||
package com.google.android.gms.cast.framework;
|
||||
|
||||
import com.google.android.gms.dynamic.IObjectWrapper;
|
||||
|
||||
interface IAppVisibilityListener {
|
||||
IObjectWrapper getThisObject() = 0;
|
||||
void onAppEnteredForeground() = 1;
|
||||
void onAppEnteredBackground() = 2;
|
||||
int getSupportedVersion() = 3;
|
||||
}
|
@ -1,5 +1,9 @@
|
||||
package com.google.android.gms.cast.framework;
|
||||
|
||||
interface ICastConnectionController {
|
||||
|
||||
void joinApplication(String applicationId, String sessionId) = 0;
|
||||
//void launchApplication(String applicationId, LaunchOptions options) = 1;
|
||||
void stopApplication(String sessionId) = 2;
|
||||
//void unknown(int i) = 3;
|
||||
int getSupportedVersion() = 4;
|
||||
}
|
@ -1,5 +1,6 @@
|
||||
package com.google.android.gms.cast.framework;
|
||||
|
||||
import com.google.android.gms.cast.framework.IAppVisibilityListener;
|
||||
import com.google.android.gms.cast.framework.ISessionManager;
|
||||
import com.google.android.gms.cast.framework.IDiscoveryManager;
|
||||
import com.google.android.gms.dynamic.IObjectWrapper;
|
||||
@ -7,14 +8,13 @@ import com.google.android.gms.dynamic.IObjectWrapper;
|
||||
interface ICastContext {
|
||||
Bundle getMergedSelectorAsBundle() = 0;
|
||||
boolean isApplicationVisible() = 1;
|
||||
//void removeAppVisibilityListener(IAppVisibilityListener listener) = 2;
|
||||
//void addAppVisibilityListener(IAppVisibilityListener listener) = 3;
|
||||
void addVisibilityChangeListener(IAppVisibilityListener listener) = 2;
|
||||
void removeVisibilityChangeListener(IAppVisibilityListener listener) = 3;
|
||||
ISessionManager getSessionManagerImpl() = 4;
|
||||
IDiscoveryManager getDiscoveryManagerImpl() = 5;
|
||||
|
||||
void destroy() = 6;
|
||||
void onActivityResumed(in IObjectWrapper activity) = 7;
|
||||
void onActivityPaused(in IObjectWrapper activity) = 8;
|
||||
void destroy() = 6; // deprecated?
|
||||
void onActivityResumed(in IObjectWrapper activity) = 7; // deprecated?
|
||||
void onActivityPaused(in IObjectWrapper activity) = 8; // deprecated?
|
||||
IObjectWrapper getWrappedThis() = 9;
|
||||
void unknown(String s1, in Map m1) = 10; // TODO
|
||||
void setReceiverApplicationId(String receiverApplicationId, in Map/*<String, IBinder>*/ sessionProvidersByCategory) = 10;
|
||||
}
|
||||
|
@ -5,4 +5,5 @@ import com.google.android.gms.dynamic.IObjectWrapper;
|
||||
interface ICastStateListener {
|
||||
IObjectWrapper getWrappedThis() = 0;
|
||||
void onCastStateChanged(int newState) = 1;
|
||||
int getSupportedVersion() = 2;
|
||||
}
|
||||
|
@ -3,8 +3,19 @@ package com.google.android.gms.cast.framework;
|
||||
import com.google.android.gms.dynamic.IObjectWrapper;
|
||||
|
||||
interface ISession {
|
||||
IObjectWrapper getWrappedThis() = 0;
|
||||
void notifySessionEnded(int error) = 5;
|
||||
boolean isConnected() = 10;
|
||||
boolean isResuming() = 14;
|
||||
IObjectWrapper getWrappedObject() = 0;
|
||||
String getCategory() = 1;
|
||||
String getSessionId() = 2;
|
||||
boolean isConnected() = 4;
|
||||
boolean isConnecting() = 5;
|
||||
boolean isDisconnecting() = 6;
|
||||
boolean isDisconnected() = 7;
|
||||
boolean isResuming() = 8;
|
||||
boolean isSuspended() = 9;
|
||||
void notifySessionStarted(String s) = 10;
|
||||
void notifyFailedToStartSession(int e) = 11;
|
||||
void notifySessionEnded(int e) = 12;
|
||||
void notifySessionResumed(boolean b) = 13;
|
||||
void notifyFailedToResumeSession(int e) = 14;
|
||||
void notifySessionSuspended(int n) = 15;
|
||||
}
|
||||
|
@ -12,4 +12,6 @@ interface ISessionManager {
|
||||
void removeCastStateListener(ICastStateListener listener) = 4;
|
||||
void endCurrentSession(boolean b, boolean stopCasting) = 5;
|
||||
IObjectWrapper getWrappedThis() = 6;
|
||||
int getCastState() = 7;
|
||||
void startSession(in Bundle bundle) = 8;
|
||||
}
|
||||
|
@ -13,4 +13,5 @@ interface ISessionManagerListener {
|
||||
void onSessionResuming(IObjectWrapper session, String sessionId) = 7;
|
||||
void onSessionResumeFailed(IObjectWrapper session, int error) = 8;
|
||||
void onSessionSuspended(IObjectWrapper session, int reason) = 9;
|
||||
int getSupportedVersion() = 10;
|
||||
}
|
||||
|
@ -6,4 +6,5 @@ interface ISessionProvider {
|
||||
IObjectWrapper getWrappedSession(String id) = 0;
|
||||
boolean isSessionRecoverable() = 1;
|
||||
String getCategory() = 2;
|
||||
int getSupportedVersion() = 3;
|
||||
}
|
||||
|
@ -2,14 +2,13 @@ package com.google.android.gms.cast.framework;
|
||||
|
||||
import com.google.android.gms.dynamic.IObjectWrapper;
|
||||
|
||||
// TODO: Functionality still needs to be determined
|
||||
interface ISessionProxy {
|
||||
IObjectWrapper getWrappedThis() = 0;
|
||||
void method1(in Bundle paramBundle) = 1;
|
||||
void method2(in Bundle paramBundle) = 2;
|
||||
void method3(boolean paramBoolean) = 3;
|
||||
long method4() = 4;
|
||||
int method5() = 5;
|
||||
void method6(in Bundle paramBundle) = 6;
|
||||
void method7(in Bundle paramBundle) = 7;
|
||||
void start(in Bundle paramBundle) = 1;
|
||||
void resume(in Bundle paramBundle) = 2;
|
||||
void end(boolean paramBoolean) = 3;
|
||||
long getSessionRemainingTimeMs() = 4;
|
||||
int getSupportedVersion() = 5;
|
||||
void onStarting(in Bundle paramBundle) = 6;
|
||||
void onResuming(in Bundle paramBundle) = 7;
|
||||
}
|
||||
|
@ -13,6 +13,7 @@ interface IMediaRouter {
|
||||
void selectDefaultRoute() = 5;
|
||||
boolean isDefaultRouteSelected() = 6; // Maybe?
|
||||
Bundle getRouteInfoExtrasById(String routeId) = 7;
|
||||
String hashKey() = 8; // Maybe?
|
||||
String getSelectedRouteId() = 8; // Maybe?
|
||||
int getSupportedVersion() = 9;
|
||||
void clearCallbacks() = 10;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user