Update wearable API

This commit is contained in:
Marvin W 2019-10-08 20:54:16 +02:00
parent cc8bf2f3f1
commit 7d50c2c94b
No known key found for this signature in database
GPG Key ID: 072E9235DB996F2A
27 changed files with 432 additions and 6 deletions

View File

@ -0,0 +1,3 @@
package com.google.android.gms.wearable.internal;
parcelable AddLocalCapabilityResponse;

View File

@ -0,0 +1,3 @@
package com.google.android.gms.wearable.internal;
parcelable ChannelReceiveFileResponse;

View File

@ -0,0 +1,3 @@
package com.google.android.gms.wearable.internal;
parcelable ChannelSendFileResponse;

View File

@ -0,0 +1,3 @@
package com.google.android.gms.wearable.internal;
parcelable CloseChannelResponse;

View File

@ -0,0 +1,3 @@
package com.google.android.gms.wearable.internal;
parcelable GetAllCapabilitiesResponse;

View File

@ -0,0 +1,3 @@
package com.google.android.gms.wearable.internal;
parcelable GetCapabilityResponse;

View File

@ -0,0 +1,3 @@
package com.google.android.gms.wearable.internal;
parcelable GetChannelInputStreamResponse;

View File

@ -0,0 +1,3 @@
package com.google.android.gms.wearable.internal;
parcelable GetChannelOutputStreamResponse;

View File

@ -0,0 +1,3 @@
package com.google.android.gms.wearable.internal;
parcelable GetCloudSyncOptInOutDoneResponse;

View File

@ -0,0 +1,3 @@
package com.google.android.gms.wearable.internal;
parcelable GetCloudSyncOptInStatusResponse;

View File

