Compare commits
	
		
			2 Commits
		
	
	
		
			8443411f07
			...
			7f3538875b
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 7f3538875b | |||
| f6efa20ff4 | 
| @ -16,10 +16,10 @@ dependencies: | |||||||
|     version: 0.1.4+1 |     version: 0.1.4+1 | ||||||
|   moxxmpp: |   moxxmpp: | ||||||
|     hosted: https://git.polynom.me/api/packages/Moxxy/pub |     hosted: https://git.polynom.me/api/packages/Moxxy/pub | ||||||
|     version: 0.1.6+1 |     version: 0.3.0 | ||||||
|   moxxmpp_socket_tcp: |   moxxmpp_socket_tcp: | ||||||
|     hosted: https://git.polynom.me/api/packages/Moxxy/pub |     hosted: https://git.polynom.me/api/packages/Moxxy/pub | ||||||
|     version: 0.1.2+9 |     version: 0.3.0 | ||||||
| 
 | 
 | ||||||
| dev_dependencies: | dev_dependencies: | ||||||
|   flutter_test: |   flutter_test: | ||||||
|  | |||||||
| @ -7,8 +7,8 @@ environment: | |||||||
| 
 | 
 | ||||||
| dependencies: | dependencies: | ||||||
|   logging: ^1.0.2 |   logging: ^1.0.2 | ||||||
|   moxxmpp: 0.2.0 |   moxxmpp: 0.3.0 | ||||||
|   moxxmpp_socket_tcp: 0.2.1 |   moxxmpp_socket_tcp: 0.3.0 | ||||||
|    |    | ||||||
| dev_dependencies: | dev_dependencies: | ||||||
|   lints: ^2.0.0 |   lints: ^2.0.0 | ||||||
|  | |||||||
| @ -31,10 +31,6 @@ void main() { | |||||||
|         host: '127.0.0.1', |         host: '127.0.0.1', | ||||||
|         port: 8888, |         port: 8888, | ||||||
|       ); |       ); | ||||||
|     await conn.registerManagers([ |  | ||||||
|       RosterManager(TestingRosterStateManager('', [])), |  | ||||||
|       DiscoManager([]), |  | ||||||
|     ]); |  | ||||||
| 
 | 
 | ||||||
|     final result = await conn.connect( |     final result = await conn.connect( | ||||||
|       waitUntilLogin: true, |       waitUntilLogin: true, | ||||||
|  | |||||||
| @ -9,7 +9,7 @@ Include the following as a dependency in your pubspec file: | |||||||
| ``` | ``` | ||||||
|  moxxmpp: |  moxxmpp: | ||||||
|     hosted: https://git.polynom.me/api/packages/Moxxy/pub |     hosted: https://git.polynom.me/api/packages/Moxxy/pub | ||||||
|     version: 0.2.0 |     version: 0.3.0 | ||||||
| ``` | ``` | ||||||
| 
 | 
 | ||||||
| You can find the documentation [here](https://moxxy.org/developers/docs/moxxmpp/). | You can find the documentation [here](https://moxxy.org/developers/docs/moxxmpp/). | ||||||
|  | |||||||
| @ -262,26 +262,14 @@ class XmppConnection { | |||||||
|     return getManagerById(presenceManager); |     return getManagerById(presenceManager); | ||||||
|   } |   } | ||||||
| 
 | 
 | ||||||
|   /// A [DiscoManager] is required so, have a wrapper for getting it. |  | ||||||
|   /// Returns the registered [DiscoManager]. |   /// Returns the registered [DiscoManager]. | ||||||
|   DiscoManager getDiscoManager() { |   DiscoManager? getDiscoManager() { | ||||||
|     assert( |     return getManagerById<DiscoManager>(discoManager); | ||||||
|       _xmppManagers.containsKey(discoManager), |  | ||||||
|       'A DiscoManager is mandatory', |  | ||||||
|     ); |  | ||||||
| 
 |  | ||||||
|     return getManagerById(discoManager)!; |  | ||||||
|   } |   } | ||||||
| 
 | 
 | ||||||
|   /// A [RosterManager] is required, so have a wrapper for getting it. |  | ||||||
|   /// Returns the registered [RosterManager]. |   /// Returns the registered [RosterManager]. | ||||||
|   RosterManager getRosterManager() { |   RosterManager? getRosterManager() { | ||||||
|     assert( |     return getManagerById<RosterManager>(rosterManager); | ||||||
|       _xmppManagers.containsKey(rosterManager), |  | ||||||
|       'A RosterManager is mandatory', |  | ||||||
|     ); |  | ||||||
| 
 |  | ||||||
|     return getManagerById(rosterManager)!; |  | ||||||
|   } |   } | ||||||
| 
 | 
 | ||||||
|   /// Returns the registered [StreamManagementManager], if one is registered. |   /// Returns the registered [StreamManagementManager], if one is registered. | ||||||
| @ -845,18 +833,6 @@ class XmppConnection { | |||||||
|     } |     } | ||||||
|   } |   } | ||||||
| 
 | 
 | ||||||
