diff --git a/OsmAnd-telegram/src/net/osmand/aidl/IOsmAndAidlInterface.aidl b/OsmAnd-telegram/src/net/osmand/aidl/IOsmAndAidlInterface.aidl index 541194e18d..b4394d647a 100644 --- a/OsmAnd-telegram/src/net/osmand/aidl/IOsmAndAidlInterface.aidl +++ b/OsmAnd-telegram/src/net/osmand/aidl/IOsmAndAidlInterface.aidl @@ -73,6 +73,7 @@ import net.osmand.aidl.customization.SetWidgetsParams; import net.osmand.aidl.customization.OsmandSettingsParams; import net.osmand.aidl.customization.OsmandSettingsInfoParams; import net.osmand.aidl.customization.CustomizationInfoParams; +import net.osmand.aidl.customization.ProfileSettingsParams; import net.osmand.aidl.gpx.AGpxFile; import net.osmand.aidl.gpx.AGpxFileDetails; @@ -305,6 +306,13 @@ interface IOsmAndAidlInterface { */ boolean addFavoriteGroup(in AddFavoriteGroupParams params); + /** + * Remove favorite group with given name. + * + * @param name (String) - name of favorite group. + */ + boolean removeFavoriteGroup(in RemoveFavoriteGroupParams params); + /** * Update favorite group with given params. * @@ -315,13 +323,6 @@ interface IOsmAndAidlInterface { * @param colorNew (String) - group color (new). * @param visibleNew (boolean) - group visibility (new). */ - boolean removeFavoriteGroup(in RemoveFavoriteGroupParams params); - - /** - * Remove favorite group with given name. - * - * @param name (String) - name of favorite group. - */ boolean updateFavoriteGroup(in UpdateFavoriteGroupParams params); /** @@ -338,6 +339,16 @@ interface IOsmAndAidlInterface { */ boolean addFavorite(in AddFavoriteParams params); + /** + * Remove favorite at given location with given params. + * + * @param lat (double) - latitude. + * @param lon (double) - longitude. + * @param name (String) - name of favorite item. + * @param category (String) - category of favorite item. + */ + boolean removeFavorite(in RemoveFavoriteParams params); + /** * Update favorite at given location with given params. * @@ -356,16 +367,6 @@ interface IOsmAndAidlInterface { * "lightgreen", "green", "lightblue", "blue", "purple", "pink", "brown". * @param visibleNew (boolean) - should new category be visible after creation. */ - boolean removeFavorite(in RemoveFavoriteParams params); - - /** - * Remove favorite at given location with given params. - * - * @param lat (double) - latitude. - * @param lon (double) - longitude. - * @param name (String) - name of favorite item. - * @param category (String) - category of favorite item. - */ boolean updateFavorite(in UpdateFavoriteParams params); /** @@ -846,4 +847,6 @@ interface IOsmAndAidlInterface { * */ boolean getGpxColor(inout GpxColorParams params); + + boolean importProfile(in ProfileSettingsParams params); } diff --git a/OsmAnd-telegram/src/net/osmand/aidl/customization/ProfileSettingsParams.aidl b/OsmAnd-telegram/src/net/osmand/aidl/customization/ProfileSettingsParams.aidl new file mode 100644 index 0000000000..9e21787596 --- /dev/null +++ b/OsmAnd-telegram/src/net/osmand/aidl/customization/ProfileSettingsParams.aidl @@ -0,0 +1,3 @@ +package net.osmand.aidl.customization; + +parcelable ProfileSettingsParams; \ No newline at end of file diff --git a/OsmAnd-telegram/src/net/osmand/aidl/customization/ProfileSettingsParams.java b/OsmAnd-telegram/src/net/osmand/aidl/customization/ProfileSettingsParams.java new file mode 100644 index 0000000000..6c2f82cd8f --- /dev/null +++ b/OsmAnd-telegram/src/net/osmand/aidl/customization/ProfileSettingsParams.java @@ -0,0 +1,64 @@ +package net.osmand.aidl.customization; + +import android.net.Uri; +import android.os.Parcel; +import android.os.Parcelable; + +public class ProfileSettingsParams implements Parcelable { + + private Uri profileSettingsUri; + private String latestChanges; + private int version; + + public ProfileSettingsParams(Uri profileSettingsUri, String latestChanges, int version) { + this.profileSettingsUri = profileSettingsUri; + this.latestChanges = latestChanges; + this.version = version; + } + + public ProfileSettingsParams(Parcel in) { + readFromParcel(in); + } + + public static final Creator CREATOR = new Creator() { + @Override + public ProfileSettingsParams createFromParcel(Parcel in) { + return new ProfileSettingsParams(in); + } + + @Override + public ProfileSettingsParams[] newArray(int size) { + return new ProfileSettingsParams[size]; + } + }; + + public int getVersion() { + return version; + } + + public String getLatestChanges() { + return latestChanges; + } + + public Uri getProfileSettingsUri() { + return profileSettingsUri; + } + + @Override + public void writeToParcel(Parcel out, int flags) { + out.writeInt(version); + out.writeString(latestChanges); + out.writeParcelable(profileSettingsUri, flags); + } + + private void readFromParcel(Parcel in) { + version = in.readInt(); + latestChanges = in.readString(); + profileSettingsUri = in.readParcelable(Uri.class.getClassLoader()); + } + + @Override + public int describeContents() { + return 0; + } +} \ No newline at end of file