├── .github ├── FUNDING.yml └── ISSUE_TEMPLATE │ ├── bug_report.md │ └── feature_request.md ├── .gitignore ├── .readthedocs.yaml ├── COPYING ├── LICENSE ├── License.html ├── README.md ├── build.gradle ├── gradle.properties ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat ├── jaxmpp-adhoc ├── build.gradle ├── pom.xml └── src │ └── main │ └── java │ ├── META-INF │ └── MANIFEST.MF │ └── tigase │ └── jaxmpp │ └── core │ ├── JaxmppAdHoc.gwt.xml │ └── client │ └── xmpp │ └── modules │ └── adhoc │ ├── Action.java │ ├── AdHocCommand.java │ ├── AdHocCommansModule.java │ ├── AdHocRequest.java │ ├── AdHocResponse.java │ ├── Session.java │ ├── State.java │ └── package-info.java ├── jaxmpp-all-singlejar └── pom.xml ├── jaxmpp-all └── pom.xml ├── jaxmpp-android ├── build.gradle ├── default.properties ├── pom.xml ├── project.properties ├── res │ └── values │ │ └── strings.xml └── src │ ├── main │ ├── AndroidManifest.xml │ └── java │ │ └── tigase │ │ └── jaxmpp │ │ └── android │ │ ├── AndroidDNSResolver.java │ │ ├── Jaxmpp.java │ │ └── xml │ │ ├── ParcelableElement.aidl │ │ └── ParcelableElement.java │ └── test │ └── java │ └── tigase │ └── jaxmpp │ └── android │ └── JaxmppTest.java ├── jaxmpp-chat ├── build.gradle ├── pom.xml └── src │ └── main │ └── java │ ├── META-INF │ └── MANIFEST.MF │ └── tigase │ └── jaxmpp │ └── core │ ├── JaxmppChat.gwt.xml │ └── client │ └── xmpp │ └── modules │ └── chat │ ├── AbstractChatManager.java │ ├── Chat.java │ ├── DefaultChatManager.java │ ├── MessageCarbonsModule.java │ ├── MessageModule.java │ ├── MessageModuleExtension.java │ └── package-info.java ├── jaxmpp-core ├── build.gradle ├── pom.xml └── src │ ├── main │ └── java │ │ ├── META-INF │ │ └── MANIFEST.MF │ │ └── tigase │ │ └── jaxmpp │ │ └── core │ │ ├── JaxmppCore.gwt.xml │ │ └── client │ │ ├── AbstractSessionObject.java │ │ ├── AbstractStanzaHandler.java │ │ ├── AsyncCallback.java │ │ ├── BareJID.java │ │ ├── Base64.java │ │ ├── ConnectionConfiguration.java │ │ ├── Connector.java │ │ ├── Context.java │ │ ├── DataHolder.java │ │ ├── Hex.java │ │ ├── JID.java │ │ ├── JaxmppCore.java │ │ ├── MultiJaxmpp.java │ │ ├── PacketWriter.java │ │ ├── Processor.java │ │ ├── Property.java │ │ ├── ResponseManager.java │ │ ├── SessionObject.java │ │ ├── UIDGenerator.java │ │ ├── UserProperties.java │ │ ├── XMPPException.java │ │ ├── XmppModule.java │ │ ├── XmppModulesManager.java │ │ ├── XmppSessionLogic.java │ │ ├── connector │ │ ├── AbstractBoshConnector.java │ │ ├── AbstractSocketXmppSessionLogic.java │ │ ├── AbstractWebSocketConnector.java │ │ ├── BoshRequest.java │ │ ├── BoshXmppSessionLogic.java │ │ ├── ConnectorWrapper.java │ │ ├── SeeOtherHostHandler.java │ │ ├── StreamError.java │ │ ├── WebSocketXmppSessionLogic.java │ │ └── package-info.java │ │ ├── criteria │ │ ├── Criteria.java │ │ ├── ElementCriteria.java │ │ ├── Or.java │ │ ├── package-info.java │ │ └── tpath │ │ │ ├── Function.java │ │ │ ├── Node.java │ │ │ ├── TPath.java │ │ │ └── TPathExpression.java │ │ ├── eventbus │ │ ├── DefaultEventBus.java │ │ ├── Event.java │ │ ├── EventBus.java │ │ ├── EventBusException.java │ │ ├── EventHandler.java │ │ ├── EventListener.java │ │ ├── JaxmppEvent.java │ │ ├── JaxmppEventWithCallback.java │ │ ├── MultiEventBus.java │ │ └── package-info.java │ │ ├── exceptions │ │ ├── JaxmppException.java │ │ └── package-info.java │ │ ├── factory │ │ ├── UniversalFactory.java │ │ └── package-info.java │ │ ├── package-info.java │ │ ├── xml │ │ ├── DefaultElement.java │ │ ├── Element.java │ │ ├── ElementBuilder.java │ │ ├── ElementComparator.java │ │ ├── ElementFactory.java │ │ ├── ElementWrapper.java │ │ ├── XMLException.java │ │ ├── XmlTools.java │ │ └── package-info.java │ │ └── xmpp │ │ ├── DefaultXMPPStream.java │ │ ├── forms │ │ ├── AbstractField.java │ │ ├── BooleanField.java │ │ ├── Field.java │ │ ├── FixedField.java │ │ ├── HiddenField.java │ │ ├── JabberDataElement.java │ │ ├── JidMultiField.java │ │ ├── JidSingleField.java │ │ ├── ListMultiField.java │ │ ├── ListSingleField.java │ │ ├── TextMultiField.java │ │ ├── TextPrivateField.java │ │ ├── TextSingleField.java │ │ ├── XDataType.java │ │ └── package-info.java │ │ ├── modules │ │ ├── AbstractIQModule.java │ │ ├── AbstractStanzaExtendableModule.java │ │ ├── AbstractStanzaModule.java │ │ ├── BookmarksModule.java │ │ ├── ClientStateIndicationModule.java │ │ ├── ContextAware.java │ │ ├── EntityTimeModule.java │ │ ├── EventBusAware.java │ │ ├── InitializingModule.java │ │ ├── ModuleProvider.java │ │ ├── PacketWriterAware.java │ │ ├── PingModule.java │ │ ├── ResourceBinderModule.java │ │ ├── SessionEstablishmentModule.java │ │ ├── SoftwareVersionModule.java │ │ ├── StreamFeaturesModule.java │ │ ├── auth │ │ │ ├── AuthModule.java │ │ │ ├── ClientSaslException.java │ │ │ ├── CredentialsCallback.java │ │ │ ├── NonSaslAuthModule.java │ │ │ ├── SaslMechanism.java │ │ │ ├── SaslModule.java │ │ │ ├── XOAuth2TokenCallback.java │ │ │ ├── package-info.java │ │ │ └── saslmechanisms │ │ │ │ ├── AbstractSaslMechanism.java │ │ │ │ ├── AnonymousMechanism.java │ │ │ │ ├── PlainMechanism.java │ │ │ │ └── XOAuth2Mechanism.java │ │ ├── connection │ │ │ ├── ConnectionEndpoint.java │ │ │ └── ConnectionSession.java │ │ ├── disco │ │ │ ├── DiscoveryModule.java │ │ │ ├── NodeDetailsCallback.java │ │ │ └── package-info.java │ │ ├── extensions │ │ │ ├── ExtendableModule.java │ │ │ ├── Extension.java │ │ │ └── ExtensionsChain.java │ │ ├── package-info.java │ │ └── streammng │ │ │ └── StreamManagementModule.java │ │ ├── package-info.java │ │ ├── stanzas │ │ ├── ErrorElement.java │ │ ├── IQ.java │ │ ├── Message.java │ │ ├── Presence.java │ │ ├── Stanza.java │ │ ├── StanzaType.java │ │ ├── StreamPacket.java │ │ └── package-info.java │ │ ├── stream │ │ ├── XMPPStream.java │ │ └── XmppStreamsManager.java │ │ └── utils │ │ ├── DateTimeFormat.java │ │ ├── EscapeUtils.java │ │ ├── MutableBoolean.java │ │ ├── RSM.java │ │ ├── delay │ │ └── XmppDelay.java │ │ └── package-info.java │ └── test │ └── java │ └── tigase │ └── jaxmpp │ └── core │ └── client │ ├── AbstractJaxmppTest.java │ ├── BareJIDTest.java │ ├── Base64Test.java │ ├── HexTest.java │ ├── JIDTest.java │ ├── MockSessionObject.java │ ├── MockWriter.java │ ├── ProcessorTest.java │ ├── ResponseManagerTest.java │ ├── SessionObjectTest.java │ ├── criteria │ └── tpath │ │ └── TPathTest.java │ ├── eventbus │ └── DefaultEventBusTest.java │ ├── xml │ └── DefaultElementTest.java │ └── xmpp │ ├── forms │ └── JabberDataElementTest.java │ ├── modules │ └── auth │ │ └── saslmechanism │ │ └── PlainMechanismTest.java │ └── utils │ └── EscapeUtilsTest.java ├── jaxmpp-deliveryreceipts ├── build.gradle ├── pom.xml └── src │ └── main │ └── java │ └── tigase │ └── jaxmpp │ └── core │ └── client │ └── xmpp │ └── modules │ └── chat │ └── xep0184 │ └── MessageDeliveryReceiptsExtension.java ├── jaxmpp-dist ├── pom.xml └── src │ └── main │ └── assembly │ └── dist.xml ├── jaxmpp-documentation ├── build.gradle ├── pom.xml └── src │ └── main │ ├── asciidoc │ ├── css │ │ └── docbook-xsl.css │ ├── images │ │ ├── architecture.graphml │ │ ├── architecture.png │ │ └── tiger-looking-left-small.png │ ├── index.asciidoc │ └── text │ │ ├── Examples.asciidoc │ │ ├── Release_Notes.asciidoc │ │ └── Tigase_JaXMPP-General_overview.asciidoc │ └── restructured │ ├── .readthedocs.yaml │ ├── Examples.rst │ ├── Makefile │ ├── Release_notes.rst │ ├── Tigase_JaXMPP-General_overview.rst │ ├── conf.py │ ├── images │ ├── architecture.graphml │ ├── architecture.png │ ├── logo.png │ ├── logo_320.png │ └── tiger-looking-left-small.png │ ├── index.rst │ ├── locale │ ├── pl │ │ └── LC_MESSAGES │ │ │ └── jaxmpp_translation.po │ └── zh_CN │ │ └── LC_MESSAGES │ │ └── jaxmpp_translation.po │ ├── make.bat │ └── requirements.txt ├── jaxmpp-filetransfer ├── build.gradle ├── pom.xml └── src │ └── main │ └── java │ ├── META-INF │ └── MANIFEST.MF │ └── tigase │ └── jaxmpp │ └── core │ ├── JaxmppFileTransfer.gwt.xml │ └── client │ └── xmpp │ └── modules │ └── filetransfer │ ├── FileTransfer.java │ └── FileTransferModule.java ├── jaxmpp-gwt-singlejar └── pom.xml ├── jaxmpp-gwt ├── build.gradle ├── pom.xml └── src │ ├── main │ └── java │ │ └── tigase │ │ └── jaxmpp │ │ └── gwt │ │ ├── JaxmppGWT.gwt.xml │ │ └── client │ │ ├── ConnectionConfiguration.java │ │ ├── ConnectionManager.java │ │ ├── GWTPresenceStore.java │ │ ├── GwtRosterStore.java │ │ ├── GwtSessionObject.java │ │ ├── Jaxmpp.java │ │ ├── JsonSerializationHelper.java │ │ ├── Presence.java │ │ ├── Roster.java │ │ ├── connectors │ │ ├── BoshConnector.java │ │ ├── BoshWorker.java │ │ ├── SeeOtherHostHandler.java │ │ ├── WebSocket.java │ │ ├── WebSocketCallback.java │ │ └── WebSocketConnector.java │ │ ├── dns │ │ ├── DnsEntry.java │ │ ├── DnsResult.java │ │ ├── WebDnsResolver.java │ │ └── WellKnownHostMetaResolver.java │ │ └── xml │ │ └── GwtElement.java │ └── test │ └── java │ └── tigase │ └── jaxmpp │ └── gwt │ ├── JaxmppGWTJUnit.gwt.xml │ └── client │ ├── BareJIDTest.java │ ├── Base64Test.java │ ├── GwtSessionObjectTest.java │ ├── JIDTest.java │ ├── JaxmppTest.java │ └── xml │ └── GwtElementTest.java ├── jaxmpp-httpfileupload ├── build.gradle ├── pom.xml └── src │ └── main │ └── java │ └── tigase │ └── jaxmpp │ └── core │ ├── JaxmppHttpFileUpload.gwt.xml │ └── client │ └── xmpp │ └── modules │ └── httpfileupload │ └── HttpFileUploadModule.java ├── jaxmpp-im ├── build.gradle ├── pom.xml └── src │ └── main │ └── java │ └── tigase │ └── jaxmpp │ └── core │ └── client │ └── xmpp │ └── modules │ └── chat │ └── xep0085 │ ├── ChatState.java │ └── ChatStateExtension.java ├── jaxmpp-j2se-singlejar └── pom.xml ├── jaxmpp-j2se ├── build.gradle ├── pom.xml └── src │ ├── main │ └── java │ │ ├── META-INF │ │ └── MANIFEST.MF │ │ └── tigase │ │ └── jaxmpp │ │ ├── core │ │ └── client │ │ │ └── xmpp │ │ │ └── modules │ │ │ ├── auth │ │ │ └── scram │ │ │ │ ├── AbstractScram.java │ │ │ │ ├── ScramMechanism.java │ │ │ │ ├── ScramPlusMechanism.java │ │ │ │ ├── ScramSHA256Mechanism.java │ │ │ │ ├── ScramSHA256PlusMechanism.java │ │ │ │ ├── ScramSHA512Mechanism.java │ │ │ │ └── ScramSHA512PlusMechanism.java │ │ │ └── capabilities │ │ │ ├── CapabilitiesCache.java │ │ │ └── CapabilitiesModule.java │ │ └── j2se │ │ ├── ConnectionConfiguration.java │ │ ├── DNSResolver.java │ │ ├── DateTimeFormatProviderImpl.java │ │ ├── J2SECapabiliesCache.java │ │ ├── J2SEPresenceStore.java │ │ ├── J2SESessionObject.java │ │ ├── Jaxmpp.java │ │ ├── Presence.java │ │ ├── Roster.java │ │ ├── ThreadSafeResponseManager.java │ │ ├── connection │ │ ├── ConnectionManager.java │ │ ├── ConnectionSessionHandler.java │ │ └── socks5bytestream │ │ │ ├── J2SEStreamhostsResolver.java │ │ │ ├── JingleSocks5BytestreamsConnectionManager.java │ │ │ ├── Socks5BytestreamsConnectionManager.java │ │ │ ├── Socks5ConnectionManager.java │ │ │ └── StreamhostsResolver.java │ │ ├── connectors │ │ ├── bosh │ │ │ ├── BoshConnector.java │ │ │ └── BoshWorker.java │ │ ├── socket │ │ │ ├── DefaultHostnameVerifier.java │ │ │ ├── JaxmppHostnameVerifier.java │ │ │ ├── OutputStreamFlushWrap.java │ │ │ ├── Reader.java │ │ │ ├── SocketConnector.java │ │ │ ├── SocketInBandRegistrationXmppSessionLogic.java │ │ │ ├── SocketXmppSessionLogic.java │ │ │ ├── StreamListener.java │ │ │ ├── TextStreamReader.java │ │ │ ├── Worker.java │ │ │ └── XMPPDomBuilderHandler.java │ │ └── websocket │ │ │ ├── WebSocketConnector.java │ │ │ └── WebSocketReader.java │ │ ├── eventbus │ │ └── ThreadSafeEventBus.java │ │ ├── filetransfer │ │ ├── FileTransfer.java │ │ ├── FileTransferManager.java │ │ ├── FileTransferNegotiator.java │ │ ├── FileTransferNegotiatorAbstract.java │ │ ├── JingleFileTransferNegotiator.java │ │ └── Socks5FileTransferNegotiator.java │ │ ├── xml │ │ └── J2seElement.java │ │ └── xmpp │ │ └── modules │ │ └── auth │ │ └── saslmechanisms │ │ └── ExternalMechanism.java │ └── test │ └── java │ └── tigase │ ├── jaxmp │ └── j2se │ │ └── connectors │ │ └── websocket │ │ └── WebSocketReaderTest.java │ └── jaxmpp │ ├── core │ └── client │ │ └── xmpp │ │ └── modules │ │ ├── auth │ │ └── scram │ │ │ ├── ScramMechanismTest.java │ │ │ └── ScramPlusMechanismTest.java │ │ └── capabilities │ │ └── CapabilitiesModuleTest.java │ └── j2se │ ├── DateTimeFormatProviderImplTest.java │ ├── J2SESessionObjectTest.java │ ├── JaxmppTest.java │ ├── connectors │ └── socket │ │ ├── DefaultHostnameVerifierTest.java │ │ └── TextStreamReaderTest.java │ └── xml │ └── J2seElementTest.java ├── jaxmpp-jingle ├── build.gradle ├── pom.xml └── src │ └── main │ └── java │ ├── META-INF │ └── MANIFEST.MF │ └── tigase │ └── jaxmpp │ └── core │ ├── JaxmppJingle.gwt.xml │ └── client │ └── xmpp │ └── modules │ └── jingle │ ├── Candidate.java │ ├── JingleModule.java │ ├── Transport.java │ └── package-info.java ├── jaxmpp-mam ├── build.gradle ├── pom.xml └── src │ └── main │ └── java │ ├── META-INF │ └── MANIFEST.MF │ └── tigase │ └── jaxmpp │ └── core │ ├── JaxmppMAM.gwt.xml │ └── client │ └── xmpp │ └── modules │ └── mam │ └── MessageArchiveManagementModule.java ├── jaxmpp-muc ├── build.gradle ├── pom.xml └── src │ └── main │ └── java │ ├── META-INF │ └── MANIFEST.MF │ └── tigase │ └── jaxmpp │ └── core │ ├── JaxmppMuc.gwt.xml │ └── client │ └── xmpp │ └── modules │ └── muc │ ├── AbstractRoomsManager.java │ ├── Affiliation.java │ ├── DefaultRoomsManager.java │ ├── MucModule.java │ ├── Occupant.java │ ├── Role.java │ ├── Room.java │ ├── XMucUserElement.java │ └── package-info.java ├── jaxmpp-omemo ├── build.gradle ├── pom.xml └── src │ └── main │ └── java │ ├── test │ └── Client.java │ └── tigase │ └── jaxmpp │ └── core │ └── client │ └── xmpp │ └── modules │ └── omemo │ ├── Bundle.java │ ├── CannotEncryptException.java │ ├── JaXMPPSignalProtocolStore.java │ ├── KeysRetriever.java │ ├── OMEMOEncryptableMessage.java │ ├── OMEMOException.java │ ├── OMEMOMessage.java │ ├── OMEMOSessionsProvider.java │ ├── OmemoExtension.java │ ├── OmemoModule.java │ └── XmppOMEMOSession.java ├── jaxmpp-presence ├── build.gradle ├── pom.xml └── src │ ├── main │ └── java │ │ ├── META-INF │ │ └── MANIFEST.MF │ │ └── tigase │ │ └── jaxmpp │ │ └── core │ │ ├── JaxmppPresence.gwt.xml │ │ └── client │ │ └── xmpp │ │ └── modules │ │ └── presence │ │ ├── PresenceModule.java │ │ ├── PresenceStore.java │ │ └── package-info.java │ └── test │ └── java │ └── tigase │ └── jaxmpp │ └── core │ └── client │ ├── MockPresenceStore.java │ └── xmpp │ └── modules │ └── presence │ └── PresenceModuleTest.java ├── jaxmpp-pubsub ├── build.gradle ├── pom.xml └── src │ ├── main │ └── java │ │ ├── META-INF │ │ └── MANIFEST.MF │ │ └── tigase │ │ └── jaxmpp │ │ └── core │ │ ├── JaxmppPubSub.gwt.xml │ │ └── client │ │ └── xmpp │ │ └── modules │ │ └── pubsub │ │ ├── Affiliation.java │ │ ├── FormSubmitter.java │ │ ├── PEPExtension.java │ │ ├── PubSubAsyncCallback.java │ │ ├── PubSubErrorCondition.java │ │ ├── PubSubModule.java │ │ ├── Subscription.java │ │ └── package-info.java │ └── test │ └── java │ └── tigase │ └── jaxmpp │ └── core │ └── client │ └── xmpp │ └── modules │ └── pubsub │ └── PubSubModuleTest.java ├── jaxmpp-push ├── build.gradle ├── pom.xml └── src │ └── main │ └── java │ └── tigase │ └── jaxmpp │ └── core │ └── client │ └── xmpp │ └── modules │ └── push │ └── PushNotificationModule.java ├── jaxmpp-registration ├── build.gradle ├── pom.xml └── src │ └── main │ └── java │ ├── META-INF │ └── MANIFEST.MF │ └── tigase │ └── jaxmpp │ └── core │ ├── JaxmppRegistration.gwt.xml │ └── client │ └── xmpp │ └── modules │ └── registration │ ├── InBandRegistrationModule.java │ ├── UnifiedRegistrationForm.java │ └── package-info.java ├── jaxmpp-roster ├── build.gradle ├── pom.xml └── src │ └── main │ └── java │ ├── META-INF │ └── MANIFEST.MF │ └── tigase │ └── jaxmpp │ └── core │ ├── JaxmppRoster.gwt.xml │ └── client │ └── xmpp │ └── modules │ └── roster │ ├── DefaultRosterStore.java │ ├── RosterCacheProvider.java │ ├── RosterItem.java │ ├── RosterModule.java │ ├── RosterStore.java │ └── package-info.java ├── jaxmpp-socks5 ├── build.gradle ├── pom.xml └── src │ └── main │ └── java │ ├── META-INF │ └── MANIFEST.MF │ └── tigase │ └── jaxmpp │ └── core │ ├── JaxmppSocks5.gwt.xml │ └── client │ └── xmpp │ └── modules │ └── socks5 │ ├── Socks5BytestreamsModule.java │ ├── StreamInitiationOfferAsyncCallback.java │ ├── Streamhost.java │ ├── StreamhostUsedCallback.java │ └── StreamhostsCallback.java ├── jaxmpp-vcard ├── build.gradle ├── pom.xml └── src │ └── main │ └── java │ ├── META-INF │ └── MANIFEST.MF │ └── tigase │ └── jaxmpp │ └── core │ ├── JaxmppVCard.gwt.xml │ └── client │ └── xmpp │ └── modules │ └── vcard │ ├── VCard.java │ ├── VCardModule.java │ └── package-info.java ├── jaxmpp-workgroup ├── build.gradle ├── pom.xml └── src │ └── main │ └── java │ └── tigase │ └── jaxmpp │ └── core │ └── client │ └── xmpp │ └── modules │ └── workgroup │ ├── WorkgroupAgentModule.java │ └── package-info.java ├── jaxmpp-xep0013_flexible_offline ├── build.gradle ├── pom.xml └── src │ └── main │ └── java │ └── tigase │ └── jaxmpp │ └── core │ └── client │ └── xmpp │ └── modules │ └── flexible_offline │ ├── FlexibleOfflineMessageRetrieval.java │ └── package-info.java ├── jaxmpp-xep0136 ├── build.gradle ├── pom.xml └── src │ └── main │ └── java │ ├── META-INF │ └── MANIFEST.MF │ └── tigase │ └── jaxmpp │ └── core │ ├── JaxmppXep0136.gwt.xml │ └── client │ └── xmpp │ └── modules │ └── xep0136 │ ├── Chat.java │ ├── ChatItem.java │ ├── ChatResultSet.java │ ├── Criteria.java │ ├── MessageArchivingModule.java │ ├── ResultSet.java │ └── SaveMode.java ├── jaxmpp.doap ├── pom.xml └── settings.gradle /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | # These are supported funding model platforms 2 | 3 | github: [tigase] 4 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Create a report to help us improve 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Describe the bug** 11 | A clear and concise description of what the bug is. 12 | 13 | **To Reproduce** 14 | Steps to reproduce the behavior: 15 | 1. Go to '...' 16 | 2. Click on '....' 17 | 3. Scroll down to '....' 18 | 4. See error 19 | 20 | **Expected behavior** 21 | A clear and concise description of what you expected to happen. 22 | 23 | **Screenshots** 24 | If applicable, add screenshots to help explain your problem. 25 | 26 | **Desktop (please complete the following information):** 27 | - OS: [e.g. iOS] 28 | - Browser [e.g. chrome, safari] 29 | - Version [e.g. 22] 30 | 31 | **Smartphone (please complete the following information):** 32 | - Device: [e.g. iPhone6] 33 | - OS: [e.g. iOS8.1] 34 | - Browser [e.g. stock browser, safari] 35 | - Version [e.g. 22] 36 | 37 | **Additional context** 38 | Add any other context about the problem here. 39 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature request 3 | about: Suggest an idea for this project 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Is your feature request related to a problem? Please describe.** 11 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] 12 | 13 | **Describe the solution you'd like** 14 | A clear and concise description of what you want to happen. 15 | 16 | **Describe alternatives you've considered** 17 | A clear and concise description of any alternative solutions or features you've considered. 18 | 19 | **Additional context** 20 | Add any other context or screenshots about the feature request here. 21 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | local.properties 2 | build/ 3 | .idea/ 4 | *.iml 5 | .classpath 6 | .settings 7 | .settings 8 | .project 9 | jaxmpp-core/bin 10 | jaxmpp-core/target 11 | jaxmpp-gwt/bin 12 | jaxmpp-gwt/target 13 | jaxmpp-gwt/war 14 | jaxmpp-j2se/bin 15 | jaxmpp-j2se/target 16 | target 17 | .gradle 18 | jaxmpp-j2se/build 19 | jaxmpp-core/build 20 | jaxmpp-gwt/build 21 | jaxmpp-android/bin 22 | jaxmpp-android/gen 23 | */bin 24 | */build 25 | */gen 26 | */target 27 | jaxmpp-gwt/gwt-unitCache 28 | docs 29 | jaxmpp-dist/dist 30 | 31 | jaxmpp-documentation/src/main/restructured/locale/*/LC_MESSAGES/*.mo 32 | jaxmpp-documentation/src/main/restructured/_build/ -------------------------------------------------------------------------------- /.readthedocs.yaml: -------------------------------------------------------------------------------- 1 | # Required 2 | version: 2 3 | 4 | # Set the version of Python and other tools you might need 5 | build: 6 | os: ubuntu-22.04 7 | tools: 8 | python: "3.11" 9 | 10 | python: 11 | install: 12 | - requirements: jaxmpp-documentation/src/main/restructured/requirements.txt 13 | 14 | # Build documentation in the docs/ directory with Sphinx 15 | sphinx: 16 | configuration: jaxmpp-documentation/src/main/restructured/conf.py -------------------------------------------------------------------------------- /build.gradle: -------------------------------------------------------------------------------- 1 | /* 2 | * build.gradle 3 | * 4 | * Tigase XMPP Client Library 5 | * Copyright (C) 2004-2018 "Tigase, Inc." 6 | * 7 | * This program is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, 10 | * or (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. Look for COPYING file in the top folder. 19 | * If not, see http://www.gnu.org/licenses/. 20 | */ 21 | 22 | subprojects { 23 | apply plugin: 'maven-publish' 24 | 25 | group = 'tigase' 26 | version = jaxmppVersion 27 | 28 | publishing { 29 | repositories { 30 | maven { 31 | credentials { 32 | username "tigaseMavenUser" 33 | password "tigaseMavenPassword" 34 | } 35 | url "http://maven-repo.tigase.org/repository/snapshot" 36 | } 37 | } 38 | repositories { 39 | mavenLocal() 40 | } 41 | } 42 | } 43 | 44 | allprojects { 45 | repositories { 46 | mavenLocal() 47 | maven {url "https://maven-repo.tigase.org/repository/release"} 48 | maven {url "https://maven-repo.tigase.org/repository/snapshot"} 49 | jcenter() 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /gradle.properties: -------------------------------------------------------------------------------- 1 | # 2 | # gradle.properties 3 | # 4 | # Tigase XMPP Client Library 5 | # Copyright (C) 2004-2018 "Tigase, Inc." 6 | # 7 | # This program is free software: you can redistribute it and/or modify 8 | # it under the terms of the GNU Affero General Public License as published by 9 | # the Free Software Foundation, either version 3 of the License, 10 | # or (at your option) any later version. 11 | # 12 | # This program is distributed in the hope that it will be useful, 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | # GNU Affero General Public License for more details. 16 | # 17 | # You should have received a copy of the GNU Affero General Public License 18 | # along with this program. Look for COPYING file in the top folder. 19 | # If not, see http://www.gnu.org/licenses/. 20 | # 21 | 22 | jaxmppVersion=3.6.1-SNAPSHOT 23 | defaultSourceCompatibility=1.8 24 | defaultTargetCompatibility=1.8 25 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tigase/jaxmpp/5400516fee3d997ecc5df3186783b0f8fb409794/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | # 2 | # gradle-wrapper.properties 3 | # 4 | # Tigase XMPP Client Library 5 | # Copyright (C) 2004-2018 "Tigase, Inc." 6 | # 7 | # This program is free software: you can redistribute it and/or modify 8 | # it under the terms of the GNU Affero General Public License as published by 9 | # the Free Software Foundation, either version 3 of the License, 10 | # or (at your option) any later version. 11 | # 12 | # This program is distributed in the hope that it will be useful, 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | # GNU Affero General Public License for more details. 16 | # 17 | # You should have received a copy of the GNU Affero General Public License 18 | # along with this program. Look for COPYING file in the top folder. 19 | # If not, see http://www.gnu.org/licenses/. 20 | # 21 | 22 | #Wed Oct 21 11:34:03 PDT 2015 23 | distributionBase=GRADLE_USER_HOME 24 | distributionPath=wrapper/dists 25 | zipStoreBase=GRADLE_USER_HOME 26 | zipStorePath=wrapper/dists 27 | distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-all.zip 28 | -------------------------------------------------------------------------------- /jaxmpp-adhoc/build.gradle: -------------------------------------------------------------------------------- 1 | /* 2 | * build.gradle 3 | * 4 | * Tigase XMPP Client Library 5 | * Copyright (C) 2004-2018 "Tigase, Inc." 6 | * 7 | * This program is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, 10 | * or (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. Look for COPYING file in the top folder. 19 | * If not, see http://www.gnu.org/licenses/. 20 | */ 21 | 22 | apply plugin: 'java' 23 | 24 | sourceCompatibility = defaultSourceCompatibility 25 | targetCompatibility = defaultTargetCompatibility 26 | 27 | publishing { 28 | publications { 29 | mavenJava(MavenPublication) { 30 | from components.java 31 | } 32 | } 33 | } 34 | 35 | dependencies { 36 | testCompile 'junit:junit:4.12' 37 | compile project(':jaxmpp-core') 38 | } -------------------------------------------------------------------------------- /jaxmpp-adhoc/src/main/java/META-INF/MANIFEST.MF: -------------------------------------------------------------------------------- 1 | Manifest-Version: 1.0 2 | Class-Path: 3 | 4 | -------------------------------------------------------------------------------- /jaxmpp-adhoc/src/main/java/tigase/jaxmpp/core/JaxmppAdHoc.gwt.xml: -------------------------------------------------------------------------------- 1 | 2 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /jaxmpp-adhoc/src/main/java/tigase/jaxmpp/core/client/xmpp/modules/adhoc/Action.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Action.java 3 | * 4 | * Tigase XMPP Client Library 5 | * Copyright (C) 2004-2018 "Tigase, Inc." 6 | * 7 | * This program is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, 10 | * or (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. Look for COPYING file in the top folder. 19 | * If not, see http://www.gnu.org/licenses/. 20 | */ 21 | package tigase.jaxmpp.core.client.xmpp.modules.adhoc; 22 | 23 | /** 24 | * Command Actions. 25 | * 26 | * @author bmalkow 27 | */ 28 | public enum Action { 29 | /** 30 | * The command should be canceled. 31 | */ 32 | cancel, 33 | /** 34 | * The command should be completed (if possible). 35 | */ 36 | complete, 37 | /** 38 | * The command should be executed or continue to be executed. This is the 39 | * default value. 40 | */ 41 | execute, 42 | /** 43 | * The command should progress to the next stage of execution. 44 | */ 45 | next, 46 | /** 47 | * The command should be digress to the previous stage of execution. 48 | */ 49 | prev 50 | } -------------------------------------------------------------------------------- /jaxmpp-adhoc/src/main/java/tigase/jaxmpp/core/client/xmpp/modules/adhoc/State.java: -------------------------------------------------------------------------------- 1 | /* 2 | * State.java 3 | * 4 | * Tigase XMPP Client Library 5 | * Copyright (C) 2004-2018 "Tigase, Inc." 6 | * 7 | * This program is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, 10 | * or (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. Look for COPYING file in the top folder. 19 | * If not, see http://www.gnu.org/licenses/. 20 | */ 21 | package tigase.jaxmpp.core.client.xmpp.modules.adhoc; 22 | 23 | /** 24 | * Ad-hoc command execution state. 25 | * 26 | * @author bmalkow 27 | */ 28 | public enum State { 29 | 30 | /** 31 | * The command has been canceled. The command session has ended. 32 | */ 33 | canceled, 34 | 35 | /** 36 | * The command has completed. The command session has ended. 37 | */ 38 | completed, 39 | 40 | /** 41 | * The command is being executed. 42 | */ 43 | executing 44 | } -------------------------------------------------------------------------------- /jaxmpp-adhoc/src/main/java/tigase/jaxmpp/core/client/xmpp/modules/adhoc/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * package-info.java 3 | * 4 | * Tigase XMPP Client Library 5 | * Copyright (C) 2004-2018 "Tigase, Inc." 6 | * 7 | * This program is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, 10 | * or (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. Look for COPYING file in the top folder. 19 | * If not, see http://www.gnu.org/licenses/. 20 | */ 21 | 22 | /** 23 | * Module implements XEP-0050: Ad-Hoc Commands. 24 | */ 25 | package tigase.jaxmpp.core.client.xmpp.modules.adhoc; 26 | 27 | -------------------------------------------------------------------------------- /jaxmpp-android/default.properties: -------------------------------------------------------------------------------- 1 | # 2 | # default.properties 3 | # 4 | # Tigase XMPP Client Library 5 | # Copyright (C) 2004-2018 "Tigase, Inc." 6 | # 7 | # This program is free software: you can redistribute it and/or modify 8 | # it under the terms of the GNU Affero General Public License as published by 9 | # the Free Software Foundation, either version 3 of the License, 10 | # or (at your option) any later version. 11 | # 12 | # This program is distributed in the hope that it will be useful, 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | # GNU Affero General Public License for more details. 16 | # 17 | # You should have received a copy of the GNU Affero General Public License 18 | # along with this program. Look for COPYING file in the top folder. 19 | # If not, see http://www.gnu.org/licenses/. 20 | # 21 | 22 | # File used by Eclipse to determine the target system 23 | # Project target. 24 | target=android-10 -------------------------------------------------------------------------------- /jaxmpp-android/project.properties: -------------------------------------------------------------------------------- 1 | # 2 | # project.properties 3 | # 4 | # Tigase XMPP Client Library 5 | # Copyright (C) 2004-2018 "Tigase, Inc." 6 | # 7 | # This program is free software: you can redistribute it and/or modify 8 | # it under the terms of the GNU Affero General Public License as published by 9 | # the Free Software Foundation, either version 3 of the License, 10 | # or (at your option) any later version. 11 | # 12 | # This program is distributed in the hope that it will be useful, 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | # GNU Affero General Public License for more details. 16 | # 17 | # You should have received a copy of the GNU Affero General Public License 18 | # along with this program. Look for COPYING file in the top folder. 19 | # If not, see http://www.gnu.org/licenses/. 20 | # 21 | 22 | # This file is automatically generated by Android Tools. 23 | # Do not modify this file -- YOUR CHANGES WILL BE ERASED! 24 | # 25 | # This file must be checked in Version Control Systems. 26 | # 27 | # To customize properties used by the Ant build system edit 28 | # "ant.properties", and override values to adapt the script to your 29 | # project structure. 30 | # 31 | # To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home): 32 | #proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt 33 | 34 | android.library=true 35 | # Project target. 36 | target=android-16 37 | -------------------------------------------------------------------------------- /jaxmpp-android/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 22 | 23 | 24 | jaxmpp-android 25 | 26 | -------------------------------------------------------------------------------- /jaxmpp-android/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 22 | 23 | 27 | 28 | 31 | 32 | -------------------------------------------------------------------------------- /jaxmpp-android/src/main/java/tigase/jaxmpp/android/xml/ParcelableElement.aidl: -------------------------------------------------------------------------------- 1 | package tigase.jaxmpp.android.xml; 2 | 3 | parcelable ParcelableElement; -------------------------------------------------------------------------------- /jaxmpp-android/src/test/java/tigase/jaxmpp/android/JaxmppTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * JaxmppTest.java 3 | * 4 | * Tigase XMPP Client Library 5 | * Copyright (C) 2004-2018 "Tigase, Inc." 6 | * 7 | * This program is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, 10 | * or (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. Look for COPYING file in the top folder. 19 | * If not, see http://www.gnu.org/licenses/. 20 | */ 21 | 22 | package tigase.jaxmpp.android; 23 | 24 | import junit.framework.Assert; 25 | import org.junit.Test; 26 | 27 | public class JaxmppTest { 28 | 29 | @Test 30 | public void test() { 31 | try { 32 | Jaxmpp j = new Jaxmpp(); 33 | } catch (Throwable e) { 34 | Assert.fail(e.getMessage()); 35 | } 36 | 37 | } 38 | 39 | } 40 | -------------------------------------------------------------------------------- /jaxmpp-chat/build.gradle: -------------------------------------------------------------------------------- 1 | /* 2 | * build.gradle 3 | * 4 | * Tigase XMPP Client Library 5 | * Copyright (C) 2004-2018 "Tigase, Inc." 6 | * 7 | * This program is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, 10 | * or (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. Look for COPYING file in the top folder. 19 | * If not, see http://www.gnu.org/licenses/. 20 | */ 21 | 22 | apply plugin: 'java' 23 | 24 | sourceCompatibility = defaultSourceCompatibility 25 | targetCompatibility = defaultTargetCompatibility 26 | 27 | publishing { 28 | publications { 29 | mavenJava(MavenPublication) { 30 | from components.java 31 | } 32 | } 33 | } 34 | 35 | dependencies { 36 | testCompile 'junit:junit:4.12' 37 | compile project(':jaxmpp-core') 38 | compile project(':jaxmpp-muc') 39 | } -------------------------------------------------------------------------------- /jaxmpp-chat/src/main/java/META-INF/MANIFEST.MF: -------------------------------------------------------------------------------- 1 | Manifest-Version: 1.0 2 | Class-Path: 3 | 4 | -------------------------------------------------------------------------------- /jaxmpp-chat/src/main/java/tigase/jaxmpp/core/JaxmppChat.gwt.xml: -------------------------------------------------------------------------------- 1 | 2 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /jaxmpp-chat/src/main/java/tigase/jaxmpp/core/client/xmpp/modules/chat/MessageModuleExtension.java: -------------------------------------------------------------------------------- 1 | /* 2 | * MessageModuleExtension.java 3 | * 4 | * Tigase XMPP Client Library 5 | * Copyright (C) 2004-2018 "Tigase, Inc." 6 | * 7 | * This program is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, 10 | * or (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. Look for COPYING file in the top folder. 19 | * If not, see http://www.gnu.org/licenses/. 20 | */ 21 | 22 | package tigase.jaxmpp.core.client.xmpp.modules.chat; 23 | 24 | import tigase.jaxmpp.core.client.exceptions.JaxmppException; 25 | import tigase.jaxmpp.core.client.xmpp.stanzas.Message; 26 | 27 | public interface MessageModuleExtension { 28 | 29 | Message beforeMessageProcess(Message message, Chat chat) throws JaxmppException; 30 | 31 | } 32 | -------------------------------------------------------------------------------- /jaxmpp-chat/src/main/java/tigase/jaxmpp/core/client/xmpp/modules/chat/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * package-info.java 3 | * 4 | * Tigase XMPP Client Library 5 | * Copyright (C) 2004-2018 "Tigase, Inc." 6 | * 7 | * This program is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, 10 | * or (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. Look for COPYING file in the top folder. 19 | * If not, see http://www.gnu.org/licenses/. 20 | */ 21 | 22 | /** 23 | * Support for sending messages and trace converstation. 24 | */ 25 | package tigase.jaxmpp.core.client.xmpp.modules.chat; 26 | 27 | -------------------------------------------------------------------------------- /jaxmpp-core/build.gradle: -------------------------------------------------------------------------------- 1 | /* 2 | * build.gradle 3 | * 4 | * Tigase XMPP Client Library 5 | * Copyright (C) 2004-2018 "Tigase, Inc." 6 | * 7 | * This program is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, 10 | * or (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. Look for COPYING file in the top folder. 19 | * If not, see http://www.gnu.org/licenses/. 20 | */ 21 | 22 | apply plugin: 'java' 23 | 24 | sourceCompatibility = defaultSourceCompatibility 25 | targetCompatibility = defaultTargetCompatibility 26 | 27 | jar { 28 | from('src/main/java') { 29 | include '**/*' 30 | } 31 | } 32 | 33 | publishing { 34 | publications { 35 | mavenJava(MavenPublication) { 36 | from components.java 37 | } 38 | } 39 | } 40 | 41 | dependencies { 42 | testCompile 'junit:junit:4.12' 43 | } -------------------------------------------------------------------------------- /jaxmpp-core/src/main/java/META-INF/MANIFEST.MF: -------------------------------------------------------------------------------- 1 | Manifest-Version: 1.0 2 | Class-Path: 3 | 4 | -------------------------------------------------------------------------------- /jaxmpp-core/src/main/java/tigase/jaxmpp/core/JaxmppCore.gwt.xml: -------------------------------------------------------------------------------- 1 | 2 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /jaxmpp-core/src/main/java/tigase/jaxmpp/core/client/DataHolder.java: -------------------------------------------------------------------------------- 1 | /* 2 | * DataHolder.java 3 | * 4 | * Tigase XMPP Client Library 5 | * Copyright (C) 2004-2018 "Tigase, Inc." 6 | * 7 | * This program is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, 10 | * or (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. Look for COPYING file in the top folder. 19 | * If not, see http://www.gnu.org/licenses/. 20 | */ 21 | package tigase.jaxmpp.core.client; 22 | 23 | import java.util.HashMap; 24 | 25 | /** 26 | * Small class for storing all types of additional data. 27 | */ 28 | public class DataHolder { 29 | 30 | private final HashMap data = new HashMap(); 31 | 32 | @SuppressWarnings("unchecked") 33 | public T getData(String key) { 34 | return (T) this.data.get(key); 35 | } 36 | 37 | @SuppressWarnings("unchecked") 38 | public T removeData(String key) { 39 | return (T) this.data.remove(key); 40 | } 41 | 42 | public void setData(String key, Object value) { 43 | this.data.put(key, value); 44 | } 45 | 46 | } -------------------------------------------------------------------------------- /jaxmpp-core/src/main/java/tigase/jaxmpp/core/client/Hex.java: -------------------------------------------------------------------------------- 1 | package tigase.jaxmpp.core.client; 2 | 3 | public class Hex { 4 | 5 | public static byte[] decode(final String hex) { 6 | int l = hex.length(); 7 | byte[] data = new byte[l / 2]; 8 | for (int i = 0; i < l; i += 2) { 9 | data[i / 2] = (byte) ((Character.digit(hex.charAt(i), 16) << 4) + Character.digit(hex.charAt(i + 1), 16)); 10 | } 11 | return data; 12 | } 13 | 14 | public static String encode(final byte[] buffer, final int offset) { 15 | final StringBuilder sb = new StringBuilder(); 16 | for (int i = offset; i < buffer.length; i++) { 17 | sb.append(Integer.toString((buffer[i] & 0xff) + 0x100, 16).substring(1)); 18 | } 19 | return sb.toString(); 20 | } 21 | 22 | public static String encode(final byte[] buffer) { 23 | return encode(buffer, 0); 24 | } 25 | 26 | public static String format(String hex, final int groupSize) { 27 | StringBuilder sb = new StringBuilder(); 28 | for (int i = 0; i < hex.length(); ) { 29 | int d = i + groupSize; 30 | if (d >= hex.length()) { 31 | d = hex.length(); 32 | } 33 | sb.append(hex.substring(i, d)); 34 | i += groupSize; 35 | if (i < hex.length()) { 36 | sb.append(" "); 37 | } 38 | } 39 | return sb.toString(); 40 | } 41 | 42 | } 43 | -------------------------------------------------------------------------------- /jaxmpp-core/src/main/java/tigase/jaxmpp/core/client/Property.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Property.java 3 | * 4 | * Tigase XMPP Client Library 5 | * Copyright (C) 2004-2018 "Tigase, Inc." 6 | * 7 | * This program is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, 10 | * or (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. Look for COPYING file in the top folder. 19 | * If not, see http://www.gnu.org/licenses/. 20 | */ 21 | package tigase.jaxmpp.core.client; 22 | 23 | /** 24 | * Base interface for classes which may be stored in JaxmppCore as "properties" 25 | * by using methods set and get on JaxmppCore instance. 26 | * 27 | * @author andrzej 28 | */ 29 | public interface Property { 30 | 31 | /** 32 | * Method which returns class which implements this interface which 33 | * may be used as a key to store instance of this class in JaxmppCore. 34 | * 35 | * @return 36 | */ 37 | Class getPropertyClass(); 38 | 39 | } 40 | -------------------------------------------------------------------------------- /jaxmpp-core/src/main/java/tigase/jaxmpp/core/client/UserProperties.java: -------------------------------------------------------------------------------- 1 | /* 2 | * UserProperties.java 3 | * 4 | * Tigase XMPP Client Library 5 | * Copyright (C) 2004-2018 "Tigase, Inc." 6 | * 7 | * This program is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, 10 | * or (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. Look for COPYING file in the top folder. 19 | * If not, see http://www.gnu.org/licenses/. 20 | */ 21 | package tigase.jaxmpp.core.client; 22 | 23 | /** 24 | * Interface to keep user properties. 25 | *

