mirror of
https://github.com/TeamVanced/VancedMicroG
synced 2024-12-12 05:37:45 +01:00
Improve new Cast bindings
This commit is contained in:
parent
718b9071a9
commit
0fe3c09adb
@ -40,23 +40,19 @@ public class WebImage extends AutoSafeParcelable {
|
|||||||
@SafeParceled(4)
|
@SafeParceled(4)
|
||||||
private final int height = 0;
|
private final int height = 0;
|
||||||
|
|
||||||
public Uri getUrl()
|
public Uri getUrl() {
|
||||||
{
|
|
||||||
return uri;
|
return uri;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getWidth()
|
public int getWidth() {
|
||||||
{
|
|
||||||
return width;
|
return width;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getHeight()
|
public int getHeight() {
|
||||||
{
|
|
||||||
return height;
|
return height;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String toString()
|
public String toString() {
|
||||||
{
|
|
||||||
return String.format("Image %dx%d %s", new Object[]{Integer.valueOf(width), Integer.valueOf(height), uri.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;
|
package com.google.android.gms.cast.framework;
|
||||||
|
|
||||||
interface ICastConnectionController {
|
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;
|
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.ISessionManager;
|
||||||
import com.google.android.gms.cast.framework.IDiscoveryManager;
|
import com.google.android.gms.cast.framework.IDiscoveryManager;
|
||||||
import com.google.android.gms.dynamic.IObjectWrapper;
|
import com.google.android.gms.dynamic.IObjectWrapper;
|
||||||
@ -7,14 +8,13 @@ import com.google.android.gms.dynamic.IObjectWrapper;
|
|||||||
interface ICastContext {
|
interface ICastContext {
|
||||||
Bundle getMergedSelectorAsBundle() = 0;
|
Bundle getMergedSelectorAsBundle() = 0;
|
||||||
boolean isApplicationVisible() = 1;
|
boolean isApplicationVisible() = 1;
|
||||||
//void removeAppVisibilityListener(IAppVisibilityListener listener) = 2;
|
void addVisibilityChangeListener(IAppVisibilityListener listener) = 2;
|
||||||
//void addAppVisibilityListener(IAppVisibilityListener listener) = 3;
|
void removeVisibilityChangeListener(IAppVisibilityListener listener) = 3;
|
||||||
ISessionManager getSessionManagerImpl() = 4;
|
ISessionManager getSessionManagerImpl() = 4;
|
||||||
IDiscoveryManager getDiscoveryManagerImpl() = 5;
|
IDiscoveryManager getDiscoveryManagerImpl() = 5;
|
||||||
|
void destroy() = 6; // deprecated?
|
||||||
void destroy() = 6;
|
void onActivityResumed(in IObjectWrapper activity) = 7; // deprecated?
|
||||||
void onActivityResumed(in IObjectWrapper activity) = 7;
|
void onActivityPaused(in IObjectWrapper activity) = 8; // deprecated?
|
||||||
void onActivityPaused(in IObjectWrapper activity) = 8;
|
|
||||||
IObjectWrapper getWrappedThis() = 9;
|
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 {
|
interface ICastStateListener {
|
||||||
IObjectWrapper getWrappedThis() = 0;
|
IObjectWrapper getWrappedThis() = 0;
|
||||||
void onCastStateChanged(int newState) = 1;
|
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;
|
import com.google.android.gms.dynamic.IObjectWrapper;
|
||||||
|
|
||||||
interface ISession {
|
interface ISession {
|
||||||
IObjectWrapper getWrappedThis() = 0;
|
IObjectWrapper getWrappedObject() = 0;
|
||||||
void notifySessionEnded(int error) = 5;
|
String getCategory() = 1;
|
||||||
boolean isConnected() = 10;
|
String getSessionId() = 2;
|
||||||
boolean isResuming() = 14;
|
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 removeCastStateListener(ICastStateListener listener) = 4;
|
||||||
void endCurrentSession(boolean b, boolean stopCasting) = 5;
|
void endCurrentSession(boolean b, boolean stopCasting) = 5;
|
||||||
IObjectWrapper getWrappedThis() = 6;
|
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 onSessionResuming(IObjectWrapper session, String sessionId) = 7;
|
||||||
void onSessionResumeFailed(IObjectWrapper session, int error) = 8;
|
void onSessionResumeFailed(IObjectWrapper session, int error) = 8;
|
||||||
void onSessionSuspended(IObjectWrapper session, int reason) = 9;
|
void onSessionSuspended(IObjectWrapper session, int reason) = 9;
|
||||||
|
int getSupportedVersion() = 10;
|
||||||
}
|
}
|
||||||
|
@ -6,4 +6,5 @@ interface ISessionProvider {
|
|||||||
IObjectWrapper getWrappedSession(String id) = 0;
|
IObjectWrapper getWrappedSession(String id) = 0;
|
||||||
boolean isSessionRecoverable() = 1;
|
boolean isSessionRecoverable() = 1;
|
||||||
String getCategory() = 2;
|
String getCategory() = 2;
|
||||||
|
int getSupportedVersion() = 3;
|
||||||
}
|
}
|
||||||
|
@ -2,14 +2,13 @@ package com.google.android.gms.cast.framework;
|
|||||||
|
|
||||||
import com.google.android.gms.dynamic.IObjectWrapper;
|
import com.google.android.gms.dynamic.IObjectWrapper;
|
||||||
|
|
||||||
// TODO: Functionality still needs to be determined
|
|
||||||
interface ISessionProxy {
|
interface ISessionProxy {
|
||||||
IObjectWrapper getWrappedThis() = 0;
|
IObjectWrapper getWrappedThis() = 0;
|
||||||
void method1(in Bundle paramBundle) = 1;
|
void start(in Bundle paramBundle) = 1;
|
||||||
void method2(in Bundle paramBundle) = 2;
|
void resume(in Bundle paramBundle) = 2;
|
||||||
void method3(boolean paramBoolean) = 3;
|
void end(boolean paramBoolean) = 3;
|
||||||
long method4() = 4;
|
long getSessionRemainingTimeMs() = 4;
|
||||||
int method5() = 5;
|
int getSupportedVersion() = 5;
|
||||||
void method6(in Bundle paramBundle) = 6;
|
void onStarting(in Bundle paramBundle) = 6;
|
||||||
void method7(in Bundle paramBundle) = 7;
|
void onResuming(in Bundle paramBundle) = 7;
|
||||||
}
|
}
|
||||||
|
@ -13,6 +13,7 @@ interface IMediaRouter {
|
|||||||
void selectDefaultRoute() = 5;
|
void selectDefaultRoute() = 5;
|
||||||
boolean isDefaultRouteSelected() = 6; // Maybe?
|
boolean isDefaultRouteSelected() = 6; // Maybe?
|
||||||
Bundle getRouteInfoExtrasById(String routeId) = 7;
|
Bundle getRouteInfoExtrasById(String routeId) = 7;
|
||||||
String hashKey() = 8; // Maybe?
|
String getSelectedRouteId() = 8; // Maybe?
|
||||||
|
int getSupportedVersion() = 9;
|
||||||
void clearCallbacks() = 10;
|
void clearCallbacks() = 10;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user