@ -2,7 +2,17 @@ package com.google.android.gms.wearable.internal;
import com.google.android.gms.common.api.Status;
import com.google.android.gms.common.data.DataHolder;
import com.google.android.gms.wearable.internal.AddLocalCapabilityResponse;
import com.google.android.gms.wearable.internal.ChannelReceiveFileResponse;
import com.google.android.gms.wearable.internal.ChannelSendFileResponse;
import com.google.android.gms.wearable.internal.CloseChannelResponse;
import com.google.android.gms.wearable.internal.DeleteDataItemsResponse;
import com.google.android.gms.wearable.internal.GetAllCapabilitiesResponse;
import com.google.android.gms.wearable.internal.GetCapabilityResponse;
import com.google.android.gms.wearable.internal.GetChannelInputStreamResponse;
import com.google.android.gms.wearable.internal.GetChannelOutputStreamResponse;
import com.google.android.gms.wearable.internal.GetCloudSyncOptInOutDoneResponse;
import com.google.android.gms.wearable.internal.GetCloudSyncOptInStatusResponse;
import com.google.android.gms.wearable.internal.GetCloudSyncSettingResponse;
import com.google.android.gms.wearable.internal.GetConfigResponse;
import com.google.android.gms.wearable.internal.GetConfigsResponse;
@ -10,12 +20,23 @@ import com.google.android.gms.wearable.internal.GetConnectedNodesResponse;
import com.google.android.gms.wearable.internal.GetDataItemResponse;
import com.google.android.gms.wearable.internal.GetFdForAssetResponse;
import com.google.android.gms.wearable.internal.GetLocalNodeResponse;
import com.google.android.gms.wearable.internal.OpenChannelResponse;
import com.google.android.gms.wearable.internal.PutDataResponse;
import com.google.android.gms.wearable.internal.RemoveLocalCapabilityResponse;
import com.google.android.gms.wearable.internal.SendMessageResponse;
import com.google.android.gms.wearable.internal.StorageInfoResponse;
interface IWearableCallbacks {
// Config
void onGetConfigResponse(in GetConfigResponse response) = 1;
void onGetConfigsResponse(in GetConfigsResponse response) = 12;
// Cloud Sync
void onGetCloudSyncOptInOutDoneResponse(in GetCloudSyncOptInOutDoneResponse response) = 27;
void onGetCloudSyncSettingResponse(in GetCloudSyncSettingResponse response) = 28;
void onGetCloudSyncOptInStatusResponse(in GetCloudSyncOptInStatusResponse response) = 29;
// Data
void onPutDataResponse(in PutDataResponse response) = 2;
void onGetDataItemResponse(in GetDataItemResponse response) = 3;
void onDataItemChanged(in DataHolder dataHolder) = 4;
@ -24,9 +45,21 @@ interface IWearableCallbacks {
void onGetFdForAssetResponse(in GetFdForAssetResponse response) = 7;
void onGetLocalNodeResponse(in GetLocalNodeResponse response) = 8;
void onGetConnectedNodesResponse(in GetConnectedNodesResponse response) = 9;
// Channels
void onOpenChannelResponse(in OpenChannelResponse response) = 13;
void onCloseChannelResponse(in CloseChannelResponse response) = 14;
void onGetChannelInputStreamResponse(in GetChannelInputStreamResponse response) = 16;
void onGetChannelOutputStreamResponse(in GetChannelOutputStreamResponse response) = 17;
void onChannelReceiveFileResponse(in ChannelReceiveFileResponse response) = 18;
void onChannelSendFileResponse(in ChannelSendFileResponse response) = 19;
void onStatus(in Status status) = 10;
void onStorageInfoResponse(in StorageInfoResponse response) = 11;
void onGetConfigsResponse(in GetConfigsResponse response) = 12;
void onGetCloudSyncSettingResponse(in GetCloudSyncSettingResponse response) = 28;
// Capabilities
void onGetCapabilityResponse(in GetCapabilityResponse response) = 21;
void onGetAllCapabilitiesResponse(in GetAllCapabilitiesResponse response) = 22;
void onAddLocalCapabilityResponse(in AddLocalCapabilityResponse response) = 25;
void onRemoveLocalCapabilityResponse(in RemoveLocalCapabilityResponse response) = 26;
}

View File

@ -34,10 +34,10 @@ interface IWearableService {
void getConnectedNodes(IWearableCallbacks callbacks) = 14;
// Capabilties
void getConnectedCapability(IWearableCallbacks callbacks, String s1, int i) = 41;
void getConnectedCapaibilties(IWearableCallbacks callbacks, int i) = 42;
void addLocalCapability(IWearableCallbacks callbacks, String cap) = 45;
void removeLocalCapability(IWearableCallbacks callbacks, String cap) = 46;
void getConnectedCapability(IWearableCallbacks callbacks, String capability, int nodeFilter) = 41;
void getConnectedCapaibilties(IWearableCallbacks callbacks, int nodeFilter) = 42;
void addLocalCapability(IWearableCallbacks callbacks, String capability) = 45;
void removeLocalCapability(IWearableCallbacks callbacks, String capability) = 46;
void addListener(IWearableCallbacks callbacks, in AddListenerRequest request) = 15;
void removeListener(IWearableCallbacks callbacks, in RemoveListenerRequest request) = 16;

View File

@ -0,0 +1,3 @@
package com.google.android.gms.wearable.internal;
parcelable OpenChannelResponse;

View File

@ -0,0 +1,3 @@
package com.google.android.gms.wearable.internal;
parcelable RemoveLocalCapabilityResponse;

View File

@ -50,4 +50,16 @@ public class WearableStatusCodes extends CommonStatusCodes {
* Indicates that the requested asset is unavailable.
*/
public static final int ASSET_UNAVAILABLE = 4005;
/**
* Indicates that the specified capability already exists.
*/
public static final int DUPLICATE_CAPABILITY = 4006;
/**
* Indicates that the specified capability is not recognized.
*/
public static final int UNKNOWN_CAPABILITY = 4007;
/**
* Indicates that the WiFi credential sync no credential fetched.
*/
public static final int WIFI_CREDENTIAL_SYNC_NO_CREDENTIAL_FETCHED = 4008;
}

View File

@ -0,0 +1,36 @@
/*
* Copyright (C) 2019 microG Project Team
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.google.android.gms.wearable.internal;
import org.microg.safeparcel.AutoSafeParcelable;
import org.microg.safeparcel.SafeParceled;
public class AddLocalCapabilityResponse extends AutoSafeParcelable {
@SafeParceled(1)
private int versionCode = 1;
@SafeParceled(2)
private int status = 0;
private AddLocalCapabilityResponse() {
}
public AddLocalCapabilityResponse(int status) {
this.status = status;
}
public static final Creator<AddLocalCapabilityResponse> CREATOR = new AutoCreator<AddLocalCapabilityResponse>(AddLocalCapabilityResponse.class);
}

View File

@ -0,0 +1,26 @@
/*
* Copyright (C) 2019 microG Project Team
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.google.android.gms.wearable.internal;
import org.microg.safeparcel.AutoSafeParcelable;
import org.microg.safeparcel.SafeParceled;
public class ChannelReceiveFileResponse extends AutoSafeParcelable {
@SafeParceled(1)
private int versionCode = 1;
public static final Creator<ChannelReceiveFileResponse> CREATOR = new AutoCreator<ChannelReceiveFileResponse>(ChannelReceiveFileResponse.class);
}

View File

@ -0,0 +1,26 @@
/*
* Copyright (C) 2019 microG Project Team
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.google.android.gms.wearable.internal;
import org.microg.safeparcel.AutoSafeParcelable;
import org.microg.safeparcel.SafeParceled;
public class ChannelSendFileResponse extends AutoSafeParcelable {
@SafeParceled(1)
private int versionCode = 1;
public static final Creator<ChannelSendFileResponse> CREATOR = new AutoCreator<ChannelSendFileResponse>(ChannelSendFileResponse.class);
}

View File

@ -0,0 +1,26 @@
/*
* Copyright (C) 2019 microG Project Team
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.google.android.gms.wearable.internal;
import org.microg.safeparcel.AutoSafeParcelable;
import org.microg.safeparcel.SafeParceled;
public class CloseChannelResponse extends AutoSafeParcelable {
@SafeParceled(1)
private int versionCode = 1;
public static final Creator<CloseChannelResponse> CREATOR = new AutoCreator<CloseChannelResponse>(CloseChannelResponse.class);
}

View File

@ -0,0 +1,26 @@
/*
* Copyright (C) 2019 microG Project Team
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.google.android.gms.wearable.internal;
import org.microg.safeparcel.AutoSafeParcelable;
import org.microg.safeparcel.SafeParceled;
public class GetAllCapabilitiesResponse extends AutoSafeParcelable {
@SafeParceled(1)
private int versionCode = 1;
public static final Creator<GetAllCapabilitiesResponse> CREATOR = new AutoCreator<GetAllCapabilitiesResponse>(GetAllCapabilitiesResponse.class);
}

View File

@ -0,0 +1,39 @@
/*
* Copyright (C) 2019 microG Project Team
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.google.android.gms.wearable.internal;
import org.microg.safeparcel.AutoSafeParcelable;
import org.microg.safeparcel.SafeParceled;
public class GetCapabilityResponse extends AutoSafeParcelable {
@SafeParceled(1)
private int versionCode = 1;
@SafeParceled(2)
private int status;
@SafeParceled(3)
private CapabilityInfoParcelable capabilityInfo;
private GetCapabilityResponse() {
}
public GetCapabilityResponse(int status, CapabilityInfoParcelable capabilityInfo) {
this.status = status;
this.capabilityInfo = capabilityInfo;
}
public static final Creator<GetCapabilityResponse> CREATOR = new AutoCreator<GetCapabilityResponse>(GetCapabilityResponse.class);
}

View File

@ -0,0 +1,26 @@
/*
* Copyright (C) 2019 microG Project Team
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.google.android.gms.wearable.internal;
import org.microg.safeparcel.AutoSafeParcelable;
import org.microg.safeparcel.SafeParceled;
public class GetChannelInputStreamResponse extends AutoSafeParcelable {
@SafeParceled(1)
private int versionCode = 1;
public static final Creator<GetChannelInputStreamResponse> CREATOR = new AutoCreator<GetChannelInputStreamResponse>(GetChannelInputStreamResponse.class);
}

View File

@ -0,0 +1,26 @@
/*
* Copyright (C) 2019 microG Project Team
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.google.android.gms.wearable.internal;
import org.microg.safeparcel.AutoSafeParcelable;
import org.microg.safeparcel.SafeParceled;
public class GetChannelOutputStreamResponse extends AutoSafeParcelable {
@SafeParceled(1)
private int versionCode = 1;
public static final Creator<GetChannelOutputStreamResponse> CREATOR = new AutoCreator<GetChannelOutputStreamResponse>(GetChannelOutputStreamResponse.class);
}

View File

@ -0,0 +1,26 @@
/*
* Copyright (C) 2019 microG Project Team
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.google.android.gms.wearable.internal;
import org.microg.safeparcel.AutoSafeParcelable;
import org.microg.safeparcel.SafeParceled;
public class GetCloudSyncOptInOutDoneResponse extends AutoSafeParcelable {
@SafeParceled(1)
private int versionCode = 1;
public static final Creator<GetCloudSyncOptInOutDoneResponse> CREATOR = new AutoCreator<GetCloudSyncOptInOutDoneResponse>(GetCloudSyncOptInOutDoneResponse.class);
}

View File

@ -0,0 +1,26 @@
/*
* Copyright (C) 2019 microG Project Team
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.google.android.gms.wearable.internal;
import org.microg.safeparcel.AutoSafeParcelable;
import org.microg.safeparcel.SafeParceled;
public class GetCloudSyncOptInStatusResponse extends AutoSafeParcelable {
@SafeParceled(1)
private int versionCode = 1;
public static final Creator<GetCloudSyncOptInStatusResponse> CREATOR = new AutoCreator<GetCloudSyncOptInStatusResponse>(GetCloudSyncOptInStatusResponse.class);
}

View File

@ -0,0 +1,26 @@
/*
* Copyright (C) 2019 microG Project Team
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.google.android.gms.wearable.internal;
import org.microg.safeparcel.AutoSafeParcelable;
import org.microg.safeparcel.SafeParceled;
public class OpenChannelResponse extends AutoSafeParcelable {
@SafeParceled(1)
private int versionCode = 1;
public static final Creator<OpenChannelResponse> CREATOR = new AutoCreator<OpenChannelResponse>(OpenChannelResponse.class);
}

View File

@ -0,0 +1,36 @@
/*
* Copyright (C) 2019 microG Project Team
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.google.android.gms.wearable.internal;
import org.microg.safeparcel.AutoSafeParcelable;
import org.microg.safeparcel.SafeParceled;
public class RemoveLocalCapabilityResponse extends AutoSafeParcelable {
@SafeParceled(1)
private int versionCode = 1;
@SafeParceled(2)
private int status = 0;
private RemoveLocalCapabilityResponse() {
}
public RemoveLocalCapabilityResponse(int status) {
this.status = status;
}
public static final Creator<RemoveLocalCapabilityResponse> CREATOR = new AutoCreator<RemoveLocalCapabilityResponse>(RemoveLocalCapabilityResponse.class);
}