26 | * User properties are not removed on state reset. 27 | * 28 | * @author bmalkow 29 | */ 30 | public interface UserProperties { 31 | 32 | /** 33 | * Get user property. 34 | * 35 | * @param key property name 36 | * 37 | * @return property or null if property isn't set. 38 | */ 39 | T getUserProperty(String key); 40 | 41 | /** 42 | * Set user property. 43 | * 44 | * @param key property name 45 | * @param value property value. null to unset property 46 | * 47 | * @return instance of this {@linkplain UserProperties} 48 | */ 49 | UserProperties setUserProperty(String key, Object value); 50 | 51 | } -------------------------------------------------------------------------------- /jaxmpp-core/src/main/java/tigase/jaxmpp/core/client/connector/BoshRequest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * BoshRequest.java 3 | * 4 | * Tigase XMPP Client Library 5 | * Copyright (C) 2004-2018 "Tigase, Inc." 6 | * 7 | * This program is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, 10 | * or (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. Look for COPYING file in the top folder. 19 | * If not, see http://www.gnu.org/licenses/. 20 | */ 21 | package tigase.jaxmpp.core.client.connector; 22 | 23 | /** 24 | * Interface for implements http BOSh requests. 25 | */ 26 | public interface BoshRequest 27 | extends Runnable { 28 | 29 | /** 30 | * Returns current response ID. 31 | * 32 | * @return response id. 33 | */ 34 | String getRid(); 35 | 36 | /** 37 | * Terminates request. 38 | */ 39 | void terminate(); 40 | } -------------------------------------------------------------------------------- /jaxmpp-core/src/main/java/tigase/jaxmpp/core/client/connector/WebSocketXmppSessionLogic.java: -------------------------------------------------------------------------------- 1 | /* 2 | * WebSocketXmppSessionLogic.java 3 | * 4 | * Tigase XMPP Client Library 5 | * Copyright (C) 2004-2018 "Tigase, Inc." 6 | * 7 | * This program is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, 10 | * or (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. Look for COPYING file in the top folder. 19 | * If not, see http://www.gnu.org/licenses/. 20 | */ 21 | package tigase.jaxmpp.core.client.connector; 22 | 23 | import tigase.jaxmpp.core.client.Context; 24 | import tigase.jaxmpp.core.client.XmppModulesManager; 25 | 26 | public class WebSocketXmppSessionLogic 27 | extends AbstractSocketXmppSessionLogic { 28 | 29 | public WebSocketXmppSessionLogic(AbstractWebSocketConnector connector, XmppModulesManager modulesManager, 30 | Context context) { 31 | super(connector, modulesManager, context); 32 | } 33 | 34 | } -------------------------------------------------------------------------------- /jaxmpp-core/src/main/java/tigase/jaxmpp/core/client/connector/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * package-info.java 3 | * 4 | * Tigase XMPP Client Library 5 | * Copyright (C) 2004-2018 "Tigase, Inc." 6 | * 7 | * This program is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, 10 | * or (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. Look for COPYING file in the top folder. 19 | * If not, see http://www.gnu.org/licenses/. 20 | */ 21 | 22 | /** 23 | * Classes for implementing Connectors. 24 | */ 25 | package tigase.jaxmpp.core.client.connector; 26 | 27 | -------------------------------------------------------------------------------- /jaxmpp-core/src/main/java/tigase/jaxmpp/core/client/criteria/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * package-info.java 3 | * 4 | * Tigase XMPP Client Library 5 | * Copyright (C) 2004-2018 "Tigase, Inc." 6 | * 7 | * This program is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, 10 | * or (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. Look for COPYING file in the top folder. 19 | * If not, see http://www.gnu.org/licenses/. 20 | */ 21 | 22 | /** 23 | * Support for selecting modules to process incoming messages. 24 | */ 25 | package tigase.jaxmpp.core.client.criteria; 26 | 27 | -------------------------------------------------------------------------------- /jaxmpp-core/src/main/java/tigase/jaxmpp/core/client/criteria/tpath/Function.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Function.java 3 | * 4 | * Tigase XMPP Client Library 5 | * Copyright (C) 2004-2018 "Tigase, Inc." 6 | * 7 | * This program is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, 10 | * or (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. Look for COPYING file in the top folder. 19 | * If not, see http://www.gnu.org/licenses/. 20 | */ 21 | package tigase.jaxmpp.core.client.criteria.tpath; 22 | 23 | import tigase.jaxmpp.core.client.xml.Element; 24 | import tigase.jaxmpp.core.client.xml.XMLException; 25 | 26 | public interface Function { 27 | 28 | Object value(Element element) throws XMLException; 29 | 30 | class Attr 31 | implements Function { 32 | 33 | private final String attName; 34 | 35 | public Attr(String attName) { 36 | this.attName = attName; 37 | } 38 | 39 | @Override 40 | public Object value(Element element) throws XMLException { 41 | return element.getAttribute(attName); 42 | } 43 | 44 | } 45 | 46 | final class Value 47 | implements Function { 48 | 49 | @Override 50 | public Object value(Element element) throws XMLException { 51 | return element.getValue(); 52 | } 53 | } 54 | 55 | } -------------------------------------------------------------------------------- /jaxmpp-core/src/main/java/tigase/jaxmpp/core/client/eventbus/Event.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Event.java 3 | * 4 | * Tigase XMPP Client Library 5 | * Copyright (C) 2004-2018 "Tigase, Inc." 6 | * 7 | * This program is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, 10 | * or (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. Look for COPYING file in the top folder. 19 | * If not, see http://www.gnu.org/licenses/. 20 | */ 21 | package tigase.jaxmpp.core.client.eventbus; 22 | 23 | /** 24 | * Base event object. 25 | * 26 | * @param handler type. 27 | */ 28 | public abstract class Event { 29 | 30 | private Object source; 31 | 32 | protected Event() { 33 | super(); 34 | } 35 | 36 | /** 37 | * Invokes handlers method. 38 | * 39 | * @param handler handler 40 | */ 41 | public abstract void dispatch(H handler) throws Exception; 42 | 43 | /** 44 | * Returns events source. 45 | * 46 | * @return events source. May be null. 47 | */ 48 | public Object getSource() { 49 | return source; 50 | } 51 | 52 | /** 53 | * Sets source. 54 | * 55 | * @param source event source. 56 | */ 57 | void setSource(Object source) { 58 | this.source = source; 59 | } 60 | 61 | } 62 | -------------------------------------------------------------------------------- /jaxmpp-core/src/main/java/tigase/jaxmpp/core/client/eventbus/EventHandler.java: -------------------------------------------------------------------------------- 1 | /* 2 | * EventHandler.java 3 | * 4 | * Tigase XMPP Client Library 5 | * Copyright (C) 2004-2018 "Tigase, Inc." 6 | * 7 | * This program is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, 10 | * or (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. Look for COPYING file in the top folder. 19 | * If not, see http://www.gnu.org/licenses/. 20 | */ 21 | package tigase.jaxmpp.core.client.eventbus; 22 | 23 | /** 24 | * Interface for event handfler. 25 | */ 26 | public interface EventHandler { 27 | 28 | } 29 | -------------------------------------------------------------------------------- /jaxmpp-core/src/main/java/tigase/jaxmpp/core/client/eventbus/EventListener.java: -------------------------------------------------------------------------------- 1 | /* 2 | * EventListener.java 3 | * 4 | * Tigase XMPP Client Library 5 | * Copyright (C) 2004-2018 "Tigase, Inc." 6 | * 7 | * This program is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, 10 | * or (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. Look for COPYING file in the top folder. 19 | * If not, see http://www.gnu.org/licenses/. 20 | */ 21 | package tigase.jaxmpp.core.client.eventbus; 22 | 23 | /** 24 | * Interface for listeners.
25 | * Listener is special viariant of handler. Instead of invoking method 26 | * {@linkplain Event#dispatch(EventHandler) dispatch()}, 27 | * {@linkplain EventListener#onEvent(Event) onEvent()} will be invoked. 28 | */ 29 | public interface EventListener 30 | extends EventHandler { 31 | 32 | /** 33 | * Method called when event is fired. 34 | * 35 | * @param event fired event. 36 | */ 37 | void onEvent(Event event); 38 | 39 | } 40 | -------------------------------------------------------------------------------- /jaxmpp-core/src/main/java/tigase/jaxmpp/core/client/eventbus/JaxmppEvent.java: -------------------------------------------------------------------------------- 1 | /* 2 | * JaxmppEvent.java 3 | * 4 | * Tigase XMPP Client Library 5 | * Copyright (C) 2004-2018 "Tigase, Inc." 6 | * 7 | * This program is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, 10 | * or (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. Look for COPYING file in the top folder. 19 | * If not, see http://www.gnu.org/licenses/. 20 | */ 21 | package tigase.jaxmpp.core.client.eventbus; 22 | 23 | import tigase.jaxmpp.core.client.SessionObject; 24 | 25 | /** 26 | * Event object used by JaXMPP Library. 27 | * 28 | * @param type of handler. 29 | */ 30 | public abstract class JaxmppEvent 31 | extends Event { 32 | 33 | protected final SessionObject sessionObject; 34 | 35 | /** 36 | * Constructs event object. 37 | * 38 | * @param sessionObject session object. 39 | */ 40 | protected JaxmppEvent(SessionObject sessionObject) { 41 | this.sessionObject = sessionObject; 42 | } 43 | 44 | /** 45 | * Return {@link SessionObject session object}. 46 | * 47 | * @return session object. 48 | */ 49 | public SessionObject getSessionObject() { 50 | return sessionObject; 51 | } 52 | 53 | } 54 | -------------------------------------------------------------------------------- /jaxmpp-core/src/main/java/tigase/jaxmpp/core/client/eventbus/JaxmppEventWithCallback.java: -------------------------------------------------------------------------------- 1 | /* 2 | * JaxmppEventWithCallback.java 3 | * 4 | * Tigase XMPP Client Library 5 | * Copyright (C) 2004-2018 "Tigase, Inc." 6 | * 7 | * This program is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, 10 | * or (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. Look for COPYING file in the top folder. 19 | * If not, see http://www.gnu.org/licenses/. 20 | */ 21 | package tigase.jaxmpp.core.client.eventbus; 22 | 23 | import tigase.jaxmpp.core.client.SessionObject; 24 | 25 | /** 26 | * Created by andrzej on 02.11.2016. 27 | */ 28 | public abstract class JaxmppEventWithCallback 29 | extends JaxmppEvent { 30 | 31 | private final RunAfter runAfter; 32 | 33 | protected JaxmppEventWithCallback(SessionObject sessionObject, 34 | RunAfter runAfter) { 35 | super(sessionObject); 36 | this.runAfter = (RunAfter) runAfter; 37 | } 38 | 39 | public RunAfter getRunAfter() { 40 | return runAfter; 41 | } 42 | 43 | public interface RunAfter { 44 | 45 | void after(E event); 46 | 47 | } 48 | 49 | } 50 | -------------------------------------------------------------------------------- /jaxmpp-core/src/main/java/tigase/jaxmpp/core/client/eventbus/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * package-info.java 3 | * 4 | * Tigase XMPP Client Library 5 | * Copyright (C) 2004-2018 "Tigase, Inc." 6 | * 7 | * This program is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, 10 | * or (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. Look for COPYING file in the top folder. 19 | * If not, see http://www.gnu.org/licenses/. 20 | */ 21 | 22 | /** 23 | * EventBus is mechanism to dispatch events fired by few modules to all listeners. 24 | */ 25 | package tigase.jaxmpp.core.client.eventbus; 26 | 27 | -------------------------------------------------------------------------------- /jaxmpp-core/src/main/java/tigase/jaxmpp/core/client/exceptions/JaxmppException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * JaxmppException.java 3 | * 4 | * Tigase XMPP Client Library 5 | * Copyright (C) 2004-2018 "Tigase, Inc." 6 | * 7 | * This program is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, 10 | * or (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. Look for COPYING file in the top folder. 19 | * If not, see http://www.gnu.org/licenses/. 20 | */ 21 | package tigase.jaxmpp.core.client.exceptions; 22 | 23 | /** 24 | * Base Exception class in library. 25 | * 26 | * @author bmalkow 27 | */ 28 | public class JaxmppException 29 | extends Exception { 30 | 31 | private static final long serialVersionUID = 1L; 32 | 33 | public JaxmppException() { 34 | super(); 35 | } 36 | 37 | public JaxmppException(String message) { 38 | super(message); 39 | } 40 | 41 | public JaxmppException(String message, Throwable cause) { 42 | super(message, cause); 43 | } 44 | 45 | public JaxmppException(Throwable cause) { 46 | super(cause); 47 | } 48 | 49 | } -------------------------------------------------------------------------------- /jaxmpp-core/src/main/java/tigase/jaxmpp/core/client/exceptions/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * package-info.java 3 | * 4 | * Tigase XMPP Client Library 5 | * Copyright (C) 2004-2018 "Tigase, Inc." 6 | * 7 | * This program is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, 10 | * or (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. Look for COPYING file in the top folder. 19 | * If not, see http://www.gnu.org/licenses/. 20 | */ 21 | 22 | /** 23 | * General exception for JAXMPP. 24 | */ 25 | package tigase.jaxmpp.core.client.exceptions; 26 | 27 | -------------------------------------------------------------------------------- /jaxmpp-core/src/main/java/tigase/jaxmpp/core/client/factory/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * package-info.java 3 | * 4 | * Tigase XMPP Client Library 5 | * Copyright (C) 2004-2018 "Tigase, Inc." 6 | * 7 | * This program is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, 10 | * or (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. Look for COPYING file in the top folder. 19 | * If not, see http://www.gnu.org/licenses/. 20 | */ 21 | 22 | /** 23 | * Universal factory. Support for create instances of util classes. 24 | */ 25 | package tigase.jaxmpp.core.client.factory; 26 | 27 | -------------------------------------------------------------------------------- /jaxmpp-core/src/main/java/tigase/jaxmpp/core/client/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * package-info.java 3 | * 4 | * Tigase XMPP Client Library 5 | * Copyright (C) 2004-2018 "Tigase, Inc." 6 | * 7 | * This program is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, 10 | * or (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. Look for COPYING file in the top folder. 19 | * If not, see http://www.gnu.org/licenses/. 20 | */ 21 | 22 | /** 23 | * Core of JAXMPP library. 24 | */ 25 | package tigase.jaxmpp.core.client; 26 | 27 | -------------------------------------------------------------------------------- /jaxmpp-core/src/main/java/tigase/jaxmpp/core/client/xml/ElementFactory.java: -------------------------------------------------------------------------------- 1 | /* 2 | * ElementFactory.java 3 | * 4 | * Tigase XMPP Client Library 5 | * Copyright (C) 2004-2018 "Tigase, Inc." 6 | * 7 | * This program is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, 10 | * or (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. Look for COPYING file in the top folder. 19 | * If not, see http://www.gnu.org/licenses/. 20 | */ 21 | 22 | package tigase.jaxmpp.core.client.xml; 23 | 24 | public class ElementFactory { 25 | 26 | public static Element create(final Element src) throws XMLException { 27 | return DefaultElement.create(src, -1); 28 | } 29 | 30 | public static Element create(final String name) throws XMLException { 31 | return new DefaultElement(name); 32 | } 33 | 34 | public static Element create(String name, String value, String xmlns) throws XMLException { 35 | return new DefaultElement(name, value, xmlns); 36 | } 37 | 38 | private ElementFactory() { 39 | } 40 | 41 | } 42 | -------------------------------------------------------------------------------- /jaxmpp-core/src/main/java/tigase/jaxmpp/core/client/xml/XmlTools.java: -------------------------------------------------------------------------------- 1 | /* 2 | * XmlTools.java 3 | * 4 | * Tigase XMPP Client Library 5 | * Copyright (C) 2004-2018 "Tigase, Inc." 6 | * 7 | * This program is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, 10 | * or (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. Look for COPYING file in the top folder. 19 | * If not, see http://www.gnu.org/licenses/. 20 | */ 21 | package tigase.jaxmpp.core.client.xml; 22 | 23 | public class XmlTools { 24 | 25 | public static Element makeResult(final Element element) throws XMLException { 26 | String t = element.getAttribute("to"); 27 | String f = element.getAttribute("from"); 28 | Element result = DefaultElement.create(element, 0); 29 | result.removeAttribute("from"); 30 | result.removeAttribute("to"); 31 | 32 | result.setAttribute("type", "result"); 33 | 34 | if (f != null) { 35 | result.setAttribute("to", f); 36 | } 37 | if (t != null) { 38 | result.setAttribute("from", t); 39 | } 40 | 41 | return result; 42 | } 43 | 44 | } -------------------------------------------------------------------------------- /jaxmpp-core/src/main/java/tigase/jaxmpp/core/client/xml/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * package-info.java 3 | * 4 | * Tigase XMPP Client Library 5 | * Copyright (C) 2004-2018 "Tigase, Inc." 6 | * 7 | * This program is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, 10 | * or (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. Look for COPYING file in the top folder. 19 | * If not, see http://www.gnu.org/licenses/. 20 | */ 21 | 22 | /** 23 | * Implementation of XML DOM. 24 | */ 25 | package tigase.jaxmpp.core.client.xml; 26 | 27 | -------------------------------------------------------------------------------- /jaxmpp-core/src/main/java/tigase/jaxmpp/core/client/xmpp/DefaultXMPPStream.java: -------------------------------------------------------------------------------- 1 | /* 2 | * DefaultXMPPStream.java 3 | * 4 | * Tigase XMPP Client Library 5 | * Copyright (C) 2004-2018 "Tigase, Inc." 6 | * 7 | * This program is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, 10 | * or (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. Look for COPYING file in the top folder. 19 | * If not, see http://www.gnu.org/licenses/. 20 | */ 21 | 22 | package tigase.jaxmpp.core.client.xmpp; 23 | 24 | import tigase.jaxmpp.core.client.xml.Element; 25 | import tigase.jaxmpp.core.client.xmpp.stream.XMPPStream; 26 | 27 | public abstract class DefaultXMPPStream 28 | implements XMPPStream { 29 | 30 | private Element features; 31 | 32 | @Override 33 | public Element getFeatures() { 34 | return features; 35 | } 36 | 37 | @Override 38 | public void setFeatures(Element features) { 39 | this.features = features; 40 | } 41 | 42 | @Override 43 | public String toString() { 44 | return "DefaultXMPPStream"; 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /jaxmpp-core/src/main/java/tigase/jaxmpp/core/client/xmpp/forms/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * package-info.java 3 | * 4 | * Tigase XMPP Client Library 5 | * Copyright (C) 2004-2018 "Tigase, Inc." 6 | * 7 | * This program is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, 10 | * or (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. Look for COPYING file in the top folder. 19 | * If not, see http://www.gnu.org/licenses/. 20 | */ 21 | 22 | /** 23 | * Support for Data Form. 24 | */ 25 | package tigase.jaxmpp.core.client.xmpp.forms; 26 | 27 | -------------------------------------------------------------------------------- /jaxmpp-core/src/main/java/tigase/jaxmpp/core/client/xmpp/modules/ContextAware.java: -------------------------------------------------------------------------------- 1 | /* 2 | * ContextAware.java 3 | * 4 | * Tigase XMPP Client Library 5 | * Copyright (C) 2004-2018 "Tigase, Inc." 6 | * 7 | * This program is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, 10 | * or (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. Look for COPYING file in the top folder. 19 | * If not, see http://www.gnu.org/licenses/. 20 | */ 21 | 22 | package tigase.jaxmpp.core.client.xmpp.modules; 23 | 24 | import tigase.jaxmpp.core.client.Context; 25 | 26 | public interface ContextAware { 27 | 28 | void setContext(Context context); 29 | 30 | } 31 | -------------------------------------------------------------------------------- /jaxmpp-core/src/main/java/tigase/jaxmpp/core/client/xmpp/modules/EventBusAware.java: -------------------------------------------------------------------------------- 1 | /* 2 | * EventBusAware.java 3 | * 4 | * Tigase XMPP Client Library 5 | * Copyright (C) 2004-2018 "Tigase, Inc." 6 | * 7 | * This program is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, 10 | * or (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. Look for COPYING file in the top folder. 19 | * If not, see http://www.gnu.org/licenses/. 20 | */ 21 | 22 | package tigase.jaxmpp.core.client.xmpp.modules; 23 | 24 | import tigase.jaxmpp.core.client.eventbus.EventBus; 25 | 26 | public interface EventBusAware { 27 | 28 | void setEventBus(EventBus context); 29 | 30 | } 31 | -------------------------------------------------------------------------------- /jaxmpp-core/src/main/java/tigase/jaxmpp/core/client/xmpp/modules/InitializingModule.java: -------------------------------------------------------------------------------- 1 | /* 2 | * InitializingModule.java 3 | * 4 | * Tigase XMPP Client Library 5 | * Copyright (C) 2004-2018 "Tigase, Inc." 6 | * 7 | * This program is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, 10 | * or (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. Look for COPYING file in the top folder. 19 | * If not, see http://www.gnu.org/licenses/. 20 | */ 21 | 22 | package tigase.jaxmpp.core.client.xmpp.modules; 23 | 24 | import tigase.jaxmpp.core.client.XmppModulesManager; 25 | 26 | /** 27 | * Interface should be implemented by module that need to be informed about its 28 | * state in {@linkplain XmppModulesManager}. 29 | */ 30 | public interface InitializingModule { 31 | 32 | /** 33 | * Called when module is registered. At this moment module is formally 34 | * registered and it is part of client. 35 | */ 36 | void afterRegister(); 37 | 38 | /** 39 | * Called just before registration module in {@linkplain XmppModulesManager} 40 | * . It is good place to check if module is initialized properly. 41 | */ 42 | void beforeRegister(); 43 | 44 | /** 45 | * Called when module is unregistered. 46 | */ 47 | void beforeUnregister(); 48 | 49 | } 50 | -------------------------------------------------------------------------------- /jaxmpp-core/src/main/java/tigase/jaxmpp/core/client/xmpp/modules/ModuleProvider.java: -------------------------------------------------------------------------------- 1 | /* 2 | * ModuleProvider.java 3 | * 4 | * Tigase XMPP Client Library 5 | * Copyright (C) 2004-2018 "Tigase, Inc." 6 | * 7 | * This program is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, 10 | * or (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. Look for COPYING file in the top folder. 19 | * If not, see http://www.gnu.org/licenses/. 20 | */ 21 | package tigase.jaxmpp.core.client.xmpp.modules; 22 | 23 | import tigase.jaxmpp.core.client.XmppModule; 24 | 25 | import java.util.Set; 26 | 27 | /** 28 | * @author andrzej 29 | */ 30 | public interface ModuleProvider { 31 | 32 | public Set getAvailableFeatures(); 33 | 34 | /** 35 | * Return module implementation by module class. 36 | * 37 | * @param moduleClass module class 38 | * 39 | * @return module implementation 40 | */ 41 | @SuppressWarnings("unchecked") 42 | public T getModule(Class moduleClass); 43 | 44 | } 45 | -------------------------------------------------------------------------------- /jaxmpp-core/src/main/java/tigase/jaxmpp/core/client/xmpp/modules/PacketWriterAware.java: -------------------------------------------------------------------------------- 1 | /* 2 | * PacketWriterAware.java 3 | * 4 | * Tigase XMPP Client Library 5 | * Copyright (C) 2004-2018 "Tigase, Inc." 6 | * 7 | * This program is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, 10 | * or (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. Look for COPYING file in the top folder. 19 | * If not, see http://www.gnu.org/licenses/. 20 | */ 21 | 22 | package tigase.jaxmpp.core.client.xmpp.modules; 23 | 24 | import tigase.jaxmpp.core.client.PacketWriter; 25 | 26 | /** 27 | * Interface should be implemented by module if {@linkplain PacketWriter} should 28 | * be injected to this module. 29 | */ 30 | public interface PacketWriterAware { 31 | 32 | /** 33 | * Set {@linkplain PacketWriter}. 34 | * 35 | * @param packetWriter {@linkplain PacketWriter} 36 | */ 37 | void setPacketWriter(PacketWriter packetWriter); 38 | 39 | } 40 | -------------------------------------------------------------------------------- /jaxmpp-core/src/main/java/tigase/jaxmpp/core/client/xmpp/modules/auth/ClientSaslException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * ClientSaslException.java 3 | * 4 | * Tigase XMPP Client Library 5 | * Copyright (C) 2004-2018 "Tigase, Inc." 6 | * 7 | * This program is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, 10 | * or (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. Look for COPYING file in the top folder. 19 | * If not, see http://www.gnu.org/licenses/. 20 | */ 21 | 22 | package tigase.jaxmpp.core.client.xmpp.modules.auth; 23 | 24 | import tigase.jaxmpp.core.client.exceptions.JaxmppException; 25 | 26 | public class ClientSaslException 27 | extends JaxmppException { 28 | 29 | private static final long serialVersionUID = 1L; 30 | 31 | public ClientSaslException() { 32 | super(); 33 | } 34 | 35 | public ClientSaslException(String message, Throwable cause) { 36 | super(message, cause); 37 | } 38 | 39 | public ClientSaslException(String message) { 40 | super(message); 41 | } 42 | 43 | public ClientSaslException(Throwable cause) { 44 | super(cause); 45 | } 46 | 47 | } 48 | -------------------------------------------------------------------------------- /jaxmpp-core/src/main/java/tigase/jaxmpp/core/client/xmpp/modules/auth/CredentialsCallback.java: -------------------------------------------------------------------------------- 1 | /* 2 | * CredentialsCallback.java 3 | * 4 | * Tigase XMPP Client Library 5 | * Copyright (C) 2004-2018 "Tigase, Inc." 6 | * 7 | * This program is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, 10 | * or (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. Look for COPYING file in the top folder. 19 | * If not, see http://www.gnu.org/licenses/. 20 | */ 21 | package tigase.jaxmpp.core.client.xmpp.modules.auth; 22 | 23 | import tigase.jaxmpp.core.client.SessionObject; 24 | 25 | /** 26 | * With this callback user password may be not stored in 27 | * {@linkplain SessionObject} but may be calculated my class. 28 | *

29 | * Callback must be stored in {@linkplain SessionObject} with key 30 | * {@linkplain AuthModule#CREDENTIALS_CALLBACK}. 31 | *

32 | */ 33 | public interface CredentialsCallback { 34 | 35 | String getCredential(); 36 | 37 | } -------------------------------------------------------------------------------- /jaxmpp-core/src/main/java/tigase/jaxmpp/core/client/xmpp/modules/auth/XOAuth2TokenCallback.java: -------------------------------------------------------------------------------- 1 | /* 2 | * XOAuth2TokenCallback.java 3 | * 4 | * Tigase XMPP Client Library 5 | * Copyright (C) 2004-2018 "Tigase, Inc." 6 | * 7 | * This program is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, 10 | * or (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. Look for COPYING file in the top folder. 19 | * If not, see http://www.gnu.org/licenses/. 20 | */ 21 | package tigase.jaxmpp.core.client.xmpp.modules.auth; 22 | 23 | import tigase.jaxmpp.core.client.SessionObject; 24 | 25 | /** 26 | * With this callback user password may be not stored in 27 | * {@linkplain SessionObject} but may be calculated my class. 28 | *

29 | * Callback must be stored in {@linkplain SessionObject} with key 30 | * {@linkplain AuthModule#CREDENTIALS_CALLBACK}. 31 | *

32 | */ 33 | public interface XOAuth2TokenCallback { 34 | 35 | String getCredential(); 36 | 37 | } -------------------------------------------------------------------------------- /jaxmpp-core/src/main/java/tigase/jaxmpp/core/client/xmpp/modules/auth/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * package-info.java 3 | * 4 | * Tigase XMPP Client Library 5 | * Copyright (C) 2004-2018 "Tigase, Inc." 6 | * 7 | * This program is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, 10 | * or (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. Look for COPYING file in the top folder. 19 | * If not, see http://www.gnu.org/licenses/. 20 | */ 21 | 22 | /** 23 | * Support for SASL and non-SASL authentication . 24 | */ 25 | package tigase.jaxmpp.core.client.xmpp.modules.auth; 26 | 27 | -------------------------------------------------------------------------------- /jaxmpp-core/src/main/java/tigase/jaxmpp/core/client/xmpp/modules/auth/saslmechanisms/AbstractSaslMechanism.java: -------------------------------------------------------------------------------- 1 | /* 2 | * AbstractSaslMechanism.java 3 | * 4 | * Tigase XMPP Client Library 5 | * Copyright (C) 2004-2018 "Tigase, Inc." 6 | * 7 | * This program is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, 10 | * or (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. Look for COPYING file in the top folder. 19 | * If not, see http://www.gnu.org/licenses/. 20 | */ 21 | 22 | package tigase.jaxmpp.core.client.xmpp.modules.auth.saslmechanisms; 23 | 24 | import tigase.jaxmpp.core.client.SessionObject; 25 | import tigase.jaxmpp.core.client.SessionObject.Scope; 26 | import tigase.jaxmpp.core.client.xmpp.modules.auth.SaslMechanism; 27 | 28 | public abstract class AbstractSaslMechanism 29 | implements SaslMechanism { 30 | 31 | public static final String SASL_COMPLETE_KEY = "SASL_COMPLETE_KEY"; 32 | 33 | @Override 34 | public boolean isComplete(SessionObject sessionObject) { 35 | Boolean b = sessionObject.getProperty(SASL_COMPLETE_KEY); 36 | return b == null ? false : b; 37 | } 38 | 39 | protected void setComplete(SessionObject sessionObject, boolean complete) { 40 | sessionObject.setProperty(Scope.stream, SASL_COMPLETE_KEY, complete); 41 | } 42 | 43 | } 44 | -------------------------------------------------------------------------------- /jaxmpp-core/src/main/java/tigase/jaxmpp/core/client/xmpp/modules/auth/saslmechanisms/AnonymousMechanism.java: -------------------------------------------------------------------------------- 1 | /* 2 | * AnonymousMechanism.java 3 | * 4 | * Tigase XMPP Client Library 5 | * Copyright (C) 2004-2018 "Tigase, Inc." 6 | * 7 | * This program is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, 10 | * or (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. Look for COPYING file in the top folder. 19 | * If not, see http://www.gnu.org/licenses/. 20 | */ 21 | package tigase.jaxmpp.core.client.xmpp.modules.auth.saslmechanisms; 22 | 23 | import tigase.jaxmpp.core.client.SessionObject; 24 | 25 | public class AnonymousMechanism 26 | extends AbstractSaslMechanism { 27 | 28 | public AnonymousMechanism() { 29 | } 30 | 31 | @Override 32 | public String evaluateChallenge(String input, SessionObject sessionObjec) { 33 | setComplete(sessionObjec, true); 34 | return null; 35 | } 36 | 37 | @Override 38 | public boolean isAllowedToUse(SessionObject sessionObject) { 39 | return true; 40 | } 41 | 42 | @Override 43 | public String name() { 44 | return "ANONYMOUS"; 45 | } 46 | 47 | } -------------------------------------------------------------------------------- /jaxmpp-core/src/main/java/tigase/jaxmpp/core/client/xmpp/modules/connection/ConnectionEndpoint.java: -------------------------------------------------------------------------------- 1 | /* 2 | * ConnectionEndpoint.java 3 | * 4 | * Tigase XMPP Client Library 5 | * Copyright (C) 2004-2018 "Tigase, Inc." 6 | * 7 | * This program is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, 10 | * or (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. Look for COPYING file in the top folder. 19 | * If not, see http://www.gnu.org/licenses/. 20 | */ 21 | 22 | /* 23 | * To change this template, choose Tools | Templates 24 | * and open the template in the editor. 25 | */ 26 | package tigase.jaxmpp.core.client.xmpp.modules.connection; 27 | 28 | import tigase.jaxmpp.core.client.JID; 29 | import tigase.jaxmpp.core.client.exceptions.JaxmppException; 30 | 31 | /** 32 | * @author andrzej 33 | */ 34 | public interface ConnectionEndpoint { 35 | 36 | String getHost() throws JaxmppException; 37 | 38 | JID getJid() throws JaxmppException; 39 | 40 | Integer getPort() throws JaxmppException; 41 | 42 | } 43 | -------------------------------------------------------------------------------- /jaxmpp-core/src/main/java/tigase/jaxmpp/core/client/xmpp/modules/disco/NodeDetailsCallback.java: -------------------------------------------------------------------------------- 1 | /* 2 | * NodeDetailsCallback.java 3 | * 4 | * Tigase XMPP Client Library 5 | * Copyright (C) 2004-2018 "Tigase, Inc." 6 | * 7 | * This program is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, 10 | * or (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. Look for COPYING file in the top folder. 19 | * If not, see http://www.gnu.org/licenses/. 20 | */ 21 | 22 | package tigase.jaxmpp.core.client.xmpp.modules.disco; 23 | 24 | import tigase.jaxmpp.core.client.SessionObject; 25 | import tigase.jaxmpp.core.client.exceptions.JaxmppException; 26 | import tigase.jaxmpp.core.client.xmpp.modules.disco.DiscoveryModule.Identity; 27 | import tigase.jaxmpp.core.client.xmpp.modules.disco.DiscoveryModule.Item; 28 | import tigase.jaxmpp.core.client.xmpp.stanzas.IQ; 29 | 30 | public interface NodeDetailsCallback { 31 | 32 | String[] getFeatures(SessionObject sessionObject, IQ requestStanza, String node) throws JaxmppException; 33 | 34 | Identity getIdentity(SessionObject sessionObject, IQ requestStanza, String node) throws JaxmppException; 35 | 36 | Item[] getItems(SessionObject sessionObject, IQ requestStanza, String node) throws JaxmppException; 37 | 38 | } 39 | -------------------------------------------------------------------------------- /jaxmpp-core/src/main/java/tigase/jaxmpp/core/client/xmpp/modules/disco/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * package-info.java 3 | * 4 | * Tigase XMPP Client Library 5 | * Copyright (C) 2004-2018 "Tigase, Inc." 6 | * 7 | * This program is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, 10 | * or (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. Look for COPYING file in the top folder. 19 | * If not, see http://www.gnu.org/licenses/. 20 | */ 21 | 22 | /** 23 | * Support for XEP-0030: Service Discovery. 24 | */ 25 | package tigase.jaxmpp.core.client.xmpp.modules.disco; 26 | 27 | -------------------------------------------------------------------------------- /jaxmpp-core/src/main/java/tigase/jaxmpp/core/client/xmpp/modules/extensions/ExtendableModule.java: -------------------------------------------------------------------------------- 1 | /* 2 | * ExtendableModule.java 3 | * 4 | * Tigase XMPP Client Library 5 | * Copyright (C) 2004-2018 "Tigase, Inc." 6 | * 7 | * This program is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, 10 | * or (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. Look for COPYING file in the top folder. 19 | * If not, see http://www.gnu.org/licenses/. 20 | */ 21 | 22 | package tigase.jaxmpp.core.client.xmpp.modules.extensions; 23 | 24 | public interface ExtendableModule { 25 | 26 | void addExtension(Extension f); 27 | 28 | ExtensionsChain getExtensionChain(); 29 | 30 | void removeExtension(Extension f); 31 | 32 | } 33 | -------------------------------------------------------------------------------- /jaxmpp-core/src/main/java/tigase/jaxmpp/core/client/xmpp/modules/extensions/Extension.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Extension.java 3 | * 4 | * Tigase XMPP Client Library 5 | * Copyright (C) 2004-2018 "Tigase, Inc." 6 | * 7 | * This program is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, 10 | * or (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. Look for COPYING file in the top folder. 19 | * If not, see http://www.gnu.org/licenses/. 20 | */ 21 | 22 | package tigase.jaxmpp.core.client.xmpp.modules.extensions; 23 | 24 | import tigase.jaxmpp.core.client.exceptions.JaxmppException; 25 | import tigase.jaxmpp.core.client.xml.Element; 26 | 27 | public interface Extension { 28 | 29 | Element afterReceive(Element received) throws JaxmppException; 30 | 31 | Element beforeSend(Element received) throws JaxmppException; 32 | 33 | String[] getFeatures(); 34 | 35 | } 36 | -------------------------------------------------------------------------------- /jaxmpp-core/src/main/java/tigase/jaxmpp/core/client/xmpp/modules/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * package-info.java 3 | * 4 | * Tigase XMPP Client Library 5 | * Copyright (C) 2004-2018 "Tigase, Inc." 6 | * 7 | * This program is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, 10 | * or (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. Look for COPYING file in the top folder. 19 | * If not, see http://www.gnu.org/licenses/. 20 | */ 21 | 22 | /** 23 | * Support for XMPP Modules. Module is class mandated to process incoming XMPP Stanza. Modules also implements methods 24 | * to execute some actions (for example retrieving VCards). 25 | */ 26 | package tigase.jaxmpp.core.client.xmpp.modules; 27 | 28 | -------------------------------------------------------------------------------- /jaxmpp-core/src/main/java/tigase/jaxmpp/core/client/xmpp/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * package-info.java 3 | * 4 | * Tigase XMPP Client Library 5 | * Copyright (C) 2004-2018 "Tigase, Inc." 6 | * 7 | * This program is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, 10 | * or (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. Look for COPYING file in the top folder. 19 | * If not, see http://www.gnu.org/licenses/. 20 | */ 21 | 22 | /** 23 | * Support for XMPP. 24 | */ 25 | package tigase.jaxmpp.core.client.xmpp; 26 | 27 | -------------------------------------------------------------------------------- /jaxmpp-core/src/main/java/tigase/jaxmpp/core/client/xmpp/stanzas/StanzaType.java: -------------------------------------------------------------------------------- 1 | /* 2 | * StanzaType.java 3 | * 4 | * Tigase XMPP Client Library 5 | * Copyright (C) 2004-2018 "Tigase, Inc." 6 | * 7 | * This program is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, 10 | * or (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. Look for COPYING file in the top folder. 19 | * If not, see http://www.gnu.org/licenses/. 20 | */ 21 | package tigase.jaxmpp.core.client.xmpp.stanzas; 22 | 23 | public enum StanzaType { 24 | chat, 25 | /** 26 | * The stanza reports an error that has occurred regarding processing or 27 | * delivery of a get or set request. 28 | */ 29 | error, 30 | /** 31 | * The stanza requests information, inquires about what data is needed in 32 | * order to complete further operations, etc. 33 | */ 34 | get, 35 | groupchat, 36 | headline, 37 | normal, 38 | probe, 39 | /** 40 | * The stanza is a response to a successful get or set request. 41 | */ 42 | result, 43 | /** 44 | * The stanza provides data that is needed for an operation to be completed, 45 | * sets new values, replaces existing values, etc. 46 | */ 47 | set, 48 | subscribe, 49 | subscribed, 50 | unavailable, 51 | unsubscribe, 52 | unsubscribed, 53 | } -------------------------------------------------------------------------------- /jaxmpp-core/src/main/java/tigase/jaxmpp/core/client/xmpp/stanzas/StreamPacket.java: -------------------------------------------------------------------------------- 1 | /* 2 | * StreamPacket.java 3 | * 4 | * Tigase XMPP Client Library 5 | * Copyright (C) 2004-2018 "Tigase, Inc." 6 | * 7 | * This program is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, 10 | * or (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. Look for COPYING file in the top folder. 19 | * If not, see http://www.gnu.org/licenses/. 20 | */ 21 | 22 | package tigase.jaxmpp.core.client.xmpp.stanzas; 23 | 24 | import tigase.jaxmpp.core.client.xml.Element; 25 | import tigase.jaxmpp.core.client.xml.ElementWrapper; 26 | import tigase.jaxmpp.core.client.xmpp.stream.XMPPStream; 27 | 28 | public abstract class StreamPacket 29 | extends ElementWrapper { 30 | 31 | private XMPPStream xmppStream; 32 | 33 | public StreamPacket(Element element) { 34 | super(element); 35 | } 36 | 37 | public XMPPStream getXmppStream() { 38 | return xmppStream; 39 | } 40 | 41 | public void setXmppStream(XMPPStream xmppStream) { 42 | this.xmppStream = xmppStream; 43 | } 44 | 45 | } 46 | -------------------------------------------------------------------------------- /jaxmpp-core/src/main/java/tigase/jaxmpp/core/client/xmpp/stanzas/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * package-info.java 3 | * 4 | * Tigase XMPP Client Library 5 | * Copyright (C) 2004-2018 "Tigase, Inc." 6 | * 7 | * This program is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, 10 | * or (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. Look for COPYING file in the top folder. 19 | * If not, see http://www.gnu.org/licenses/. 20 | */ 21 | 22 | /** 23 | * XMPP Stanzas. 24 | */ 25 | package tigase.jaxmpp.core.client.xmpp.stanzas; 26 | 27 | -------------------------------------------------------------------------------- /jaxmpp-core/src/main/java/tigase/jaxmpp/core/client/xmpp/stream/XMPPStream.java: -------------------------------------------------------------------------------- 1 | /* 2 | * XMPPStream.java 3 | * 4 | * Tigase XMPP Client Library 5 | * Copyright (C) 2004-2018 "Tigase, Inc." 6 | * 7 | * This program is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, 10 | * or (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. Look for COPYING file in the top folder. 19 | * If not, see http://www.gnu.org/licenses/. 20 | */ 21 | 22 | package tigase.jaxmpp.core.client.xmpp.stream; 23 | 24 | import tigase.jaxmpp.core.client.exceptions.JaxmppException; 25 | import tigase.jaxmpp.core.client.xml.Element; 26 | 27 | public interface XMPPStream { 28 | 29 | Element getFeatures(); 30 | 31 | void setFeatures(Element children); 32 | 33 | public void write(final Element stanza) throws JaxmppException; 34 | 35 | } 36 | -------------------------------------------------------------------------------- /jaxmpp-core/src/main/java/tigase/jaxmpp/core/client/xmpp/utils/DateTimeFormat.java: -------------------------------------------------------------------------------- 1 | /* 2 | * DateTimeFormat.java 3 | * 4 | * Tigase XMPP Client Library 5 | * Copyright (C) 2004-2018 "Tigase, Inc." 6 | * 7 | * This program is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, 10 | * or (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. Look for COPYING file in the top folder. 19 | * If not, see http://www.gnu.org/licenses/. 20 | */ 21 | package tigase.jaxmpp.core.client.xmpp.utils; 22 | 23 | import java.util.Date; 24 | 25 | /** 26 | * Date time formatter, implements XMPP Date and Time 28 | * Profiles. 29 | */ 30 | public class DateTimeFormat { 31 | 32 | private static DateTimeFormatProvider provider; 33 | 34 | public static void setProvider(DateTimeFormatProvider provider) { 35 | DateTimeFormat.provider = provider; 36 | } 37 | 38 | public String format(Date date) { 39 | return provider.format(date); 40 | } 41 | 42 | public Date parse(String s) { 43 | return provider.parse(s); 44 | } 45 | 46 | public static interface DateTimeFormatProvider { 47 | 48 | String format(Date date); 49 | 50 | Date parse(String s); 51 | } 52 | } -------------------------------------------------------------------------------- /jaxmpp-core/src/main/java/tigase/jaxmpp/core/client/xmpp/utils/MutableBoolean.java: -------------------------------------------------------------------------------- 1 | /* 2 | * MutableBoolean.java 3 | * 4 | * Tigase XMPP Client Library 5 | * Copyright (C) 2004-2018 "Tigase, Inc." 6 | * 7 | * This program is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, 10 | * or (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. Look for COPYING file in the top folder. 19 | * If not, see http://www.gnu.org/licenses/. 20 | */ 21 | 22 | package tigase.jaxmpp.core.client.xmpp.utils; 23 | 24 | public class MutableBoolean { 25 | 26 | private boolean value = false; 27 | 28 | public boolean isValue() { 29 | return value; 30 | } 31 | 32 | public void setValue(boolean value) { 33 | this.value = value; 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /jaxmpp-core/src/main/java/tigase/jaxmpp/core/client/xmpp/utils/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * package-info.java 3 | * 4 | * Tigase XMPP Client Library 5 | * Copyright (C) 2004-2018 "Tigase, Inc." 6 | * 7 | * This program is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, 10 | * or (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. Look for COPYING file in the top folder. 19 | * If not, see http://www.gnu.org/licenses/. 20 | */ 21 | 22 | /** 23 | * Support for common XMPP utils. 24 | */ 25 | package tigase.jaxmpp.core.client.xmpp.utils; 26 | 27 | -------------------------------------------------------------------------------- /jaxmpp-core/src/test/java/tigase/jaxmpp/core/client/MockSessionObject.java: -------------------------------------------------------------------------------- 1 | /* 2 | * MockSessionObject.java 3 | * 4 | * Tigase XMPP Client Library 5 | * Copyright (C) 2004-2018 "Tigase, Inc." 6 | * 7 | * This program is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, 10 | * or (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. Look for COPYING file in the top folder. 19 | * If not, see http://www.gnu.org/licenses/. 20 | */ 21 | 22 | package tigase.jaxmpp.core.client; 23 | 24 | import tigase.jaxmpp.core.client.eventbus.EventBus; 25 | 26 | import java.util.HashMap; 27 | //import tigase.jaxmpp.core.client.xmpp.modules.presence.PresenceModule; 28 | //import tigase.jaxmpp.core.client.xmpp.modules.roster.RosterModule; 29 | //import tigase.jaxmpp.core.client.xmpp.modules.roster.RosterStore; 30 | 31 | public class MockSessionObject 32 | extends AbstractSessionObject { 33 | 34 | public MockSessionObject(EventBus eventBus) { 35 | super(); 36 | setEventBus(eventBus); 37 | properties = new HashMap(); 38 | 39 | // PresenceModule.setPresenceStore(this, new MockPresenceStore()); 40 | // RosterModule.setRosterStore(this, new RosterStore()); 41 | ResponseManager.setResponseManager(this, new ResponseManager()); 42 | } 43 | 44 | } 45 | -------------------------------------------------------------------------------- /jaxmpp-core/src/test/java/tigase/jaxmpp/core/client/xmpp/utils/EscapeUtilsTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * EscapeUtilsTest.java 3 | * 4 | * Tigase XMPP Client Library 5 | * Copyright (C) 2004-2018 "Tigase, Inc." 6 | * 7 | * This program is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, 10 | * or (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. Look for COPYING file in the top folder. 19 | * If not, see http://www.gnu.org/licenses/. 20 | */ 21 | package tigase.jaxmpp.core.client.xmpp.utils; 22 | 23 | import org.junit.Test; 24 | 25 | import static org.junit.Assert.assertEquals; 26 | 27 | public class EscapeUtilsTest { 28 | 29 | @Test 30 | public void testEscape() { 31 | assertEquals("<a>"&<a>", EscapeUtils.escape("\"&")); 32 | assertEquals("<a>", EscapeUtils.escape("")); 33 | assertEquals("<a b="x'x">", EscapeUtils.escape("")); 34 | } 35 | 36 | @Test 37 | public void testUnescape() { 38 | assertEquals("", EscapeUtils.unescape("<a>")); 39 | assertEquals("", EscapeUtils.unescape("<a b="x'x">")); 40 | assertEquals("\"&", EscapeUtils.unescape("<a>"&<a>")); 41 | } 42 | 43 | } -------------------------------------------------------------------------------- /jaxmpp-deliveryreceipts/build.gradle: -------------------------------------------------------------------------------- 1 | /* 2 | * build.gradle 3 | * 4 | * Tigase XMPP Client Library 5 | * Copyright (C) 2004-2018 "Tigase, Inc." 6 | * 7 | * This program is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, 10 | * or (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. Look for COPYING file in the top folder. 19 | * If not, see http://www.gnu.org/licenses/. 20 | */ 21 | 22 | apply plugin: 'java' 23 | 24 | sourceCompatibility = defaultSourceCompatibility 25 | targetCompatibility = defaultTargetCompatibility 26 | 27 | publishing { 28 | publications { 29 | mavenJava(MavenPublication) { 30 | from components.java 31 | } 32 | } 33 | } 34 | 35 | dependencies { 36 | testCompile 'junit:junit:4.12' 37 | compile project(':jaxmpp-core') 38 | compile project(':jaxmpp-chat') 39 | } -------------------------------------------------------------------------------- /jaxmpp-dist/src/main/assembly/dist.xml: -------------------------------------------------------------------------------- 1 | 2 | 22 | 23 | 24 | dist 25 | 26 | zip 27 | tar.gz 28 | 29 | 30 | 31 | 32 | ../docs 33 | docs 34 | 35 | Tigase_JaXMPP_Guide/html_chunk/**/* 36 | Tigase_JaXMPP_Guide/pdf/**/* 37 | javadoc/**/* 38 | 39 | 40 | 41 | 42 | 43 | 44 | false 45 | runtime 46 | 47 | ${artifact.artifactId}.${artifact.extension} 48 | 49 | false 50 | 51 | 52 | 53 | -------------------------------------------------------------------------------- /jaxmpp-documentation/build.gradle: -------------------------------------------------------------------------------- 1 | /* 2 | * build.gradle 3 | * 4 | * Tigase XMPP Client Library 5 | * Copyright (C) 2004-2018 "Tigase, Inc." 6 | * 7 | * This program is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, 10 | * or (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. Look for COPYING file in the top folder. 19 | * If not, see http://www.gnu.org/licenses/. 20 | */ 21 | 22 | apply plugin: 'org.asciidoctor.gradle.asciidoctor' 23 | 24 | buildscript { 25 | repositories { 26 | jcenter() 27 | } 28 | 29 | dependencies { 30 | classpath 'org.asciidoctor:asciidoctor-gradle-plugin:1.5.0' 31 | } 32 | } 33 | 34 | 35 | asciidoctorj { 36 | version = '1.5.4' 37 | } 38 | 39 | asciidoctor { 40 | sourceDir = new File("$projectDir/src/main/asciidoc") 41 | outputDir = new File("$buildDir/docs") 42 | options = [ 43 | doctype : 'book', 44 | attributes: [ 45 | 'source-highlighter': 'coderay', 46 | toc : '', 47 | idprefix : '', 48 | idseparator : '-' 49 | ] 50 | ] 51 | } -------------------------------------------------------------------------------- /jaxmpp-documentation/src/main/asciidoc/images/architecture.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tigase/jaxmpp/5400516fee3d997ecc5df3186783b0f8fb409794/jaxmpp-documentation/src/main/asciidoc/images/architecture.png -------------------------------------------------------------------------------- /jaxmpp-documentation/src/main/asciidoc/images/tiger-looking-left-small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tigase/jaxmpp/5400516fee3d997ecc5df3186783b0f8fb409794/jaxmpp-documentation/src/main/asciidoc/images/tiger-looking-left-small.png -------------------------------------------------------------------------------- /jaxmpp-documentation/src/main/asciidoc/index.asciidoc: -------------------------------------------------------------------------------- 1 | = Tigase JaXMPP 2 | Tigase Team 3 | :toc: 4 | :numbered: 5 | :website: http://tigase.net 6 | :Date: 2014-07-10 7 | 8 | :leveloffset: 0 9 | 10 | :no title: 11 | 12 | :no author: 13 | 14 | include::text/Release_Notes.asciidoc[] 15 | 16 | include::text/Tigase_JaXMPP-General_overview.asciidoc[] 17 | 18 | include::text/Examples.asciidoc[] 19 | -------------------------------------------------------------------------------- /jaxmpp-documentation/src/main/asciidoc/text/Tigase_JaXMPP-General_overview.asciidoc: -------------------------------------------------------------------------------- 1 | image::images/tiger-looking-left-small.png[] 2 | 3 | [[ACS_DesignAndImplementation]] 4 | == Design and implementation 5 | 6 | === Tigase JaXMPP 7 | 8 | *JaXMPP* is an extensible XMPP client library 9 | 10 | === Design 11 | 12 | image::images/architecture.png[] 13 | 14 | -------------------------------------------------------------------------------- /jaxmpp-documentation/src/main/restructured/.readthedocs.yaml: -------------------------------------------------------------------------------- 1 | # Required 2 | version: 2 3 | 4 | # Set the version of Python and other tools you might need 5 | build: 6 | os: ubuntu-22.04 7 | tools: 8 | python: "3.11" 9 | 10 | # Build documentation in the docs/ directory with Sphinx 11 | sphinx: 12 | configuration: conf.py -------------------------------------------------------------------------------- /jaxmpp-documentation/src/main/restructured/Makefile: -------------------------------------------------------------------------------- 1 | # Minimal makefile for Sphinx documentation 2 | # 3 | 4 | # You can set these variables from the command line, and also 5 | # from the environment for the first two. 6 | SPHINXOPTS = 7 | SPHINXBUILD = sphinx-build 8 | SOURCEDIR = . 9 | BUILDDIR = _build 10 | 11 | # Put it first so that "make" without argument is like "make help". 12 | help: 13 | @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) 14 | 15 | .PHONY: help Makefile 16 | 17 | # Catch-all target: route all unknown targets to Sphinx using the new 18 | # "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). 19 | %: Makefile 20 | @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) 21 | -------------------------------------------------------------------------------- /jaxmpp-documentation/src/main/restructured/Tigase_JaXMPP-General_overview.rst: -------------------------------------------------------------------------------- 1 | |logo| 2 | 3 | 4 | Design and implementation 5 | ========================= 6 | 7 | 8 | Tigase JaXMPP 9 | ------------- 10 | 11 | **JaXMPP** is an extensible XMPP client library 12 | 13 | Design 14 | ------ 15 | 16 | |architecture| 17 | 18 | .. |logo| image:: images/logo_320.png 19 | .. |tiger looking left small| image:: images/tiger-looking-left-small.png 20 | .. |architecture| image:: images/architecture.png 21 | 22 | -------------------------------------------------------------------------------- /jaxmpp-documentation/src/main/restructured/images/architecture.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tigase/jaxmpp/5400516fee3d997ecc5df3186783b0f8fb409794/jaxmpp-documentation/src/main/restructured/images/architecture.png -------------------------------------------------------------------------------- /jaxmpp-documentation/src/main/restructured/images/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tigase/jaxmpp/5400516fee3d997ecc5df3186783b0f8fb409794/jaxmpp-documentation/src/main/restructured/images/logo.png -------------------------------------------------------------------------------- /jaxmpp-documentation/src/main/restructured/images/logo_320.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tigase/jaxmpp/5400516fee3d997ecc5df3186783b0f8fb409794/jaxmpp-documentation/src/main/restructured/images/logo_320.png -------------------------------------------------------------------------------- /jaxmpp-documentation/src/main/restructured/images/tiger-looking-left-small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tigase/jaxmpp/5400516fee3d997ecc5df3186783b0f8fb409794/jaxmpp-documentation/src/main/restructured/images/tiger-looking-left-small.png -------------------------------------------------------------------------------- /jaxmpp-documentation/src/main/restructured/index.rst: -------------------------------------------------------------------------------- 1 | 2 | ========================================== 3 | Tigase JaXMPP- Version v3.2.0 4 | ========================================== 5 | 6 | .. toctree:: 7 | :titlesonly: 8 | :numbered: 3 9 | 10 | Release_notes 11 | Tigase_JaXMPP-General_overview 12 | Examples 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /jaxmpp-documentation/src/main/restructured/make.bat: -------------------------------------------------------------------------------- 1 | @ECHO OFF 2 | 3 | pushd %~dp0 4 | 5 | REM Command file for Sphinx documentation 6 | 7 | if "%SPHINXBUILD%" == "" ( 8 | set SPHINXBUILD=sphinx-build 9 | ) 10 | set SOURCEDIR=source 11 | set BUILDDIR=build 12 | 13 | if "%1" == "" goto help 14 | 15 | %SPHINXBUILD% >NUL 2>NUL 16 | if errorlevel 9009 ( 17 | echo. 18 | echo.The 'sphinx-build' command was not found. Make sure you have Sphinx 19 | echo.installed, then set the SPHINXBUILD environment variable to point 20 | echo.to the full path of the 'sphinx-build' executable. Alternatively you 21 | echo.may add the Sphinx directory to PATH. 22 | echo. 23 | echo.If you don't have Sphinx installed, grab it from 24 | echo.http://sphinx-doc.org/ 25 | exit /b 1 26 | ) 27 | 28 | %SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% 29 | goto end 30 | 31 | :help 32 | %SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% 33 | 34 | :end 35 | popd 36 | -------------------------------------------------------------------------------- /jaxmpp-documentation/src/main/restructured/requirements.txt: -------------------------------------------------------------------------------- 1 | sphinx 2 | sphinx_rtd_theme -------------------------------------------------------------------------------- /jaxmpp-filetransfer/build.gradle: -------------------------------------------------------------------------------- 1 | /* 2 | * build.gradle 3 | * 4 | * Tigase XMPP Client Library 5 | * Copyright (C) 2004-2018 "Tigase, Inc." 6 | * 7 | * This program is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, 10 | * or (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. Look for COPYING file in the top folder. 19 | * If not, see http://www.gnu.org/licenses/. 20 | */ 21 | 22 | apply plugin: 'java' 23 | 24 | sourceCompatibility = defaultSourceCompatibility 25 | targetCompatibility = defaultTargetCompatibility 26 | 27 | publishing { 28 | publications { 29 | mavenJava(MavenPublication) { 30 | from components.java 31 | } 32 | } 33 | } 34 | 35 | dependencies { 36 | testCompile 'junit:junit:4.12' 37 | compile project(':jaxmpp-core') 38 | } -------------------------------------------------------------------------------- /jaxmpp-filetransfer/src/main/java/META-INF/MANIFEST.MF: -------------------------------------------------------------------------------- 1 | Manifest-Version: 1.0 2 | Class-Path: 3 | 4 | -------------------------------------------------------------------------------- /jaxmpp-filetransfer/src/main/java/tigase/jaxmpp/core/JaxmppFileTransfer.gwt.xml: -------------------------------------------------------------------------------- 1 | 2 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /jaxmpp-gwt/src/main/java/tigase/jaxmpp/gwt/JaxmppGWT.gwt.xml: -------------------------------------------------------------------------------- 1 | 2 | 22 | 23 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /jaxmpp-gwt/src/main/java/tigase/jaxmpp/gwt/client/ConnectionConfiguration.java: -------------------------------------------------------------------------------- 1 | /* 2 | * ConnectionConfiguration.java 3 | * 4 | * Tigase XMPP Client Library 5 | * Copyright (C) 2004-2018 "Tigase, Inc." 6 | * 7 | * This program is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, 10 | * or (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. Look for COPYING file in the top folder. 19 | * If not, see http://www.gnu.org/licenses/. 20 | */ 21 | package tigase.jaxmpp.gwt.client; 22 | 23 | import tigase.jaxmpp.core.client.SessionObject; 24 | import tigase.jaxmpp.core.client.connector.AbstractBoshConnector; 25 | 26 | /** 27 | * Connection configuration object. 28 | */ 29 | public class ConnectionConfiguration 30 | extends tigase.jaxmpp.core.client.ConnectionConfiguration { 31 | 32 | ConnectionConfiguration(SessionObject sessionObject) { 33 | super(sessionObject); 34 | } 35 | 36 | /** 37 | * Set BOSH Service URL. 38 | * 39 | * @param boshService BOSH service URL 40 | */ 41 | public void setBoshService(String boshService) { 42 | sessionObject.setUserProperty(AbstractBoshConnector.BOSH_SERVICE_URL_KEY, boshService); 43 | 44 | } 45 | } -------------------------------------------------------------------------------- /jaxmpp-gwt/src/main/java/tigase/jaxmpp/gwt/client/Roster.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Roster.java 3 | * 4 | * Tigase XMPP Client Library 5 | * Copyright (C) 2004-2018 "Tigase, Inc." 6 | * 7 | * This program is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, 10 | * or (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. Look for COPYING file in the top folder. 19 | * If not, see http://www.gnu.org/licenses/. 20 | */ 21 | package tigase.jaxmpp.gwt.client; 22 | 23 | import tigase.jaxmpp.core.client.exceptions.JaxmppException; 24 | import tigase.jaxmpp.core.client.xmpp.modules.roster.RosterModule; 25 | import tigase.jaxmpp.core.client.xmpp.modules.roster.RosterStore; 26 | 27 | /** 28 | * @author andrzej 29 | */ 30 | public class Roster { 31 | 32 | public static void initialize(Jaxmpp jaxmpp) throws JaxmppException { 33 | RosterStore rosterStore = RosterModule.getRosterStore(jaxmpp.getSessionObject()); 34 | if (rosterStore == null) { 35 | rosterStore = new GwtRosterStore(); 36 | RosterModule.setRosterStore(jaxmpp.getSessionObject(), rosterStore); 37 | } 38 | jaxmpp.set(rosterStore); 39 | 40 | jaxmpp.getModulesManager().register(new RosterModule()); 41 | } 42 | 43 | } 44 | -------------------------------------------------------------------------------- /jaxmpp-gwt/src/main/java/tigase/jaxmpp/gwt/client/connectors/SeeOtherHostHandler.java: -------------------------------------------------------------------------------- 1 | /* 2 | * SeeOtherHostHandler.java 3 | * 4 | * Tigase XMPP Client Library 5 | * Copyright (C) 2004-2018 "Tigase, Inc." 6 | * 7 | * This program is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, 10 | * or (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. Look for COPYING file in the top folder. 19 | * If not, see http://www.gnu.org/licenses/. 20 | */ 21 | package tigase.jaxmpp.gwt.client.connectors; 22 | 23 | /** 24 | * @author andrzej 25 | */ 26 | public interface SeeOtherHostHandler 27 | extends tigase.jaxmpp.core.client.connector.SeeOtherHostHandler { 28 | 29 | } 30 | -------------------------------------------------------------------------------- /jaxmpp-gwt/src/main/java/tigase/jaxmpp/gwt/client/connectors/WebSocketCallback.java: -------------------------------------------------------------------------------- 1 | /* 2 | * WebSocketCallback.java 3 | * 4 | * Tigase XMPP Client Library 5 | * Copyright (C) 2004-2018 "Tigase, Inc." 6 | * 7 | * This program is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, 10 | * or (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. Look for COPYING file in the top folder. 19 | * If not, see http://www.gnu.org/licenses/. 20 | */ 21 | package tigase.jaxmpp.gwt.client.connectors; 22 | 23 | /** 24 | * @author andrzej 25 | */ 26 | public interface WebSocketCallback { 27 | 28 | /** 29 | * Method called when WebSocket connection is closed 30 | */ 31 | void onClose(WebSocket ws); 32 | 33 | /** 34 | * Method called when WebSocket receives error 35 | */ 36 | void onError(WebSocket ws); 37 | 38 | /** 39 | * Method called when WebSocket receives message 40 | */ 41 | void onMessage(WebSocket ws, String message); 42 | 43 | /** 44 | * Method called when WebSocket opens connection 45 | */ 46 | void onOpen(WebSocket ws); 47 | 48 | } 49 | -------------------------------------------------------------------------------- /jaxmpp-gwt/src/main/java/tigase/jaxmpp/gwt/client/dns/DnsEntry.java: -------------------------------------------------------------------------------- 1 | /* 2 | * DnsEntry.java 3 | * 4 | * Tigase XMPP Client Library 5 | * Copyright (C) 2004-2018 "Tigase, Inc." 6 | * 7 | * This program is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, 10 | * or (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. Look for COPYING file in the top folder. 19 | * If not, see http://www.gnu.org/licenses/. 20 | */ 21 | package tigase.jaxmpp.gwt.client.dns; 22 | 23 | import com.google.gwt.core.client.JavaScriptObject; 24 | import com.google.gwt.core.client.JsArrayString; 25 | 26 | /** 27 | * @author andrzej 28 | */ 29 | public class DnsEntry 30 | extends JavaScriptObject { 31 | 32 | protected DnsEntry() { 33 | } 34 | 35 | public final native String getHost() /*-{ 36 | return this.host; 37 | }-*/; 38 | 39 | public final native JsArrayString getIps() /*-{ 40 | return this.ip; 41 | }-*/; 42 | 43 | public final native int getPort() /*-{ 44 | return this.port; 45 | }-*/; 46 | 47 | public final native String getUrl() /*-{ 48 | return this.url; 49 | }-*/; 50 | } 51 | -------------------------------------------------------------------------------- /jaxmpp-gwt/src/test/java/tigase/jaxmpp/gwt/JaxmppGWTJUnit.gwt.xml: -------------------------------------------------------------------------------- 1 | 2 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /jaxmpp-gwt/src/test/java/tigase/jaxmpp/gwt/client/JaxmppTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * JaxmppTest.java 3 | * 4 | * Tigase XMPP Client Library 5 | * Copyright (C) 2004-2018 "Tigase, Inc." 6 | * 7 | * This program is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, 10 | * or (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. Look for COPYING file in the top folder. 19 | * If not, see http://www.gnu.org/licenses/. 20 | */ 21 | 22 | package tigase.jaxmpp.gwt.client; 23 | 24 | import com.google.gwt.junit.client.GWTTestCase; 25 | 26 | public class JaxmppTest 27 | extends GWTTestCase { 28 | 29 | @Override 30 | public String getModuleName() { 31 | return "tigase.jaxmpp.gwt.JaxmppGWTJUnit"; 32 | } 33 | 34 | public void test() { 35 | try { 36 | Jaxmpp j = new Jaxmpp(); 37 | } catch (Throwable e) { 38 | //Assert.fail(e.getMessage()); 39 | } 40 | 41 | } 42 | 43 | } 44 | -------------------------------------------------------------------------------- /jaxmpp-httpfileupload/build.gradle: -------------------------------------------------------------------------------- 1 | /* 2 | * build.gradle 3 | * 4 | * Tigase XMPP Client Library 5 | * Copyright (C) 2004-2018 "Tigase, Inc." 6 | * 7 | * This program is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, 10 | * or (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. Look for COPYING file in the top folder. 19 | * If not, see http://www.gnu.org/licenses/. 20 | */ 21 | 22 | apply plugin: 'java' 23 | 24 | sourceCompatibility = defaultSourceCompatibility 25 | targetCompatibility = defaultTargetCompatibility 26 | 27 | publishing { 28 | publications { 29 | mavenJava(MavenPublication) { 30 | from components.java 31 | } 32 | } 33 | } 34 | 35 | dependencies { 36 | testCompile 'junit:junit:4.12' 37 | compile project(':jaxmpp-core') 38 | } -------------------------------------------------------------------------------- /jaxmpp-httpfileupload/src/main/java/tigase/jaxmpp/core/JaxmppHttpFileUpload.gwt.xml: -------------------------------------------------------------------------------- 1 | 2 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /jaxmpp-im/build.gradle: -------------------------------------------------------------------------------- 1 | /* 2 | * build.gradle 3 | * 4 | * Tigase XMPP Client Library 5 | * Copyright (C) 2004-2018 "Tigase, Inc." 6 | * 7 | * This program is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, 10 | * or (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. Look for COPYING file in the top folder. 19 | * If not, see http://www.gnu.org/licenses/. 20 | */ 21 | 22 | apply plugin: 'java' 23 | 24 | sourceCompatibility = defaultSourceCompatibility 25 | targetCompatibility = defaultTargetCompatibility 26 | 27 | publishing { 28 | publications { 29 | mavenJava(MavenPublication) { 30 | from components.java 31 | } 32 | } 33 | } 34 | 35 | dependencies { 36 | testCompile 'junit:junit:4.12' 37 | compile project(':jaxmpp-core') 38 | compile project(':jaxmpp-chat') 39 | compile project(':jaxmpp-presence') 40 | } -------------------------------------------------------------------------------- /jaxmpp-im/src/main/java/tigase/jaxmpp/core/client/xmpp/modules/chat/xep0085/ChatState.java: -------------------------------------------------------------------------------- 1 | /* 2 | * ChatState.java 3 | * 4 | * Tigase XMPP Client Library 5 | * Copyright (C) 2004-2018 "Tigase, Inc." 6 | * 7 | * This program is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, 10 | * or (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. Look for COPYING file in the top folder. 19 | * If not, see http://www.gnu.org/licenses/. 20 | */ 21 | package tigase.jaxmpp.core.client.xmpp.modules.chat.xep0085; 22 | 23 | import tigase.jaxmpp.core.client.xml.Element; 24 | import tigase.jaxmpp.core.client.xml.ElementFactory; 25 | import tigase.jaxmpp.core.client.xml.XMLException; 26 | 27 | /** 28 | * @author andrzej 29 | */ 30 | public enum ChatState { 31 | 32 | active, 33 | inactive, 34 | gone, 35 | composing, 36 | paused; 37 | 38 | public static String XMLNS = "http://jabber.org/protocol/chatstates"; 39 | 40 | public static ChatState fromElement(Element elem) throws XMLException { 41 | if (!XMLNS.equals(elem.getXMLNS())) { 42 | return null; 43 | } 44 | return ChatState.valueOf(elem.getName()); 45 | } 46 | 47 | public Element toElement() throws XMLException { 48 | Element elem = ElementFactory.create(name()); 49 | elem.setXMLNS(XMLNS); 50 | return elem; 51 | } 52 | 53 | } 54 | -------------------------------------------------------------------------------- /jaxmpp-j2se/build.gradle: -------------------------------------------------------------------------------- 1 | /* 2 | * build.gradle 3 | * 4 | * Tigase XMPP Client Library 5 | * Copyright (C) 2004-2018 "Tigase, Inc." 6 | * 7 | * This program is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, 10 | * or (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. Look for COPYING file in the top folder. 19 | * If not, see http://www.gnu.org/licenses/. 20 | */ 21 | 22 | apply plugin: 'java' 23 | 24 | sourceCompatibility = defaultSourceCompatibility 25 | targetCompatibility = defaultTargetCompatibility 26 | 27 | publishing { 28 | publications { 29 | mavenJava(MavenPublication) { 30 | from components.java 31 | } 32 | } 33 | } 34 | 35 | dependencies { 36 | testCompile 'junit:junit:4.12' 37 | compile project(':jaxmpp-core') 38 | compile project(':jaxmpp-socks5') 39 | compile project(':jaxmpp-jingle') 40 | compile project(':jaxmpp-filetransfer') 41 | compile project(':jaxmpp-roster') 42 | compile project(':jaxmpp-presence') 43 | compile project(':jaxmpp-registration') 44 | compile 'tigase:tigase-xmltools:4.0.1' 45 | compile 'org.bouncycastle:bctls-jdk15on:1.57' 46 | compile 'org.bouncycastle:bcprov-jdk15on:1.57' 47 | 48 | } 49 | -------------------------------------------------------------------------------- /jaxmpp-j2se/src/main/java/META-INF/MANIFEST.MF: -------------------------------------------------------------------------------- 1 | Manifest-Version: 1.0 2 | Class-Path: 3 | 4 | -------------------------------------------------------------------------------- /jaxmpp-j2se/src/main/java/tigase/jaxmpp/core/client/xmpp/modules/auth/scram/ScramMechanism.java: -------------------------------------------------------------------------------- 1 | /* 2 | * ScramMechanism.java 3 | * 4 | * Tigase XMPP Client Library 5 | * Copyright (C) 2004-2018 "Tigase, Inc." 6 | * 7 | * This program is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, 10 | * or (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. Look for COPYING file in the top folder. 19 | * If not, see http://www.gnu.org/licenses/. 20 | */ 21 | 22 | package tigase.jaxmpp.core.client.xmpp.modules.auth.scram; 23 | 24 | import tigase.jaxmpp.core.client.SessionObject; 25 | 26 | public class ScramMechanism 27 | extends AbstractScram { 28 | 29 | public ScramMechanism() { 30 | super("SCRAM-SHA-1", "SHA1", "Client Key".getBytes(UTF_CHARSET), "Server Key".getBytes(UTF_CHARSET)); 31 | } 32 | 33 | @Override 34 | protected byte[] getBindData(BindType bindType, SessionObject sessionObject) { 35 | return null; 36 | } 37 | 38 | @Override 39 | protected BindType getBindType(SessionObject sessionObject) { 40 | return BindType.n; 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /jaxmpp-j2se/src/main/java/tigase/jaxmpp/core/client/xmpp/modules/auth/scram/ScramSHA256Mechanism.java: -------------------------------------------------------------------------------- 1 | /* 2 | * ScramSHA256Mechanism.java 3 | * 4 | * Tigase XMPP Client Library 5 | * Copyright (C) 2004-2018 "Tigase, Inc." 6 | * 7 | * This program is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, 10 | * or (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. Look for COPYING file in the top folder. 19 | * If not, see http://www.gnu.org/licenses/. 20 | */ 21 | 22 | package tigase.jaxmpp.core.client.xmpp.modules.auth.scram; 23 | 24 | import tigase.jaxmpp.core.client.SessionObject; 25 | 26 | public class ScramSHA256Mechanism 27 | extends AbstractScram { 28 | 29 | public ScramSHA256Mechanism() { 30 | super("SCRAM-SHA-256", "SHA-256", "Client Key".getBytes(UTF_CHARSET), "Server Key".getBytes(UTF_CHARSET)); 31 | } 32 | 33 | @Override 34 | protected byte[] getBindData(BindType bindType, SessionObject sessionObject) { 35 | return null; 36 | } 37 | 38 | @Override 39 | protected BindType getBindType(SessionObject sessionObject) { 40 | return BindType.n; 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /jaxmpp-j2se/src/main/java/tigase/jaxmpp/core/client/xmpp/modules/auth/scram/ScramSHA256PlusMechanism.java: -------------------------------------------------------------------------------- 1 | /* 2 | * ScramSHA256PlusMechanism.java 3 | * 4 | * Tigase XMPP Client Library 5 | * Copyright (C) 2004-2018 "Tigase, Inc." 6 | * 7 | * This program is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, 10 | * or (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. Look for COPYING file in the top folder. 19 | * If not, see http://www.gnu.org/licenses/. 20 | */ 21 | 22 | package tigase.jaxmpp.core.client.xmpp.modules.auth.scram; 23 | 24 | public class ScramSHA256PlusMechanism 25 | extends ScramPlusMechanism { 26 | 27 | public ScramSHA256PlusMechanism() { 28 | super("SCRAM-SHA-256-PLUS", "SHA-256", "Client Key".getBytes(UTF_CHARSET), "Server Key".getBytes(UTF_CHARSET)); 29 | } 30 | 31 | } 32 | -------------------------------------------------------------------------------- /jaxmpp-j2se/src/main/java/tigase/jaxmpp/core/client/xmpp/modules/auth/scram/ScramSHA512Mechanism.java: -------------------------------------------------------------------------------- 1 | /* 2 | * ScramSHA512Mechanism.java 3 | * 4 | * Tigase TTS-NG 5 | * Copyright (C) 2015-2017 "Tigase, Inc." 6 | * 7 | * This program is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as published by 9 | * the Free Software Foundation, version 3 of the License, 10 | * or (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. Look for COPYING file in the top folder. 19 | * If not, see http://www.gnu.org/licenses/. 20 | */ 21 | 22 | package tigase.jaxmpp.core.client.xmpp.modules.auth.scram; 23 | 24 | import tigase.jaxmpp.core.client.SessionObject; 25 | 26 | public class ScramSHA512Mechanism 27 | extends AbstractScram { 28 | 29 | public ScramSHA512Mechanism() { 30 | super("SCRAM-SHA-512", "SHA-512", "Client Key".getBytes(UTF_CHARSET), "Server Key".getBytes(UTF_CHARSET)); 31 | } 32 | 33 | @Override 34 | protected byte[] getBindData(BindType bindType, SessionObject sessionObject) { 35 | return null; 36 | } 37 | 38 | @Override 39 | protected BindType getBindType(SessionObject sessionObject) { 40 | return BindType.n; 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /jaxmpp-j2se/src/main/java/tigase/jaxmpp/core/client/xmpp/modules/auth/scram/ScramSHA512PlusMechanism.java: -------------------------------------------------------------------------------- 1 | /* 2 | * ScramSHA512PlusMechanism.java 3 | * 4 | * Tigase TTS-NG 5 | * Copyright (C) 2015-2017 "Tigase, Inc." 6 | * 7 | * This program is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as published by 9 | * the Free Software Foundation, version 3 of the License, 10 | * or (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. Look for COPYING file in the top folder. 19 | * If not, see http://www.gnu.org/licenses/. 20 | */ 21 | 22 | package tigase.jaxmpp.core.client.xmpp.modules.auth.scram; 23 | 24 | public class ScramSHA512PlusMechanism 25 | extends ScramPlusMechanism { 26 | 27 | public ScramSHA512PlusMechanism() { 28 | super("SCRAM-SHA-512-PLUS", "SHA-512", "Client Key".getBytes(UTF_CHARSET), "Server Key".getBytes(UTF_CHARSET)); 29 | } 30 | 31 | } 32 | -------------------------------------------------------------------------------- /jaxmpp-j2se/src/main/java/tigase/jaxmpp/core/client/xmpp/modules/capabilities/CapabilitiesCache.java: -------------------------------------------------------------------------------- 1 | /* 2 | * CapabilitiesCache.java 3 | * 4 | * Tigase XMPP Client Library 5 | * Copyright (C) 2004-2018 "Tigase, Inc." 6 | * 7 | * This program is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, 10 | * or (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. Look for COPYING file in the top folder. 19 | * If not, see http://www.gnu.org/licenses/. 20 | */ 21 | package tigase.jaxmpp.core.client.xmpp.modules.capabilities; 22 | 23 | import tigase.jaxmpp.core.client.xmpp.modules.disco.DiscoveryModule.Identity; 24 | 25 | import java.util.Collection; 26 | import java.util.Set; 27 | 28 | public interface CapabilitiesCache { 29 | 30 | Set getFeatures(String node); 31 | 32 | Identity getIdentity(String node); 33 | 34 | Set getNodesWithFeature(String feature); 35 | 36 | boolean isCached(String node); 37 | 38 | void store(String node, String name, String category, String type, Collection features); 39 | 40 | } -------------------------------------------------------------------------------- /jaxmpp-j2se/src/main/java/tigase/jaxmpp/j2se/J2SEPresenceStore.java: -------------------------------------------------------------------------------- 1 | /* 2 | * J2SEPresenceStore.java 3 | * 4 | * Tigase XMPP Client Library 5 | * Copyright (C) 2004-2018 "Tigase, Inc." 6 | * 7 | * This program is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, 10 | * or (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. Look for COPYING file in the top folder. 19 | * If not, see http://www.gnu.org/licenses/. 20 | */ 21 | 22 | package tigase.jaxmpp.j2se; 23 | 24 | import tigase.jaxmpp.core.client.BareJID; 25 | import tigase.jaxmpp.core.client.JID; 26 | import tigase.jaxmpp.core.client.xmpp.modules.presence.PresenceStore; 27 | import tigase.jaxmpp.core.client.xmpp.stanzas.Presence; 28 | 29 | import java.util.Map; 30 | import java.util.concurrent.ConcurrentHashMap; 31 | 32 | public class J2SEPresenceStore 33 | extends PresenceStore { 34 | 35 | public J2SEPresenceStore() { 36 | presencesMapByBareJid = new ConcurrentHashMap>(); 37 | presenceByJid = new ConcurrentHashMap(); 38 | bestPresence = new ConcurrentHashMap(); 39 | } 40 | 41 | @Override 42 | protected Map createResourcePresenceMap() { 43 | return new ConcurrentHashMap(); 44 | } 45 | 46 | } 47 | -------------------------------------------------------------------------------- /jaxmpp-j2se/src/main/java/tigase/jaxmpp/j2se/J2SESessionObject.java: -------------------------------------------------------------------------------- 1 | /* 2 | * J2SESessionObject.java 3 | * 4 | * Tigase XMPP Client Library 5 | * Copyright (C) 2004-2018 "Tigase, Inc." 6 | * 7 | * This program is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, 10 | * or (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. Look for COPYING file in the top folder. 19 | * If not, see http://www.gnu.org/licenses/. 20 | */ 21 | 22 | package tigase.jaxmpp.j2se; 23 | 24 | import tigase.jaxmpp.core.client.AbstractSessionObject; 25 | 26 | import java.util.concurrent.ConcurrentHashMap; 27 | 28 | public class J2SESessionObject 29 | extends AbstractSessionObject { 30 | 31 | public J2SESessionObject() { 32 | properties = new ConcurrentHashMap(); 33 | } 34 | 35 | } 36 | -------------------------------------------------------------------------------- /jaxmpp-j2se/src/main/java/tigase/jaxmpp/j2se/Roster.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Roster.java 3 | * 4 | * Tigase XMPP Client Library 5 | * Copyright (C) 2004-2018 "Tigase, Inc." 6 | * 7 | * This program is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, 10 | * or (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. Look for COPYING file in the top folder. 19 | * If not, see http://www.gnu.org/licenses/. 20 | */ 21 | package tigase.jaxmpp.j2se; 22 | 23 | import tigase.jaxmpp.core.client.exceptions.JaxmppException; 24 | import tigase.jaxmpp.core.client.xmpp.modules.roster.DefaultRosterStore; 25 | import tigase.jaxmpp.core.client.xmpp.modules.roster.RosterModule; 26 | import tigase.jaxmpp.core.client.xmpp.modules.roster.RosterStore; 27 | 28 | /** 29 | * @author andrzej 30 | */ 31 | public class Roster { 32 | 33 | public static void initialize(Jaxmpp jaxmpp) throws JaxmppException { 34 | RosterStore rosterStore = RosterModule.getRosterStore(jaxmpp.getSessionObject()); 35 | if (rosterStore == null) { 36 | rosterStore = new DefaultRosterStore(); 37 | RosterModule.setRosterStore(jaxmpp.getSessionObject(), rosterStore); 38 | } 39 | jaxmpp.set(rosterStore); 40 | 41 | jaxmpp.getModulesManager().register(new RosterModule()); 42 | } 43 | 44 | } 45 | -------------------------------------------------------------------------------- /jaxmpp-j2se/src/main/java/tigase/jaxmpp/j2se/ThreadSafeResponseManager.java: -------------------------------------------------------------------------------- 1 | /* 2 | * ThreadSafeResponseManager.java 3 | * 4 | * Tigase XMPP Client Library 5 | * Copyright (C) 2004-2018 "Tigase, Inc." 6 | * 7 | * This program is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, 10 | * or (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. Look for COPYING file in the top folder. 19 | * If not, see http://www.gnu.org/licenses/. 20 | */ 21 | 22 | package tigase.jaxmpp.j2se; 23 | 24 | import tigase.jaxmpp.core.client.ResponseManager; 25 | 26 | import java.util.Map; 27 | import java.util.concurrent.ConcurrentHashMap; 28 | 29 | public class ThreadSafeResponseManager 30 | extends ResponseManager { 31 | 32 | private final Map handlers = new ConcurrentHashMap(); 33 | 34 | @Override 35 | protected Map getHandlers() { 36 | return this.handlers; 37 | } 38 | 39 | } 40 | -------------------------------------------------------------------------------- /jaxmpp-j2se/src/main/java/tigase/jaxmpp/j2se/connection/ConnectionSessionHandler.java: -------------------------------------------------------------------------------- 1 | /* 2 | * ConnectionSessionHandler.java 3 | * 4 | * Tigase XMPP Client Library 5 | * Copyright (C) 2004-2018 "Tigase, Inc." 6 | * 7 | * This program is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, 10 | * or (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. Look for COPYING file in the top folder. 19 | * If not, see http://www.gnu.org/licenses/. 20 | */ 21 | package tigase.jaxmpp.j2se.connection; 22 | 23 | import tigase.jaxmpp.core.client.xmpp.modules.connection.ConnectionSession; 24 | 25 | /** 26 | * @author andrzej 27 | */ 28 | public interface ConnectionSessionHandler { 29 | 30 | ConnectionSession getSession(String sid); 31 | 32 | } 33 | -------------------------------------------------------------------------------- /jaxmpp-j2se/src/main/java/tigase/jaxmpp/j2se/connection/socks5bytestream/StreamhostsResolver.java: -------------------------------------------------------------------------------- 1 | /* 2 | * StreamhostsResolver.java 3 | * 4 | * Tigase XMPP Client Library 5 | * Copyright (C) 2004-2018 "Tigase, Inc." 6 | * 7 | * This program is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, 10 | * or (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. Look for COPYING file in the top folder. 19 | * If not, see http://www.gnu.org/licenses/. 20 | */ 21 | package tigase.jaxmpp.j2se.connection.socks5bytestream; 22 | 23 | import tigase.jaxmpp.core.client.JID; 24 | import tigase.jaxmpp.core.client.xmpp.modules.socks5.Streamhost; 25 | 26 | import java.util.List; 27 | 28 | /** 29 | * @author andrzej 30 | */ 31 | public interface StreamhostsResolver { 32 | 33 | List getLocalStreamHosts(JID jid, int port); 34 | 35 | } 36 | -------------------------------------------------------------------------------- /jaxmpp-j2se/src/main/java/tigase/jaxmpp/j2se/connectors/socket/JaxmppHostnameVerifier.java: -------------------------------------------------------------------------------- 1 | /* 2 | * JaxmppHostnameVerifier.java 3 | * 4 | * Tigase XMPP Client Library 5 | * Copyright (C) 2004-2018 "Tigase, Inc." 6 | * 7 | * This program is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, 10 | * or (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. Look for COPYING file in the top folder. 19 | * If not, see http://www.gnu.org/licenses/. 20 | */ 21 | package tigase.jaxmpp.j2se.connectors.socket; 22 | 23 | import java.security.cert.Certificate; 24 | 25 | /** 26 | * Created by bmalkow on 17.07.2017. 27 | */ 28 | public interface JaxmppHostnameVerifier { 29 | 30 | boolean verify(String hostname, Certificate certificate); 31 | } 32 | -------------------------------------------------------------------------------- /jaxmpp-j2se/src/main/java/tigase/jaxmpp/j2se/connectors/socket/Reader.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Reader.java 3 | * 4 | * Tigase XMPP Client Library 5 | * Copyright (C) 2004-2018 "Tigase, Inc." 6 | * 7 | * This program is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, 10 | * or (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. Look for COPYING file in the top folder. 19 | * If not, see http://www.gnu.org/licenses/. 20 | */ 21 | package tigase.jaxmpp.j2se.connectors.socket; 22 | 23 | import java.io.IOException; 24 | 25 | /** 26 | * New Reader class replaces standard InputStreamReader as it cannot read from 27 | * InflaterInputStream. 28 | * 29 | * @author andrzej 30 | */ 31 | public interface Reader { 32 | 33 | int read(char[] cbuf) throws IOException; 34 | 35 | } 36 | -------------------------------------------------------------------------------- /jaxmpp-j2se/src/main/java/tigase/jaxmpp/j2se/connectors/socket/StreamListener.java: -------------------------------------------------------------------------------- 1 | /* 2 | * StreamListener.java 3 | * 4 | * Tigase XMPP Client Library 5 | * Copyright (C) 2004-2018 "Tigase, Inc." 6 | * 7 | * This program is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, 10 | * or (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. Look for COPYING file in the top folder. 19 | * If not, see http://www.gnu.org/licenses/. 20 | */ 21 | package tigase.jaxmpp.j2se.connectors.socket; 22 | 23 | import tigase.xml.Element; 24 | 25 | import java.util.Map; 26 | 27 | public interface StreamListener { 28 | 29 | void nextElement(Element element); 30 | 31 | void xmppStreamClosed(); 32 | 33 | void xmppStreamOpened(Map attribs); 34 | 35 | } -------------------------------------------------------------------------------- /jaxmpp-j2se/src/test/java/tigase/jaxmpp/j2se/JaxmppTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * JaxmppTest.java 3 | * 4 | * Tigase XMPP Client Library 5 | * Copyright (C) 2004-2018 "Tigase, Inc." 6 | * 7 | * This program is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, 10 | * or (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. Look for COPYING file in the top folder. 19 | * If not, see http://www.gnu.org/licenses/. 20 | */ 21 | 22 | package tigase.jaxmpp.j2se; 23 | 24 | import junit.framework.Assert; 25 | import org.junit.Test; 26 | 27 | public class JaxmppTest { 28 | 29 | @Test 30 | public void test() { 31 | try { 32 | Jaxmpp j = new Jaxmpp(); 33 | } catch (Throwable e) { 34 | Assert.fail(e.getMessage()); 35 | } 36 | 37 | } 38 | 39 | } 40 | -------------------------------------------------------------------------------- /jaxmpp-jingle/build.gradle: -------------------------------------------------------------------------------- 1 | /* 2 | * build.gradle 3 | * 4 | * Tigase XMPP Client Library 5 | * Copyright (C) 2004-2018 "Tigase, Inc." 6 | * 7 | * This program is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, 10 | * or (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. Look for COPYING file in the top folder. 19 | * If not, see http://www.gnu.org/licenses/. 20 | */ 21 | 22 | apply plugin: 'java' 23 | 24 | sourceCompatibility = defaultSourceCompatibility 25 | targetCompatibility = defaultTargetCompatibility 26 | 27 | publishing { 28 | publications { 29 | mavenJava(MavenPublication) { 30 | from components.java 31 | } 32 | } 33 | } 34 | 35 | dependencies { 36 | testCompile 'junit:junit:4.12' 37 | compile project(':jaxmpp-core') 38 | } -------------------------------------------------------------------------------- /jaxmpp-jingle/src/main/java/META-INF/MANIFEST.MF: -------------------------------------------------------------------------------- 1 | Manifest-Version: 1.0 2 | Class-Path: 3 | 4 | -------------------------------------------------------------------------------- /jaxmpp-jingle/src/main/java/tigase/jaxmpp/core/JaxmppJingle.gwt.xml: -------------------------------------------------------------------------------- 1 | 2 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /jaxmpp-jingle/src/main/java/tigase/jaxmpp/core/client/xmpp/modules/jingle/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * package-info.java 3 | * 4 | * Tigase XMPP Client Library 5 | * Copyright (C) 2004-2018 "Tigase, Inc." 6 | * 7 | * This program is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, 10 | * or (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. Look for COPYING file in the top folder. 19 | * If not, see http://www.gnu.org/licenses/. 20 | */ 21 | 22 | /** 23 | * Support for JINGLE. 24 | */ 25 | package tigase.jaxmpp.core.client.xmpp.modules.jingle; 26 | 27 | -------------------------------------------------------------------------------- /jaxmpp-mam/build.gradle: -------------------------------------------------------------------------------- 1 | /* 2 | * build.gradle 3 | * 4 | * Tigase XMPP Client Library 5 | * Copyright (C) 2004-2018 "Tigase, Inc." 6 | * 7 | * This program is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, 10 | * or (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. Look for COPYING file in the top folder. 19 | * If not, see http://www.gnu.org/licenses/. 20 | */ 21 | 22 | apply plugin: 'java' 23 | 24 | sourceCompatibility = defaultSourceCompatibility 25 | targetCompatibility = defaultTargetCompatibility 26 | 27 | publishing { 28 | publications { 29 | mavenJava(MavenPublication) { 30 | from components.java 31 | } 32 | } 33 | } 34 | 35 | dependencies { 36 | testCompile 'junit:junit:4.12' 37 | compile project(':jaxmpp-core') 38 | compile project(':jaxmpp-chat') 39 | } -------------------------------------------------------------------------------- /jaxmpp-mam/src/main/java/META-INF/MANIFEST.MF: -------------------------------------------------------------------------------- 1 | Manifest-Version: 1.0 2 | Class-Path: 3 | 4 | -------------------------------------------------------------------------------- /jaxmpp-mam/src/main/java/tigase/jaxmpp/core/JaxmppMAM.gwt.xml: -------------------------------------------------------------------------------- 1 | 2 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /jaxmpp-muc/build.gradle: -------------------------------------------------------------------------------- 1 | /* 2 | * build.gradle 3 | * 4 | * Tigase XMPP Client Library 5 | * Copyright (C) 2004-2018 "Tigase, Inc." 6 | * 7 | * This program is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, 10 | * or (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. Look for COPYING file in the top folder. 19 | * If not, see http://www.gnu.org/licenses/. 20 | */ 21 | 22 | apply plugin: 'java' 23 | 24 | sourceCompatibility = defaultSourceCompatibility 25 | targetCompatibility = defaultTargetCompatibility 26 | 27 | publishing { 28 | publications { 29 | mavenJava(MavenPublication) { 30 | from components.java 31 | } 32 | } 33 | } 34 | 35 | dependencies { 36 | testCompile 'junit:junit:4.12' 37 | compile project(':jaxmpp-core') 38 | } -------------------------------------------------------------------------------- /jaxmpp-muc/src/main/java/META-INF/MANIFEST.MF: -------------------------------------------------------------------------------- 1 | Manifest-Version: 1.0 2 | Class-Path: 3 | 4 | -------------------------------------------------------------------------------- /jaxmpp-muc/src/main/java/tigase/jaxmpp/core/JaxmppMuc.gwt.xml: -------------------------------------------------------------------------------- 1 | 2 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /jaxmpp-muc/src/main/java/tigase/jaxmpp/core/client/xmpp/modules/muc/DefaultRoomsManager.java: -------------------------------------------------------------------------------- 1 | /* 2 | * DefaultRoomsManager.java 3 | * 4 | * Tigase XMPP Client Library 5 | * Copyright (C) 2004-2018 "Tigase, Inc." 6 | * 7 | * This program is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, 10 | * or (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. Look for COPYING file in the top folder. 19 | * If not, see http://www.gnu.org/licenses/. 20 | */ 21 | package tigase.jaxmpp.core.client.xmpp.modules.muc; 22 | 23 | import tigase.jaxmpp.core.client.BareJID; 24 | 25 | public class DefaultRoomsManager 26 | extends AbstractRoomsManager { 27 | 28 | protected static long chatIds = 1; 29 | 30 | @Override 31 | public Room createRoomInstance(BareJID roomJid, String nickname, String password) { 32 | Room room = new Room(chatIds++, context, roomJid, nickname); 33 | room.setPassword(password); 34 | 35 | return room; 36 | } 37 | 38 | } -------------------------------------------------------------------------------- /jaxmpp-muc/src/main/java/tigase/jaxmpp/core/client/xmpp/modules/muc/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * package-info.java 3 | * 4 | * Tigase XMPP Client Library 5 | * Copyright (C) 2004-2018 "Tigase, Inc." 6 | * 7 | * This program is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, 10 | * or (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. Look for COPYING file in the top folder. 19 | * If not, see http://www.gnu.org/licenses/. 20 | */ 21 | 22 | /** 23 | * Support for XEP-0045: Multi-User Chat. 24 | */ 25 | package tigase.jaxmpp.core.client.xmpp.modules.muc; 26 | 27 | -------------------------------------------------------------------------------- /jaxmpp-omemo/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'java' 2 | 3 | sourceCompatibility = defaultSourceCompatibility 4 | targetCompatibility = defaultTargetCompatibility 5 | 6 | publishing { 7 | publications { 8 | mavenJava(MavenPublication) { 9 | from components.java 10 | } 11 | } 12 | } 13 | 14 | dependencies { 15 | testCompile 'junit:junit:4.12' 16 | compile project(':jaxmpp-j2se') 17 | compile project(':jaxmpp-chat') 18 | compile project(':jaxmpp-presence') 19 | compile project(':jaxmpp-pubsub') 20 | compile project(':jaxmpp-roster') 21 | compile 'org.whispersystems:signal-protocol-java:2.8.1' 22 | } 23 | -------------------------------------------------------------------------------- /jaxmpp-omemo/src/main/java/tigase/jaxmpp/core/client/xmpp/modules/omemo/CannotEncryptException.java: -------------------------------------------------------------------------------- 1 | package tigase.jaxmpp.core.client.xmpp.modules.omemo; 2 | 3 | public class CannotEncryptException extends OMEMOException { 4 | 5 | public CannotEncryptException() { 6 | } 7 | 8 | public CannotEncryptException(String message) { 9 | super(message); 10 | } 11 | 12 | public CannotEncryptException(String message, Throwable cause) { 13 | super(message, cause); 14 | } 15 | 16 | public CannotEncryptException(Throwable cause) { 17 | super(cause); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /jaxmpp-omemo/src/main/java/tigase/jaxmpp/core/client/xmpp/modules/omemo/JaXMPPSignalProtocolStore.java: -------------------------------------------------------------------------------- 1 | package tigase.jaxmpp.core.client.xmpp.modules.omemo; 2 | 3 | import org.whispersystems.libsignal.state.PreKeyRecord; 4 | import org.whispersystems.libsignal.state.SignalProtocolStore; 5 | 6 | import java.util.List; 7 | 8 | public interface JaXMPPSignalProtocolStore 9 | extends SignalProtocolStore, OMEMOSessionsProvider { 10 | 11 | List loadPreKeys(); 12 | 13 | List getSubDevice(String name); 14 | 15 | } 16 | -------------------------------------------------------------------------------- /jaxmpp-omemo/src/main/java/tigase/jaxmpp/core/client/xmpp/modules/omemo/OMEMOEncryptableMessage.java: -------------------------------------------------------------------------------- 1 | package tigase.jaxmpp.core.client.xmpp.modules.omemo; 2 | 3 | import tigase.jaxmpp.core.client.xml.Element; 4 | import tigase.jaxmpp.core.client.xml.XMLException; 5 | import tigase.jaxmpp.core.client.xmpp.stanzas.Message; 6 | 7 | public class OMEMOEncryptableMessage 8 | extends Message { 9 | 10 | public static enum Encryption { 11 | Required, 12 | Disabled, Default 13 | } 14 | private Encryption encryption = Encryption.Default; 15 | 16 | public OMEMOEncryptableMessage(Element element) throws XMLException { 17 | super(element); 18 | } 19 | 20 | public Encryption getEncryption() { 21 | return encryption; 22 | } 23 | 24 | public void setEncryption(Encryption encryption) { 25 | this.encryption = encryption; 26 | } 27 | 28 | } 29 | -------------------------------------------------------------------------------- /jaxmpp-omemo/src/main/java/tigase/jaxmpp/core/client/xmpp/modules/omemo/OMEMOException.java: -------------------------------------------------------------------------------- 1 | package tigase.jaxmpp.core.client.xmpp.modules.omemo; 2 | 3 | import tigase.jaxmpp.core.client.exceptions.JaxmppException; 4 | 5 | public class OMEMOException extends JaxmppException { 6 | 7 | public OMEMOException() { 8 | } 9 | 10 | public OMEMOException(String message) { 11 | super(message); 12 | } 13 | 14 | public OMEMOException(String message, Throwable cause) { 15 | super(message, cause); 16 | } 17 | 18 | public OMEMOException(Throwable cause) { 19 | super(cause); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /jaxmpp-omemo/src/main/java/tigase/jaxmpp/core/client/xmpp/modules/omemo/OMEMOMessage.java: -------------------------------------------------------------------------------- 1 | package tigase.jaxmpp.core.client.xmpp.modules.omemo; 2 | 3 | import tigase.jaxmpp.core.client.xml.Element; 4 | import tigase.jaxmpp.core.client.xml.XMLException; 5 | import tigase.jaxmpp.core.client.xmpp.stanzas.Message; 6 | 7 | public class OMEMOMessage 8 | extends Message { 9 | 10 | private boolean secured; 11 | 12 | protected OMEMOMessage(boolean secured, Element element) throws XMLException { 13 | super(element); 14 | this.secured = secured; 15 | } 16 | 17 | public boolean isSecured() { 18 | return secured; 19 | } 20 | 21 | public void setSecured(boolean secured) { 22 | this.secured = secured; 23 | } 24 | 25 | } 26 | -------------------------------------------------------------------------------- /jaxmpp-omemo/src/main/java/tigase/jaxmpp/core/client/xmpp/modules/omemo/OMEMOSessionsProvider.java: -------------------------------------------------------------------------------- 1 | package tigase.jaxmpp.core.client.xmpp.modules.omemo; 2 | 3 | import tigase.jaxmpp.core.client.BareJID; 4 | 5 | public interface OMEMOSessionsProvider { 6 | 7 | XmppOMEMOSession getSession(BareJID jid); 8 | 9 | void storeSession(XmppOMEMOSession session); 10 | 11 | void removeSession(XmppOMEMOSession session); 12 | 13 | boolean isOMEMORequired(BareJID jid); 14 | 15 | void setOMEMORequired(BareJID jid, boolean required); 16 | 17 | } 18 | -------------------------------------------------------------------------------- /jaxmpp-presence/build.gradle: -------------------------------------------------------------------------------- 1 | /* 2 | * build.gradle 3 | * 4 | * Tigase XMPP Client Library 5 | * Copyright (C) 2004-2018 "Tigase, Inc." 6 | * 7 | * This program is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, 10 | * or (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. Look for COPYING file in the top folder. 19 | * If not, see http://www.gnu.org/licenses/. 20 | */ 21 | 22 | apply plugin: 'java' 23 | 24 | sourceCompatibility = defaultSourceCompatibility 25 | targetCompatibility = defaultTargetCompatibility 26 | 27 | publishing { 28 | publications { 29 | mavenJava(MavenPublication) { 30 | from components.java 31 | } 32 | } 33 | } 34 | 35 | dependencies { 36 | testCompile 'junit:junit:4.12' 37 | compile project(':jaxmpp-core') 38 | testCompile project(':jaxmpp-core').sourceSets.test.output 39 | } -------------------------------------------------------------------------------- /jaxmpp-presence/src/main/java/META-INF/MANIFEST.MF: -------------------------------------------------------------------------------- 1 | Manifest-Version: 1.0 2 | Class-Path: 3 | 4 | -------------------------------------------------------------------------------- /jaxmpp-presence/src/main/java/tigase/jaxmpp/core/JaxmppPresence.gwt.xml: -------------------------------------------------------------------------------- 1 | 2 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /jaxmpp-presence/src/main/java/tigase/jaxmpp/core/client/xmpp/modules/presence/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * package-info.java 3 | * 4 | * Tigase XMPP Client Library 5 | * Copyright (C) 2004-2018 "Tigase, Inc." 6 | * 7 | * This program is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, 10 | * or (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. Look for COPYING file in the top folder. 19 | * If not, see http://www.gnu.org/licenses/. 20 | */ 21 | 22 | /** 23 | * Support for presence. 24 | */ 25 | package tigase.jaxmpp.core.client.xmpp.modules.presence; 26 | 27 | -------------------------------------------------------------------------------- /jaxmpp-presence/src/test/java/tigase/jaxmpp/core/client/MockPresenceStore.java: -------------------------------------------------------------------------------- 1 | /* 2 | * MockPresenceStore.java 3 | * 4 | * Tigase XMPP Client Library 5 | * Copyright (C) 2004-2018 "Tigase, Inc." 6 | * 7 | * This program is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, 10 | * or (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. Look for COPYING file in the top folder. 19 | * If not, see http://www.gnu.org/licenses/. 20 | */ 21 | 22 | package tigase.jaxmpp.core.client; 23 | 24 | import tigase.jaxmpp.core.client.xmpp.modules.presence.PresenceStore; 25 | import tigase.jaxmpp.core.client.xmpp.stanzas.Presence; 26 | 27 | import java.util.HashMap; 28 | import java.util.Map; 29 | 30 | public class MockPresenceStore 31 | extends PresenceStore { 32 | 33 | public MockPresenceStore() { 34 | presencesMapByBareJid = new HashMap>(); 35 | presenceByJid = new HashMap(); 36 | bestPresence = new HashMap(); 37 | } 38 | 39 | @Override 40 | protected Map createResourcePresenceMap() { 41 | return new HashMap(); 42 | } 43 | 44 | } 45 | -------------------------------------------------------------------------------- /jaxmpp-pubsub/build.gradle: -------------------------------------------------------------------------------- 1 | /* 2 | * build.gradle 3 | * 4 | * Tigase XMPP Client Library 5 | * Copyright (C) 2004-2018 "Tigase, Inc." 6 | * 7 | * This program is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, 10 | * or (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. Look for COPYING file in the top folder. 19 | * If not, see http://www.gnu.org/licenses/. 20 | */ 21 | 22 | apply plugin: 'java' 23 | 24 | sourceCompatibility = defaultSourceCompatibility 25 | targetCompatibility = defaultTargetCompatibility 26 | 27 | publishing { 28 | publications { 29 | mavenJava(MavenPublication) { 30 | from components.java 31 | } 32 | } 33 | } 34 | 35 | dependencies { 36 | testCompile 'junit:junit:4.12' 37 | compile project(':jaxmpp-core') 38 | } -------------------------------------------------------------------------------- /jaxmpp-pubsub/src/main/java/META-INF/MANIFEST.MF: -------------------------------------------------------------------------------- 1 | Manifest-Version: 1.0 2 | Class-Path: 3 | 4 | -------------------------------------------------------------------------------- /jaxmpp-pubsub/src/main/java/tigase/jaxmpp/core/JaxmppPubSub.gwt.xml: -------------------------------------------------------------------------------- 1 | 2 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /jaxmpp-pubsub/src/main/java/tigase/jaxmpp/core/client/xmpp/modules/pubsub/Affiliation.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Affiliation.java 3 | * 4 | * Tigase XMPP Client Library 5 | * Copyright (C) 2004-2018 "Tigase, Inc." 6 | * 7 | * This program is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, 10 | * or (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. Look for COPYING file in the top folder. 19 | * If not, see http://www.gnu.org/licenses/. 20 | */ 21 | 22 | package tigase.jaxmpp.core.client.xmpp.modules.pubsub; 23 | 24 | public enum Affiliation { 25 | /** */ 26 | member, 27 | /** */ 28 | none, 29 | /** An entity that is disallowed from subscribing or publishing to a node. */ 30 | outcast, 31 | /** 32 | * The manager of a node, of which there may be more than one; often but not 33 | * necessarily the node creator. 34 | */ 35 | owner, 36 | /** An entity that is allowed to publish items to a node. */ 37 | publisher; 38 | } 39 | -------------------------------------------------------------------------------- /jaxmpp-pubsub/src/main/java/tigase/jaxmpp/core/client/xmpp/modules/pubsub/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * package-info.java 3 | * 4 | * Tigase XMPP Client Library 5 | * Copyright (C) 2004-2018 "Tigase, Inc." 6 | * 7 | * This program is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, 10 | * or (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. Look for COPYING file in the top folder. 19 | * If not, see http://www.gnu.org/licenses/. 20 | */ 21 | 22 | /** 23 | * Support for XEP-0060: Publish-Subscribe. 24 | */ 25 | package tigase.jaxmpp.core.client.xmpp.modules.pubsub; 26 | 27 | -------------------------------------------------------------------------------- /jaxmpp-push/build.gradle: -------------------------------------------------------------------------------- 1 | /* 2 | * build.gradle 3 | * 4 | * Tigase XMPP Client Library 5 | * Copyright (C) 2004-2018 "Tigase, Inc." 6 | * 7 | * This program is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, 10 | * or (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. Look for COPYING file in the top folder. 19 | * If not, see http://www.gnu.org/licenses/. 20 | */ 21 | 22 | apply plugin: 'java' 23 | 24 | sourceCompatibility = defaultSourceCompatibility 25 | targetCompatibility = defaultTargetCompatibility 26 | 27 | publishing { 28 | publications { 29 | mavenJava(MavenPublication) { 30 | from components.java 31 | } 32 | } 33 | } 34 | 35 | dependencies { 36 | testCompile 'junit:junit:4.12' 37 | compile project(':jaxmpp-core') 38 | } -------------------------------------------------------------------------------- /jaxmpp-registration/build.gradle: -------------------------------------------------------------------------------- 1 | /* 2 | * build.gradle 3 | * 4 | * Tigase XMPP Client Library 5 | * Copyright (C) 2004-2018 "Tigase, Inc." 6 | * 7 | * This program is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, 10 | * or (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. Look for COPYING file in the top folder. 19 | * If not, see http://www.gnu.org/licenses/. 20 | */ 21 | 22 | apply plugin: 'java' 23 | 24 | sourceCompatibility = defaultSourceCompatibility 25 | targetCompatibility = defaultTargetCompatibility 26 | 27 | publishing { 28 | publications { 29 | mavenJava(MavenPublication) { 30 | from components.java 31 | } 32 | } 33 | } 34 | 35 | dependencies { 36 | testCompile 'junit:junit:4.12' 37 | compile project(':jaxmpp-core') 38 | } -------------------------------------------------------------------------------- /jaxmpp-registration/src/main/java/META-INF/MANIFEST.MF: -------------------------------------------------------------------------------- 1 | Manifest-Version: 1.0 2 | Class-Path: 3 | 4 | -------------------------------------------------------------------------------- /jaxmpp-registration/src/main/java/tigase/jaxmpp/core/JaxmppRegistration.gwt.xml: -------------------------------------------------------------------------------- 1 | 2 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /jaxmpp-registration/src/main/java/tigase/jaxmpp/core/client/xmpp/modules/registration/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * package-info.java 3 | * 4 | * Tigase XMPP Client Library 5 | * Copyright (C) 2004-2018 "Tigase, Inc." 6 | * 7 | * This program is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, 10 | * or (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. Look for COPYING file in the top folder. 19 | * If not, see http://www.gnu.org/licenses/. 20 | */ 21 | 22 | /** 23 | * Support for XEP-0077: In-Band Registration. 24 | */ 25 | package tigase.jaxmpp.core.client.xmpp.modules.registration; 26 | 27 | -------------------------------------------------------------------------------- /jaxmpp-roster/build.gradle: -------------------------------------------------------------------------------- 1 | /* 2 | * build.gradle 3 | * 4 | * Tigase XMPP Client Library 5 | * Copyright (C) 2004-2018 "Tigase, Inc." 6 | * 7 | * This program is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, 10 | * or (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. Look for COPYING file in the top folder. 19 | * If not, see http://www.gnu.org/licenses/. 20 | */ 21 | 22 | apply plugin: 'java' 23 | 24 | sourceCompatibility = defaultSourceCompatibility 25 | targetCompatibility = defaultTargetCompatibility 26 | 27 | publishing { 28 | publications { 29 | mavenJava(MavenPublication) { 30 | from components.java 31 | } 32 | } 33 | } 34 | 35 | dependencies { 36 | testCompile 'junit:junit:4.12' 37 | compile project(':jaxmpp-core') 38 | } -------------------------------------------------------------------------------- /jaxmpp-roster/src/main/java/META-INF/MANIFEST.MF: -------------------------------------------------------------------------------- 1 | Manifest-Version: 1.0 2 | Class-Path: 3 | 4 | -------------------------------------------------------------------------------- /jaxmpp-roster/src/main/java/tigase/jaxmpp/core/JaxmppRoster.gwt.xml: -------------------------------------------------------------------------------- 1 | 2 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /jaxmpp-roster/src/main/java/tigase/jaxmpp/core/client/xmpp/modules/roster/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * package-info.java 3 | * 4 | * Tigase XMPP Client Library 5 | * Copyright (C) 2004-2018 "Tigase, Inc." 6 | * 7 | * This program is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, 10 | * or (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. Look for COPYING file in the top folder. 19 | * If not, see http://www.gnu.org/licenses/. 20 | */ 21 | 22 | /** 23 | * Support for roster management. 24 | */ 25 | package tigase.jaxmpp.core.client.xmpp.modules.roster; 26 | 27 | -------------------------------------------------------------------------------- /jaxmpp-socks5/build.gradle: -------------------------------------------------------------------------------- 1 | /* 2 | * build.gradle 3 | * 4 | * Tigase XMPP Client Library 5 | * Copyright (C) 2004-2018 "Tigase, Inc." 6 | * 7 | * This program is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, 10 | * or (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. Look for COPYING file in the top folder. 19 | * If not, see http://www.gnu.org/licenses/. 20 | */ 21 | 22 | apply plugin: 'java' 23 | 24 | sourceCompatibility = defaultSourceCompatibility 25 | targetCompatibility = defaultTargetCompatibility 26 | 27 | publishing { 28 | publications { 29 | mavenJava(MavenPublication) { 30 | from components.java 31 | } 32 | } 33 | } 34 | 35 | dependencies { 36 | testCompile 'junit:junit:4.12' 37 | compile project(':jaxmpp-core') 38 | } -------------------------------------------------------------------------------- /jaxmpp-socks5/src/main/java/META-INF/MANIFEST.MF: -------------------------------------------------------------------------------- 1 | Manifest-Version: 1.0 2 | Class-Path: 3 | 4 | -------------------------------------------------------------------------------- /jaxmpp-socks5/src/main/java/tigase/jaxmpp/core/JaxmppSocks5.gwt.xml: -------------------------------------------------------------------------------- 1 | 2 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /jaxmpp-vcard/build.gradle: -------------------------------------------------------------------------------- 1 | /* 2 | * build.gradle 3 | * 4 | * Tigase XMPP Client Library 5 | * Copyright (C) 2004-2018 "Tigase, Inc." 6 | * 7 | * This program is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, 10 | * or (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. Look for COPYING file in the top folder. 19 | * If not, see http://www.gnu.org/licenses/. 20 | */ 21 | 22 | apply plugin: 'java' 23 | 24 | sourceCompatibility = defaultSourceCompatibility 25 | targetCompatibility = defaultTargetCompatibility 26 | 27 | publishing { 28 | publications { 29 | mavenJava(MavenPublication) { 30 | from components.java 31 | } 32 | } 33 | } 34 | 35 | dependencies { 36 | testCompile 'junit:junit:4.12' 37 | compile project(':jaxmpp-core') 38 | } -------------------------------------------------------------------------------- /jaxmpp-vcard/src/main/java/META-INF/MANIFEST.MF: -------------------------------------------------------------------------------- 1 | Manifest-Version: 1.0 2 | Class-Path: 3 | 4 | -------------------------------------------------------------------------------- /jaxmpp-vcard/src/main/java/tigase/jaxmpp/core/JaxmppVCard.gwt.xml: -------------------------------------------------------------------------------- 1 | 2 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /jaxmpp-vcard/src/main/java/tigase/jaxmpp/core/client/xmpp/modules/vcard/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * package-info.java 3 | * 4 | * Tigase XMPP Client Library 5 | * Copyright (C) 2004-2018 "Tigase, Inc." 6 | * 7 | * This program is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, 10 | * or (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. Look for COPYING file in the top folder. 19 | * If not, see http://www.gnu.org/licenses/. 20 | */ 21 | 22 | /** 23 | * Support for XEP-0054: vcard-temp. 24 | */ 25 | package tigase.jaxmpp.core.client.xmpp.modules.vcard; 26 | 27 | -------------------------------------------------------------------------------- /jaxmpp-workgroup/build.gradle: -------------------------------------------------------------------------------- 1 | /* 2 | * build.gradle 3 | * 4 | * Tigase XMPP Client Library 5 | * Copyright (C) 2004-2018 "Tigase, Inc." 6 | * 7 | * This program is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, 10 | * or (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. Look for COPYING file in the top folder. 19 | * If not, see http://www.gnu.org/licenses/. 20 | */ 21 | 22 | apply plugin: 'java' 23 | 24 | sourceCompatibility = defaultSourceCompatibility 25 | targetCompatibility = defaultTargetCompatibility 26 | 27 | publishing { 28 | publications { 29 | mavenJava(MavenPublication) { 30 | from components.java 31 | } 32 | } 33 | } 34 | 35 | dependencies { 36 | testCompile 'junit:junit:4.12' 37 | compile project(':jaxmpp-core') 38 | } -------------------------------------------------------------------------------- /jaxmpp-workgroup/src/main/java/tigase/jaxmpp/core/client/xmpp/modules/workgroup/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * package-info.java 3 | * 4 | * Tigase XMPP Client Library 5 | * Copyright (C) 2004-2018 "Tigase, Inc." 6 | * 7 | * This program is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, 10 | * or (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. Look for COPYING file in the top folder. 19 | * If not, see http://www.gnu.org/licenses/. 20 | */ 21 | 22 | /** 23 | * Support for XEP-0013: Flexible Offline Message Retrieval. 24 | */ 25 | package tigase.jaxmpp.core.client.xmpp.modules.workgroup; 26 | 27 | -------------------------------------------------------------------------------- /jaxmpp-xep0013_flexible_offline/build.gradle: -------------------------------------------------------------------------------- 1 | /* 2 | * build.gradle 3 | * 4 | * Tigase XMPP Client Library 5 | * Copyright (C) 2004-2018 "Tigase, Inc." 6 | * 7 | * This program is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, 10 | * or (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. Look for COPYING file in the top folder. 19 | * If not, see http://www.gnu.org/licenses/. 20 | */ 21 | 22 | apply plugin: 'java' 23 | 24 | sourceCompatibility = defaultSourceCompatibility 25 | targetCompatibility = defaultTargetCompatibility 26 | 27 | publishing { 28 | publications { 29 | mavenJava(MavenPublication) { 30 | from components.java 31 | } 32 | } 33 | } 34 | 35 | dependencies { 36 | testCompile 'junit:junit:4.12' 37 | compile project(':jaxmpp-core') 38 | compile project(':jaxmpp-presence') 39 | } -------------------------------------------------------------------------------- /jaxmpp-xep0013_flexible_offline/src/main/java/tigase/jaxmpp/core/client/xmpp/modules/flexible_offline/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * package-info.java 3 | * 4 | * Tigase XMPP Client Library 5 | * Copyright (C) 2004-2018 "Tigase, Inc." 6 | * 7 | * This program is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, 10 | * or (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. Look for COPYING file in the top folder. 19 | * If not, see http://www.gnu.org/licenses/. 20 | */ 21 | 22 | /** 23 | * Support for XEP-0013: Flexible Offline Message Retrieval. 24 | */ 25 | package tigase.jaxmpp.core.client.xmpp.modules.flexible_offline; 26 | 27 | -------------------------------------------------------------------------------- /jaxmpp-xep0136/build.gradle: -------------------------------------------------------------------------------- 1 | /* 2 | * build.gradle 3 | * 4 | * Tigase XMPP Client Library 5 | * Copyright (C) 2004-2018 "Tigase, Inc." 6 | * 7 | * This program is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, 10 | * or (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. Look for COPYING file in the top folder. 19 | * If not, see http://www.gnu.org/licenses/. 20 | */ 21 | 22 | apply plugin: 'java' 23 | 24 | sourceCompatibility = defaultSourceCompatibility 25 | targetCompatibility = defaultTargetCompatibility 26 | 27 | publishing { 28 | publications { 29 | mavenJava(MavenPublication) { 30 | from components.java 31 | } 32 | } 33 | } 34 | 35 | dependencies { 36 | testCompile 'junit:junit:4.12' 37 | compile project(':jaxmpp-core') 38 | } -------------------------------------------------------------------------------- /jaxmpp-xep0136/src/main/java/META-INF/MANIFEST.MF: -------------------------------------------------------------------------------- 1 | Manifest-Version: 1.0 2 | Class-Path: 3 | 4 | -------------------------------------------------------------------------------- /jaxmpp-xep0136/src/main/java/tigase/jaxmpp/core/JaxmppXep0136.gwt.xml: -------------------------------------------------------------------------------- 1 | 2 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /jaxmpp-xep0136/src/main/java/tigase/jaxmpp/core/client/xmpp/modules/xep0136/ChatResultSet.java: -------------------------------------------------------------------------------- 1 | /* 2 | * ChatResultSet.java 3 | * 4 | * Tigase XMPP Client Library 5 | * Copyright (C) 2004-2018 "Tigase, Inc." 6 | * 7 | * This program is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, 10 | * or (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. Look for COPYING file in the top folder. 19 | * If not, see http://www.gnu.org/licenses/. 20 | */ 21 | package tigase.jaxmpp.core.client.xmpp.modules.xep0136; 22 | 23 | public class ChatResultSet 24 | extends ResultSet { 25 | 26 | private Chat chat = new Chat(); 27 | 28 | public Chat getChat() { 29 | return chat; 30 | } 31 | 32 | void setChat(Chat chat) { 33 | this.chat = chat; 34 | } 35 | 36 | } 37 | --------------------------------------------------------------------------------