diff --git a/smack-experimental/src/main/java/org/jivesoftware/smackx/jingle_encrypted_transfer/JingleEncryptedTransferManager.java b/smack-experimental/src/main/java/org/jivesoftware/smackx/jet/JingleEncryptedTransferManager.java similarity index 66% rename from smack-experimental/src/main/java/org/jivesoftware/smackx/jingle_encrypted_transfer/JingleEncryptedTransferManager.java rename to smack-experimental/src/main/java/org/jivesoftware/smackx/jet/JingleEncryptedTransferManager.java index 7b92026b0..0b3987ccd 100644 --- a/smack-experimental/src/main/java/org/jivesoftware/smackx/jingle_encrypted_transfer/JingleEncryptedTransferManager.java +++ b/smack-experimental/src/main/java/org/jivesoftware/smackx/jet/JingleEncryptedTransferManager.java @@ -1,4 +1,20 @@ -package org.jivesoftware.smackx.jingle_encrypted_transfer; +/** + * + * Copyright 2017 Paul Schaub + * + * 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.jivesoftware.smackx.jet; import java.util.HashMap; import java.util.Map; @@ -10,7 +26,7 @@ import org.jivesoftware.smack.XMPPConnection; /** * Created by vanitas on 13.07.17. */ -public class JingleEncryptedTransferManager extends Manager { +public final class JingleEncryptedTransferManager extends Manager { public static final String NAMESPACE = "urn:xmpp:jingle:jet:0"; diff --git a/smack-experimental/src/main/java/org/jivesoftware/smackx/jingle_encrypted_transfer/JingleEncryptionMethod.java b/smack-experimental/src/main/java/org/jivesoftware/smackx/jet/JingleEncryptionMethod.java similarity index 88% rename from smack-experimental/src/main/java/org/jivesoftware/smackx/jingle_encrypted_transfer/JingleEncryptionMethod.java rename to smack-experimental/src/main/java/org/jivesoftware/smackx/jet/JingleEncryptionMethod.java index 79ebfb025..53cf44475 100644 --- a/smack-experimental/src/main/java/org/jivesoftware/smackx/jingle_encrypted_transfer/JingleEncryptionMethod.java +++ b/smack-experimental/src/main/java/org/jivesoftware/smackx/jet/JingleEncryptionMethod.java @@ -14,14 +14,13 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.jivesoftware.smackx.jingle_encrypted_transfer; +package org.jivesoftware.smackx.jet; import java.security.NoSuchAlgorithmException; import org.jivesoftware.smack.SmackException; import org.jivesoftware.smack.XMPPException; import org.jivesoftware.smack.packet.ExtensionElement; -import org.jivesoftware.smack.provider.ExtensionElementProvider; import org.jxmpp.jid.FullJid; @@ -34,9 +33,9 @@ public interface JingleEncryptionMethod { byte[] decryptJingleTransfer(FullJid sender, ExtensionElement encryptionElement) throws JingleEncryptionException, InterruptedException, XMPPException.XMPPErrorException, SmackException.NotConnectedException, SmackException.NoResponseException; - ExtensionElementProvider getEncryptionElementProvider(); - class JingleEncryptionException extends Exception { + private static final long serialVersionUID = 1L; + public JingleEncryptionException(Throwable throwable) { super(throwable); } diff --git a/smack-experimental/src/main/java/org/jivesoftware/smackx/jingle_encrypted_transfer/JingleEncryptionMethodManager.java b/smack-experimental/src/main/java/org/jivesoftware/smackx/jet/JingleEncryptionMethodManager.java similarity index 53% rename from smack-experimental/src/main/java/org/jivesoftware/smackx/jingle_encrypted_transfer/JingleEncryptionMethodManager.java rename to smack-experimental/src/main/java/org/jivesoftware/smackx/jet/JingleEncryptionMethodManager.java index 98793e4ed..4eb069cec 100644 --- a/smack-experimental/src/main/java/org/jivesoftware/smackx/jingle_encrypted_transfer/JingleEncryptionMethodManager.java +++ b/smack-experimental/src/main/java/org/jivesoftware/smackx/jet/JingleEncryptionMethodManager.java @@ -1,4 +1,20 @@ -package org.jivesoftware.smackx.jingle_encrypted_transfer; +/** + * + * Copyright 2017 Paul Schaub + * + * 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.jivesoftware.smackx.jet; import java.util.HashMap; @@ -8,7 +24,7 @@ import org.jivesoftware.smack.provider.ExtensionElementProvider; /** * Created by vanitas on 13.07.17. */ -public class JingleEncryptionMethodManager { +public final class JingleEncryptionMethodManager { public static HashMap> securityKeyTransportProviders = new HashMap<>(); diff --git a/smack-experimental/src/main/java/org/jivesoftware/smackx/jingle_encrypted_transfer/element/SecurityElement.java b/smack-experimental/src/main/java/org/jivesoftware/smackx/jet/element/SecurityElement.java similarity index 60% rename from smack-experimental/src/main/java/org/jivesoftware/smackx/jingle_encrypted_transfer/element/SecurityElement.java rename to smack-experimental/src/main/java/org/jivesoftware/smackx/jet/element/SecurityElement.java index 4f927af5b..cfb59bf32 100644 --- a/smack-experimental/src/main/java/org/jivesoftware/smackx/jingle_encrypted_transfer/element/SecurityElement.java +++ b/smack-experimental/src/main/java/org/jivesoftware/smackx/jet/element/SecurityElement.java @@ -1,8 +1,24 @@ -package org.jivesoftware.smackx.jingle_encrypted_transfer.element; +/** + * + * Copyright 2017 Paul Schaub + * + * 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.jivesoftware.smackx.jet.element; import org.jivesoftware.smack.packet.ExtensionElement; import org.jivesoftware.smack.util.XmlStringBuilder; -import org.jivesoftware.smackx.jingle_encrypted_transfer.JingleEncryptedTransferManager; +import org.jivesoftware.smackx.jet.JingleEncryptedTransferManager; /** * Created by vanitas on 13.07.17. diff --git a/smack-experimental/src/main/java/org/jivesoftware/smackx/jet/element/package-info.java b/smack-experimental/src/main/java/org/jivesoftware/smackx/jet/element/package-info.java new file mode 100644 index 000000000..442412fc7 --- /dev/null +++ b/smack-experimental/src/main/java/org/jivesoftware/smackx/jet/element/package-info.java @@ -0,0 +1,22 @@ +/** + * + * Copyright 2017 Paul Schaub + * + * 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. + */ + +/** + * Smack's API for XEP-XXXX: Jingle Encrypted Transfers. + * Elements. + */ +package org.jivesoftware.smackx.jet.element; diff --git a/smack-experimental/src/main/java/org/jivesoftware/smackx/jet/package-info.java b/smack-experimental/src/main/java/org/jivesoftware/smackx/jet/package-info.java new file mode 100644 index 000000000..927a7b356 --- /dev/null +++ b/smack-experimental/src/main/java/org/jivesoftware/smackx/jet/package-info.java @@ -0,0 +1,21 @@ +/** + * + * Copyright 2017 Paul Schaub + * + * 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. + */ + +/** + * Smack's API for XEP-XXXX: Jingle Encrypted Transfers. + */ +package org.jivesoftware.smackx.jet; diff --git a/smack-experimental/src/main/java/org/jivesoftware/smackx/jingle_encrypted_transfer/provider/SecurityProvider.java b/smack-experimental/src/main/java/org/jivesoftware/smackx/jet/provider/SecurityProvider.java similarity index 62% rename from smack-experimental/src/main/java/org/jivesoftware/smackx/jingle_encrypted_transfer/provider/SecurityProvider.java rename to smack-experimental/src/main/java/org/jivesoftware/smackx/jet/provider/SecurityProvider.java index 502c2c9e5..567a1aa5b 100644 --- a/smack-experimental/src/main/java/org/jivesoftware/smackx/jingle_encrypted_transfer/provider/SecurityProvider.java +++ b/smack-experimental/src/main/java/org/jivesoftware/smackx/jet/provider/SecurityProvider.java @@ -1,4 +1,20 @@ -package org.jivesoftware.smackx.jingle_encrypted_transfer.provider; +/** + * + * Copyright 2017 Paul Schaub + * + * 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.jivesoftware.smackx.jet.provider; import java.util.logging.Level; import java.util.logging.Logger; @@ -6,9 +22,9 @@ import java.util.logging.Logger; import org.jivesoftware.smack.packet.ExtensionElement; import org.jivesoftware.smack.provider.ExtensionElementProvider; import org.jivesoftware.smack.util.Objects; -import org.jivesoftware.smackx.jingle_encrypted_transfer.JingleEncryptedTransferManager; -import org.jivesoftware.smackx.jingle_encrypted_transfer.JingleEncryptionMethodManager; -import org.jivesoftware.smackx.jingle_encrypted_transfer.element.SecurityElement; +import org.jivesoftware.smackx.jet.JingleEncryptedTransferManager; +import org.jivesoftware.smackx.jet.JingleEncryptionMethodManager; +import org.jivesoftware.smackx.jet.element.SecurityElement; import org.xmlpull.v1.XmlPullParser; diff --git a/smack-experimental/src/main/java/org/jivesoftware/smackx/jet/provider/package-info.java b/smack-experimental/src/main/java/org/jivesoftware/smackx/jet/provider/package-info.java new file mode 100644 index 000000000..5e5d6c654 --- /dev/null +++ b/smack-experimental/src/main/java/org/jivesoftware/smackx/jet/provider/package-info.java @@ -0,0 +1,22 @@ +/** + * + * Copyright 2017 Paul Schaub + * + * 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. + */ + +/** + * Smack's API for XEP-XXXX: Jingle Encrypted Transfers. + * Providers. + */ +package org.jivesoftware.smackx.jet.provider; diff --git a/smack-omemo/src/main/java/org/jivesoftware/smackx/omemo/OmemoManager.java b/smack-omemo/src/main/java/org/jivesoftware/smackx/omemo/OmemoManager.java index 066f7e494..a7965f5f5 100644 --- a/smack-omemo/src/main/java/org/jivesoftware/smackx/omemo/OmemoManager.java +++ b/smack-omemo/src/main/java/org/jivesoftware/smackx/omemo/OmemoManager.java @@ -47,7 +47,7 @@ import org.jivesoftware.smackx.carbons.CarbonManager; import org.jivesoftware.smackx.disco.ServiceDiscoveryManager; import org.jivesoftware.smackx.eme.element.ExplicitMessageEncryptionElement; import org.jivesoftware.smackx.hints.element.StoreHint; -import org.jivesoftware.smackx.jingle_encrypted_transfer.JingleEncryptionMethod; +import org.jivesoftware.smackx.jet.JingleEncryptionMethod; import org.jivesoftware.smackx.mam.MamManager; import org.jivesoftware.smackx.muc.MultiUserChat; import org.jivesoftware.smackx.muc.MultiUserChatManager;