-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #17 from takenet/feature/999999-blue-messenger
feat: version upgrade
- Loading branch information
Showing
18 changed files
with
304 additions
and
239 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,53 +1,54 @@ | ||
library lime; | ||
library; | ||
|
||
export 'src/protocol/guid.dart' show guid; | ||
export 'src/protocol/extensions/string.extension.dart' show StringExtension; | ||
export 'src/protocol/extensions/notification_event.extension.dart' | ||
show NotificationEventExtension; | ||
export 'package:lime/src/protocol/extensions/authentication_schema.extension.dart' | ||
show AuthenticationSchemaExtension; | ||
|
||
export 'src/protocol/client/client_channel.dart' show ClientChannel; | ||
export 'src/protocol/command.dart' show Command; | ||
export 'src/protocol/document.dart' show Document; | ||
export 'src/protocol/envelope.dart' show Envelope; | ||
export 'src/protocol/lime_uri.dart' show LimeUri; | ||
export 'src/protocol/media_type.dart' show MediaType; | ||
export 'src/protocol/message.dart' show Message; | ||
export 'src/protocol/notification.dart' show Notification; | ||
export 'src/protocol/plain_document.dart' show PlainDocument; | ||
export 'src/protocol/reason_codes.dart' show ReasonCodes; | ||
export 'src/protocol/reason.dart' show Reason; | ||
export 'src/protocol/enums/command_method.enum.dart' show CommandMethod; | ||
export 'src/protocol/enums/command_status.enum.dart' show CommandStatus; | ||
export 'src/protocol/enums/notification_event.enum.dart' show NotificationEvent; | ||
export 'src/protocol/enums/presence_status.enum.dart' show PresenceStatus; | ||
export 'src/protocol/enums/routing_rule.enum.dart' show RoutingRule; | ||
export 'src/protocol/enums/session_compression.enum.dart' | ||
show SessionCompression; | ||
export 'src/protocol/enums/session_encryption.enum.dart' show SessionEncryption; | ||
export 'src/protocol/enums/session_state.enum.dart' show SessionState; | ||
export 'src/protocol/enums/presence_status.enum.dart' show PresenceStatus; | ||
export 'src/protocol/enums/routing_rule.enum.dart' show RoutingRule; | ||
export 'src/protocol/envelope.dart' show Envelope; | ||
export 'src/protocol/exceptions/insecure_socket.exception.dart' | ||
show InsecureSocketException; | ||
export 'src/protocol/exceptions/lime.exception.dart' show LimeException; | ||
export 'src/protocol/extensions/envelope.extension.dart' show EnvelopeExtension; | ||
export 'src/protocol/types/composite_types.dart' show CompositeTypes; | ||
export 'src/protocol/types/discrete_types.dart' show DiscreteTypes; | ||
export 'src/protocol/types/sub_types.dart' show SubTypes; | ||
export 'src/protocol/node.dart' show Node; | ||
export 'src/protocol/extensions/notification_event.extension.dart' | ||
show NotificationEventExtension; | ||
export 'src/protocol/extensions/string.extension.dart' show StringExtension; | ||
export 'src/protocol/guid.dart' show guid; | ||
export 'src/protocol/identity.dart' show Identity; | ||
export 'src/protocol/session.dart' show Session; | ||
export 'src/protocol/lime_uri.dart' show LimeUri; | ||
export 'src/protocol/media_type.dart' show MediaType; | ||
export 'src/protocol/message.dart' show Message; | ||
export 'src/protocol/network/transport.dart' show Transport; | ||
export 'src/protocol/network/web_socket_transport.dart' show WebSocketTransport; | ||
export 'src/protocol/node.dart' show Node; | ||
export 'src/protocol/notification.dart' show Notification; | ||
export 'src/protocol/plain_document.dart' show PlainDocument; | ||
export 'src/protocol/presence.dart' show Presence; | ||
export 'src/protocol/reason.dart' show Reason; | ||
export 'src/protocol/reason_codes.dart' show ReasonCodes; | ||
export 'src/protocol/security/authentication.dart' show Authentication; | ||
export 'src/protocol/security/enums/authentication_scheme.enum.dart' | ||
show AuthenticationScheme; | ||
export 'src/protocol/security/external_authentication.dart' | ||
show ExternalAuthentication; | ||
export 'src/protocol/security/guest_authentication.dart' | ||
show GuestAuthentication; | ||
export 'src/protocol/security/key_authentication.dart' show KeyAuthentication; | ||
export 'src/protocol/security/external_authentication.dart' | ||
show ExternalAuthentication; | ||
export 'src/protocol/security/plain_authentication.dart' | ||
show PlainAuthentication; | ||
export 'src/protocol/security/transport_authentication.dart' | ||
show TransportAuthentication; | ||
export 'src/protocol/security/enums/authentication_scheme.enum.dart' | ||
show AuthenticationScheme; | ||
export 'package:lime/src/protocol/extensions/authentication_schema.extension.dart' | ||
show AuthenticationSchemaExtension; | ||
export 'src/protocol/client/client_channel.dart' show ClientChannel; | ||
export 'src/protocol/network/transport.dart' show Transport; | ||
export 'src/protocol/network/web_socket_transport.dart' show WebSocketTransport; | ||
export 'src/protocol/exceptions/lime.exception.dart' show LimeException; | ||
export 'src/protocol/exceptions/insecure_socket.exception.dart' | ||
show InsecureSocketException; | ||
export 'src/protocol/session.dart' show Session; | ||
export 'src/protocol/types/composite_types.dart' show CompositeTypes; | ||
export 'src/protocol/types/discrete_types.dart' show DiscreteTypes; | ||
export 'src/protocol/types/sub_types.dart' show SubTypes; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 1 addition & 2 deletions
3
lib/src/protocol/extensions/authentication_schema.extension.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,7 @@ | ||
import 'package:flutter/foundation.dart'; | ||
import 'package:lime/lime.dart'; | ||
|
||
extension AuthenticationSchemaExtension on AuthenticationScheme { | ||
AuthenticationScheme getValue(String? value) => | ||
AuthenticationScheme.values.firstWhere((e) => describeEnum(e) == value, | ||
AuthenticationScheme.values.firstWhere((e) => e.name == value, | ||
orElse: () => AuthenticationScheme.unknown); | ||
} |
19 changes: 10 additions & 9 deletions
19
lib/src/protocol/extensions/notification_event.extension.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,22 @@ | ||
import 'package:flutter/foundation.dart'; | ||
|
||
import '../enums/notification_event.enum.dart'; | ||
|
||
extension NotificationEventExtension on NotificationEvent { | ||
NotificationEvent getValue(String? value) => | ||
NotificationEvent.values.firstWhere((e) => describeEnum(e) == value, orElse: () => NotificationEvent.unknown); | ||
NotificationEvent.values.firstWhere((e) => e.name == value, | ||
orElse: () => NotificationEvent.unknown); | ||
|
||
bool isLowerThan(NotificationEvent? other) { | ||
const events = { | ||
NotificationEvent.accepted: 0, | ||
NotificationEvent.dispatched: 1, | ||
NotificationEvent.received: 2, | ||
NotificationEvent.consumed: 3, | ||
NotificationEvent.failed: 4, | ||
NotificationEvent.sending: 0, | ||
NotificationEvent.accepted: 1, | ||
NotificationEvent.dispatched: 2, | ||
NotificationEvent.received: 3, | ||
NotificationEvent.consumed: 4, | ||
NotificationEvent.failed: 5, | ||
NotificationEvent.unknown: 99, | ||
}; | ||
|
||
return (events[this] ?? 99) < (events[other ?? NotificationEvent.unknown] ?? 99); | ||
return (events[this] ?? 99) < | ||
(events[other ?? NotificationEvent.unknown] ?? 99); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.