|   /// Make sure that all required managers are registered |  | ||||||
|   void _runPreConnectionAssertions() { |  | ||||||
|     assert( |  | ||||||
|       _xmppManagers.containsKey(rosterManager), |  | ||||||
|       'A RosterManager is mandatory', |  | ||||||
|     ); |  | ||||||
|     assert( |  | ||||||
|       _xmppManagers.containsKey(discoManager), |  | ||||||
|       'A DiscoManager is mandatory', |  | ||||||
|     ); |  | ||||||
|   } |  | ||||||
| 
 |  | ||||||
|   /// The private implementation for [XmppConnection.connect]. The parameters have |   /// The private implementation for [XmppConnection.connect]. The parameters have | ||||||
|   /// the same meaning as with [XmppConnection.connect]. |   /// the same meaning as with [XmppConnection.connect]. | ||||||
|   Future<Result<bool, XmppError>> _connectImpl({ |   Future<Result<bool, XmppError>> _connectImpl({ | ||||||
| @ -957,8 +933,6 @@ class XmppConnection { | |||||||
|     bool waitUntilLogin = false, |     bool waitUntilLogin = false, | ||||||
|     bool enableReconnectOnSuccess = true, |     bool enableReconnectOnSuccess = true, | ||||||
|   }) async { |   }) async { | ||||||
|     _runPreConnectionAssertions(); |  | ||||||
| 
 |  | ||||||
|     final result = _connectImpl( |     final result = _connectImpl( | ||||||
|       lastResource: lastResource, |       lastResource: lastResource, | ||||||
|       shouldReconnect: shouldReconnect ?? !waitUntilLogin, |       shouldReconnect: shouldReconnect ?? !waitUntilLogin, | ||||||
|  | |||||||
| @ -35,10 +35,6 @@ void main() { | |||||||
|         jid: JID.fromString('component.example.org'), |         jid: JID.fromString('component.example.org'), | ||||||
|         password: 'abc123', |         password: 'abc123', | ||||||
|       ); |       ); | ||||||
|     await conn.registerManagers([ |  | ||||||
|       RosterManager(TestingRosterStateManager('', [])), |  | ||||||
|       DiscoManager([]), |  | ||||||
|     ]); |  | ||||||
|     final result = await conn.connect( |     final result = await conn.connect( | ||||||
|       waitUntilLogin: true, |       waitUntilLogin: true, | ||||||
|     ); |     ); | ||||||
|  | |||||||
| @ -1,6 +1,6 @@ | |||||||
| name: moxxmpp_socket_tcp | name: moxxmpp_socket_tcp | ||||||
| description: A socket for moxxmpp using TCP that implements the RFC6120 connection algorithm and XEP-0368 | description: A socket for moxxmpp using TCP that implements the RFC6120 connection algorithm and XEP-0368 | ||||||
| version: 0.2.1 | version: 0.3.0 | ||||||
| homepage: https://codeberg.org/moxxy/moxxmpp | homepage: https://codeberg.org/moxxy/moxxmpp | ||||||
| publish_to: https://git.polynom.me/api/packages/Moxxy/pub | publish_to: https://git.polynom.me/api/packages/Moxxy/pub | ||||||
| 
 | 
 | ||||||
| @ -12,7 +12,7 @@ dependencies: | |||||||
|   meta: ^1.6.0 |   meta: ^1.6.0 | ||||||
|   moxxmpp: |   moxxmpp: | ||||||
|     hosted: https://git.polynom.me/api/packages/Moxxy/pub |     hosted: https://git.polynom.me/api/packages/Moxxy/pub | ||||||
|     version: ^0.2.0 |     version: ^0.3.0 | ||||||
| 
 | 
 | ||||||
| dev_dependencies: | dev_dependencies: | ||||||
|   lints: ^2.0.0 |   lints: ^2.0.0 | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user