diff options
author | Dominik Schürmann <dominik@dominikschuermann.de> | 2012-12-14 18:22:03 +0100 |
---|---|---|
committer | Dominik Schürmann <dominik@dominikschuermann.de> | 2012-12-14 18:22:03 +0100 |
commit | be4e3a10b008dfb33caf593b6e68bb7018c2a41c (patch) | |
tree | 781e16e6964cc2482f9eeac7e123659b5bafded8 /APG-API-Lib | |
parent | 2dcaad3d3b6f8757f01e4abd2295431f24cdfed5 (diff) | |
download | open-keychain-be4e3a10b008dfb33caf593b6e68bb7018c2a41c.tar.gz open-keychain-be4e3a10b008dfb33caf593b6e68bb7018c2a41c.tar.bz2 open-keychain-be4e3a10b008dfb33caf593b6e68bb7018c2a41c.zip |
AIDL API changes
Diffstat (limited to 'APG-API-Lib')
11 files changed, 222 insertions, 48 deletions
diff --git a/APG-API-Lib/src/org/thialfihar/android/apg/service/IApgService.aidl b/APG-API-Lib/src/org/thialfihar/android/apg/service/IApgApiService.aidl index 71c6a9e42..277ce6722 100644 --- a/APG-API-Lib/src/org/thialfihar/android/apg/service/IApgService.aidl +++ b/APG-API-Lib/src/org/thialfihar/android/apg/service/IApgApiService.aidl @@ -1,14 +1,30 @@ +/* + * Copyright (C) 2012 Dominik Schürmann <dominik@dominikschuermann.de> + * + * 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 org.thialfihar.android.apg.service; -import org.thialfihar.android.apg.service.IApgEncryptDecryptHandler; -import org.thialfihar.android.apg.service.IApgSignVerifyHandler; -import org.thialfihar.android.apg.service.IApgHelperHandler; +import org.thialfihar.android.apg.service.handler.IApgEncryptHandler; +import org.thialfihar.android.apg.service.handler.IApgDecryptHandler; +import org.thialfihar.android.apg.service.handler.IApgGetDecryptionKeyIdHandler; /** * All methods are oneway, which means they are asynchronous and non-blocking. * Results are returned into given Handler, which has to be implemented on client side. */ -interface IApgService { +interface IApgApiService { /** * Encrypt @@ -34,7 +50,7 @@ interface IApgService { */ oneway void encryptAsymmetric(in byte[] inputBytes, in String inputUri, in boolean useAsciiArmor, in int compression, in long[] encryptionKeyIds, in int symmetricEncryptionAlgorithm, - in IApgEncryptDecryptHandler handler); + in IApgEncryptHandler handler); /** * Same as encryptAsymmetric but using a passphrase for symmetric encryption @@ -44,7 +60,7 @@ interface IApgService { */ oneway void encryptSymmetric(in byte[] inputBytes, in String inputUri, in boolean useAsciiArmor, in int compression, in String encryptionPassphrase, in int symmetricEncryptionAlgorithm, - in IApgEncryptDecryptHandler handler); + in IApgEncryptHandler handler); /** * Encrypt and sign @@ -81,7 +97,7 @@ interface IApgService { in boolean useAsciiArmor, in int compression, in long[] encryptionKeyIds, in int symmetricEncryptionAlgorithm, in long signatureKeyId, in int signatureHashAlgorithm, in boolean signatureForceV3, in String signaturePassphrase, - in IApgEncryptDecryptHandler handler); + in IApgEncryptHandler handler); /** * Same as encryptAndSignAsymmetric but using a passphrase for symmetric encryption @@ -93,7 +109,7 @@ interface IApgService { in boolean useAsciiArmor, in int compression, in String encryptionPassphrase, in int symmetricEncryptionAlgorithm, in long signatureKeyId, in int signatureHashAlgorithm, in boolean signatureForceV3, in String signaturePassphrase, - in IApgEncryptDecryptHandler handler); + in IApgEncryptHandler handler); /** * Decrypts and verifies given input bytes. If no signature is present this method @@ -109,7 +125,7 @@ interface IApgService { * Handler where to return results to after successful encryption */ oneway void decryptAndVerifyAsymmetric(in byte[] inputBytes, in String inputUri, - in String keyPassphrase, in IApgEncryptDecryptHandler handler); + in String keyPassphrase, in IApgDecryptHandler handler); /** * Same as decryptAndVerifyAsymmetric but for symmetric decryption. @@ -118,13 +134,13 @@ interface IApgService { * Passphrase to decrypt */ oneway void decryptAndVerifySymmetric(in byte[] inputBytes, in String inputUri, - in String encryptionPassphrase, in IApgEncryptDecryptHandler handler); + in String encryptionPassphrase, in IApgDecryptHandler handler); /** * */ - oneway void getDecryptionKey(in byte[] inputBytes, in String inputUri, - in IApgHelperHandler handler); + oneway void getDecryptionKeyId(in byte[] inputBytes, in String inputUri, + in IApgGetDecryptionKeyIdHandler handler); }
\ No newline at end of file diff --git a/APG-API-Lib/src/org/thialfihar/android/apg/service/IApgEncryptDecryptHandler.aidl b/APG-API-Lib/src/org/thialfihar/android/apg/service/IApgEncryptDecryptHandler.aidl deleted file mode 100644 index ff6b7254c..000000000 --- a/APG-API-Lib/src/org/thialfihar/android/apg/service/IApgEncryptDecryptHandler.aidl +++ /dev/null @@ -1,16 +0,0 @@ -package org.thialfihar.android.apg.service; - -interface IApgEncryptDecryptHandler { - /** - * Either output or streamUri is given. One of them is null - * - */ - oneway void onSuccessEncrypt(in byte[] outputBytes, in String outputUri); - - oneway void onSuccessDecrypt(in byte[] outputBytes, in String outputUri, in boolean signature, - in long signatureKeyId, in String signatureUserId, in boolean signatureSuccess, - in boolean signatureUnknown); - - - oneway void onException(in int exceptionNumber, in String message); -}
\ No newline at end of file diff --git a/APG-API-Lib/src/org/thialfihar/android/apg/service/IApgHelperHandler.aidl b/APG-API-Lib/src/org/thialfihar/android/apg/service/IApgHelperHandler.aidl deleted file mode 100644 index bb405329a..000000000 --- a/APG-API-Lib/src/org/thialfihar/android/apg/service/IApgHelperHandler.aidl +++ /dev/null @@ -1,9 +0,0 @@ -package org.thialfihar.android.apg.service; - -interface IApgHelperHandler { - - oneway void onSuccessGetDecryptionKey(in long secretKeyId, in boolean symmetric); - - - oneway void onException(in int exceptionNumber, in String message); -}
\ No newline at end of file diff --git a/APG-API-Lib/src/org/thialfihar/android/apg/service/IApgKeyService.aidl b/APG-API-Lib/src/org/thialfihar/android/apg/service/IApgKeyService.aidl new file mode 100644 index 000000000..12ecddc17 --- /dev/null +++ b/APG-API-Lib/src/org/thialfihar/android/apg/service/IApgKeyService.aidl @@ -0,0 +1,32 @@ +/* + * Copyright (C) 2012 Dominik Schürmann <dominik@dominikschuermann.de> + * + * 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 org.thialfihar.android.apg.service; + +import org.thialfihar.android.apg.service.handler.IApgGetKeyringsHandler; + +/** + * All methods are oneway, which means they are asynchronous and non-blocking. + * Results are returned into given Handler, which has to be implemented on client side. + */ +interface IApgKeyService { + + oneway void getPublicKeyRings(in long[] masterKeyIds, in boolean asAsciiArmoredStringArray, + in IApgGetKeyringsHandler handler); + + oneway void getSecretKeyRings(in long[] masterKeyIds, in boolean asAsciiArmoredStringArray, + in IApgGetKeyringsHandler handler); +}
\ No newline at end of file diff --git a/APG-API-Lib/src/org/thialfihar/android/apg/service/IApgSignVerifyHandler.aidl b/APG-API-Lib/src/org/thialfihar/android/apg/service/IApgSignVerifyHandler.aidl deleted file mode 100644 index 1375d1548..000000000 --- a/APG-API-Lib/src/org/thialfihar/android/apg/service/IApgSignVerifyHandler.aidl +++ /dev/null @@ -1,11 +0,0 @@ -package org.thialfihar.android.apg.service; - -interface IApgSignVerifyHandler { - oneway void onSuccessSign(in byte[] outputBytes, in String outputUri); - - oneway void onSuccessVerify(in boolean signature, in long signatureKeyId, - in String signatureUserId, in boolean signatureSuccess, in boolean signatureUnknown); - - - oneway void onException(in int exceptionNumber, in String message); -}
\ No newline at end of file diff --git a/APG-API-Lib/src/org/thialfihar/android/apg/service/handler/IApgDecryptHandler.aidl b/APG-API-Lib/src/org/thialfihar/android/apg/service/handler/IApgDecryptHandler.aidl new file mode 100644 index 000000000..feb56bce6 --- /dev/null +++ b/APG-API-Lib/src/org/thialfihar/android/apg/service/handler/IApgDecryptHandler.aidl @@ -0,0 +1,27 @@ +/* + * Copyright (C) 2012 Dominik Schürmann <dominik@dominikschuermann.de> + * + * 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 org.thialfihar.android.apg.service.handler; + +interface IApgDecryptHandler { + + oneway void onSuccess(in byte[] outputBytes, in String outputUri, in boolean signature, + in long signatureKeyId, in String signatureUserId, in boolean signatureSuccess, + in boolean signatureUnknown); + + + oneway void onException(in int exceptionNumber, in String message); +}
\ No newline at end of file diff --git a/APG-API-Lib/src/org/thialfihar/android/apg/service/handler/IApgEncryptHandler.aidl b/APG-API-Lib/src/org/thialfihar/android/apg/service/handler/IApgEncryptHandler.aidl new file mode 100644 index 000000000..be0317715 --- /dev/null +++ b/APG-API-Lib/src/org/thialfihar/android/apg/service/handler/IApgEncryptHandler.aidl @@ -0,0 +1,28 @@ +/* + * Copyright (C) 2012 Dominik Schürmann <dominik@dominikschuermann.de> + * + * 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 org.thialfihar.android.apg.service.handler; + +interface IApgEncryptHandler { + /** + * Either output or streamUri is given. One of them is null + * + */ + oneway void onSuccess(in byte[] outputBytes, in String outputUri); + + + oneway void onException(in int exceptionNumber, in String message); +}
\ No newline at end of file diff --git a/APG-API-Lib/src/org/thialfihar/android/apg/service/handler/IApgGetDecryptionKeyIdHandler.aidl b/APG-API-Lib/src/org/thialfihar/android/apg/service/handler/IApgGetDecryptionKeyIdHandler.aidl new file mode 100644 index 000000000..020a80b99 --- /dev/null +++ b/APG-API-Lib/src/org/thialfihar/android/apg/service/handler/IApgGetDecryptionKeyIdHandler.aidl @@ -0,0 +1,25 @@ +/* + * Copyright (C) 2012 Dominik Schürmann <dominik@dominikschuermann.de> + * + * 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 org.thialfihar.android.apg.service.handler; + +interface IApgGetDecryptionKeyIdHandler { + + oneway void onSuccess(in long secretKeyId, in boolean symmetric); + + + oneway void onException(in int exceptionNumber, in String message); +}
\ No newline at end of file diff --git a/APG-API-Lib/src/org/thialfihar/android/apg/service/handler/IApgGetKeyringsHandler.aidl b/APG-API-Lib/src/org/thialfihar/android/apg/service/handler/IApgGetKeyringsHandler.aidl new file mode 100644 index 000000000..ffa9d0d2d --- /dev/null +++ b/APG-API-Lib/src/org/thialfihar/android/apg/service/handler/IApgGetKeyringsHandler.aidl @@ -0,0 +1,28 @@ +/* + * Copyright (C) 2012 Dominik Schürmann <dominik@dominikschuermann.de> + * + * 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 org.thialfihar.android.apg.service.handler; + +interface IApgGetKeyringsHandler { + /** + * Either outputBytes or outputString is given. One of them is null + * + */ + oneway void onSuccess(in byte[] outputBytes, in List<String> outputString); + + + oneway void onException(in int exceptionNumber, in String message); +}
\ No newline at end of file diff --git a/APG-API-Lib/src/org/thialfihar/android/apg/service/handler/IApgSignHandler.aidl b/APG-API-Lib/src/org/thialfihar/android/apg/service/handler/IApgSignHandler.aidl new file mode 100644 index 000000000..cf91e8bc4 --- /dev/null +++ b/APG-API-Lib/src/org/thialfihar/android/apg/service/handler/IApgSignHandler.aidl @@ -0,0 +1,28 @@ +/* + * Copyright (C) 2012 Dominik Schürmann <dominik@dominikschuermann.de> + * + * 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 org.thialfihar.android.apg.service.handler; + +interface IApgSignHandler { + /** + * Either output or streamUri is given. One of them is null + * + */ + oneway void onSuccess(in byte[] outputBytes, in String outputUri); + + + oneway void onException(in int exceptionNumber, in String message); +}
\ No newline at end of file diff --git a/APG-API-Lib/src/org/thialfihar/android/apg/service/handler/IApgVerifyHandler.aidl b/APG-API-Lib/src/org/thialfihar/android/apg/service/handler/IApgVerifyHandler.aidl new file mode 100644 index 000000000..6baaec758 --- /dev/null +++ b/APG-API-Lib/src/org/thialfihar/android/apg/service/handler/IApgVerifyHandler.aidl @@ -0,0 +1,26 @@ +/* + * Copyright (C) 2012 Dominik Schürmann <dominik@dominikschuermann.de> + * + * 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 org.thialfihar.android.apg.service.handler; + +interface IApgVerifyHandler { + + oneway void onSuccess(in boolean signature, in long signatureKeyId, + in String signatureUserId, in boolean signatureSuccess, in boolean signatureUnknown); + + + oneway void onException(in int exceptionNumber, in String message); +}
\ No newline at end of file |