diff --git a/README.md b/README.md index 655fd53..5b472e0 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,6 @@ -# Connect +# twonly -> Connect a zecure open-source instant-image sharing, full-featured AI app based on 5 blockchains. - -Actually there is no AI or Blockchain or any other dump hyped stuff included into this app. The -purpose of this app is first off all to create a usable, good looking and important of all -end-to-end encrypted alternative to S[redacted]chat. As I love to schare images with friends but not -a strange company. +Don't be lonely, get twonly! Send pictures to a friend in real time and be sure you are the only two people who can see them. ## Features @@ -17,95 +12,7 @@ This app was started because of the three main features I missed out by popular 2. Privacy by design: The server only knows your username and public key. 3. User-friendliness: Decide for your own :) -> "It's the combination that makes the difference. Only a combination of privacy, security and user-friendliness can make a application good. Focusing on just one of these three areas can mean that everyone loses out in the end." ~ Myself - -### But there is even more! - -4. Decentralized: Everyone can host an server. The usernames are like your email USERNAME@YOURSERVER -5. Simple to use: What is a Public key? If you don't know this it is okay you don't have to to use Connect! - -> "Its like when S[redacted]chat, Signal and email had an baby" ~ Myself - -## Roadmap - -The development of this App has the following stages: - -1. **Working POC**: As this is my first App ever the first step is to learn App development. During -this step I try everything I can do as a non experienced App developer to make working POC App which -is by design secure meaning while I learn new things I always try to think how this could be -attacked and how I could protect it. But as I have no experience at all I depend on libraries who -look secure. This step include: - - 1. Create a working POC and an private invitation code - 2. Test the POC with friends - 3. Improve and fix bugs - 4. Repeat steps 2. and 3. until I have a usable App - -2. **Bug Bounty**: This is probably the most fun part. The GitHub Repository will become open-source -and I make public releases so others can [install](https://github.com/ImranR98/Obtainium) and test -the app as well. After I published the App the following steps will happen. - 1. I try to hack my own App using the free Android Hacking Course from - [heytree.io](https://app.hextree.io/map/android/android-continent). And if I find something will - create a nice write-up. - 2. Add the new invitation code "BUGBOUNTY" so reale smart people (not - like me) can try to hack the app. And if they find something and create a small POC there is a - small Bug Bounty of 50€. - -3. **Pre-Releasing and Scaling**: If I ever come to this point the App will be first released on -[droidy-fy](https://droidify.eu.org/) to test on a larger scale. - -4. **Release**: This will probably never happen, but if it will, I will release the App on Google -Play and maybe Apple App Store for a couple of €€ as this requires a paid developer account :/. The -version on droid-fy will be free for ever to encourage people to switch to open source apps which. - -5. **Becoming Rich**: I will add an ChatBot into the App. Then I rename the App into ConnectAI add -misleading advertisement on the website that the app is smart as it has an AI and then sell the app -for $7 trillion to become rich. - -## Decentralized - -The idea behind this idea is that the server does not know anything about the user. As the server -is not able to read the messages but only see the receiver of it the only purpose is to forward -the message. So like for emails the user can specify in his username to which server he belongs to. - - -The username is then build up with the following informations: - -`username@fqdn:port` - -The username is unique for the corresponding server. The second part contains the fully qualified -domain name where the server is reachable. It is also possible to specify a custom port. The -default port are the HTTP and TLS ports. - - -### Thoughts -When the user is adding another user they could exchange the servers public key which the user then -reports to their own home sever. The home server then can authenticate the other server. But what -is the thread here, the server are not able to see the messages nor change it as the client does an -integrity check. An attacker could drop a messages and send an ACK as this is unauthenticated. - - -## Self-hosting - -It is possible to host the server yourself and then modify the server in your app. But be aware it -is not planned to sync the different servers so you can only add people when their are on the same -server! As in my understanding this is not supported by the Signal protocol, but please proof me -wrong and at a PR :) - -A possible idea could be to add multiple servers in app but this would then require multiple -parallel open websocket connection to check for new messages. As before if you want that feature -create a PR :) - - ## Bug-Bounty -This app offers a Bug Bounty as I really love the Idea of others hacking my app. Depending on the -criticality the bounty can go up to 50€ (more later when there are donation or I actually make some -money which I probably never will do :/). - -## Credits - -As this is my first Android app, I used different examples where I copied the code design decisions. -To give them credits and maybe help others they are listed below: - -- [Database handling (model, provider and usage)](https://github.com/alextekartik/flutter_app_example/blob/master/notepad_sqflite/) +twonly offers a Bug Bounty. Depending on the criticality the bounty can go up to 50€ (more later, +this is out of my own pocket :/). diff --git a/android/app/build.gradle b/android/app/build.gradle index 93add39..4ac8c8b 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -22,7 +22,7 @@ android { defaultConfig { // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). - applicationId = "eu.tsmr.connect" + applicationId = "eu.twonly" // You can update the following values to match your application needs. // For more information, see: https://flutter.dev/to/review-gradle-config. minSdk = flutter.minSdkVersion diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml index 42de359..1ef439c 100644 --- a/android/app/src/main/AndroidManifest.xml +++ b/android/app/src/main/AndroidManifest.xml @@ -1,8 +1,8 @@ + android:icon="@mipmap/ic_launcher"> + + + + + + diff --git a/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/android/app/src/main/res/mipmap-hdpi/ic_launcher.png index db77bb4..66fd698 100644 Binary files a/android/app/src/main/res/mipmap-hdpi/ic_launcher.png and b/android/app/src/main/res/mipmap-hdpi/ic_launcher.png differ diff --git a/android/app/src/main/res/mipmap-hdpi/launcher_icon.png b/android/app/src/main/res/mipmap-hdpi/launcher_icon.png deleted file mode 100644 index 06a81f5..0000000 Binary files a/android/app/src/main/res/mipmap-hdpi/launcher_icon.png and /dev/null differ diff --git a/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/android/app/src/main/res/mipmap-mdpi/ic_launcher.png index 17987b7..9a46365 100644 Binary files a/android/app/src/main/res/mipmap-mdpi/ic_launcher.png and b/android/app/src/main/res/mipmap-mdpi/ic_launcher.png differ diff --git a/android/app/src/main/res/mipmap-mdpi/launcher_icon.png b/android/app/src/main/res/mipmap-mdpi/launcher_icon.png deleted file mode 100644 index d2aecdd..0000000 Binary files a/android/app/src/main/res/mipmap-mdpi/launcher_icon.png and /dev/null differ diff --git a/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png index 09d4391..ac2cb3b 100644 Binary files a/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png and b/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png differ diff --git a/android/app/src/main/res/mipmap-xhdpi/launcher_icon.png b/android/app/src/main/res/mipmap-xhdpi/launcher_icon.png deleted file mode 100644 index ea0ca0f..0000000 Binary files a/android/app/src/main/res/mipmap-xhdpi/launcher_icon.png and /dev/null differ diff --git a/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png index d5f1c8d..ff6b543 100644 Binary files a/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png and b/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png differ diff --git a/android/app/src/main/res/mipmap-xxhdpi/launcher_icon.png b/android/app/src/main/res/mipmap-xxhdpi/launcher_icon.png deleted file mode 100644 index c72472a..0000000 Binary files a/android/app/src/main/res/mipmap-xxhdpi/launcher_icon.png and /dev/null differ diff --git a/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png index 4d6372e..a441089 100644 Binary files a/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png and b/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png differ diff --git a/android/app/src/main/res/mipmap-xxxhdpi/launcher_icon.png b/android/app/src/main/res/mipmap-xxxhdpi/launcher_icon.png deleted file mode 100644 index b509ceb..0000000 Binary files a/android/app/src/main/res/mipmap-xxxhdpi/launcher_icon.png and /dev/null differ diff --git a/android/app/src/main/res/values/colors.xml b/android/app/src/main/res/values/colors.xml new file mode 100644 index 0000000..24bb191 --- /dev/null +++ b/android/app/src/main/res/values/colors.xml @@ -0,0 +1,4 @@ + + + #FF57CC99 + \ No newline at end of file diff --git a/assets/images/2.0x/flutter_logo.png b/assets/images/2.0x/flutter_logo.png deleted file mode 100644 index b65164d..0000000 Binary files a/assets/images/2.0x/flutter_logo.png and /dev/null differ diff --git a/assets/images/3.0x/flutter_logo.png b/assets/images/3.0x/flutter_logo.png deleted file mode 100644 index 97e5dc9..0000000 Binary files a/assets/images/3.0x/flutter_logo.png and /dev/null differ diff --git a/assets/images/flutter_logo.png b/assets/images/flutter_logo.png deleted file mode 100644 index b5c6ca7..0000000 Binary files a/assets/images/flutter_logo.png and /dev/null differ diff --git a/assets/images/link-solid.svg b/assets/images/link-solid.svg new file mode 100644 index 0000000..19a9881 --- /dev/null +++ b/assets/images/link-solid.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/assets/images/logo.png b/assets/images/logo.png index c685be2..8b5e608 100644 Binary files a/assets/images/logo.png and b/assets/images/logo.png differ diff --git a/assets/images/logo/android/play_store_512.png b/assets/images/logo/android/play_store_512.png deleted file mode 100644 index 2213192..0000000 Binary files a/assets/images/logo/android/play_store_512.png and /dev/null differ diff --git a/assets/images/logo/android/res/mipmap-anydpi-v26/ic_launcher.xml b/assets/images/logo/android/res/mipmap-anydpi-v26/ic_launcher.xml deleted file mode 100644 index 345888d..0000000 --- a/assets/images/logo/android/res/mipmap-anydpi-v26/ic_launcher.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/assets/images/logo/android/res/mipmap-hdpi/ic_launcher.png b/assets/images/logo/android/res/mipmap-hdpi/ic_launcher.png deleted file mode 100644 index 92b6c05..0000000 Binary files a/assets/images/logo/android/res/mipmap-hdpi/ic_launcher.png and /dev/null differ diff --git a/assets/images/logo/android/res/mipmap-hdpi/ic_launcher_background.png b/assets/images/logo/android/res/mipmap-hdpi/ic_launcher_background.png deleted file mode 100644 index f60a087..0000000 Binary files a/assets/images/logo/android/res/mipmap-hdpi/ic_launcher_background.png and /dev/null differ diff --git a/assets/images/logo/android/res/mipmap-hdpi/ic_launcher_foreground.png b/assets/images/logo/android/res/mipmap-hdpi/ic_launcher_foreground.png deleted file mode 100644 index 5756a07..0000000 Binary files a/assets/images/logo/android/res/mipmap-hdpi/ic_launcher_foreground.png and /dev/null differ diff --git a/assets/images/logo/android/res/mipmap-hdpi/ic_launcher_monochrome.png b/assets/images/logo/android/res/mipmap-hdpi/ic_launcher_monochrome.png deleted file mode 100644 index 44047db..0000000 Binary files a/assets/images/logo/android/res/mipmap-hdpi/ic_launcher_monochrome.png and /dev/null differ diff --git a/assets/images/logo/android/res/mipmap-mdpi/ic_launcher.png b/assets/images/logo/android/res/mipmap-mdpi/ic_launcher.png deleted file mode 100644 index b98fd2d..0000000 Binary files a/assets/images/logo/android/res/mipmap-mdpi/ic_launcher.png and /dev/null differ diff --git a/assets/images/logo/android/res/mipmap-mdpi/ic_launcher_background.png b/assets/images/logo/android/res/mipmap-mdpi/ic_launcher_background.png deleted file mode 100644 index 5ac52b8..0000000 Binary files a/assets/images/logo/android/res/mipmap-mdpi/ic_launcher_background.png and /dev/null differ diff --git a/assets/images/logo/android/res/mipmap-mdpi/ic_launcher_foreground.png b/assets/images/logo/android/res/mipmap-mdpi/ic_launcher_foreground.png deleted file mode 100644 index 192abe0..0000000 Binary files a/assets/images/logo/android/res/mipmap-mdpi/ic_launcher_foreground.png and /dev/null differ diff --git a/assets/images/logo/android/res/mipmap-mdpi/ic_launcher_monochrome.png b/assets/images/logo/android/res/mipmap-mdpi/ic_launcher_monochrome.png deleted file mode 100644 index 4f71405..0000000 Binary files a/assets/images/logo/android/res/mipmap-mdpi/ic_launcher_monochrome.png and /dev/null differ diff --git a/assets/images/logo/android/res/mipmap-xhdpi/ic_launcher.png b/assets/images/logo/android/res/mipmap-xhdpi/ic_launcher.png deleted file mode 100644 index 0e2bec2..0000000 Binary files a/assets/images/logo/android/res/mipmap-xhdpi/ic_launcher.png and /dev/null differ diff --git a/assets/images/logo/android/res/mipmap-xhdpi/ic_launcher_background.png b/assets/images/logo/android/res/mipmap-xhdpi/ic_launcher_background.png deleted file mode 100644 index ed3244f..0000000 Binary files a/assets/images/logo/android/res/mipmap-xhdpi/ic_launcher_background.png and /dev/null differ diff --git a/assets/images/logo/android/res/mipmap-xhdpi/ic_launcher_foreground.png b/assets/images/logo/android/res/mipmap-xhdpi/ic_launcher_foreground.png deleted file mode 100644 index ce3ad26..0000000 Binary files a/assets/images/logo/android/res/mipmap-xhdpi/ic_launcher_foreground.png and /dev/null differ diff --git a/assets/images/logo/android/res/mipmap-xhdpi/ic_launcher_monochrome.png b/assets/images/logo/android/res/mipmap-xhdpi/ic_launcher_monochrome.png deleted file mode 100644 index 6d68579..0000000 Binary files a/assets/images/logo/android/res/mipmap-xhdpi/ic_launcher_monochrome.png and /dev/null differ diff --git a/assets/images/logo/android/res/mipmap-xxhdpi/ic_launcher.png b/assets/images/logo/android/res/mipmap-xxhdpi/ic_launcher.png deleted file mode 100644 index 6bdb7a8..0000000 Binary files a/assets/images/logo/android/res/mipmap-xxhdpi/ic_launcher.png and /dev/null differ diff --git a/assets/images/logo/android/res/mipmap-xxhdpi/ic_launcher_background.png b/assets/images/logo/android/res/mipmap-xxhdpi/ic_launcher_background.png deleted file mode 100644 index 72222b9..0000000 Binary files a/assets/images/logo/android/res/mipmap-xxhdpi/ic_launcher_background.png and /dev/null differ diff --git a/assets/images/logo/android/res/mipmap-xxhdpi/ic_launcher_foreground.png b/assets/images/logo/android/res/mipmap-xxhdpi/ic_launcher_foreground.png deleted file mode 100644 index 2d1f04c..0000000 Binary files a/assets/images/logo/android/res/mipmap-xxhdpi/ic_launcher_foreground.png and /dev/null differ diff --git a/assets/images/logo/android/res/mipmap-xxhdpi/ic_launcher_monochrome.png b/assets/images/logo/android/res/mipmap-xxhdpi/ic_launcher_monochrome.png deleted file mode 100644 index 60be356..0000000 Binary files a/assets/images/logo/android/res/mipmap-xxhdpi/ic_launcher_monochrome.png and /dev/null differ diff --git a/assets/images/logo/android/res/mipmap-xxxhdpi/ic_launcher.png b/assets/images/logo/android/res/mipmap-xxxhdpi/ic_launcher.png deleted file mode 100644 index 1ecbb80..0000000 Binary files a/assets/images/logo/android/res/mipmap-xxxhdpi/ic_launcher.png and /dev/null differ diff --git a/assets/images/logo/android/res/mipmap-xxxhdpi/ic_launcher_background.png b/assets/images/logo/android/res/mipmap-xxxhdpi/ic_launcher_background.png deleted file mode 100644 index f5654c9..0000000 Binary files a/assets/images/logo/android/res/mipmap-xxxhdpi/ic_launcher_background.png and /dev/null differ diff --git a/assets/images/logo/android/res/mipmap-xxxhdpi/ic_launcher_foreground.png b/assets/images/logo/android/res/mipmap-xxxhdpi/ic_launcher_foreground.png deleted file mode 100644 index 7b4839a..0000000 Binary files a/assets/images/logo/android/res/mipmap-xxxhdpi/ic_launcher_foreground.png and /dev/null differ diff --git a/assets/images/logo/android/res/mipmap-xxxhdpi/ic_launcher_monochrome.png b/assets/images/logo/android/res/mipmap-xxxhdpi/ic_launcher_monochrome.png deleted file mode 100644 index 58861ac..0000000 Binary files a/assets/images/logo/android/res/mipmap-xxxhdpi/ic_launcher_monochrome.png and /dev/null differ diff --git a/assets/images/logo/ios/AppIcon-20@2x.png b/assets/images/logo/ios/AppIcon-20@2x.png deleted file mode 100644 index 947f94b..0000000 Binary files a/assets/images/logo/ios/AppIcon-20@2x.png and /dev/null differ diff --git a/assets/images/logo/ios/AppIcon-20@2x~ipad.png b/assets/images/logo/ios/AppIcon-20@2x~ipad.png deleted file mode 100644 index 947f94b..0000000 Binary files a/assets/images/logo/ios/AppIcon-20@2x~ipad.png and /dev/null differ diff --git a/assets/images/logo/ios/AppIcon-20@3x.png b/assets/images/logo/ios/AppIcon-20@3x.png deleted file mode 100644 index c32e369..0000000 Binary files a/assets/images/logo/ios/AppIcon-20@3x.png and /dev/null differ diff --git a/assets/images/logo/ios/AppIcon-20~ipad.png b/assets/images/logo/ios/AppIcon-20~ipad.png deleted file mode 100644 index 4d16182..0000000 Binary files a/assets/images/logo/ios/AppIcon-20~ipad.png and /dev/null differ diff --git a/assets/images/logo/ios/AppIcon-29.png b/assets/images/logo/ios/AppIcon-29.png deleted file mode 100644 index 8fa6ef4..0000000 Binary files a/assets/images/logo/ios/AppIcon-29.png and /dev/null differ diff --git a/assets/images/logo/ios/AppIcon-29@2x.png b/assets/images/logo/ios/AppIcon-29@2x.png deleted file mode 100644 index 4d1fec9..0000000 Binary files a/assets/images/logo/ios/AppIcon-29@2x.png and /dev/null differ diff --git a/assets/images/logo/ios/AppIcon-29@2x~ipad.png b/assets/images/logo/ios/AppIcon-29@2x~ipad.png deleted file mode 100644 index 4d1fec9..0000000 Binary files a/assets/images/logo/ios/AppIcon-29@2x~ipad.png and /dev/null differ diff --git a/assets/images/logo/ios/AppIcon-29@3x.png b/assets/images/logo/ios/AppIcon-29@3x.png deleted file mode 100644 index 1dadbe0..0000000 Binary files a/assets/images/logo/ios/AppIcon-29@3x.png and /dev/null differ diff --git a/assets/images/logo/ios/AppIcon-29~ipad.png b/assets/images/logo/ios/AppIcon-29~ipad.png deleted file mode 100644 index 8fa6ef4..0000000 Binary files a/assets/images/logo/ios/AppIcon-29~ipad.png and /dev/null differ diff --git a/assets/images/logo/ios/AppIcon-40@2x.png b/assets/images/logo/ios/AppIcon-40@2x.png deleted file mode 100644 index b0fe379..0000000 Binary files a/assets/images/logo/ios/AppIcon-40@2x.png and /dev/null differ diff --git a/assets/images/logo/ios/AppIcon-40@2x~ipad.png b/assets/images/logo/ios/AppIcon-40@2x~ipad.png deleted file mode 100644 index b0fe379..0000000 Binary files a/assets/images/logo/ios/AppIcon-40@2x~ipad.png and /dev/null differ diff --git a/assets/images/logo/ios/AppIcon-40@3x.png b/assets/images/logo/ios/AppIcon-40@3x.png deleted file mode 100644 index 07fafe4..0000000 Binary files a/assets/images/logo/ios/AppIcon-40@3x.png and /dev/null differ diff --git a/assets/images/logo/ios/AppIcon-40~ipad.png b/assets/images/logo/ios/AppIcon-40~ipad.png deleted file mode 100644 index 947f94b..0000000 Binary files a/assets/images/logo/ios/AppIcon-40~ipad.png and /dev/null differ diff --git a/assets/images/logo/ios/AppIcon-60@2x~car.png b/assets/images/logo/ios/AppIcon-60@2x~car.png deleted file mode 100644 index 07fafe4..0000000 Binary files a/assets/images/logo/ios/AppIcon-60@2x~car.png and /dev/null differ diff --git a/assets/images/logo/ios/AppIcon-60@3x~car.png b/assets/images/logo/ios/AppIcon-60@3x~car.png deleted file mode 100644 index 06e300f..0000000 Binary files a/assets/images/logo/ios/AppIcon-60@3x~car.png and /dev/null differ diff --git a/assets/images/logo/ios/AppIcon-83.5@2x~ipad.png b/assets/images/logo/ios/AppIcon-83.5@2x~ipad.png deleted file mode 100644 index 73e50e9..0000000 Binary files a/assets/images/logo/ios/AppIcon-83.5@2x~ipad.png and /dev/null differ diff --git a/assets/images/logo/ios/AppIcon@2x.png b/assets/images/logo/ios/AppIcon@2x.png deleted file mode 100644 index 07fafe4..0000000 Binary files a/assets/images/logo/ios/AppIcon@2x.png and /dev/null differ diff --git a/assets/images/logo/ios/AppIcon@2x~ipad.png b/assets/images/logo/ios/AppIcon@2x~ipad.png deleted file mode 100644 index 9cb8132..0000000 Binary files a/assets/images/logo/ios/AppIcon@2x~ipad.png and /dev/null differ diff --git a/assets/images/logo/ios/AppIcon@3x.png b/assets/images/logo/ios/AppIcon@3x.png deleted file mode 100644 index 06e300f..0000000 Binary files a/assets/images/logo/ios/AppIcon@3x.png and /dev/null differ diff --git a/assets/images/logo/ios/AppIcon~ios-marketing.png b/assets/images/logo/ios/AppIcon~ios-marketing.png deleted file mode 100644 index 9a6dbc7..0000000 Binary files a/assets/images/logo/ios/AppIcon~ios-marketing.png and /dev/null differ diff --git a/assets/images/logo/ios/AppIcon~ipad.png b/assets/images/logo/ios/AppIcon~ipad.png deleted file mode 100644 index 42aeac7..0000000 Binary files a/assets/images/logo/ios/AppIcon~ipad.png and /dev/null differ diff --git a/assets/images/logo/ios/Contents.json b/assets/images/logo/ios/Contents.json deleted file mode 100644 index bd04914..0000000 --- a/assets/images/logo/ios/Contents.json +++ /dev/null @@ -1,134 +0,0 @@ -{ - "images": [ - { - "filename": "AppIcon@2x.png", - "idiom": "iphone", - "scale": "2x", - "size": "60x60" - }, - { - "filename": "AppIcon@3x.png", - "idiom": "iphone", - "scale": "3x", - "size": "60x60" - }, - { - "filename": "AppIcon~ipad.png", - "idiom": "ipad", - "scale": "1x", - "size": "76x76" - }, - { - "filename": "AppIcon@2x~ipad.png", - "idiom": "ipad", - "scale": "2x", - "size": "76x76" - }, - { - "filename": "AppIcon-83.5@2x~ipad.png", - "idiom": "ipad", - "scale": "2x", - "size": "83.5x83.5" - }, - { - "filename": "AppIcon-40@2x.png", - "idiom": "iphone", - "scale": "2x", - "size": "40x40" - }, - { - "filename": "AppIcon-40@3x.png", - "idiom": "iphone", - "scale": "3x", - "size": "40x40" - }, - { - "filename": "AppIcon-40~ipad.png", - "idiom": "ipad", - "scale": "1x", - "size": "40x40" - }, - { - "filename": "AppIcon-40@2x~ipad.png", - "idiom": "ipad", - "scale": "2x", - "size": "40x40" - }, - { - "filename": "AppIcon-20@2x.png", - "idiom": "iphone", - "scale": "2x", - "size": "20x20" - }, - { - "filename": "AppIcon-20@3x.png", - "idiom": "iphone", - "scale": "3x", - "size": "20x20" - }, - { - "filename": "AppIcon-20~ipad.png", - "idiom": "ipad", - "scale": "1x", - "size": "20x20" - }, - { - "filename": "AppIcon-20@2x~ipad.png", - "idiom": "ipad", - "scale": "2x", - "size": "20x20" - }, - { - "filename": "AppIcon-29.png", - "idiom": "iphone", - "scale": "1x", - "size": "29x29" - }, - { - "filename": "AppIcon-29@2x.png", - "idiom": "iphone", - "scale": "2x", - "size": "29x29" - }, - { - "filename": "AppIcon-29@3x.png", - "idiom": "iphone", - "scale": "3x", - "size": "29x29" - }, - { - "filename": "AppIcon-29~ipad.png", - "idiom": "ipad", - "scale": "1x", - "size": "29x29" - }, - { - "filename": "AppIcon-29@2x~ipad.png", - "idiom": "ipad", - "scale": "2x", - "size": "29x29" - }, - { - "filename": "AppIcon-60@2x~car.png", - "idiom": "car", - "scale": "2x", - "size": "60x60" - }, - { - "filename": "AppIcon-60@3x~car.png", - "idiom": "car", - "scale": "3x", - "size": "60x60" - }, - { - "filename": "AppIcon~ios-marketing.png", - "idiom": "ios-marketing", - "scale": "1x", - "size": "1024x1024" - } - ], - "info": { - "author": "iconkitchen", - "version": 1 - } -} \ No newline at end of file diff --git a/assets/images/logo/logo.png b/assets/images/logo/logo.png deleted file mode 100644 index 2213192..0000000 Binary files a/assets/images/logo/logo.png and /dev/null differ diff --git a/assets/images/logo/web/README.txt b/assets/images/logo/web/README.txt deleted file mode 100644 index 3bdd02f..0000000 --- a/assets/images/logo/web/README.txt +++ /dev/null @@ -1,18 +0,0 @@ -Add this to your HTML : - - - - -Add this to your app's manifest.json: - - ... - { - "icons": [ - { "src": "/favicon.ico", "type": "image/x-icon", "sizes": "16x16 32x32" }, - { "src": "/icon-192.png", "type": "image/png", "sizes": "192x192" }, - { "src": "/icon-512.png", "type": "image/png", "sizes": "512x512" }, - { "src": "/icon-192-maskable.png", "type": "image/png", "sizes": "192x192", "purpose": "maskable" }, - { "src": "/icon-512-maskable.png", "type": "image/png", "sizes": "512x512", "purpose": "maskable" } - ] - } - ... diff --git a/assets/images/logo/web/apple-touch-icon.png b/assets/images/logo/web/apple-touch-icon.png deleted file mode 100644 index 06e300f..0000000 Binary files a/assets/images/logo/web/apple-touch-icon.png and /dev/null differ diff --git a/assets/images/logo/web/favicon.ico b/assets/images/logo/web/favicon.ico deleted file mode 100644 index d5ee75c..0000000 Binary files a/assets/images/logo/web/favicon.ico and /dev/null differ diff --git a/assets/images/logo/web/icon-192-maskable.png b/assets/images/logo/web/icon-192-maskable.png deleted file mode 100644 index ff700c5..0000000 Binary files a/assets/images/logo/web/icon-192-maskable.png and /dev/null differ diff --git a/assets/images/logo/web/icon-192.png b/assets/images/logo/web/icon-192.png deleted file mode 100644 index d41d311..0000000 Binary files a/assets/images/logo/web/icon-192.png and /dev/null differ diff --git a/assets/images/logo/web/icon-512-maskable.png b/assets/images/logo/web/icon-512-maskable.png deleted file mode 100644 index 2213192..0000000 Binary files a/assets/images/logo/web/icon-512-maskable.png and /dev/null differ diff --git a/assets/images/logo/web/icon-512.png b/assets/images/logo/web/icon-512.png deleted file mode 100644 index efda500..0000000 Binary files a/assets/images/logo/web/icon-512.png and /dev/null differ diff --git a/assets/images/shield-solid.svg b/assets/images/shield-solid.svg deleted file mode 100644 index c6e82e1..0000000 --- a/assets/images/shield-solid.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/generate_proto.sh b/generate_proto.sh new file mode 100755 index 0000000..a5cd387 --- /dev/null +++ b/generate_proto.sh @@ -0,0 +1,37 @@ +#!/bin/bash + +# Set the source directory + +SRC_DIR="../twonly-server/twonly/src/" + +DST_DIR="$(pwd)/lib/src/proto/" + +mkdir $DST_DIR + +ORIGINAL_DIR=$(pwd) + +cd "$SRC_DIR" || { + echo "Failed to change directory to $SRC_DIR" + exit 1 +} + +# Iterate over all .proto files in the source directory +for proto_file in "api/"*.proto; do + # Check if the file exists to avoid errors if no .proto files are found + + if [[ -f "$proto_file" ]]; then + # Run the protoc command + protoc --proto_path="." --dart_out="$DST_DIR" "$proto_file" + echo "Processed: $proto_file" + else + echo "No .proto files found in $SRC_DIR" + fi +done + +# Change back to the original directory +cd "$ORIGINAL_DIR" || { + echo "Failed to change back to the original directory" + exit 1 +} + +echo "Finished processing .proto files." \ No newline at end of file diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png index 7030e7f..70138a7 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png index aad73ee..d9443b7 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png index 6155983..0af1a77 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png index 9d67b03..deab51d 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png index 07cff37..4843790 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png index c1c790f..6a7ba85 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png index 22ca802..4009a11 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png index 6155983..0af1a77 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png index baa889e..6eb282c 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png index 604603d..37b69a4 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-50x50@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-50x50@1x.png index 97f65d5..2cda520 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-50x50@1x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-50x50@1x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-50x50@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-50x50@2x.png index 9e5aaea..97c9a6b 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-50x50@2x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-50x50@2x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@1x.png index e09f1bc..522b8ca 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@1x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@1x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@2x.png index 18c463a..f185282 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@2x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@2x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png index 604603d..37b69a4 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png index 29535b1..9328b83 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@1x.png index 06a81f5..f5b9405 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@1x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@1x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@2x.png index c72472a..194b8cf 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@2x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@2x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png index a7a6f67..773c35e 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png index 81d8674..255cdcd 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png index 9539c82..acd2255 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png differ diff --git a/ios/Runner/Info.plist b/ios/Runner/Info.plist index 78131c2..f03ccf5 100644 --- a/ios/Runner/Info.plist +++ b/ios/Runner/Info.plist @@ -5,7 +5,7 @@ CFBundleDevelopmentRegion $(DEVELOPMENT_LANGUAGE) CFBundleDisplayName - Connect + twonly CFBundleExecutable $(EXECUTABLE_NAME) CFBundleIdentifier @@ -13,7 +13,7 @@ CFBundleInfoDictionaryVersion 6.0 CFBundleName - connect + twonly CFBundlePackageType APPL CFBundleShortVersionString diff --git a/lib/main.dart b/lib/main.dart index 4bfc817..bbe4cdb 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -1,6 +1,6 @@ import 'package:camera/camera.dart'; -import 'package:connect/src/providers/api_provider.dart'; -import 'package:connect/src/providers/db_provider.dart'; +import 'package:twonly/src/providers/api_provider.dart'; +import 'package:twonly/src/providers/db_provider.dart'; import 'package:flutter/material.dart'; import 'package:logging/logging.dart'; @@ -45,13 +45,13 @@ void main() async { var apiUrl = "ws://api.theconnectapp.de/v0/"; if (kDebugMode) { // Overwrite the domain in your local network so you can test the app locally - apiUrl = "ws://debug.theconnectapp.de:3030/v0/"; + apiUrl = "ws://10.99.0.6:3030/api/client"; } apiProvider = ApiProvider(apiUrl: apiUrl); // TODO: Open the connection in the background so the app launch is not delayed. - await apiProvider.connect(); + //await apiProvider.connect(); // Workmanager.executeTask((task, inputData) async { // await _HomeState().manager(); diff --git a/lib/src/model/signal_identity_json.dart b/lib/src/model/signal_identity_json.dart new file mode 100644 index 0000000..59835b3 --- /dev/null +++ b/lib/src/model/signal_identity_json.dart @@ -0,0 +1,29 @@ +import 'dart:convert'; +import 'dart:typed_data'; +import 'package:json_annotation/json_annotation.dart'; +part 'signal_identity_json.g.dart'; + +class Uint8ListConverter implements JsonConverter { + const Uint8ListConverter(); + @override + Uint8List fromJson(String json) { + return base64Decode(json); + } + + @override + String toJson(Uint8List object) { + return base64Encode(object); + } +} + +@JsonSerializable() +class SignalIdentity { + const SignalIdentity( + {required this.identityKeyPairU8List, required this.registrationId}); + final int registrationId; + @Uint8ListConverter() + final Uint8List identityKeyPairU8List; + factory SignalIdentity.fromJson(Map json) => + _$SignalIdentityFromJson(json); + Map toJson() => _$SignalIdentityToJson(this); +} diff --git a/lib/src/model/user.g.dart b/lib/src/model/signal_identity_json.g.dart similarity index 63% rename from lib/src/model/user.g.dart rename to lib/src/model/signal_identity_json.g.dart index 4662cb0..c498160 100644 --- a/lib/src/model/user.g.dart +++ b/lib/src/model/signal_identity_json.g.dart @@ -1,20 +1,20 @@ // GENERATED CODE - DO NOT MODIFY BY HAND -part of 'user.dart'; +part of 'signal_identity_json.dart'; // ************************************************************************** // JsonSerializableGenerator // ************************************************************************** -User _$UserFromJson(Map json) => User( - username: json['username'] as String, +SignalIdentity _$SignalIdentityFromJson(Map json) => + SignalIdentity( identityKeyPairU8List: const Uint8ListConverter() - .fromJson(json['identityKeyPairU8List'] as List), + .fromJson(json['identityKeyPairU8List'] as String), registrationId: (json['registrationId'] as num).toInt(), ); -Map _$UserToJson(User instance) => { - 'username': instance.username, +Map _$SignalIdentityToJson(SignalIdentity instance) => + { 'registrationId': instance.registrationId, 'identityKeyPairU8List': const Uint8ListConverter().toJson(instance.identityKeyPairU8List), diff --git a/lib/src/model/user.dart b/lib/src/model/user.dart deleted file mode 100644 index 2655eaf..0000000 --- a/lib/src/model/user.dart +++ /dev/null @@ -1,27 +0,0 @@ -import 'dart:typed_data'; -import 'package:json_annotation/json_annotation.dart'; -part 'user.g.dart'; - -class Uint8ListConverter implements JsonConverter> { - const Uint8ListConverter(); - @override - Uint8List fromJson(List json) { - return Uint8List.fromList(json); - } - - @override - List toJson(Uint8List object) { - return object.toList(); - } -} - -@JsonSerializable() -class User { - const User({required this.username, required this.identityKeyPairU8List, required this.registrationId}); - final String username; - final int registrationId; - @Uint8ListConverter() - final Uint8List identityKeyPairU8List; - factory User.fromJson(Map json) => _$UserFromJson(json); - Map toJson() => _$UserToJson(this); -} diff --git a/lib/src/model/user_data_json.dart b/lib/src/model/user_data_json.dart new file mode 100644 index 0000000..1e59943 --- /dev/null +++ b/lib/src/model/user_data_json.dart @@ -0,0 +1,20 @@ +import 'dart:typed_data'; +import 'package:json_annotation/json_annotation.dart'; +import 'package:twonly/src/model/signal_identity_json.dart'; +part 'user_data_json.g.dart'; + +@JsonSerializable() +class UserData { + const UserData( + {required this.userId, + required this.username, + required this.displayName}); + final String username; + final String displayName; + + @Uint8ListConverter() + final Uint8List userId; + factory UserData.fromJson(Map json) => + _$UserDataFromJson(json); + Map toJson() => _$UserDataToJson(this); +} diff --git a/lib/src/model/user_data_json.g.dart b/lib/src/model/user_data_json.g.dart new file mode 100644 index 0000000..7040af4 --- /dev/null +++ b/lib/src/model/user_data_json.g.dart @@ -0,0 +1,19 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'user_data_json.dart'; + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +UserData _$UserDataFromJson(Map json) => UserData( + userId: const Uint8ListConverter().fromJson(json['userId'] as String), + username: json['username'] as String, + displayName: json['displayName'] as String, + ); + +Map _$UserDataToJson(UserData instance) => { + 'username': instance.username, + 'displayName': instance.displayName, + 'userId': const Uint8ListConverter().toJson(instance.userId), + }; diff --git a/lib/src/proto/api/client_to_server.pb.dart b/lib/src/proto/api/client_to_server.pb.dart new file mode 100644 index 0000000..331b00e --- /dev/null +++ b/lib/src/proto/api/client_to_server.pb.dart @@ -0,0 +1,989 @@ +// +// Generated code. Do not modify. +// source: api/client_to_server.proto +// +// @dart = 2.12 + +// ignore_for_file: annotate_overrides, camel_case_types, comment_references +// ignore_for_file: constant_identifier_names, library_prefixes +// ignore_for_file: non_constant_identifier_names, prefer_final_fields +// ignore_for_file: unnecessary_import, unnecessary_this, unused_import + +import 'dart:core' as $core; + +import 'package:fixnum/fixnum.dart' as $fixnum; +import 'package:protobuf/protobuf.dart' as $pb; + +import 'error.pbenum.dart' as $0; + +enum ClientToServer_V { + v0, + notSet +} + +class ClientToServer extends $pb.GeneratedMessage { + factory ClientToServer({ + V0? v0, + }) { + final $result = create(); + if (v0 != null) { + $result.v0 = v0; + } + return $result; + } + ClientToServer._() : super(); + factory ClientToServer.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory ClientToServer.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static const $core.Map<$core.int, ClientToServer_V> _ClientToServer_VByTag = { + 1 : ClientToServer_V.v0, + 0 : ClientToServer_V.notSet + }; + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'ClientToServer', package: const $pb.PackageName(_omitMessageNames ? '' : 'client_to_server'), createEmptyInstance: create) + ..oo(0, [1]) + ..aOM(1, _omitFieldNames ? '' : 'V0', protoName: 'V0', subBuilder: V0.create) + ..hasRequiredFields = false + ; + + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + ClientToServer clone() => ClientToServer()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + ClientToServer copyWith(void Function(ClientToServer) updates) => super.copyWith((message) => updates(message as ClientToServer)) as ClientToServer; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static ClientToServer create() => ClientToServer._(); + ClientToServer createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static ClientToServer getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static ClientToServer? _defaultInstance; + + ClientToServer_V whichV() => _ClientToServer_VByTag[$_whichOneof(0)]!; + void clearV() => clearField($_whichOneof(0)); + + @$pb.TagNumber(1) + V0 get v0 => $_getN(0); + @$pb.TagNumber(1) + set v0(V0 v) { setField(1, v); } + @$pb.TagNumber(1) + $core.bool hasV0() => $_has(0); + @$pb.TagNumber(1) + void clearV0() => clearField(1); + @$pb.TagNumber(1) + V0 ensureV0() => $_ensure(0); +} + +enum V0_Kind { + handshake, + applicationdata, + response, + notSet +} + +class V0 extends $pb.GeneratedMessage { + factory V0({ + $fixnum.Int64? seq, + Handshake? handshake, + ApplicationData? applicationdata, + Response? response, + }) { + final $result = create(); + if (seq != null) { + $result.seq = seq; + } + if (handshake != null) { + $result.handshake = handshake; + } + if (applicationdata != null) { + $result.applicationdata = applicationdata; + } + if (response != null) { + $result.response = response; + } + return $result; + } + V0._() : super(); + factory V0.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory V0.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static const $core.Map<$core.int, V0_Kind> _V0_KindByTag = { + 2 : V0_Kind.handshake, + 3 : V0_Kind.applicationdata, + 4 : V0_Kind.response, + 0 : V0_Kind.notSet + }; + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'V0', package: const $pb.PackageName(_omitMessageNames ? '' : 'client_to_server'), createEmptyInstance: create) + ..oo(0, [2, 3, 4]) + ..a<$fixnum.Int64>(1, _omitFieldNames ? '' : 'seq', $pb.PbFieldType.OU6, defaultOrMaker: $fixnum.Int64.ZERO) + ..aOM(2, _omitFieldNames ? '' : 'handshake', subBuilder: Handshake.create) + ..aOM(3, _omitFieldNames ? '' : 'applicationdata', subBuilder: ApplicationData.create) + ..aOM(4, _omitFieldNames ? '' : 'response', subBuilder: Response.create) + ..hasRequiredFields = false + ; + + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + V0 clone() => V0()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + V0 copyWith(void Function(V0) updates) => super.copyWith((message) => updates(message as V0)) as V0; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static V0 create() => V0._(); + V0 createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static V0 getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static V0? _defaultInstance; + + V0_Kind whichKind() => _V0_KindByTag[$_whichOneof(0)]!; + void clearKind() => clearField($_whichOneof(0)); + + @$pb.TagNumber(1) + $fixnum.Int64 get seq => $_getI64(0); + @$pb.TagNumber(1) + set seq($fixnum.Int64 v) { $_setInt64(0, v); } + @$pb.TagNumber(1) + $core.bool hasSeq() => $_has(0); + @$pb.TagNumber(1) + void clearSeq() => clearField(1); + + @$pb.TagNumber(2) + Handshake get handshake => $_getN(1); + @$pb.TagNumber(2) + set handshake(Handshake v) { setField(2, v); } + @$pb.TagNumber(2) + $core.bool hasHandshake() => $_has(1); + @$pb.TagNumber(2) + void clearHandshake() => clearField(2); + @$pb.TagNumber(2) + Handshake ensureHandshake() => $_ensure(1); + + @$pb.TagNumber(3) + ApplicationData get applicationdata => $_getN(2); + @$pb.TagNumber(3) + set applicationdata(ApplicationData v) { setField(3, v); } + @$pb.TagNumber(3) + $core.bool hasApplicationdata() => $_has(2); + @$pb.TagNumber(3) + void clearApplicationdata() => clearField(3); + @$pb.TagNumber(3) + ApplicationData ensureApplicationdata() => $_ensure(2); + + @$pb.TagNumber(4) + Response get response => $_getN(3); + @$pb.TagNumber(4) + set response(Response v) { setField(4, v); } + @$pb.TagNumber(4) + $core.bool hasResponse() => $_has(3); + @$pb.TagNumber(4) + void clearResponse() => clearField(4); + @$pb.TagNumber(4) + Response ensureResponse() => $_ensure(3); +} + +class Handshake_Register extends $pb.GeneratedMessage { + factory Handshake_Register({ + $core.String? username, + $core.String? inviteCode, + $core.List<$core.int>? publicIdentityKey, + $core.List<$core.int>? signedPrekey, + $core.List<$core.int>? signedPrekeySignature, + $fixnum.Int64? signedPrekeyId, + }) { + final $result = create(); + if (username != null) { + $result.username = username; + } + if (inviteCode != null) { + $result.inviteCode = inviteCode; + } + if (publicIdentityKey != null) { + $result.publicIdentityKey = publicIdentityKey; + } + if (signedPrekey != null) { + $result.signedPrekey = signedPrekey; + } + if (signedPrekeySignature != null) { + $result.signedPrekeySignature = signedPrekeySignature; + } + if (signedPrekeyId != null) { + $result.signedPrekeyId = signedPrekeyId; + } + return $result; + } + Handshake_Register._() : super(); + factory Handshake_Register.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory Handshake_Register.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'Handshake.Register', package: const $pb.PackageName(_omitMessageNames ? '' : 'client_to_server'), createEmptyInstance: create) + ..aOS(1, _omitFieldNames ? '' : 'username') + ..aOS(2, _omitFieldNames ? '' : 'inviteCode') + ..a<$core.List<$core.int>>(3, _omitFieldNames ? '' : 'publicIdentityKey', $pb.PbFieldType.OY) + ..a<$core.List<$core.int>>(4, _omitFieldNames ? '' : 'signedPrekey', $pb.PbFieldType.OY) + ..a<$core.List<$core.int>>(5, _omitFieldNames ? '' : 'signedPrekeySignature', $pb.PbFieldType.OY) + ..aInt64(6, _omitFieldNames ? '' : 'signedPrekeyId') + ..hasRequiredFields = false + ; + + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + Handshake_Register clone() => Handshake_Register()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + Handshake_Register copyWith(void Function(Handshake_Register) updates) => super.copyWith((message) => updates(message as Handshake_Register)) as Handshake_Register; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static Handshake_Register create() => Handshake_Register._(); + Handshake_Register createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static Handshake_Register getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static Handshake_Register? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get username => $_getSZ(0); + @$pb.TagNumber(1) + set username($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasUsername() => $_has(0); + @$pb.TagNumber(1) + void clearUsername() => clearField(1); + + @$pb.TagNumber(2) + $core.String get inviteCode => $_getSZ(1); + @$pb.TagNumber(2) + set inviteCode($core.String v) { $_setString(1, v); } + @$pb.TagNumber(2) + $core.bool hasInviteCode() => $_has(1); + @$pb.TagNumber(2) + void clearInviteCode() => clearField(2); + + @$pb.TagNumber(3) + $core.List<$core.int> get publicIdentityKey => $_getN(2); + @$pb.TagNumber(3) + set publicIdentityKey($core.List<$core.int> v) { $_setBytes(2, v); } + @$pb.TagNumber(3) + $core.bool hasPublicIdentityKey() => $_has(2); + @$pb.TagNumber(3) + void clearPublicIdentityKey() => clearField(3); + + @$pb.TagNumber(4) + $core.List<$core.int> get signedPrekey => $_getN(3); + @$pb.TagNumber(4) + set signedPrekey($core.List<$core.int> v) { $_setBytes(3, v); } + @$pb.TagNumber(4) + $core.bool hasSignedPrekey() => $_has(3); + @$pb.TagNumber(4) + void clearSignedPrekey() => clearField(4); + + @$pb.TagNumber(5) + $core.List<$core.int> get signedPrekeySignature => $_getN(4); + @$pb.TagNumber(5) + set signedPrekeySignature($core.List<$core.int> v) { $_setBytes(4, v); } + @$pb.TagNumber(5) + $core.bool hasSignedPrekeySignature() => $_has(4); + @$pb.TagNumber(5) + void clearSignedPrekeySignature() => clearField(5); + + @$pb.TagNumber(6) + $fixnum.Int64 get signedPrekeyId => $_getI64(5); + @$pb.TagNumber(6) + set signedPrekeyId($fixnum.Int64 v) { $_setInt64(5, v); } + @$pb.TagNumber(6) + $core.bool hasSignedPrekeyId() => $_has(5); + @$pb.TagNumber(6) + void clearSignedPrekeyId() => clearField(6); +} + +class Handshake_GetChallenge extends $pb.GeneratedMessage { + factory Handshake_GetChallenge() => create(); + Handshake_GetChallenge._() : super(); + factory Handshake_GetChallenge.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory Handshake_GetChallenge.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'Handshake.GetChallenge', package: const $pb.PackageName(_omitMessageNames ? '' : 'client_to_server'), createEmptyInstance: create) + ..hasRequiredFields = false + ; + + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + Handshake_GetChallenge clone() => Handshake_GetChallenge()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + Handshake_GetChallenge copyWith(void Function(Handshake_GetChallenge) updates) => super.copyWith((message) => updates(message as Handshake_GetChallenge)) as Handshake_GetChallenge; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static Handshake_GetChallenge create() => Handshake_GetChallenge._(); + Handshake_GetChallenge createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static Handshake_GetChallenge getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static Handshake_GetChallenge? _defaultInstance; +} + +class Handshake_OpenSession extends $pb.GeneratedMessage { + factory Handshake_OpenSession({ + $core.List<$core.int>? userId, + $core.List<$core.int>? response, + }) { + final $result = create(); + if (userId != null) { + $result.userId = userId; + } + if (response != null) { + $result.response = response; + } + return $result; + } + Handshake_OpenSession._() : super(); + factory Handshake_OpenSession.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory Handshake_OpenSession.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'Handshake.OpenSession', package: const $pb.PackageName(_omitMessageNames ? '' : 'client_to_server'), createEmptyInstance: create) + ..a<$core.List<$core.int>>(1, _omitFieldNames ? '' : 'userId', $pb.PbFieldType.OY) + ..a<$core.List<$core.int>>(2, _omitFieldNames ? '' : 'response', $pb.PbFieldType.OY) + ..hasRequiredFields = false + ; + + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + Handshake_OpenSession clone() => Handshake_OpenSession()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + Handshake_OpenSession copyWith(void Function(Handshake_OpenSession) updates) => super.copyWith((message) => updates(message as Handshake_OpenSession)) as Handshake_OpenSession; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static Handshake_OpenSession create() => Handshake_OpenSession._(); + Handshake_OpenSession createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static Handshake_OpenSession getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static Handshake_OpenSession? _defaultInstance; + + @$pb.TagNumber(1) + $core.List<$core.int> get userId => $_getN(0); + @$pb.TagNumber(1) + set userId($core.List<$core.int> v) { $_setBytes(0, v); } + @$pb.TagNumber(1) + $core.bool hasUserId() => $_has(0); + @$pb.TagNumber(1) + void clearUserId() => clearField(1); + + @$pb.TagNumber(2) + $core.List<$core.int> get response => $_getN(1); + @$pb.TagNumber(2) + set response($core.List<$core.int> v) { $_setBytes(1, v); } + @$pb.TagNumber(2) + $core.bool hasResponse() => $_has(1); + @$pb.TagNumber(2) + void clearResponse() => clearField(2); +} + +enum Handshake_Handshake { + register, + getchallenge, + opensession, + notSet +} + +class Handshake extends $pb.GeneratedMessage { + factory Handshake({ + Handshake_Register? register, + Handshake_GetChallenge? getchallenge, + Handshake_OpenSession? opensession, + }) { + final $result = create(); + if (register != null) { + $result.register = register; + } + if (getchallenge != null) { + $result.getchallenge = getchallenge; + } + if (opensession != null) { + $result.opensession = opensession; + } + return $result; + } + Handshake._() : super(); + factory Handshake.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory Handshake.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static const $core.Map<$core.int, Handshake_Handshake> _Handshake_HandshakeByTag = { + 1 : Handshake_Handshake.register, + 2 : Handshake_Handshake.getchallenge, + 3 : Handshake_Handshake.opensession, + 0 : Handshake_Handshake.notSet + }; + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'Handshake', package: const $pb.PackageName(_omitMessageNames ? '' : 'client_to_server'), createEmptyInstance: create) + ..oo(0, [1, 2, 3]) + ..aOM(1, _omitFieldNames ? '' : 'register', subBuilder: Handshake_Register.create) + ..aOM(2, _omitFieldNames ? '' : 'getchallenge', subBuilder: Handshake_GetChallenge.create) + ..aOM(3, _omitFieldNames ? '' : 'opensession', subBuilder: Handshake_OpenSession.create) + ..hasRequiredFields = false + ; + + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + Handshake clone() => Handshake()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + Handshake copyWith(void Function(Handshake) updates) => super.copyWith((message) => updates(message as Handshake)) as Handshake; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static Handshake create() => Handshake._(); + Handshake createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static Handshake getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static Handshake? _defaultInstance; + + Handshake_Handshake whichHandshake() => _Handshake_HandshakeByTag[$_whichOneof(0)]!; + void clearHandshake() => clearField($_whichOneof(0)); + + @$pb.TagNumber(1) + Handshake_Register get register => $_getN(0); + @$pb.TagNumber(1) + set register(Handshake_Register v) { setField(1, v); } + @$pb.TagNumber(1) + $core.bool hasRegister() => $_has(0); + @$pb.TagNumber(1) + void clearRegister() => clearField(1); + @$pb.TagNumber(1) + Handshake_Register ensureRegister() => $_ensure(0); + + @$pb.TagNumber(2) + Handshake_GetChallenge get getchallenge => $_getN(1); + @$pb.TagNumber(2) + set getchallenge(Handshake_GetChallenge v) { setField(2, v); } + @$pb.TagNumber(2) + $core.bool hasGetchallenge() => $_has(1); + @$pb.TagNumber(2) + void clearGetchallenge() => clearField(2); + @$pb.TagNumber(2) + Handshake_GetChallenge ensureGetchallenge() => $_ensure(1); + + @$pb.TagNumber(3) + Handshake_OpenSession get opensession => $_getN(2); + @$pb.TagNumber(3) + set opensession(Handshake_OpenSession v) { setField(3, v); } + @$pb.TagNumber(3) + $core.bool hasOpensession() => $_has(2); + @$pb.TagNumber(3) + void clearOpensession() => clearField(3); + @$pb.TagNumber(3) + Handshake_OpenSession ensureOpensession() => $_ensure(2); +} + +class ApplicationData_TextMessage extends $pb.GeneratedMessage { + factory ApplicationData_TextMessage({ + $core.List<$core.int>? userId, + $core.List<$core.int>? body, + }) { + final $result = create(); + if (userId != null) { + $result.userId = userId; + } + if (body != null) { + $result.body = body; + } + return $result; + } + ApplicationData_TextMessage._() : super(); + factory ApplicationData_TextMessage.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory ApplicationData_TextMessage.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'ApplicationData.TextMessage', package: const $pb.PackageName(_omitMessageNames ? '' : 'client_to_server'), createEmptyInstance: create) + ..a<$core.List<$core.int>>(1, _omitFieldNames ? '' : 'userId', $pb.PbFieldType.OY) + ..a<$core.List<$core.int>>(3, _omitFieldNames ? '' : 'body', $pb.PbFieldType.OY) + ..hasRequiredFields = false + ; + + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + ApplicationData_TextMessage clone() => ApplicationData_TextMessage()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + ApplicationData_TextMessage copyWith(void Function(ApplicationData_TextMessage) updates) => super.copyWith((message) => updates(message as ApplicationData_TextMessage)) as ApplicationData_TextMessage; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static ApplicationData_TextMessage create() => ApplicationData_TextMessage._(); + ApplicationData_TextMessage createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static ApplicationData_TextMessage getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static ApplicationData_TextMessage? _defaultInstance; + + @$pb.TagNumber(1) + $core.List<$core.int> get userId => $_getN(0); + @$pb.TagNumber(1) + set userId($core.List<$core.int> v) { $_setBytes(0, v); } + @$pb.TagNumber(1) + $core.bool hasUserId() => $_has(0); + @$pb.TagNumber(1) + void clearUserId() => clearField(1); + + @$pb.TagNumber(3) + $core.List<$core.int> get body => $_getN(1); + @$pb.TagNumber(3) + set body($core.List<$core.int> v) { $_setBytes(1, v); } + @$pb.TagNumber(3) + $core.bool hasBody() => $_has(1); + @$pb.TagNumber(3) + void clearBody() => clearField(3); +} + +class ApplicationData_GetUserByUsername extends $pb.GeneratedMessage { + factory ApplicationData_GetUserByUsername({ + $core.String? username, + }) { + final $result = create(); + if (username != null) { + $result.username = username; + } + return $result; + } + ApplicationData_GetUserByUsername._() : super(); + factory ApplicationData_GetUserByUsername.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory ApplicationData_GetUserByUsername.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'ApplicationData.GetUserByUsername', package: const $pb.PackageName(_omitMessageNames ? '' : 'client_to_server'), createEmptyInstance: create) + ..aOS(1, _omitFieldNames ? '' : 'username') + ..hasRequiredFields = false + ; + + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + ApplicationData_GetUserByUsername clone() => ApplicationData_GetUserByUsername()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + ApplicationData_GetUserByUsername copyWith(void Function(ApplicationData_GetUserByUsername) updates) => super.copyWith((message) => updates(message as ApplicationData_GetUserByUsername)) as ApplicationData_GetUserByUsername; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static ApplicationData_GetUserByUsername create() => ApplicationData_GetUserByUsername._(); + ApplicationData_GetUserByUsername createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static ApplicationData_GetUserByUsername getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static ApplicationData_GetUserByUsername? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get username => $_getSZ(0); + @$pb.TagNumber(1) + set username($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasUsername() => $_has(0); + @$pb.TagNumber(1) + void clearUsername() => clearField(1); +} + +class ApplicationData_GetPrekeysByUserId extends $pb.GeneratedMessage { + factory ApplicationData_GetPrekeysByUserId({ + $core.List<$core.int>? userId, + }) { + final $result = create(); + if (userId != null) { + $result.userId = userId; + } + return $result; + } + ApplicationData_GetPrekeysByUserId._() : super(); + factory ApplicationData_GetPrekeysByUserId.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory ApplicationData_GetPrekeysByUserId.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'ApplicationData.GetPrekeysByUserId', package: const $pb.PackageName(_omitMessageNames ? '' : 'client_to_server'), createEmptyInstance: create) + ..a<$core.List<$core.int>>(1, _omitFieldNames ? '' : 'userId', $pb.PbFieldType.OY) + ..hasRequiredFields = false + ; + + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + ApplicationData_GetPrekeysByUserId clone() => ApplicationData_GetPrekeysByUserId()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + ApplicationData_GetPrekeysByUserId copyWith(void Function(ApplicationData_GetPrekeysByUserId) updates) => super.copyWith((message) => updates(message as ApplicationData_GetPrekeysByUserId)) as ApplicationData_GetPrekeysByUserId; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static ApplicationData_GetPrekeysByUserId create() => ApplicationData_GetPrekeysByUserId._(); + ApplicationData_GetPrekeysByUserId createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static ApplicationData_GetPrekeysByUserId getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static ApplicationData_GetPrekeysByUserId? _defaultInstance; + + @$pb.TagNumber(1) + $core.List<$core.int> get userId => $_getN(0); + @$pb.TagNumber(1) + set userId($core.List<$core.int> v) { $_setBytes(0, v); } + @$pb.TagNumber(1) + $core.bool hasUserId() => $_has(0); + @$pb.TagNumber(1) + void clearUserId() => clearField(1); +} + +enum ApplicationData_ApplicationData { + textmessage, + getuserbyusername, + getprekeysbyuserid, + notSet +} + +class ApplicationData extends $pb.GeneratedMessage { + factory ApplicationData({ + ApplicationData_TextMessage? textmessage, + ApplicationData_GetUserByUsername? getuserbyusername, + ApplicationData_GetPrekeysByUserId? getprekeysbyuserid, + }) { + final $result = create(); + if (textmessage != null) { + $result.textmessage = textmessage; + } + if (getuserbyusername != null) { + $result.getuserbyusername = getuserbyusername; + } + if (getprekeysbyuserid != null) { + $result.getprekeysbyuserid = getprekeysbyuserid; + } + return $result; + } + ApplicationData._() : super(); + factory ApplicationData.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory ApplicationData.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static const $core.Map<$core.int, ApplicationData_ApplicationData> _ApplicationData_ApplicationDataByTag = { + 1 : ApplicationData_ApplicationData.textmessage, + 2 : ApplicationData_ApplicationData.getuserbyusername, + 3 : ApplicationData_ApplicationData.getprekeysbyuserid, + 0 : ApplicationData_ApplicationData.notSet + }; + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'ApplicationData', package: const $pb.PackageName(_omitMessageNames ? '' : 'client_to_server'), createEmptyInstance: create) + ..oo(0, [1, 2, 3]) + ..aOM(1, _omitFieldNames ? '' : 'textmessage', subBuilder: ApplicationData_TextMessage.create) + ..aOM(2, _omitFieldNames ? '' : 'getuserbyusername', subBuilder: ApplicationData_GetUserByUsername.create) + ..aOM(3, _omitFieldNames ? '' : 'getprekeysbyuserid', subBuilder: ApplicationData_GetPrekeysByUserId.create) + ..hasRequiredFields = false + ; + + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + ApplicationData clone() => ApplicationData()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + ApplicationData copyWith(void Function(ApplicationData) updates) => super.copyWith((message) => updates(message as ApplicationData)) as ApplicationData; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static ApplicationData create() => ApplicationData._(); + ApplicationData createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static ApplicationData getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static ApplicationData? _defaultInstance; + + ApplicationData_ApplicationData whichApplicationData() => _ApplicationData_ApplicationDataByTag[$_whichOneof(0)]!; + void clearApplicationData() => clearField($_whichOneof(0)); + + @$pb.TagNumber(1) + ApplicationData_TextMessage get textmessage => $_getN(0); + @$pb.TagNumber(1) + set textmessage(ApplicationData_TextMessage v) { setField(1, v); } + @$pb.TagNumber(1) + $core.bool hasTextmessage() => $_has(0); + @$pb.TagNumber(1) + void clearTextmessage() => clearField(1); + @$pb.TagNumber(1) + ApplicationData_TextMessage ensureTextmessage() => $_ensure(0); + + @$pb.TagNumber(2) + ApplicationData_GetUserByUsername get getuserbyusername => $_getN(1); + @$pb.TagNumber(2) + set getuserbyusername(ApplicationData_GetUserByUsername v) { setField(2, v); } + @$pb.TagNumber(2) + $core.bool hasGetuserbyusername() => $_has(1); + @$pb.TagNumber(2) + void clearGetuserbyusername() => clearField(2); + @$pb.TagNumber(2) + ApplicationData_GetUserByUsername ensureGetuserbyusername() => $_ensure(1); + + @$pb.TagNumber(3) + ApplicationData_GetPrekeysByUserId get getprekeysbyuserid => $_getN(2); + @$pb.TagNumber(3) + set getprekeysbyuserid(ApplicationData_GetPrekeysByUserId v) { setField(3, v); } + @$pb.TagNumber(3) + $core.bool hasGetprekeysbyuserid() => $_has(2); + @$pb.TagNumber(3) + void clearGetprekeysbyuserid() => clearField(3); + @$pb.TagNumber(3) + ApplicationData_GetPrekeysByUserId ensureGetprekeysbyuserid() => $_ensure(2); +} + +class Response_Prekeys extends $pb.GeneratedMessage { + factory Response_Prekeys({ + $core.Iterable<$core.List<$core.int>>? prekeys, + }) { + final $result = create(); + if (prekeys != null) { + $result.prekeys.addAll(prekeys); + } + return $result; + } + Response_Prekeys._() : super(); + factory Response_Prekeys.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory Response_Prekeys.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'Response.Prekeys', package: const $pb.PackageName(_omitMessageNames ? '' : 'client_to_server'), createEmptyInstance: create) + ..p<$core.List<$core.int>>(1, _omitFieldNames ? '' : 'prekeys', $pb.PbFieldType.PY) + ..hasRequiredFields = false + ; + + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + Response_Prekeys clone() => Response_Prekeys()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + Response_Prekeys copyWith(void Function(Response_Prekeys) updates) => super.copyWith((message) => updates(message as Response_Prekeys)) as Response_Prekeys; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static Response_Prekeys create() => Response_Prekeys._(); + Response_Prekeys createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static Response_Prekeys getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static Response_Prekeys? _defaultInstance; + + @$pb.TagNumber(1) + $core.List<$core.List<$core.int>> get prekeys => $_getList(0); +} + +enum Response_Ok_Ok { + none, + prekeys, + notSet +} + +class Response_Ok extends $pb.GeneratedMessage { + factory Response_Ok({ + $core.bool? none, + Response_Prekeys? prekeys, + }) { + final $result = create(); + if (none != null) { + $result.none = none; + } + if (prekeys != null) { + $result.prekeys = prekeys; + } + return $result; + } + Response_Ok._() : super(); + factory Response_Ok.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory Response_Ok.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static const $core.Map<$core.int, Response_Ok_Ok> _Response_Ok_OkByTag = { + 1 : Response_Ok_Ok.none, + 2 : Response_Ok_Ok.prekeys, + 0 : Response_Ok_Ok.notSet + }; + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'Response.Ok', package: const $pb.PackageName(_omitMessageNames ? '' : 'client_to_server'), createEmptyInstance: create) + ..oo(0, [1, 2]) + ..aOB(1, _omitFieldNames ? '' : 'None', protoName: 'None') + ..aOM(2, _omitFieldNames ? '' : 'prekeys', subBuilder: Response_Prekeys.create) + ..hasRequiredFields = false + ; + + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + Response_Ok clone() => Response_Ok()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + Response_Ok copyWith(void Function(Response_Ok) updates) => super.copyWith((message) => updates(message as Response_Ok)) as Response_Ok; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static Response_Ok create() => Response_Ok._(); + Response_Ok createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static Response_Ok getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static Response_Ok? _defaultInstance; + + Response_Ok_Ok whichOk() => _Response_Ok_OkByTag[$_whichOneof(0)]!; + void clearOk() => clearField($_whichOneof(0)); + + @$pb.TagNumber(1) + $core.bool get none => $_getBF(0); + @$pb.TagNumber(1) + set none($core.bool v) { $_setBool(0, v); } + @$pb.TagNumber(1) + $core.bool hasNone() => $_has(0); + @$pb.TagNumber(1) + void clearNone() => clearField(1); + + @$pb.TagNumber(2) + Response_Prekeys get prekeys => $_getN(1); + @$pb.TagNumber(2) + set prekeys(Response_Prekeys v) { setField(2, v); } + @$pb.TagNumber(2) + $core.bool hasPrekeys() => $_has(1); + @$pb.TagNumber(2) + void clearPrekeys() => clearField(2); + @$pb.TagNumber(2) + Response_Prekeys ensurePrekeys() => $_ensure(1); +} + +enum Response_Response { + ok, + error, + notSet +} + +class Response extends $pb.GeneratedMessage { + factory Response({ + Response_Ok? ok, + $0.ErrorCode? error, + }) { + final $result = create(); + if (ok != null) { + $result.ok = ok; + } + if (error != null) { + $result.error = error; + } + return $result; + } + Response._() : super(); + factory Response.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory Response.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static const $core.Map<$core.int, Response_Response> _Response_ResponseByTag = { + 1 : Response_Response.ok, + 2 : Response_Response.error, + 0 : Response_Response.notSet + }; + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'Response', package: const $pb.PackageName(_omitMessageNames ? '' : 'client_to_server'), createEmptyInstance: create) + ..oo(0, [1, 2]) + ..aOM(1, _omitFieldNames ? '' : 'ok', subBuilder: Response_Ok.create) + ..e<$0.ErrorCode>(2, _omitFieldNames ? '' : 'error', $pb.PbFieldType.OE, defaultOrMaker: $0.ErrorCode.Unknown, valueOf: $0.ErrorCode.valueOf, enumValues: $0.ErrorCode.values) + ..hasRequiredFields = false + ; + + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + Response clone() => Response()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + Response copyWith(void Function(Response) updates) => super.copyWith((message) => updates(message as Response)) as Response; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static Response create() => Response._(); + Response createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static Response getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static Response? _defaultInstance; + + Response_Response whichResponse() => _Response_ResponseByTag[$_whichOneof(0)]!; + void clearResponse() => clearField($_whichOneof(0)); + + @$pb.TagNumber(1) + Response_Ok get ok => $_getN(0); + @$pb.TagNumber(1) + set ok(Response_Ok v) { setField(1, v); } + @$pb.TagNumber(1) + $core.bool hasOk() => $_has(0); + @$pb.TagNumber(1) + void clearOk() => clearField(1); + @$pb.TagNumber(1) + Response_Ok ensureOk() => $_ensure(0); + + @$pb.TagNumber(2) + $0.ErrorCode get error => $_getN(1); + @$pb.TagNumber(2) + set error($0.ErrorCode v) { setField(2, v); } + @$pb.TagNumber(2) + $core.bool hasError() => $_has(1); + @$pb.TagNumber(2) + void clearError() => clearField(2); +} + + +const _omitFieldNames = $core.bool.fromEnvironment('protobuf.omit_field_names'); +const _omitMessageNames = $core.bool.fromEnvironment('protobuf.omit_message_names'); diff --git a/lib/src/proto/api/client_to_server.pbenum.dart b/lib/src/proto/api/client_to_server.pbenum.dart new file mode 100644 index 0000000..2f4ab00 --- /dev/null +++ b/lib/src/proto/api/client_to_server.pbenum.dart @@ -0,0 +1,11 @@ +// +// Generated code. Do not modify. +// source: api/client_to_server.proto +// +// @dart = 2.12 + +// ignore_for_file: annotate_overrides, camel_case_types, comment_references +// ignore_for_file: constant_identifier_names, library_prefixes +// ignore_for_file: non_constant_identifier_names, prefer_final_fields +// ignore_for_file: unnecessary_import, unnecessary_this, unused_import + diff --git a/lib/src/proto/api/client_to_server.pbjson.dart b/lib/src/proto/api/client_to_server.pbjson.dart new file mode 100644 index 0000000..99b7607 --- /dev/null +++ b/lib/src/proto/api/client_to_server.pbjson.dart @@ -0,0 +1,204 @@ +// +// Generated code. Do not modify. +// source: api/client_to_server.proto +// +// @dart = 2.12 + +// ignore_for_file: annotate_overrides, camel_case_types, comment_references +// ignore_for_file: constant_identifier_names, library_prefixes +// ignore_for_file: non_constant_identifier_names, prefer_final_fields +// ignore_for_file: unnecessary_import, unnecessary_this, unused_import + +import 'dart:convert' as $convert; +import 'dart:core' as $core; +import 'dart:typed_data' as $typed_data; + +@$core.Deprecated('Use clientToServerDescriptor instead') +const ClientToServer$json = { + '1': 'ClientToServer', + '2': [ + {'1': 'V0', '3': 1, '4': 1, '5': 11, '6': '.client_to_server.V0', '9': 0, '10': 'V0'}, + ], + '8': [ + {'1': 'v'}, + ], +}; + +/// Descriptor for `ClientToServer`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List clientToServerDescriptor = $convert.base64Decode( + 'Cg5DbGllbnRUb1NlcnZlchImCgJWMBgBIAEoCzIULmNsaWVudF90b19zZXJ2ZXIuVjBIAFICVj' + 'BCAwoBdg=='); + +@$core.Deprecated('Use v0Descriptor instead') +const V0$json = { + '1': 'V0', + '2': [ + {'1': 'seq', '3': 1, '4': 1, '5': 4, '10': 'seq'}, + {'1': 'handshake', '3': 2, '4': 1, '5': 11, '6': '.client_to_server.Handshake', '9': 0, '10': 'handshake'}, + {'1': 'applicationdata', '3': 3, '4': 1, '5': 11, '6': '.client_to_server.ApplicationData', '9': 0, '10': 'applicationdata'}, + {'1': 'response', '3': 4, '4': 1, '5': 11, '6': '.client_to_server.Response', '9': 0, '10': 'response'}, + ], + '8': [ + {'1': 'Kind'}, + ], +}; + +/// Descriptor for `V0`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List v0Descriptor = $convert.base64Decode( + 'CgJWMBIQCgNzZXEYASABKARSA3NlcRI7CgloYW5kc2hha2UYAiABKAsyGy5jbGllbnRfdG9fc2' + 'VydmVyLkhhbmRzaGFrZUgAUgloYW5kc2hha2USTQoPYXBwbGljYXRpb25kYXRhGAMgASgLMiEu' + 'Y2xpZW50X3RvX3NlcnZlci5BcHBsaWNhdGlvbkRhdGFIAFIPYXBwbGljYXRpb25kYXRhEjgKCH' + 'Jlc3BvbnNlGAQgASgLMhouY2xpZW50X3RvX3NlcnZlci5SZXNwb25zZUgAUghyZXNwb25zZUIG' + 'CgRLaW5k'); + +@$core.Deprecated('Use handshakeDescriptor instead') +const Handshake$json = { + '1': 'Handshake', + '2': [ + {'1': 'register', '3': 1, '4': 1, '5': 11, '6': '.client_to_server.Handshake.Register', '9': 0, '10': 'register'}, + {'1': 'getchallenge', '3': 2, '4': 1, '5': 11, '6': '.client_to_server.Handshake.GetChallenge', '9': 0, '10': 'getchallenge'}, + {'1': 'opensession', '3': 3, '4': 1, '5': 11, '6': '.client_to_server.Handshake.OpenSession', '9': 0, '10': 'opensession'}, + ], + '3': [Handshake_Register$json, Handshake_GetChallenge$json, Handshake_OpenSession$json], + '8': [ + {'1': 'Handshake'}, + ], +}; + +@$core.Deprecated('Use handshakeDescriptor instead') +const Handshake_Register$json = { + '1': 'Register', + '2': [ + {'1': 'username', '3': 1, '4': 1, '5': 9, '10': 'username'}, + {'1': 'invite_code', '3': 2, '4': 1, '5': 9, '9': 0, '10': 'inviteCode', '17': true}, + {'1': 'public_identity_key', '3': 3, '4': 1, '5': 12, '10': 'publicIdentityKey'}, + {'1': 'signed_prekey', '3': 4, '4': 1, '5': 12, '10': 'signedPrekey'}, + {'1': 'signed_prekey_signature', '3': 5, '4': 1, '5': 12, '10': 'signedPrekeySignature'}, + {'1': 'signed_prekey_id', '3': 6, '4': 1, '5': 3, '10': 'signedPrekeyId'}, + ], + '8': [ + {'1': '_invite_code'}, + ], +}; + +@$core.Deprecated('Use handshakeDescriptor instead') +const Handshake_GetChallenge$json = { + '1': 'GetChallenge', +}; + +@$core.Deprecated('Use handshakeDescriptor instead') +const Handshake_OpenSession$json = { + '1': 'OpenSession', + '2': [ + {'1': 'user_id', '3': 1, '4': 1, '5': 12, '10': 'userId'}, + {'1': 'response', '3': 2, '4': 1, '5': 12, '10': 'response'}, + ], +}; + +/// Descriptor for `Handshake`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List handshakeDescriptor = $convert.base64Decode( + 'CglIYW5kc2hha2USQgoIcmVnaXN0ZXIYASABKAsyJC5jbGllbnRfdG9fc2VydmVyLkhhbmRzaG' + 'FrZS5SZWdpc3RlckgAUghyZWdpc3RlchJOCgxnZXRjaGFsbGVuZ2UYAiABKAsyKC5jbGllbnRf' + 'dG9fc2VydmVyLkhhbmRzaGFrZS5HZXRDaGFsbGVuZ2VIAFIMZ2V0Y2hhbGxlbmdlEksKC29wZW' + '5zZXNzaW9uGAMgASgLMicuY2xpZW50X3RvX3NlcnZlci5IYW5kc2hha2UuT3BlblNlc3Npb25I' + 'AFILb3BlbnNlc3Npb24akwIKCFJlZ2lzdGVyEhoKCHVzZXJuYW1lGAEgASgJUgh1c2VybmFtZR' + 'IkCgtpbnZpdGVfY29kZRgCIAEoCUgAUgppbnZpdGVDb2RliAEBEi4KE3B1YmxpY19pZGVudGl0' + 'eV9rZXkYAyABKAxSEXB1YmxpY0lkZW50aXR5S2V5EiMKDXNpZ25lZF9wcmVrZXkYBCABKAxSDH' + 'NpZ25lZFByZWtleRI2ChdzaWduZWRfcHJla2V5X3NpZ25hdHVyZRgFIAEoDFIVc2lnbmVkUHJl' + 'a2V5U2lnbmF0dXJlEigKEHNpZ25lZF9wcmVrZXlfaWQYBiABKANSDnNpZ25lZFByZWtleUlkQg' + '4KDF9pbnZpdGVfY29kZRoOCgxHZXRDaGFsbGVuZ2UaQgoLT3BlblNlc3Npb24SFwoHdXNlcl9p' + 'ZBgBIAEoDFIGdXNlcklkEhoKCHJlc3BvbnNlGAIgASgMUghyZXNwb25zZUILCglIYW5kc2hha2' + 'U='); + +@$core.Deprecated('Use applicationDataDescriptor instead') +const ApplicationData$json = { + '1': 'ApplicationData', + '2': [ + {'1': 'textmessage', '3': 1, '4': 1, '5': 11, '6': '.client_to_server.ApplicationData.TextMessage', '9': 0, '10': 'textmessage'}, + {'1': 'getuserbyusername', '3': 2, '4': 1, '5': 11, '6': '.client_to_server.ApplicationData.GetUserByUsername', '9': 0, '10': 'getuserbyusername'}, + {'1': 'getprekeysbyuserid', '3': 3, '4': 1, '5': 11, '6': '.client_to_server.ApplicationData.GetPrekeysByUserId', '9': 0, '10': 'getprekeysbyuserid'}, + ], + '3': [ApplicationData_TextMessage$json, ApplicationData_GetUserByUsername$json, ApplicationData_GetPrekeysByUserId$json], + '8': [ + {'1': 'ApplicationData'}, + ], +}; + +@$core.Deprecated('Use applicationDataDescriptor instead') +const ApplicationData_TextMessage$json = { + '1': 'TextMessage', + '2': [ + {'1': 'user_id', '3': 1, '4': 1, '5': 12, '10': 'userId'}, + {'1': 'body', '3': 3, '4': 1, '5': 12, '10': 'body'}, + ], +}; + +@$core.Deprecated('Use applicationDataDescriptor instead') +const ApplicationData_GetUserByUsername$json = { + '1': 'GetUserByUsername', + '2': [ + {'1': 'username', '3': 1, '4': 1, '5': 9, '10': 'username'}, + ], +}; + +@$core.Deprecated('Use applicationDataDescriptor instead') +const ApplicationData_GetPrekeysByUserId$json = { + '1': 'GetPrekeysByUserId', + '2': [ + {'1': 'user_id', '3': 1, '4': 1, '5': 12, '10': 'userId'}, + ], +}; + +/// Descriptor for `ApplicationData`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List applicationDataDescriptor = $convert.base64Decode( + 'Cg9BcHBsaWNhdGlvbkRhdGESUQoLdGV4dG1lc3NhZ2UYASABKAsyLS5jbGllbnRfdG9fc2Vydm' + 'VyLkFwcGxpY2F0aW9uRGF0YS5UZXh0TWVzc2FnZUgAUgt0ZXh0bWVzc2FnZRJjChFnZXR1c2Vy' + 'Ynl1c2VybmFtZRgCIAEoCzIzLmNsaWVudF90b19zZXJ2ZXIuQXBwbGljYXRpb25EYXRhLkdldF' + 'VzZXJCeVVzZXJuYW1lSABSEWdldHVzZXJieXVzZXJuYW1lEmYKEmdldHByZWtleXNieXVzZXJp' + 'ZBgDIAEoCzI0LmNsaWVudF90b19zZXJ2ZXIuQXBwbGljYXRpb25EYXRhLkdldFByZWtleXNCeV' + 'VzZXJJZEgAUhJnZXRwcmVrZXlzYnl1c2VyaWQaOgoLVGV4dE1lc3NhZ2USFwoHdXNlcl9pZBgB' + 'IAEoDFIGdXNlcklkEhIKBGJvZHkYAyABKAxSBGJvZHkaLwoRR2V0VXNlckJ5VXNlcm5hbWUSGg' + 'oIdXNlcm5hbWUYASABKAlSCHVzZXJuYW1lGi0KEkdldFByZWtleXNCeVVzZXJJZBIXCgd1c2Vy' + 'X2lkGAEgASgMUgZ1c2VySWRCEQoPQXBwbGljYXRpb25EYXRh'); + +@$core.Deprecated('Use responseDescriptor instead') +const Response$json = { + '1': 'Response', + '2': [ + {'1': 'ok', '3': 1, '4': 1, '5': 11, '6': '.client_to_server.Response.Ok', '9': 0, '10': 'ok'}, + {'1': 'error', '3': 2, '4': 1, '5': 14, '6': '.error.ErrorCode', '9': 0, '10': 'error'}, + ], + '3': [Response_Prekeys$json, Response_Ok$json], + '8': [ + {'1': 'Response'}, + ], +}; + +@$core.Deprecated('Use responseDescriptor instead') +const Response_Prekeys$json = { + '1': 'Prekeys', + '2': [ + {'1': 'prekeys', '3': 1, '4': 3, '5': 12, '10': 'prekeys'}, + ], +}; + +@$core.Deprecated('Use responseDescriptor instead') +const Response_Ok$json = { + '1': 'Ok', + '2': [ + {'1': 'None', '3': 1, '4': 1, '5': 8, '9': 0, '10': 'None'}, + {'1': 'prekeys', '3': 2, '4': 1, '5': 11, '6': '.client_to_server.Response.Prekeys', '9': 0, '10': 'prekeys'}, + ], + '8': [ + {'1': 'Ok'}, + ], +}; + +/// Descriptor for `Response`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List responseDescriptor = $convert.base64Decode( + 'CghSZXNwb25zZRIvCgJvaxgBIAEoCzIdLmNsaWVudF90b19zZXJ2ZXIuUmVzcG9uc2UuT2tIAF' + 'ICb2sSKAoFZXJyb3IYAiABKA4yEC5lcnJvci5FcnJvckNvZGVIAFIFZXJyb3IaIwoHUHJla2V5' + 'cxIYCgdwcmVrZXlzGAEgAygMUgdwcmVrZXlzGmAKAk9rEhQKBE5vbmUYASABKAhIAFIETm9uZR' + 'I+CgdwcmVrZXlzGAIgASgLMiIuY2xpZW50X3RvX3NlcnZlci5SZXNwb25zZS5QcmVrZXlzSABS' + 'B3ByZWtleXNCBAoCT2tCCgoIUmVzcG9uc2U='); + diff --git a/lib/src/proto/api/client_to_server.pbserver.dart b/lib/src/proto/api/client_to_server.pbserver.dart new file mode 100644 index 0000000..58443e2 --- /dev/null +++ b/lib/src/proto/api/client_to_server.pbserver.dart @@ -0,0 +1,14 @@ +// +// Generated code. Do not modify. +// source: api/client_to_server.proto +// +// @dart = 2.12 + +// ignore_for_file: annotate_overrides, camel_case_types, comment_references +// ignore_for_file: constant_identifier_names +// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes +// ignore_for_file: non_constant_identifier_names, prefer_final_fields +// ignore_for_file: unnecessary_import, unnecessary_this, unused_import + +export 'client_to_server.pb.dart'; + diff --git a/lib/src/proto/api/error.pb.dart b/lib/src/proto/api/error.pb.dart new file mode 100644 index 0000000..7229879 --- /dev/null +++ b/lib/src/proto/api/error.pb.dart @@ -0,0 +1,15 @@ +// +// Generated code. Do not modify. +// source: api/error.proto +// +// @dart = 2.12 + +// ignore_for_file: annotate_overrides, camel_case_types, comment_references +// ignore_for_file: constant_identifier_names, library_prefixes +// ignore_for_file: non_constant_identifier_names, prefer_final_fields +// ignore_for_file: unnecessary_import, unnecessary_this, unused_import + +import 'dart:core' as $core; + +export 'error.pbenum.dart'; + diff --git a/lib/src/proto/api/error.pbenum.dart b/lib/src/proto/api/error.pbenum.dart new file mode 100644 index 0000000..8c9d9c0 --- /dev/null +++ b/lib/src/proto/api/error.pbenum.dart @@ -0,0 +1,54 @@ +// +// Generated code. Do not modify. +// source: api/error.proto +// +// @dart = 2.12 + +// ignore_for_file: annotate_overrides, camel_case_types, comment_references +// ignore_for_file: constant_identifier_names, library_prefixes +// ignore_for_file: non_constant_identifier_names, prefer_final_fields +// ignore_for_file: unnecessary_import, unnecessary_this, unused_import + +import 'dart:core' as $core; + +import 'package:protobuf/protobuf.dart' as $pb; + +class ErrorCode extends $pb.ProtobufEnum { + static const ErrorCode Unknown = ErrorCode._(0, _omitEnumNames ? '' : 'Unknown'); + static const ErrorCode BadRequest = ErrorCode._(400, _omitEnumNames ? '' : 'BadRequest'); + static const ErrorCode TooManyRequests = ErrorCode._(429, _omitEnumNames ? '' : 'TooManyRequests'); + static const ErrorCode InternalError = ErrorCode._(500, _omitEnumNames ? '' : 'InternalError'); + static const ErrorCode InvalidInvitationCode = ErrorCode._(1002, _omitEnumNames ? '' : 'InvalidInvitationCode'); + static const ErrorCode UsernameAlreadyTaken = ErrorCode._(1003, _omitEnumNames ? '' : 'UsernameAlreadyTaken'); + static const ErrorCode SignatureNotValid = ErrorCode._(1004, _omitEnumNames ? '' : 'SignatureNotValid'); + static const ErrorCode UsernameNotFound = ErrorCode._(1005, _omitEnumNames ? '' : 'UsernameNotFound'); + static const ErrorCode UsernameNotValid = ErrorCode._(1006, _omitEnumNames ? '' : 'UsernameNotValid'); + static const ErrorCode InvalidPublicKey = ErrorCode._(1007, _omitEnumNames ? '' : 'InvalidPublicKey'); + static const ErrorCode SessionAlreadyAuthenticated = ErrorCode._(1008, _omitEnumNames ? '' : 'SessionAlreadyAuthenticated'); + static const ErrorCode SessionNotAuthenticated = ErrorCode._(1009, _omitEnumNames ? '' : 'SessionNotAuthenticated'); + static const ErrorCode OnlyOneSessionAllowed = ErrorCode._(1010, _omitEnumNames ? '' : 'OnlyOneSessionAllowed'); + + static const $core.List values = [ + Unknown, + BadRequest, + TooManyRequests, + InternalError, + InvalidInvitationCode, + UsernameAlreadyTaken, + SignatureNotValid, + UsernameNotFound, + UsernameNotValid, + InvalidPublicKey, + SessionAlreadyAuthenticated, + SessionNotAuthenticated, + OnlyOneSessionAllowed, + ]; + + static final $core.Map<$core.int, ErrorCode> _byValue = $pb.ProtobufEnum.initByValue(values); + static ErrorCode? valueOf($core.int value) => _byValue[value]; + + const ErrorCode._($core.int v, $core.String n) : super(v, n); +} + + +const _omitEnumNames = $core.bool.fromEnvironment('protobuf.omit_enum_names'); diff --git a/lib/src/proto/api/error.pbjson.dart b/lib/src/proto/api/error.pbjson.dart new file mode 100644 index 0000000..0cc3219 --- /dev/null +++ b/lib/src/proto/api/error.pbjson.dart @@ -0,0 +1,44 @@ +// +// Generated code. Do not modify. +// source: api/error.proto +// +// @dart = 2.12 + +// ignore_for_file: annotate_overrides, camel_case_types, comment_references +// ignore_for_file: constant_identifier_names, library_prefixes +// ignore_for_file: non_constant_identifier_names, prefer_final_fields +// ignore_for_file: unnecessary_import, unnecessary_this, unused_import + +import 'dart:convert' as $convert; +import 'dart:core' as $core; +import 'dart:typed_data' as $typed_data; + +@$core.Deprecated('Use errorCodeDescriptor instead') +const ErrorCode$json = { + '1': 'ErrorCode', + '2': [ + {'1': 'Unknown', '2': 0}, + {'1': 'BadRequest', '2': 400}, + {'1': 'TooManyRequests', '2': 429}, + {'1': 'InternalError', '2': 500}, + {'1': 'InvalidInvitationCode', '2': 1002}, + {'1': 'UsernameAlreadyTaken', '2': 1003}, + {'1': 'SignatureNotValid', '2': 1004}, + {'1': 'UsernameNotFound', '2': 1005}, + {'1': 'UsernameNotValid', '2': 1006}, + {'1': 'InvalidPublicKey', '2': 1007}, + {'1': 'SessionAlreadyAuthenticated', '2': 1008}, + {'1': 'SessionNotAuthenticated', '2': 1009}, + {'1': 'OnlyOneSessionAllowed', '2': 1010}, + ], +}; + +/// Descriptor for `ErrorCode`. Decode as a `google.protobuf.EnumDescriptorProto`. +final $typed_data.Uint8List errorCodeDescriptor = $convert.base64Decode( + 'CglFcnJvckNvZGUSCwoHVW5rbm93bhAAEg8KCkJhZFJlcXVlc3QQkAMSFAoPVG9vTWFueVJlcX' + 'Vlc3RzEK0DEhIKDUludGVybmFsRXJyb3IQ9AMSGgoVSW52YWxpZEludml0YXRpb25Db2RlEOoH' + 'EhkKFFVzZXJuYW1lQWxyZWFkeVRha2VuEOsHEhYKEVNpZ25hdHVyZU5vdFZhbGlkEOwHEhUKEF' + 'VzZXJuYW1lTm90Rm91bmQQ7QcSFQoQVXNlcm5hbWVOb3RWYWxpZBDuBxIVChBJbnZhbGlkUHVi' + 'bGljS2V5EO8HEiAKG1Nlc3Npb25BbHJlYWR5QXV0aGVudGljYXRlZBDwBxIcChdTZXNzaW9uTm' + '90QXV0aGVudGljYXRlZBDxBxIaChVPbmx5T25lU2Vzc2lvbkFsbG93ZWQQ8gc='); + diff --git a/lib/src/proto/api/error.pbserver.dart b/lib/src/proto/api/error.pbserver.dart new file mode 100644 index 0000000..89b76b4 --- /dev/null +++ b/lib/src/proto/api/error.pbserver.dart @@ -0,0 +1,14 @@ +// +// Generated code. Do not modify. +// source: api/error.proto +// +// @dart = 2.12 + +// ignore_for_file: annotate_overrides, camel_case_types, comment_references +// ignore_for_file: constant_identifier_names +// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes +// ignore_for_file: non_constant_identifier_names, prefer_final_fields +// ignore_for_file: unnecessary_import, unnecessary_this, unused_import + +export 'error.pb.dart'; + diff --git a/lib/src/proto/api/server_to_client.pb.dart b/lib/src/proto/api/server_to_client.pb.dart new file mode 100644 index 0000000..bfd1701 --- /dev/null +++ b/lib/src/proto/api/server_to_client.pb.dart @@ -0,0 +1,557 @@ +// +// Generated code. Do not modify. +// source: api/server_to_client.proto +// +// @dart = 2.12 + +// ignore_for_file: annotate_overrides, camel_case_types, comment_references +// ignore_for_file: constant_identifier_names, library_prefixes +// ignore_for_file: non_constant_identifier_names, prefer_final_fields +// ignore_for_file: unnecessary_import, unnecessary_this, unused_import + +import 'dart:core' as $core; + +import 'package:fixnum/fixnum.dart' as $fixnum; +import 'package:protobuf/protobuf.dart' as $pb; + +import 'error.pbenum.dart' as $0; + +enum ServerToClient_V { + v0, + notSet +} + +class ServerToClient extends $pb.GeneratedMessage { + factory ServerToClient({ + V0? v0, + }) { + final $result = create(); + if (v0 != null) { + $result.v0 = v0; + } + return $result; + } + ServerToClient._() : super(); + factory ServerToClient.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory ServerToClient.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static const $core.Map<$core.int, ServerToClient_V> _ServerToClient_VByTag = { + 1 : ServerToClient_V.v0, + 0 : ServerToClient_V.notSet + }; + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'ServerToClient', package: const $pb.PackageName(_omitMessageNames ? '' : 'server_to_client'), createEmptyInstance: create) + ..oo(0, [1]) + ..aOM(1, _omitFieldNames ? '' : 'V0', protoName: 'V0', subBuilder: V0.create) + ..hasRequiredFields = false + ; + + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + ServerToClient clone() => ServerToClient()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + ServerToClient copyWith(void Function(ServerToClient) updates) => super.copyWith((message) => updates(message as ServerToClient)) as ServerToClient; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static ServerToClient create() => ServerToClient._(); + ServerToClient createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static ServerToClient getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static ServerToClient? _defaultInstance; + + ServerToClient_V whichV() => _ServerToClient_VByTag[$_whichOneof(0)]!; + void clearV() => clearField($_whichOneof(0)); + + @$pb.TagNumber(1) + V0 get v0 => $_getN(0); + @$pb.TagNumber(1) + set v0(V0 v) { setField(1, v); } + @$pb.TagNumber(1) + $core.bool hasV0() => $_has(0); + @$pb.TagNumber(1) + void clearV0() => clearField(1); + @$pb.TagNumber(1) + V0 ensureV0() => $_ensure(0); +} + +enum V0_Kind { + response, + newMessage, + requestNewPreKeys, + notSet +} + +class V0 extends $pb.GeneratedMessage { + factory V0({ + $fixnum.Int64? seq, + Response? response, + NewMessage? newMessage, + $core.bool? requestNewPreKeys, + }) { + final $result = create(); + if (seq != null) { + $result.seq = seq; + } + if (response != null) { + $result.response = response; + } + if (newMessage != null) { + $result.newMessage = newMessage; + } + if (requestNewPreKeys != null) { + $result.requestNewPreKeys = requestNewPreKeys; + } + return $result; + } + V0._() : super(); + factory V0.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory V0.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static const $core.Map<$core.int, V0_Kind> _V0_KindByTag = { + 2 : V0_Kind.response, + 3 : V0_Kind.newMessage, + 4 : V0_Kind.requestNewPreKeys, + 0 : V0_Kind.notSet + }; + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'V0', package: const $pb.PackageName(_omitMessageNames ? '' : 'server_to_client'), createEmptyInstance: create) + ..oo(0, [2, 3, 4]) + ..a<$fixnum.Int64>(1, _omitFieldNames ? '' : 'seq', $pb.PbFieldType.OU6, defaultOrMaker: $fixnum.Int64.ZERO) + ..aOM(2, _omitFieldNames ? '' : 'response', subBuilder: Response.create) + ..aOM(3, _omitFieldNames ? '' : 'newMessage', protoName: 'newMessage', subBuilder: NewMessage.create) + ..aOB(4, _omitFieldNames ? '' : 'RequestNewPreKeys', protoName: 'RequestNewPreKeys') + ..hasRequiredFields = false + ; + + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + V0 clone() => V0()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + V0 copyWith(void Function(V0) updates) => super.copyWith((message) => updates(message as V0)) as V0; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static V0 create() => V0._(); + V0 createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static V0 getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static V0? _defaultInstance; + + V0_Kind whichKind() => _V0_KindByTag[$_whichOneof(0)]!; + void clearKind() => clearField($_whichOneof(0)); + + @$pb.TagNumber(1) + $fixnum.Int64 get seq => $_getI64(0); + @$pb.TagNumber(1) + set seq($fixnum.Int64 v) { $_setInt64(0, v); } + @$pb.TagNumber(1) + $core.bool hasSeq() => $_has(0); + @$pb.TagNumber(1) + void clearSeq() => clearField(1); + + @$pb.TagNumber(2) + Response get response => $_getN(1); + @$pb.TagNumber(2) + set response(Response v) { setField(2, v); } + @$pb.TagNumber(2) + $core.bool hasResponse() => $_has(1); + @$pb.TagNumber(2) + void clearResponse() => clearField(2); + @$pb.TagNumber(2) + Response ensureResponse() => $_ensure(1); + + @$pb.TagNumber(3) + NewMessage get newMessage => $_getN(2); + @$pb.TagNumber(3) + set newMessage(NewMessage v) { setField(3, v); } + @$pb.TagNumber(3) + $core.bool hasNewMessage() => $_has(2); + @$pb.TagNumber(3) + void clearNewMessage() => clearField(3); + @$pb.TagNumber(3) + NewMessage ensureNewMessage() => $_ensure(2); + + @$pb.TagNumber(4) + $core.bool get requestNewPreKeys => $_getBF(3); + @$pb.TagNumber(4) + set requestNewPreKeys($core.bool v) { $_setBool(3, v); } + @$pb.TagNumber(4) + $core.bool hasRequestNewPreKeys() => $_has(3); + @$pb.TagNumber(4) + void clearRequestNewPreKeys() => clearField(4); +} + +class NewMessage extends $pb.GeneratedMessage { + factory NewMessage({ + $core.List<$core.int>? body, + }) { + final $result = create(); + if (body != null) { + $result.body = body; + } + return $result; + } + NewMessage._() : super(); + factory NewMessage.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory NewMessage.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'NewMessage', package: const $pb.PackageName(_omitMessageNames ? '' : 'server_to_client'), createEmptyInstance: create) + ..a<$core.List<$core.int>>(1, _omitFieldNames ? '' : 'body', $pb.PbFieldType.OY) + ..hasRequiredFields = false + ; + + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + NewMessage clone() => NewMessage()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + NewMessage copyWith(void Function(NewMessage) updates) => super.copyWith((message) => updates(message as NewMessage)) as NewMessage; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static NewMessage create() => NewMessage._(); + NewMessage createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static NewMessage getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static NewMessage? _defaultInstance; + + @$pb.TagNumber(1) + $core.List<$core.int> get body => $_getN(0); + @$pb.TagNumber(1) + set body($core.List<$core.int> v) { $_setBytes(0, v); } + @$pb.TagNumber(1) + $core.bool hasBody() => $_has(0); + @$pb.TagNumber(1) + void clearBody() => clearField(1); +} + +class Response_UserData extends $pb.GeneratedMessage { + factory Response_UserData({ + $core.List<$core.int>? userId, + $core.Iterable<$core.List<$core.int>>? prekeys, + $core.List<$core.int>? publicIdentityKey, + $core.List<$core.int>? signedPrekey, + $core.List<$core.int>? signedPrekeySignature, + $fixnum.Int64? signedPrekeyId, + }) { + final $result = create(); + if (userId != null) { + $result.userId = userId; + } + if (prekeys != null) { + $result.prekeys.addAll(prekeys); + } + if (publicIdentityKey != null) { + $result.publicIdentityKey = publicIdentityKey; + } + if (signedPrekey != null) { + $result.signedPrekey = signedPrekey; + } + if (signedPrekeySignature != null) { + $result.signedPrekeySignature = signedPrekeySignature; + } + if (signedPrekeyId != null) { + $result.signedPrekeyId = signedPrekeyId; + } + return $result; + } + Response_UserData._() : super(); + factory Response_UserData.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory Response_UserData.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'Response.UserData', package: const $pb.PackageName(_omitMessageNames ? '' : 'server_to_client'), createEmptyInstance: create) + ..a<$core.List<$core.int>>(1, _omitFieldNames ? '' : 'userId', $pb.PbFieldType.OY) + ..p<$core.List<$core.int>>(2, _omitFieldNames ? '' : 'prekeys', $pb.PbFieldType.PY) + ..a<$core.List<$core.int>>(3, _omitFieldNames ? '' : 'publicIdentityKey', $pb.PbFieldType.OY) + ..a<$core.List<$core.int>>(4, _omitFieldNames ? '' : 'signedPrekey', $pb.PbFieldType.OY) + ..a<$core.List<$core.int>>(5, _omitFieldNames ? '' : 'signedPrekeySignature', $pb.PbFieldType.OY) + ..aInt64(6, _omitFieldNames ? '' : 'signedPrekeyId') + ..hasRequiredFields = false + ; + + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + Response_UserData clone() => Response_UserData()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + Response_UserData copyWith(void Function(Response_UserData) updates) => super.copyWith((message) => updates(message as Response_UserData)) as Response_UserData; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static Response_UserData create() => Response_UserData._(); + Response_UserData createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static Response_UserData getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static Response_UserData? _defaultInstance; + + @$pb.TagNumber(1) + $core.List<$core.int> get userId => $_getN(0); + @$pb.TagNumber(1) + set userId($core.List<$core.int> v) { $_setBytes(0, v); } + @$pb.TagNumber(1) + $core.bool hasUserId() => $_has(0); + @$pb.TagNumber(1) + void clearUserId() => clearField(1); + + @$pb.TagNumber(2) + $core.List<$core.List<$core.int>> get prekeys => $_getList(1); + + @$pb.TagNumber(3) + $core.List<$core.int> get publicIdentityKey => $_getN(2); + @$pb.TagNumber(3) + set publicIdentityKey($core.List<$core.int> v) { $_setBytes(2, v); } + @$pb.TagNumber(3) + $core.bool hasPublicIdentityKey() => $_has(2); + @$pb.TagNumber(3) + void clearPublicIdentityKey() => clearField(3); + + @$pb.TagNumber(4) + $core.List<$core.int> get signedPrekey => $_getN(3); + @$pb.TagNumber(4) + set signedPrekey($core.List<$core.int> v) { $_setBytes(3, v); } + @$pb.TagNumber(4) + $core.bool hasSignedPrekey() => $_has(3); + @$pb.TagNumber(4) + void clearSignedPrekey() => clearField(4); + + @$pb.TagNumber(5) + $core.List<$core.int> get signedPrekeySignature => $_getN(4); + @$pb.TagNumber(5) + set signedPrekeySignature($core.List<$core.int> v) { $_setBytes(4, v); } + @$pb.TagNumber(5) + $core.bool hasSignedPrekeySignature() => $_has(4); + @$pb.TagNumber(5) + void clearSignedPrekeySignature() => clearField(5); + + @$pb.TagNumber(6) + $fixnum.Int64 get signedPrekeyId => $_getI64(5); + @$pb.TagNumber(6) + set signedPrekeyId($fixnum.Int64 v) { $_setInt64(5, v); } + @$pb.TagNumber(6) + $core.bool hasSignedPrekeyId() => $_has(5); + @$pb.TagNumber(6) + void clearSignedPrekeyId() => clearField(6); +} + +enum Response_Ok_Ok { + none, + userid, + challenge, + userdata, + notSet +} + +class Response_Ok extends $pb.GeneratedMessage { + factory Response_Ok({ + $core.bool? none, + $core.List<$core.int>? userid, + $core.List<$core.int>? challenge, + Response_UserData? userdata, + }) { + final $result = create(); + if (none != null) { + $result.none = none; + } + if (userid != null) { + $result.userid = userid; + } + if (challenge != null) { + $result.challenge = challenge; + } + if (userdata != null) { + $result.userdata = userdata; + } + return $result; + } + Response_Ok._() : super(); + factory Response_Ok.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory Response_Ok.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static const $core.Map<$core.int, Response_Ok_Ok> _Response_Ok_OkByTag = { + 1 : Response_Ok_Ok.none, + 2 : Response_Ok_Ok.userid, + 3 : Response_Ok_Ok.challenge, + 4 : Response_Ok_Ok.userdata, + 0 : Response_Ok_Ok.notSet + }; + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'Response.Ok', package: const $pb.PackageName(_omitMessageNames ? '' : 'server_to_client'), createEmptyInstance: create) + ..oo(0, [1, 2, 3, 4]) + ..aOB(1, _omitFieldNames ? '' : 'None', protoName: 'None') + ..a<$core.List<$core.int>>(2, _omitFieldNames ? '' : 'userid', $pb.PbFieldType.OY) + ..a<$core.List<$core.int>>(3, _omitFieldNames ? '' : 'challenge', $pb.PbFieldType.OY) + ..aOM(4, _omitFieldNames ? '' : 'userdata', subBuilder: Response_UserData.create) + ..hasRequiredFields = false + ; + + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + Response_Ok clone() => Response_Ok()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + Response_Ok copyWith(void Function(Response_Ok) updates) => super.copyWith((message) => updates(message as Response_Ok)) as Response_Ok; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static Response_Ok create() => Response_Ok._(); + Response_Ok createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static Response_Ok getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static Response_Ok? _defaultInstance; + + Response_Ok_Ok whichOk() => _Response_Ok_OkByTag[$_whichOneof(0)]!; + void clearOk() => clearField($_whichOneof(0)); + + @$pb.TagNumber(1) + $core.bool get none => $_getBF(0); + @$pb.TagNumber(1) + set none($core.bool v) { $_setBool(0, v); } + @$pb.TagNumber(1) + $core.bool hasNone() => $_has(0); + @$pb.TagNumber(1) + void clearNone() => clearField(1); + + @$pb.TagNumber(2) + $core.List<$core.int> get userid => $_getN(1); + @$pb.TagNumber(2) + set userid($core.List<$core.int> v) { $_setBytes(1, v); } + @$pb.TagNumber(2) + $core.bool hasUserid() => $_has(1); + @$pb.TagNumber(2) + void clearUserid() => clearField(2); + + @$pb.TagNumber(3) + $core.List<$core.int> get challenge => $_getN(2); + @$pb.TagNumber(3) + set challenge($core.List<$core.int> v) { $_setBytes(2, v); } + @$pb.TagNumber(3) + $core.bool hasChallenge() => $_has(2); + @$pb.TagNumber(3) + void clearChallenge() => clearField(3); + + @$pb.TagNumber(4) + Response_UserData get userdata => $_getN(3); + @$pb.TagNumber(4) + set userdata(Response_UserData v) { setField(4, v); } + @$pb.TagNumber(4) + $core.bool hasUserdata() => $_has(3); + @$pb.TagNumber(4) + void clearUserdata() => clearField(4); + @$pb.TagNumber(4) + Response_UserData ensureUserdata() => $_ensure(3); +} + +enum Response_Response { + ok, + error, + notSet +} + +class Response extends $pb.GeneratedMessage { + factory Response({ + Response_Ok? ok, + $0.ErrorCode? error, + }) { + final $result = create(); + if (ok != null) { + $result.ok = ok; + } + if (error != null) { + $result.error = error; + } + return $result; + } + Response._() : super(); + factory Response.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory Response.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static const $core.Map<$core.int, Response_Response> _Response_ResponseByTag = { + 1 : Response_Response.ok, + 2 : Response_Response.error, + 0 : Response_Response.notSet + }; + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'Response', package: const $pb.PackageName(_omitMessageNames ? '' : 'server_to_client'), createEmptyInstance: create) + ..oo(0, [1, 2]) + ..aOM(1, _omitFieldNames ? '' : 'ok', subBuilder: Response_Ok.create) + ..e<$0.ErrorCode>(2, _omitFieldNames ? '' : 'error', $pb.PbFieldType.OE, defaultOrMaker: $0.ErrorCode.Unknown, valueOf: $0.ErrorCode.valueOf, enumValues: $0.ErrorCode.values) + ..hasRequiredFields = false + ; + + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + Response clone() => Response()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + Response copyWith(void Function(Response) updates) => super.copyWith((message) => updates(message as Response)) as Response; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static Response create() => Response._(); + Response createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static Response getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static Response? _defaultInstance; + + Response_Response whichResponse() => _Response_ResponseByTag[$_whichOneof(0)]!; + void clearResponse() => clearField($_whichOneof(0)); + + @$pb.TagNumber(1) + Response_Ok get ok => $_getN(0); + @$pb.TagNumber(1) + set ok(Response_Ok v) { setField(1, v); } + @$pb.TagNumber(1) + $core.bool hasOk() => $_has(0); + @$pb.TagNumber(1) + void clearOk() => clearField(1); + @$pb.TagNumber(1) + Response_Ok ensureOk() => $_ensure(0); + + @$pb.TagNumber(2) + $0.ErrorCode get error => $_getN(1); + @$pb.TagNumber(2) + set error($0.ErrorCode v) { setField(2, v); } + @$pb.TagNumber(2) + $core.bool hasError() => $_has(1); + @$pb.TagNumber(2) + void clearError() => clearField(2); +} + + +const _omitFieldNames = $core.bool.fromEnvironment('protobuf.omit_field_names'); +const _omitMessageNames = $core.bool.fromEnvironment('protobuf.omit_message_names'); diff --git a/lib/src/proto/api/server_to_client.pbenum.dart b/lib/src/proto/api/server_to_client.pbenum.dart new file mode 100644 index 0000000..9a3b7d3 --- /dev/null +++ b/lib/src/proto/api/server_to_client.pbenum.dart @@ -0,0 +1,11 @@ +// +// Generated code. Do not modify. +// source: api/server_to_client.proto +// +// @dart = 2.12 + +// ignore_for_file: annotate_overrides, camel_case_types, comment_references +// ignore_for_file: constant_identifier_names, library_prefixes +// ignore_for_file: non_constant_identifier_names, prefer_final_fields +// ignore_for_file: unnecessary_import, unnecessary_this, unused_import + diff --git a/lib/src/proto/api/server_to_client.pbjson.dart b/lib/src/proto/api/server_to_client.pbjson.dart new file mode 100644 index 0000000..89e559e --- /dev/null +++ b/lib/src/proto/api/server_to_client.pbjson.dart @@ -0,0 +1,125 @@ +// +// Generated code. Do not modify. +// source: api/server_to_client.proto +// +// @dart = 2.12 + +// ignore_for_file: annotate_overrides, camel_case_types, comment_references +// ignore_for_file: constant_identifier_names, library_prefixes +// ignore_for_file: non_constant_identifier_names, prefer_final_fields +// ignore_for_file: unnecessary_import, unnecessary_this, unused_import + +import 'dart:convert' as $convert; +import 'dart:core' as $core; +import 'dart:typed_data' as $typed_data; + +@$core.Deprecated('Use serverToClientDescriptor instead') +const ServerToClient$json = { + '1': 'ServerToClient', + '2': [ + {'1': 'V0', '3': 1, '4': 1, '5': 11, '6': '.server_to_client.V0', '9': 0, '10': 'V0'}, + ], + '8': [ + {'1': 'v'}, + ], +}; + +/// Descriptor for `ServerToClient`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List serverToClientDescriptor = $convert.base64Decode( + 'Cg5TZXJ2ZXJUb0NsaWVudBImCgJWMBgBIAEoCzIULnNlcnZlcl90b19jbGllbnQuVjBIAFICVj' + 'BCAwoBdg=='); + +@$core.Deprecated('Use v0Descriptor instead') +const V0$json = { + '1': 'V0', + '2': [ + {'1': 'seq', '3': 1, '4': 1, '5': 4, '10': 'seq'}, + {'1': 'response', '3': 2, '4': 1, '5': 11, '6': '.server_to_client.Response', '9': 0, '10': 'response'}, + {'1': 'newMessage', '3': 3, '4': 1, '5': 11, '6': '.server_to_client.NewMessage', '9': 0, '10': 'newMessage'}, + {'1': 'RequestNewPreKeys', '3': 4, '4': 1, '5': 8, '9': 0, '10': 'RequestNewPreKeys'}, + ], + '8': [ + {'1': 'Kind'}, + ], +}; + +/// Descriptor for `V0`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List v0Descriptor = $convert.base64Decode( + 'CgJWMBIQCgNzZXEYASABKARSA3NlcRI4CghyZXNwb25zZRgCIAEoCzIaLnNlcnZlcl90b19jbG' + 'llbnQuUmVzcG9uc2VIAFIIcmVzcG9uc2USPgoKbmV3TWVzc2FnZRgDIAEoCzIcLnNlcnZlcl90' + 'b19jbGllbnQuTmV3TWVzc2FnZUgAUgpuZXdNZXNzYWdlEi4KEVJlcXVlc3ROZXdQcmVLZXlzGA' + 'QgASgISABSEVJlcXVlc3ROZXdQcmVLZXlzQgYKBEtpbmQ='); + +@$core.Deprecated('Use newMessageDescriptor instead') +const NewMessage$json = { + '1': 'NewMessage', + '2': [ + {'1': 'body', '3': 1, '4': 1, '5': 12, '10': 'body'}, + ], +}; + +/// Descriptor for `NewMessage`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List newMessageDescriptor = $convert.base64Decode( + 'CgpOZXdNZXNzYWdlEhIKBGJvZHkYASABKAxSBGJvZHk='); + +@$core.Deprecated('Use responseDescriptor instead') +const Response$json = { + '1': 'Response', + '2': [ + {'1': 'ok', '3': 1, '4': 1, '5': 11, '6': '.server_to_client.Response.Ok', '9': 0, '10': 'ok'}, + {'1': 'error', '3': 2, '4': 1, '5': 14, '6': '.error.ErrorCode', '9': 0, '10': 'error'}, + ], + '3': [Response_UserData$json, Response_Ok$json], + '8': [ + {'1': 'Response'}, + ], +}; + +@$core.Deprecated('Use responseDescriptor instead') +const Response_UserData$json = { + '1': 'UserData', + '2': [ + {'1': 'user_id', '3': 1, '4': 1, '5': 12, '10': 'userId'}, + {'1': 'prekeys', '3': 2, '4': 3, '5': 12, '10': 'prekeys'}, + {'1': 'public_identity_key', '3': 3, '4': 1, '5': 12, '9': 0, '10': 'publicIdentityKey', '17': true}, + {'1': 'signed_prekey', '3': 4, '4': 1, '5': 12, '9': 1, '10': 'signedPrekey', '17': true}, + {'1': 'signed_prekey_signature', '3': 5, '4': 1, '5': 12, '9': 2, '10': 'signedPrekeySignature', '17': true}, + {'1': 'signed_prekey_id', '3': 6, '4': 1, '5': 3, '9': 3, '10': 'signedPrekeyId', '17': true}, + ], + '8': [ + {'1': '_public_identity_key'}, + {'1': '_signed_prekey'}, + {'1': '_signed_prekey_signature'}, + {'1': '_signed_prekey_id'}, + ], +}; + +@$core.Deprecated('Use responseDescriptor instead') +const Response_Ok$json = { + '1': 'Ok', + '2': [ + {'1': 'None', '3': 1, '4': 1, '5': 8, '9': 0, '10': 'None'}, + {'1': 'userid', '3': 2, '4': 1, '5': 12, '9': 0, '10': 'userid'}, + {'1': 'challenge', '3': 3, '4': 1, '5': 12, '9': 0, '10': 'challenge'}, + {'1': 'userdata', '3': 4, '4': 1, '5': 11, '6': '.server_to_client.Response.UserData', '9': 0, '10': 'userdata'}, + ], + '8': [ + {'1': 'Ok'}, + ], +}; + +/// Descriptor for `Response`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List responseDescriptor = $convert.base64Decode( + 'CghSZXNwb25zZRIvCgJvaxgBIAEoCzIdLnNlcnZlcl90b19jbGllbnQuUmVzcG9uc2UuT2tIAF' + 'ICb2sSKAoFZXJyb3IYAiABKA4yEC5lcnJvci5FcnJvckNvZGVIAFIFZXJyb3Ia4wIKCFVzZXJE' + 'YXRhEhcKB3VzZXJfaWQYASABKAxSBnVzZXJJZBIYCgdwcmVrZXlzGAIgAygMUgdwcmVrZXlzEj' + 'MKE3B1YmxpY19pZGVudGl0eV9rZXkYAyABKAxIAFIRcHVibGljSWRlbnRpdHlLZXmIAQESKAoN' + 'c2lnbmVkX3ByZWtleRgEIAEoDEgBUgxzaWduZWRQcmVrZXmIAQESOwoXc2lnbmVkX3ByZWtleV' + '9zaWduYXR1cmUYBSABKAxIAlIVc2lnbmVkUHJla2V5U2lnbmF0dXJliAEBEi0KEHNpZ25lZF9w' + 'cmVrZXlfaWQYBiABKANIA1IOc2lnbmVkUHJla2V5SWSIAQFCFgoUX3B1YmxpY19pZGVudGl0eV' + '9rZXlCEAoOX3NpZ25lZF9wcmVrZXlCGgoYX3NpZ25lZF9wcmVrZXlfc2lnbmF0dXJlQhMKEV9z' + 'aWduZWRfcHJla2V5X2lkGp0BCgJPaxIUCgROb25lGAEgASgISABSBE5vbmUSGAoGdXNlcmlkGA' + 'IgASgMSABSBnVzZXJpZBIeCgljaGFsbGVuZ2UYAyABKAxIAFIJY2hhbGxlbmdlEkEKCHVzZXJk' + 'YXRhGAQgASgLMiMuc2VydmVyX3RvX2NsaWVudC5SZXNwb25zZS5Vc2VyRGF0YUgAUgh1c2VyZG' + 'F0YUIECgJPa0IKCghSZXNwb25zZQ=='); + diff --git a/lib/src/proto/api/server_to_client.pbserver.dart b/lib/src/proto/api/server_to_client.pbserver.dart new file mode 100644 index 0000000..3cc0b47 --- /dev/null +++ b/lib/src/proto/api/server_to_client.pbserver.dart @@ -0,0 +1,14 @@ +// +// Generated code. Do not modify. +// source: api/server_to_client.proto +// +// @dart = 2.12 + +// ignore_for_file: annotate_overrides, camel_case_types, comment_references +// ignore_for_file: constant_identifier_names +// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes +// ignore_for_file: non_constant_identifier_names, prefer_final_fields +// ignore_for_file: unnecessary_import, unnecessary_this, unused_import + +export 'server_to_client.pb.dart'; + diff --git a/lib/src/providers/api_provider.dart b/lib/src/providers/api_provider.dart index 4f0e282..1545957 100644 --- a/lib/src/providers/api_provider.dart +++ b/lib/src/providers/api_provider.dart @@ -2,8 +2,13 @@ import 'dart:collection'; import 'dart:convert'; import 'dart:ffi'; import 'dart:math'; +import 'dart:typed_data'; +import 'package:fixnum/fixnum.dart'; import 'package:logging/logging.dart'; +import 'package:twonly/src/proto/api/client_to_server.pb.dart'; +import 'package:twonly/src/proto/api/server_to_client.pb.dart' as server; +import 'package:twonly/src/signal/signal_helper.dart'; import 'package:web_socket_channel/web_socket_channel.dart'; class ApiProvider { @@ -13,7 +18,7 @@ class ApiProvider { final log = Logger("connect::ApiProvider"); final HashMap> _callbacks = HashMap(); - final HashMap?> messagesV0 = HashMap(); + final HashMap messagesV0 = HashMap(); WebSocketChannel? _channel; @@ -21,7 +26,7 @@ class ApiProvider { if (_channel != null && _channel!.closeCode != null) { return true; } - log.info("Trying to connect to the backend!"); + log.info("Trying to connect to the backend $apiUrl!"); try { var channel = WebSocketChannel.connect( Uri.parse(apiUrl), @@ -37,28 +42,11 @@ class ApiProvider { } } - void _onData(dynamic msgJson) { + void _onData(dynamic msgBuffer) { try { - Map msg = jsonDecode(msgJson); - if (!msg.containsKey("v")) { - log.shout("Got invalid data from server!"); - return; - } - if (msg["v"] != "0") { - log.shout("Server msg not supported by client!\n $msgJson"); - return; - } - if (!msg.containsKey("seq") || !msg.containsKey("kind")) { - log.shout("Invalid server msg. No seq number or kind given: $msgJson!"); - return; - } - if (msg["kind"] == "Response") { - if (messagesV0[msg["seq"]] != null) { - log.shout("Seq no unknown: $msgJson!"); - return; - } - messagesV0[msg["seq"]] = msg; - } + final msg = server.ServerToClient.fromBuffer(msgBuffer); + print("New message: $msg"); + messagesV0[msg.v0.seq] = msg; } catch (e) { log.shout("Error parsing the servers message: $e"); } @@ -74,7 +62,7 @@ class ApiProvider { } // TODO: There must be a smarter move to do that :/ - Future?> _waitForResponse(Uint64 seq) async { + Future _waitForResponse(Int64 seq) async { final startTime = DateTime.now(); final timeout = Duration(seconds: 5); @@ -93,49 +81,81 @@ class ApiProvider { } } - Future?> _sendRequestV0( - Map request) async { - var seq = Random().nextInt(0xFFFFFFFFFFFFFF) as Uint64; - while (!messagesV0.containsKey(seq)) { - seq = Random().nextInt(0xFFFFFFFFFFFFFF) as Uint64; + Future _sendRequestV0(ClientToServer request) async { + var seq = Int64(Random().nextInt(4294967296)); + while (messagesV0.containsKey(seq)) { + seq = Int64(Random().nextInt(4294967296)); } - request["v"] = "0"; - request["seq"] = seq; - final requestJson = jsonEncode(request); + request.v0.seq = seq; + final requestBytes = request.writeToBuffer(); + + log.info("Check if is connected?"); // check if it is connected to the backend. if not try to reconnect. if (!await connect()) { return null; } - // reserve seq no - messagesV0[seq] = null; - _channel!.sink.add(requestJson); + _channel!.sink.add(requestBytes); return await _waitForResponse(seq); } - String? _getErrorMsg(Map msg) { - if (msg.containsKey("Ok")) { - return null; - } - if (msg.containsKey("Error")) { - if (msg["Error"] != null) { - if (msg["Error"].containsKey("AlertUser")) { - return msg["Error"]["AlertUser"]; - } - } - return "There was an unknown error :/"; - } + String? _getErrorMsg(server.ServerToClient msg) { + // if (msg.containsKey("Ok")) { + // return null; + // } + // if (msg.containsKey("Error")) { + // if (msg["Error"] != null) { + // if (msg["Error"].containsKey("AlertUser")) { + // return msg["Error"]["AlertUser"]; + // } + // } + // return "There was an unknown error :/"; + // } return null; } - Future handshakeCheckRegister( - String username, String inviteCode) async { - final resp = await _sendRequestV0({ - "kind": "Handshake", - "CheckRegister": {"username": username, "inviteCode": inviteCode} - }); + ClientToServer createClientToServerFromHandshake(Handshake handshake) { + // Create the V0 message + var v0 = V0() + ..seq = Int64(0) // You can set this to the appropriate sequence number + ..handshake = handshake; + + // Create the ClientToServer message + var clientToServer = ClientToServer()..v0 = v0; + + return clientToServer; + } + + Future register( + String username, + // Uint8List publicIdentityKey, + // Uint8List signedPrekey, + // Uint8List signedPrekeySignature, + String? inviteCode) async { + final reqSignal = await SignalHelper.getRegisterData(); + + if (reqSignal == null) { + print("NULL"); + return null; + } + + print(reqSignal); + var register = Handshake_Register() + ..username = username + ..signedPrekey = reqSignal["signedPreKey"]?["key"] + ..signedPrekeySignature = reqSignal["signedPreKey"]?["signature"] + ..signedPrekeyId = Int64(reqSignal["signedPreKey"]?["id"]); + + if (inviteCode != null) { + register.inviteCode = inviteCode; + } + // Create the Handshake message + var handshake = Handshake()..register = register; + var req = createClientToServerFromHandshake(handshake); + + final resp = await _sendRequestV0(req); if (resp == null) { return "Server is not reachable!"; } diff --git a/lib/src/providers/db_provider.dart b/lib/src/providers/db_provider.dart index a07812e..f7ff2cd 100644 --- a/lib/src/providers/db_provider.dart +++ b/lib/src/providers/db_provider.dart @@ -1,11 +1,11 @@ import 'dart:async'; import 'dart:math'; -import 'package:connect/src/model/identity_key_store_model.dart'; -import 'package:connect/src/model/model_constants.dart'; -import 'package:connect/src/model/pre_key_model.dart'; -import 'package:connect/src/model/sender_key_store_model.dart'; -import 'package:connect/src/model/session_store_model.dart'; -import 'package:connect/src/utils.dart'; +import 'package:twonly/src/model/identity_key_store_model.dart'; +import 'package:twonly/src/model/model_constants.dart'; +import 'package:twonly/src/model/pre_key_model.dart'; +import 'package:twonly/src/model/sender_key_store_model.dart'; +import 'package:twonly/src/model/session_store_model.dart'; +import 'package:twonly/src/utils.dart'; import 'package:sqflite_sqlcipher/sqflite.dart'; class DbProvider { diff --git a/lib/src/signal/connect_identitiy_key_store.dart b/lib/src/signal/connect_identitiy_key_store.dart index 7a7ab9e..f277c64 100644 --- a/lib/src/signal/connect_identitiy_key_store.dart +++ b/lib/src/signal/connect_identitiy_key_store.dart @@ -1,7 +1,7 @@ import 'dart:typed_data'; import 'package:collection/collection.dart'; -import 'package:connect/main.dart'; -import 'package:connect/src/model/identity_key_store_model.dart'; +import 'package:twonly/main.dart'; +import 'package:twonly/src/model/identity_key_store_model.dart'; import 'package:libsignal_protocol_dart/libsignal_protocol_dart.dart'; bool eq(List? list1, List? list2) => diff --git a/lib/src/signal/connect_pre_key_store.dart b/lib/src/signal/connect_pre_key_store.dart index 9f982b1..bd1bb9c 100644 --- a/lib/src/signal/connect_pre_key_store.dart +++ b/lib/src/signal/connect_pre_key_store.dart @@ -1,6 +1,6 @@ import 'dart:typed_data'; -import 'package:connect/main.dart'; -import 'package:connect/src/model/pre_key_model.dart'; +import 'package:twonly/main.dart'; +import 'package:twonly/src/model/pre_key_model.dart'; import 'package:libsignal_protocol_dart/libsignal_protocol_dart.dart'; typedef DB = DbSignalPreKeyStore; diff --git a/lib/src/signal/connect_sender_key_store.dart b/lib/src/signal/connect_sender_key_store.dart index 9671f78..e8aa768 100644 --- a/lib/src/signal/connect_sender_key_store.dart +++ b/lib/src/signal/connect_sender_key_store.dart @@ -1,6 +1,6 @@ import 'dart:typed_data'; -import 'package:connect/main.dart'; -import 'package:connect/src/model/sender_key_store_model.dart'; +import 'package:twonly/main.dart'; +import 'package:twonly/src/model/sender_key_store_model.dart'; import 'package:libsignal_protocol_dart/libsignal_protocol_dart.dart'; typedef DB = DbSignalSenderKeyStore; diff --git a/lib/src/signal/connect_session_store.dart b/lib/src/signal/connect_session_store.dart index 1ece6ee..d636ed1 100644 --- a/lib/src/signal/connect_session_store.dart +++ b/lib/src/signal/connect_session_store.dart @@ -1,6 +1,6 @@ import 'dart:typed_data'; -import 'package:connect/main.dart'; -import 'package:connect/src/model/session_store_model.dart'; +import 'package:twonly/main.dart'; +import 'package:twonly/src/model/session_store_model.dart'; import 'package:libsignal_protocol_dart/libsignal_protocol_dart.dart'; // make it easier to read diff --git a/lib/src/signal/connect_signal_protocol_store.dart b/lib/src/signal/connect_signal_protocol_store.dart index 07980a6..b186930 100644 --- a/lib/src/signal/connect_signal_protocol_store.dart +++ b/lib/src/signal/connect_signal_protocol_store.dart @@ -1,7 +1,7 @@ -import 'package:connect/src/signal/connect_identitiy_key_store.dart'; -import 'package:connect/src/signal/connect_pre_key_store.dart'; -import 'package:connect/src/signal/connect_session_store.dart'; -import 'package:connect/src/signal/connect_signed_pre_key_store.dart'; +import 'package:twonly/src/signal/connect_identitiy_key_store.dart'; +import 'package:twonly/src/signal/connect_pre_key_store.dart'; +import 'package:twonly/src/signal/connect_session_store.dart'; +import 'package:twonly/src/signal/connect_signed_pre_key_store.dart'; import 'package:libsignal_protocol_dart/libsignal_protocol_dart.dart'; class ConnectSignalProtocolStore implements SignalProtocolStore { diff --git a/lib/src/signal/connect_signed_pre_key_store.dart b/lib/src/signal/connect_signed_pre_key_store.dart index 4463612..7f9a8b4 100644 --- a/lib/src/signal/connect_signed_pre_key_store.dart +++ b/lib/src/signal/connect_signed_pre_key_store.dart @@ -2,7 +2,7 @@ import 'dart:collection'; import 'dart:convert'; import 'dart:typed_data'; -import 'package:connect/src/utils.dart'; +import 'package:twonly/src/utils.dart'; import 'package:libsignal_protocol_dart/libsignal_protocol_dart.dart'; class ConnectSignedPreKeyStore extends SignedPreKeyStore { @@ -16,15 +16,19 @@ class ConnectSignedPreKeyStore extends SignedPreKeyStore { return store; } final storeHashMap = json.decode(storeSerialized); - // for (final item in storeHashMap) { - // store[item[0]] = Uint8List.fromList(item[1].codeUnits); - // } - return storeHashMap; + for (final item in storeHashMap) { + store[item[0]] = base64Decode(item[1]); + } + return store; } Future safeStore(HashMap store) async { final storage = getSecureStorage(); - final storeSerialized = json.encode(store); + var storeHashMap = []; + for (final item in store.entries) { + storeHashMap.add([item.key, base64Encode(item.value)]); + } + final storeSerialized = json.encode(storeHashMap); await storage.write(key: "signed_pre_key_store", value: storeSerialized); } diff --git a/lib/src/signal/signal_helper.dart b/lib/src/signal/signal_helper.dart index 9372443..9abf57d 100644 --- a/lib/src/signal/signal_helper.dart +++ b/lib/src/signal/signal_helper.dart @@ -2,18 +2,18 @@ import 'dart:convert'; import 'dart:developer'; import 'dart:typed_data'; import 'package:libsignal_protocol_dart/libsignal_protocol_dart.dart'; +import 'package:twonly/src/model/signal_identity_json.dart'; +import 'package:twonly/src/utils.dart'; import 'connect_sender_key_store.dart'; import 'connect_signal_protocol_store.dart'; class SignalDataModel { - String name; + Uint8List userId; ConnectSignalProtocolStore signalStore; ConnectSenderKeyStore senderKeyStore; - Map serverKeyBundle; SignalDataModel({ - required this.name, - required this.serverKeyBundle, + required this.userId, required this.senderKeyStore, required this.signalStore, }); @@ -26,7 +26,7 @@ class SignalDataModel { final generator = NumericFingerprintGenerator(5200); final localFingerprint = generator.createFor( 1, - Uint8List.fromList(utf8.encode(name)), + userId, (await signalStore.getIdentityKeyPair()).getPublicKey(), Uint8List.fromList(utf8.encode(target)), targetIdentity, @@ -139,7 +139,54 @@ class SignalDataModel { class SignalHelper { static const int defaultDeviceId = 1; - static Future createNewSignalIdentity(String name) async { + static Future?> getRegisterData() async { + final storage = getSecureStorage(); + final signalIdentityJson = await storage.read(key: "signal_identity"); + if (signalIdentityJson == null) { + return null; + } + + print(signalIdentityJson); + final SignalIdentity signalIdentity = + SignalIdentity.fromJson(jsonDecode(signalIdentityJson)); + + final identityKeyPair = + IdentityKeyPair.fromSerialized(signalIdentity.identityKeyPairU8List); + // final publicKey = identityKeyPair.getPublicKey().serialize(); + + ConnectSignalProtocolStore signalStore = ConnectSignalProtocolStore( + identityKeyPair, signalIdentity.registrationId); + + final signedPreKey = (await signalStore.loadSignedPreKeys())[0]; + final Map req = {}; + req['registrationId'] = signalIdentity.registrationId; + req['identityKey'] = + (await signalStore.getIdentityKeyPair()).getPublicKey().serialize(); + + req['signedPreKey'] = { + 'id': signedPreKey.id, + 'signature': signedPreKey.signature, + 'key': signedPreKey.getKeyPair().publicKey.serialize(), + }; + // List pKeysList = []; + // for (PreKeyRecord pKey in preKeys) { + // Map pKeys = {}; + // pKeys['id'] = pKey.id; + // pKeys['key'] = base64Encode(pKey.getKeyPair().publicKey.serialize()); + // pKeysList.add(pKeys); + // } + // req['preKeys'] = pKeysList; + return req; + } + + static Future createIfNotExistsSignalIdentity() async { + final storage = getSecureStorage(); + + final signalIdentity = await storage.read(key: "signal_identity"); + if (signalIdentity != null) { + return; + } + final identityKeyPair = generateIdentityKeyPair(); final registrationId = generateRegistrationId(true); @@ -157,30 +204,11 @@ class SignalHelper { await signalStore.signedPreKeyStore .storeSignedPreKey(signedPreKey.id, signedPreKey); - Map req = {}; - req['registrationId'] = registrationId; - req['identityKey'] = - base64Encode(identityKeyPair.getPublicKey().serialize()); - req['signedPreKey'] = { - 'id': signedPreKey.id, - 'signature': base64Encode(signedPreKey.signature), - 'key': base64Encode(signedPreKey.getKeyPair().publicKey.serialize()), - }; - List pKeysList = []; - for (PreKeyRecord pKey in preKeys) { - Map pKeys = {}; - pKeys['id'] = pKey.id; - pKeys['key'] = base64Encode(pKey.getKeyPair().publicKey.serialize()); - pKeysList.add(pKeys); - } - req['preKeys'] = pKeysList; + final storedSignalIdentity = SignalIdentity( + identityKeyPairU8List: identityKeyPair.serialize(), + registrationId: registrationId); - SignalDataModel sm = SignalDataModel( - name: name, - serverKeyBundle: req, - senderKeyStore: ConnectSenderKeyStore(), - signalStore: signalStore, - ); - return sm; + await storage.write( + key: "signal_identity", value: jsonEncode(storedSignalIdentity)); } } diff --git a/lib/src/utils.dart b/lib/src/utils.dart index 0df44a2..57c6471 100644 --- a/lib/src/utils.dart +++ b/lib/src/utils.dart @@ -1,8 +1,9 @@ import 'dart:convert'; -import 'package:connect/main.dart'; -import 'package:connect/src/signal/signal_helper.dart'; +import 'package:twonly/main.dart'; +import 'package:twonly/src/signal/signal_helper.dart'; import 'package:flutter_secure_storage/flutter_secure_storage.dart'; -import 'model/user.dart'; +import 'model/signal_identity_json.dart'; +import 'model/user_data_json.dart'; // Just a helper function to get the secure storage FlutterSecureStorage getSecureStorage() { @@ -13,23 +14,22 @@ FlutterSecureStorage getSecureStorage() { } Future isUserCreated() async { - User? user = await getUser(); + UserData? user = await getUser(); if (user == null) { return false; } return true; } -Future getUser() async { +Future getUser() async { final storage = getSecureStorage(); - String? userJson = await storage.read(key: "user"); + String? userJson = await storage.read(key: "user_data"); if (userJson == null) { return null; } try { -// Decode the JSON string final userMap = jsonDecode(userJson) as Map; - final user = User.fromJson(userMap); + final user = UserData.fromJson(userMap); return user; } catch (_) { return null; @@ -45,24 +45,17 @@ Future deleteLocalUserData() async { Future createNewUser(String username, String inviteCode) async { final storage = getSecureStorage(); + await SignalHelper.createIfNotExistsSignalIdentity(); + // TODO: API call to server to check username and inviteCode - final check = await apiProvider.handshakeCheckRegister(username, inviteCode); + final check = await apiProvider.register(username, inviteCode); if (check != null) { return check; } - final signalModel = await SignalHelper.createNewSignalIdentity(username); + print(check); - final identityKeyPair = await signalModel.signalStore.getIdentityKeyPair(); - - final user = User( - username: username, - identityKeyPairU8List: identityKeyPair.serialize(), - registrationId: await signalModel.signalStore.getLocalRegistrationId()); - - // TODO: API call to register user - - await storage.write(key: "user", value: jsonEncode(user)); + // await storage.write(key: "user_data", value: jsonEncode(userData)); return null; } diff --git a/linux/.gitignore b/linux/.gitignore deleted file mode 100644 index d3896c9..0000000 --- a/linux/.gitignore +++ /dev/null @@ -1 +0,0 @@ -flutter/ephemeral diff --git a/linux/CMakeLists.txt b/linux/CMakeLists.txt deleted file mode 100644 index 50fa8d0..0000000 --- a/linux/CMakeLists.txt +++ /dev/null @@ -1,145 +0,0 @@ -# Project-level configuration. -cmake_minimum_required(VERSION 3.10) -project(runner LANGUAGES CXX) - -# The name of the executable created for the application. Change this to change -# the on-disk name of your application. -set(BINARY_NAME "connect") -# The unique GTK application identifier for this application. See: -# https://wiki.gnome.org/HowDoI/ChooseApplicationID -set(APPLICATION_ID "com.example.connect") - -# Explicitly opt in to modern CMake behaviors to avoid warnings with recent -# versions of CMake. -cmake_policy(SET CMP0063 NEW) - -# Load bundled libraries from the lib/ directory relative to the binary. -set(CMAKE_INSTALL_RPATH "$ORIGIN/lib") - -# Root filesystem for cross-building. -if(FLUTTER_TARGET_PLATFORM_SYSROOT) - set(CMAKE_SYSROOT ${FLUTTER_TARGET_PLATFORM_SYSROOT}) - set(CMAKE_FIND_ROOT_PATH ${CMAKE_SYSROOT}) - set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) - set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY) - set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) - set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) -endif() - -# Define build configuration options. -if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES) - set(CMAKE_BUILD_TYPE "Debug" CACHE - STRING "Flutter build mode" FORCE) - set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS - "Debug" "Profile" "Release") -endif() - -# Compilation settings that should be applied to most targets. -# -# Be cautious about adding new options here, as plugins use this function by -# default. In most cases, you should add new options to specific targets instead -# of modifying this function. -function(APPLY_STANDARD_SETTINGS TARGET) - target_compile_features(${TARGET} PUBLIC cxx_std_14) - target_compile_options(${TARGET} PRIVATE -Wall -Werror) - target_compile_options(${TARGET} PRIVATE "$<$>:-O3>") - target_compile_definitions(${TARGET} PRIVATE "$<$>:NDEBUG>") -endfunction() - -# Flutter library and tool build rules. -set(FLUTTER_MANAGED_DIR "${CMAKE_CURRENT_SOURCE_DIR}/flutter") -add_subdirectory(${FLUTTER_MANAGED_DIR}) - -# System-level dependencies. -find_package(PkgConfig REQUIRED) -pkg_check_modules(GTK REQUIRED IMPORTED_TARGET gtk+-3.0) - -add_definitions(-DAPPLICATION_ID="${APPLICATION_ID}") - -# Define the application target. To change its name, change BINARY_NAME above, -# not the value here, or `flutter run` will no longer work. -# -# Any new source files that you add to the application should be added here. -add_executable(${BINARY_NAME} - "main.cc" - "my_application.cc" - "${FLUTTER_MANAGED_DIR}/generated_plugin_registrant.cc" -) - -# Apply the standard set of build settings. This can be removed for applications -# that need different build settings. -apply_standard_settings(${BINARY_NAME}) - -# Add dependency libraries. Add any application-specific dependencies here. -target_link_libraries(${BINARY_NAME} PRIVATE flutter) -target_link_libraries(${BINARY_NAME} PRIVATE PkgConfig::GTK) - -# Run the Flutter tool portions of the build. This must not be removed. -add_dependencies(${BINARY_NAME} flutter_assemble) - -# Only the install-generated bundle's copy of the executable will launch -# correctly, since the resources must in the right relative locations. To avoid -# people trying to run the unbundled copy, put it in a subdirectory instead of -# the default top-level location. -set_target_properties(${BINARY_NAME} - PROPERTIES - RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/intermediates_do_not_run" -) - - -# Generated plugin build rules, which manage building the plugins and adding -# them to the application. -include(flutter/generated_plugins.cmake) - - -# === Installation === -# By default, "installing" just makes a relocatable bundle in the build -# directory. -set(BUILD_BUNDLE_DIR "${PROJECT_BINARY_DIR}/bundle") -if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) - set(CMAKE_INSTALL_PREFIX "${BUILD_BUNDLE_DIR}" CACHE PATH "..." FORCE) -endif() - -# Start with a clean build bundle directory every time. -install(CODE " - file(REMOVE_RECURSE \"${BUILD_BUNDLE_DIR}/\") - " COMPONENT Runtime) - -set(INSTALL_BUNDLE_DATA_DIR "${CMAKE_INSTALL_PREFIX}/data") -set(INSTALL_BUNDLE_LIB_DIR "${CMAKE_INSTALL_PREFIX}/lib") - -install(TARGETS ${BINARY_NAME} RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}" - COMPONENT Runtime) - -install(FILES "${FLUTTER_ICU_DATA_FILE}" DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" - COMPONENT Runtime) - -install(FILES "${FLUTTER_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" - COMPONENT Runtime) - -foreach(bundled_library ${PLUGIN_BUNDLED_LIBRARIES}) - install(FILES "${bundled_library}" - DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" - COMPONENT Runtime) -endforeach(bundled_library) - -# Copy the native assets provided by the build.dart from all packages. -set(NATIVE_ASSETS_DIR "${PROJECT_BUILD_DIR}native_assets/linux/") -install(DIRECTORY "${NATIVE_ASSETS_DIR}" - DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" - COMPONENT Runtime) - -# Fully re-copy the assets directory on each build to avoid having stale files -# from a previous install. -set(FLUTTER_ASSET_DIR_NAME "flutter_assets") -install(CODE " - file(REMOVE_RECURSE \"${INSTALL_BUNDLE_DATA_DIR}/${FLUTTER_ASSET_DIR_NAME}\") - " COMPONENT Runtime) -install(DIRECTORY "${PROJECT_BUILD_DIR}/${FLUTTER_ASSET_DIR_NAME}" - DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" COMPONENT Runtime) - -# Install the AOT library on non-Debug builds only. -if(NOT CMAKE_BUILD_TYPE MATCHES "Debug") - install(FILES "${AOT_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" - COMPONENT Runtime) -endif() diff --git a/linux/flutter/CMakeLists.txt b/linux/flutter/CMakeLists.txt deleted file mode 100644 index d5bd016..0000000 --- a/linux/flutter/CMakeLists.txt +++ /dev/null @@ -1,88 +0,0 @@ -# This file controls Flutter-level build steps. It should not be edited. -cmake_minimum_required(VERSION 3.10) - -set(EPHEMERAL_DIR "${CMAKE_CURRENT_SOURCE_DIR}/ephemeral") - -# Configuration provided via flutter tool. -include(${EPHEMERAL_DIR}/generated_config.cmake) - -# TODO: Move the rest of this into files in ephemeral. See -# https://github.com/flutter/flutter/issues/57146. - -# Serves the same purpose as list(TRANSFORM ... PREPEND ...), -# which isn't available in 3.10. -function(list_prepend LIST_NAME PREFIX) - set(NEW_LIST "") - foreach(element ${${LIST_NAME}}) - list(APPEND NEW_LIST "${PREFIX}${element}") - endforeach(element) - set(${LIST_NAME} "${NEW_LIST}" PARENT_SCOPE) -endfunction() - -# === Flutter Library === -# System-level dependencies. -find_package(PkgConfig REQUIRED) -pkg_check_modules(GTK REQUIRED IMPORTED_TARGET gtk+-3.0) -pkg_check_modules(GLIB REQUIRED IMPORTED_TARGET glib-2.0) -pkg_check_modules(GIO REQUIRED IMPORTED_TARGET gio-2.0) - -set(FLUTTER_LIBRARY "${EPHEMERAL_DIR}/libflutter_linux_gtk.so") - -# Published to parent scope for install step. -set(FLUTTER_LIBRARY ${FLUTTER_LIBRARY} PARENT_SCOPE) -set(FLUTTER_ICU_DATA_FILE "${EPHEMERAL_DIR}/icudtl.dat" PARENT_SCOPE) -set(PROJECT_BUILD_DIR "${PROJECT_DIR}/build/" PARENT_SCOPE) -set(AOT_LIBRARY "${PROJECT_DIR}/build/lib/libapp.so" PARENT_SCOPE) - -list(APPEND FLUTTER_LIBRARY_HEADERS - "fl_basic_message_channel.h" - "fl_binary_codec.h" - "fl_binary_messenger.h" - "fl_dart_project.h" - "fl_engine.h" - "fl_json_message_codec.h" - "fl_json_method_codec.h" - "fl_message_codec.h" - "fl_method_call.h" - "fl_method_channel.h" - "fl_method_codec.h" - "fl_method_response.h" - "fl_plugin_registrar.h" - "fl_plugin_registry.h" - "fl_standard_message_codec.h" - "fl_standard_method_codec.h" - "fl_string_codec.h" - "fl_value.h" - "fl_view.h" - "flutter_linux.h" -) -list_prepend(FLUTTER_LIBRARY_HEADERS "${EPHEMERAL_DIR}/flutter_linux/") -add_library(flutter INTERFACE) -target_include_directories(flutter INTERFACE - "${EPHEMERAL_DIR}" -) -target_link_libraries(flutter INTERFACE "${FLUTTER_LIBRARY}") -target_link_libraries(flutter INTERFACE - PkgConfig::GTK - PkgConfig::GLIB - PkgConfig::GIO -) -add_dependencies(flutter flutter_assemble) - -# === Flutter tool backend === -# _phony_ is a non-existent file to force this command to run every time, -# since currently there's no way to get a full input/output list from the -# flutter tool. -add_custom_command( - OUTPUT ${FLUTTER_LIBRARY} ${FLUTTER_LIBRARY_HEADERS} - ${CMAKE_CURRENT_BINARY_DIR}/_phony_ - COMMAND ${CMAKE_COMMAND} -E env - ${FLUTTER_TOOL_ENVIRONMENT} - "${FLUTTER_ROOT}/packages/flutter_tools/bin/tool_backend.sh" - ${FLUTTER_TARGET_PLATFORM} ${CMAKE_BUILD_TYPE} - VERBATIM -) -add_custom_target(flutter_assemble DEPENDS - "${FLUTTER_LIBRARY}" - ${FLUTTER_LIBRARY_HEADERS} -) diff --git a/linux/flutter/generated_plugin_registrant.cc b/linux/flutter/generated_plugin_registrant.cc deleted file mode 100644 index dd8425c..0000000 --- a/linux/flutter/generated_plugin_registrant.cc +++ /dev/null @@ -1,19 +0,0 @@ -// -// Generated file. Do not edit. -// - -// clang-format off - -#include "generated_plugin_registrant.h" - -#include -#include - -void fl_register_plugins(FlPluginRegistry* registry) { - g_autoptr(FlPluginRegistrar) emoji_picker_flutter_registrar = - fl_plugin_registry_get_registrar_for_plugin(registry, "EmojiPickerFlutterPlugin"); - emoji_picker_flutter_plugin_register_with_registrar(emoji_picker_flutter_registrar); - g_autoptr(FlPluginRegistrar) flutter_secure_storage_linux_registrar = - fl_plugin_registry_get_registrar_for_plugin(registry, "FlutterSecureStorageLinuxPlugin"); - flutter_secure_storage_linux_plugin_register_with_registrar(flutter_secure_storage_linux_registrar); -} diff --git a/linux/flutter/generated_plugin_registrant.h b/linux/flutter/generated_plugin_registrant.h deleted file mode 100644 index e0f0a47..0000000 --- a/linux/flutter/generated_plugin_registrant.h +++ /dev/null @@ -1,15 +0,0 @@ -// -// Generated file. Do not edit. -// - -// clang-format off - -#ifndef GENERATED_PLUGIN_REGISTRANT_ -#define GENERATED_PLUGIN_REGISTRANT_ - -#include - -// Registers Flutter plugins. -void fl_register_plugins(FlPluginRegistry* registry); - -#endif // GENERATED_PLUGIN_REGISTRANT_ diff --git a/linux/flutter/generated_plugins.cmake b/linux/flutter/generated_plugins.cmake deleted file mode 100644 index a39777e..0000000 --- a/linux/flutter/generated_plugins.cmake +++ /dev/null @@ -1,25 +0,0 @@ -# -# Generated file, do not edit. -# - -list(APPEND FLUTTER_PLUGIN_LIST - emoji_picker_flutter - flutter_secure_storage_linux -) - -list(APPEND FLUTTER_FFI_PLUGIN_LIST -) - -set(PLUGIN_BUNDLED_LIBRARIES) - -foreach(plugin ${FLUTTER_PLUGIN_LIST}) - add_subdirectory(flutter/ephemeral/.plugin_symlinks/${plugin}/linux plugins/${plugin}) - target_link_libraries(${BINARY_NAME} PRIVATE ${plugin}_plugin) - list(APPEND PLUGIN_BUNDLED_LIBRARIES $) - list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${plugin}_bundled_libraries}) -endforeach(plugin) - -foreach(ffi_plugin ${FLUTTER_FFI_PLUGIN_LIST}) - add_subdirectory(flutter/ephemeral/.plugin_symlinks/${ffi_plugin}/linux plugins/${ffi_plugin}) - list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${ffi_plugin}_bundled_libraries}) -endforeach(ffi_plugin) diff --git a/linux/main.cc b/linux/main.cc deleted file mode 100644 index e7c5c54..0000000 --- a/linux/main.cc +++ /dev/null @@ -1,6 +0,0 @@ -#include "my_application.h" - -int main(int argc, char** argv) { - g_autoptr(MyApplication) app = my_application_new(); - return g_application_run(G_APPLICATION(app), argc, argv); -} diff --git a/linux/my_application.cc b/linux/my_application.cc deleted file mode 100644 index 93fd937..0000000 --- a/linux/my_application.cc +++ /dev/null @@ -1,124 +0,0 @@ -#include "my_application.h" - -#include -#ifdef GDK_WINDOWING_X11 -#include -#endif - -#include "flutter/generated_plugin_registrant.h" - -struct _MyApplication { - GtkApplication parent_instance; - char** dart_entrypoint_arguments; -}; - -G_DEFINE_TYPE(MyApplication, my_application, GTK_TYPE_APPLICATION) - -// Implements GApplication::activate. -static void my_application_activate(GApplication* application) { - MyApplication* self = MY_APPLICATION(application); - GtkWindow* window = - GTK_WINDOW(gtk_application_window_new(GTK_APPLICATION(application))); - - // Use a header bar when running in GNOME as this is the common style used - // by applications and is the setup most users will be using (e.g. Ubuntu - // desktop). - // If running on X and not using GNOME then just use a traditional title bar - // in case the window manager does more exotic layout, e.g. tiling. - // If running on Wayland assume the header bar will work (may need changing - // if future cases occur). - gboolean use_header_bar = TRUE; -#ifdef GDK_WINDOWING_X11 - GdkScreen* screen = gtk_window_get_screen(window); - if (GDK_IS_X11_SCREEN(screen)) { - const gchar* wm_name = gdk_x11_screen_get_window_manager_name(screen); - if (g_strcmp0(wm_name, "GNOME Shell") != 0) { - use_header_bar = FALSE; - } - } -#endif - if (use_header_bar) { - GtkHeaderBar* header_bar = GTK_HEADER_BAR(gtk_header_bar_new()); - gtk_widget_show(GTK_WIDGET(header_bar)); - gtk_header_bar_set_title(header_bar, "connect"); - gtk_header_bar_set_show_close_button(header_bar, TRUE); - gtk_window_set_titlebar(window, GTK_WIDGET(header_bar)); - } else { - gtk_window_set_title(window, "connect"); - } - - gtk_window_set_default_size(window, 1280, 720); - gtk_widget_show(GTK_WIDGET(window)); - - g_autoptr(FlDartProject) project = fl_dart_project_new(); - fl_dart_project_set_dart_entrypoint_arguments(project, self->dart_entrypoint_arguments); - - FlView* view = fl_view_new(project); - gtk_widget_show(GTK_WIDGET(view)); - gtk_container_add(GTK_CONTAINER(window), GTK_WIDGET(view)); - - fl_register_plugins(FL_PLUGIN_REGISTRY(view)); - - gtk_widget_grab_focus(GTK_WIDGET(view)); -} - -// Implements GApplication::local_command_line. -static gboolean my_application_local_command_line(GApplication* application, gchar*** arguments, int* exit_status) { - MyApplication* self = MY_APPLICATION(application); - // Strip out the first argument as it is the binary name. - self->dart_entrypoint_arguments = g_strdupv(*arguments + 1); - - g_autoptr(GError) error = nullptr; - if (!g_application_register(application, nullptr, &error)) { - g_warning("Failed to register: %s", error->message); - *exit_status = 1; - return TRUE; - } - - g_application_activate(application); - *exit_status = 0; - - return TRUE; -} - -// Implements GApplication::startup. -static void my_application_startup(GApplication* application) { - //MyApplication* self = MY_APPLICATION(object); - - // Perform any actions required at application startup. - - G_APPLICATION_CLASS(my_application_parent_class)->startup(application); -} - -// Implements GApplication::shutdown. -static void my_application_shutdown(GApplication* application) { - //MyApplication* self = MY_APPLICATION(object); - - // Perform any actions required at application shutdown. - - G_APPLICATION_CLASS(my_application_parent_class)->shutdown(application); -} - -// Implements GObject::dispose. -static void my_application_dispose(GObject* object) { - MyApplication* self = MY_APPLICATION(object); - g_clear_pointer(&self->dart_entrypoint_arguments, g_strfreev); - G_OBJECT_CLASS(my_application_parent_class)->dispose(object); -} - -static void my_application_class_init(MyApplicationClass* klass) { - G_APPLICATION_CLASS(klass)->activate = my_application_activate; - G_APPLICATION_CLASS(klass)->local_command_line = my_application_local_command_line; - G_APPLICATION_CLASS(klass)->startup = my_application_startup; - G_APPLICATION_CLASS(klass)->shutdown = my_application_shutdown; - G_OBJECT_CLASS(klass)->dispose = my_application_dispose; -} - -static void my_application_init(MyApplication* self) {} - -MyApplication* my_application_new() { - return MY_APPLICATION(g_object_new(my_application_get_type(), - "application-id", APPLICATION_ID, - "flags", G_APPLICATION_NON_UNIQUE, - nullptr)); -} diff --git a/linux/my_application.h b/linux/my_application.h deleted file mode 100644 index 72271d5..0000000 --- a/linux/my_application.h +++ /dev/null @@ -1,18 +0,0 @@ -#ifndef FLUTTER_MY_APPLICATION_H_ -#define FLUTTER_MY_APPLICATION_H_ - -#include - -G_DECLARE_FINAL_TYPE(MyApplication, my_application, MY, APPLICATION, - GtkApplication) - -/** - * my_application_new: - * - * Creates a new Flutter-based application. - * - * Returns: a new #MyApplication. - */ -MyApplication* my_application_new(); - -#endif // FLUTTER_MY_APPLICATION_H_ diff --git a/macos/.gitignore b/macos/.gitignore deleted file mode 100644 index 746adbb..0000000 --- a/macos/.gitignore +++ /dev/null @@ -1,7 +0,0 @@ -# Flutter-related -**/Flutter/ephemeral/ -**/Pods/ - -# Xcode-related -**/dgph -**/xcuserdata/ diff --git a/macos/Flutter/Flutter-Debug.xcconfig b/macos/Flutter/Flutter-Debug.xcconfig deleted file mode 100644 index 4b81f9b..0000000 --- a/macos/Flutter/Flutter-Debug.xcconfig +++ /dev/null @@ -1,2 +0,0 @@ -#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" -#include "ephemeral/Flutter-Generated.xcconfig" diff --git a/macos/Flutter/Flutter-Release.xcconfig b/macos/Flutter/Flutter-Release.xcconfig deleted file mode 100644 index 5caa9d1..0000000 --- a/macos/Flutter/Flutter-Release.xcconfig +++ /dev/null @@ -1,2 +0,0 @@ -#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" -#include "ephemeral/Flutter-Generated.xcconfig" diff --git a/macos/Flutter/GeneratedPluginRegistrant.swift b/macos/Flutter/GeneratedPluginRegistrant.swift deleted file mode 100644 index b14dab6..0000000 --- a/macos/Flutter/GeneratedPluginRegistrant.swift +++ /dev/null @@ -1,24 +0,0 @@ -// -// Generated file. Do not edit. -// - -import FlutterMacOS -import Foundation - -import device_info_plus -import emoji_picker_flutter -import flutter_secure_storage_macos -import mobile_scanner -import path_provider_foundation -import shared_preferences_foundation -import sqflite_sqlcipher - -func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) { - DeviceInfoPlusMacosPlugin.register(with: registry.registrar(forPlugin: "DeviceInfoPlusMacosPlugin")) - EmojiPickerFlutterPlugin.register(with: registry.registrar(forPlugin: "EmojiPickerFlutterPlugin")) - FlutterSecureStoragePlugin.register(with: registry.registrar(forPlugin: "FlutterSecureStoragePlugin")) - MobileScannerPlugin.register(with: registry.registrar(forPlugin: "MobileScannerPlugin")) - PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin")) - SharedPreferencesPlugin.register(with: registry.registrar(forPlugin: "SharedPreferencesPlugin")) - SqfliteSqlCipherPlugin.register(with: registry.registrar(forPlugin: "SqfliteSqlCipherPlugin")) -} diff --git a/macos/Podfile b/macos/Podfile deleted file mode 100644 index c795730..0000000 --- a/macos/Podfile +++ /dev/null @@ -1,43 +0,0 @@ -platform :osx, '10.14' - -# CocoaPods analytics sends network stats synchronously affecting flutter build latency. -ENV['COCOAPODS_DISABLE_STATS'] = 'true' - -project 'Runner', { - 'Debug' => :debug, - 'Profile' => :release, - 'Release' => :release, -} - -def flutter_root - generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'ephemeral', 'Flutter-Generated.xcconfig'), __FILE__) - unless File.exist?(generated_xcode_build_settings_path) - raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure \"flutter pub get\" is executed first" - end - - File.foreach(generated_xcode_build_settings_path) do |line| - matches = line.match(/FLUTTER_ROOT\=(.*)/) - return matches[1].strip if matches - end - raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Flutter-Generated.xcconfig, then run \"flutter pub get\"" -end - -require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root) - -flutter_macos_podfile_setup - -target 'Runner' do - use_frameworks! - use_modular_headers! - - flutter_install_all_macos_pods File.dirname(File.realpath(__FILE__)) - target 'RunnerTests' do - inherit! :search_paths - end -end - -post_install do |installer| - installer.pods_project.targets.each do |target| - flutter_additional_macos_build_settings(target) - end -end diff --git a/macos/Podfile.lock b/macos/Podfile.lock deleted file mode 100644 index 900f253..0000000 --- a/macos/Podfile.lock +++ /dev/null @@ -1,54 +0,0 @@ -PODS: - - device_info_plus (0.0.1): - - FlutterMacOS - - emoji_picker_flutter (0.0.1): - - FlutterMacOS - - flutter_secure_storage_macos (6.1.1): - - FlutterMacOS - - FlutterMacOS (1.0.0) - - mobile_scanner (6.0.2): - - FlutterMacOS - - path_provider_foundation (0.0.1): - - Flutter - - FlutterMacOS - - shared_preferences_foundation (0.0.1): - - Flutter - - FlutterMacOS - -DEPENDENCIES: - - device_info_plus (from `Flutter/ephemeral/.symlinks/plugins/device_info_plus/macos`) - - emoji_picker_flutter (from `Flutter/ephemeral/.symlinks/plugins/emoji_picker_flutter/macos`) - - flutter_secure_storage_macos (from `Flutter/ephemeral/.symlinks/plugins/flutter_secure_storage_macos/macos`) - - FlutterMacOS (from `Flutter/ephemeral`) - - mobile_scanner (from `Flutter/ephemeral/.symlinks/plugins/mobile_scanner/macos`) - - path_provider_foundation (from `Flutter/ephemeral/.symlinks/plugins/path_provider_foundation/darwin`) - - shared_preferences_foundation (from `Flutter/ephemeral/.symlinks/plugins/shared_preferences_foundation/darwin`) - -EXTERNAL SOURCES: - device_info_plus: - :path: Flutter/ephemeral/.symlinks/plugins/device_info_plus/macos - emoji_picker_flutter: - :path: Flutter/ephemeral/.symlinks/plugins/emoji_picker_flutter/macos - flutter_secure_storage_macos: - :path: Flutter/ephemeral/.symlinks/plugins/flutter_secure_storage_macos/macos - FlutterMacOS: - :path: Flutter/ephemeral - mobile_scanner: - :path: Flutter/ephemeral/.symlinks/plugins/mobile_scanner/macos - path_provider_foundation: - :path: Flutter/ephemeral/.symlinks/plugins/path_provider_foundation/darwin - shared_preferences_foundation: - :path: Flutter/ephemeral/.symlinks/plugins/shared_preferences_foundation/darwin - -SPEC CHECKSUMS: - device_info_plus: 1b14eed9bf95428983aed283a8d51cce3d8c4215 - emoji_picker_flutter: 533634326b1c5de9a181ba14b9758e6dfe967a20 - flutter_secure_storage_macos: 59459653abe1adb92abbc8ea747d79f8d19866c9 - FlutterMacOS: 8f6f14fa908a6fb3fba0cd85dbd81ec4b251fb24 - mobile_scanner: 07710d6b9b2c220ae899de2d7ecf5d77ffa56333 - path_provider_foundation: 2b6b4c569c0fb62ec74538f866245ac84301af46 - shared_preferences_foundation: fcdcbc04712aee1108ac7fda236f363274528f78 - -PODFILE CHECKSUM: 236401fc2c932af29a9fcf0e97baeeb2d750d367 - -COCOAPODS: 1.16.2 diff --git a/macos/Runner.xcodeproj/project.pbxproj b/macos/Runner.xcodeproj/project.pbxproj deleted file mode 100644 index a155d51..0000000 --- a/macos/Runner.xcodeproj/project.pbxproj +++ /dev/null @@ -1,801 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 54; - objects = { - -/* Begin PBXAggregateTarget section */ - 33CC111A2044C6BA0003C045 /* Flutter Assemble */ = { - isa = PBXAggregateTarget; - buildConfigurationList = 33CC111B2044C6BA0003C045 /* Build configuration list for PBXAggregateTarget "Flutter Assemble" */; - buildPhases = ( - 33CC111E2044C6BF0003C045 /* ShellScript */, - ); - dependencies = ( - ); - name = "Flutter Assemble"; - productName = FLX; - }; -/* End PBXAggregateTarget section */ - -/* Begin PBXBuildFile section */ - 331C80D8294CF71000263BE5 /* RunnerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 331C80D7294CF71000263BE5 /* RunnerTests.swift */; }; - 335BBD1B22A9A15E00E9071D /* GeneratedPluginRegistrant.swift in Sources */ = {isa = PBXBuildFile; fileRef = 335BBD1A22A9A15E00E9071D /* GeneratedPluginRegistrant.swift */; }; - 33CC10F12044A3C60003C045 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 33CC10F02044A3C60003C045 /* AppDelegate.swift */; }; - 33CC10F32044A3C60003C045 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 33CC10F22044A3C60003C045 /* Assets.xcassets */; }; - 33CC10F62044A3C60003C045 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 33CC10F42044A3C60003C045 /* MainMenu.xib */; }; - 33CC11132044BFA00003C045 /* MainFlutterWindow.swift in Sources */ = {isa = PBXBuildFile; fileRef = 33CC11122044BFA00003C045 /* MainFlutterWindow.swift */; }; - 93026427A9DF7AAA6CC7B97C /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4265710EECAA2F97B8113D01 /* Pods_Runner.framework */; }; - AB296B701251E3CE239B5DC3 /* Pods_RunnerTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 48B1995FEE403CAECAA47C00 /* Pods_RunnerTests.framework */; }; -/* End PBXBuildFile section */ - -/* Begin PBXContainerItemProxy section */ - 331C80D9294CF71000263BE5 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 33CC10E52044A3C60003C045 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 33CC10EC2044A3C60003C045; - remoteInfo = Runner; - }; - 33CC111F2044C79F0003C045 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 33CC10E52044A3C60003C045 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 33CC111A2044C6BA0003C045; - remoteInfo = FLX; - }; -/* End PBXContainerItemProxy section */ - -/* Begin PBXCopyFilesBuildPhase section */ - 33CC110E2044A8840003C045 /* Bundle Framework */ = { - isa = PBXCopyFilesBuildPhase; - buildActionMask = 2147483647; - dstPath = ""; - dstSubfolderSpec = 10; - files = ( - ); - name = "Bundle Framework"; - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXCopyFilesBuildPhase section */ - -/* Begin PBXFileReference section */ - 1789A69B9BC449AC934B2739 /* Pods-RunnerTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.debug.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.debug.xcconfig"; sourceTree = ""; }; - 17E8104198C1A0DDA47869A1 /* Pods-RunnerTests.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.profile.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.profile.xcconfig"; sourceTree = ""; }; - 29C6541DF6E6A63F5A5D3C23 /* Pods-RunnerTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.release.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.release.xcconfig"; sourceTree = ""; }; - 331C80D5294CF71000263BE5 /* RunnerTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RunnerTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; - 331C80D7294CF71000263BE5 /* RunnerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RunnerTests.swift; sourceTree = ""; }; - 333000ED22D3DE5D00554162 /* Warnings.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Warnings.xcconfig; sourceTree = ""; }; - 335BBD1A22A9A15E00E9071D /* GeneratedPluginRegistrant.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GeneratedPluginRegistrant.swift; sourceTree = ""; }; - 33CC10ED2044A3C60003C045 /* connect.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = connect.app; sourceTree = BUILT_PRODUCTS_DIR; }; - 33CC10F02044A3C60003C045 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; - 33CC10F22044A3C60003C045 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Assets.xcassets; path = Runner/Assets.xcassets; sourceTree = ""; }; - 33CC10F52044A3C60003C045 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/MainMenu.xib; sourceTree = ""; }; - 33CC10F72044A3C60003C045 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; name = Info.plist; path = Runner/Info.plist; sourceTree = ""; }; - 33CC11122044BFA00003C045 /* MainFlutterWindow.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MainFlutterWindow.swift; sourceTree = ""; }; - 33CEB47222A05771004F2AC0 /* Flutter-Debug.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "Flutter-Debug.xcconfig"; sourceTree = ""; }; - 33CEB47422A05771004F2AC0 /* Flutter-Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "Flutter-Release.xcconfig"; sourceTree = ""; }; - 33CEB47722A0578A004F2AC0 /* Flutter-Generated.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = "Flutter-Generated.xcconfig"; path = "ephemeral/Flutter-Generated.xcconfig"; sourceTree = ""; }; - 33E51913231747F40026EE4D /* DebugProfile.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = DebugProfile.entitlements; sourceTree = ""; }; - 33E51914231749380026EE4D /* Release.entitlements */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.entitlements; path = Release.entitlements; sourceTree = ""; }; - 33E5194F232828860026EE4D /* AppInfo.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = AppInfo.xcconfig; sourceTree = ""; }; - 4265710EECAA2F97B8113D01 /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 48B1995FEE403CAECAA47C00 /* Pods_RunnerTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_RunnerTests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 71E524D25EA1025FA1CAFBF3 /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = ""; }; - 7A86767FBB6E91E4EB0A83B5 /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = ""; }; - 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Release.xcconfig; sourceTree = ""; }; - 8999E7436DEE4145BFBCCA69 /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = ""; }; - 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = Debug.xcconfig; sourceTree = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 331C80D2294CF70F00263BE5 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - AB296B701251E3CE239B5DC3 /* Pods_RunnerTests.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 33CC10EA2044A3C60003C045 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 93026427A9DF7AAA6CC7B97C /* Pods_Runner.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 331C80D6294CF71000263BE5 /* RunnerTests */ = { - isa = PBXGroup; - children = ( - 331C80D7294CF71000263BE5 /* RunnerTests.swift */, - ); - path = RunnerTests; - sourceTree = ""; - }; - 33BA886A226E78AF003329D5 /* Configs */ = { - isa = PBXGroup; - children = ( - 33E5194F232828860026EE4D /* AppInfo.xcconfig */, - 9740EEB21CF90195004384FC /* Debug.xcconfig */, - 7AFA3C8E1D35360C0083082E /* Release.xcconfig */, - 333000ED22D3DE5D00554162 /* Warnings.xcconfig */, - ); - path = Configs; - sourceTree = ""; - }; - 33CC10E42044A3C60003C045 = { - isa = PBXGroup; - children = ( - 33FAB671232836740065AC1E /* Runner */, - 33CEB47122A05771004F2AC0 /* Flutter */, - 331C80D6294CF71000263BE5 /* RunnerTests */, - 33CC10EE2044A3C60003C045 /* Products */, - D73912EC22F37F3D000D13A0 /* Frameworks */, - A3E483E6288DAA9A6CD24475 /* Pods */, - ); - sourceTree = ""; - }; - 33CC10EE2044A3C60003C045 /* Products */ = { - isa = PBXGroup; - children = ( - 33CC10ED2044A3C60003C045 /* connect.app */, - 331C80D5294CF71000263BE5 /* RunnerTests.xctest */, - ); - name = Products; - sourceTree = ""; - }; - 33CC11242044D66E0003C045 /* Resources */ = { - isa = PBXGroup; - children = ( - 33CC10F22044A3C60003C045 /* Assets.xcassets */, - 33CC10F42044A3C60003C045 /* MainMenu.xib */, - 33CC10F72044A3C60003C045 /* Info.plist */, - ); - name = Resources; - path = ..; - sourceTree = ""; - }; - 33CEB47122A05771004F2AC0 /* Flutter */ = { - isa = PBXGroup; - children = ( - 335BBD1A22A9A15E00E9071D /* GeneratedPluginRegistrant.swift */, - 33CEB47222A05771004F2AC0 /* Flutter-Debug.xcconfig */, - 33CEB47422A05771004F2AC0 /* Flutter-Release.xcconfig */, - 33CEB47722A0578A004F2AC0 /* Flutter-Generated.xcconfig */, - ); - path = Flutter; - sourceTree = ""; - }; - 33FAB671232836740065AC1E /* Runner */ = { - isa = PBXGroup; - children = ( - 33CC10F02044A3C60003C045 /* AppDelegate.swift */, - 33CC11122044BFA00003C045 /* MainFlutterWindow.swift */, - 33E51913231747F40026EE4D /* DebugProfile.entitlements */, - 33E51914231749380026EE4D /* Release.entitlements */, - 33CC11242044D66E0003C045 /* Resources */, - 33BA886A226E78AF003329D5 /* Configs */, - ); - path = Runner; - sourceTree = ""; - }; - A3E483E6288DAA9A6CD24475 /* Pods */ = { - isa = PBXGroup; - children = ( - 71E524D25EA1025FA1CAFBF3 /* Pods-Runner.debug.xcconfig */, - 8999E7436DEE4145BFBCCA69 /* Pods-Runner.release.xcconfig */, - 7A86767FBB6E91E4EB0A83B5 /* Pods-Runner.profile.xcconfig */, - 1789A69B9BC449AC934B2739 /* Pods-RunnerTests.debug.xcconfig */, - 29C6541DF6E6A63F5A5D3C23 /* Pods-RunnerTests.release.xcconfig */, - 17E8104198C1A0DDA47869A1 /* Pods-RunnerTests.profile.xcconfig */, - ); - name = Pods; - path = Pods; - sourceTree = ""; - }; - D73912EC22F37F3D000D13A0 /* Frameworks */ = { - isa = PBXGroup; - children = ( - 4265710EECAA2F97B8113D01 /* Pods_Runner.framework */, - 48B1995FEE403CAECAA47C00 /* Pods_RunnerTests.framework */, - ); - name = Frameworks; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - 331C80D4294CF70F00263BE5 /* RunnerTests */ = { - isa = PBXNativeTarget; - buildConfigurationList = 331C80DE294CF71000263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */; - buildPhases = ( - BF4817297D117DAC2F609608 /* [CP] Check Pods Manifest.lock */, - 331C80D1294CF70F00263BE5 /* Sources */, - 331C80D2294CF70F00263BE5 /* Frameworks */, - 331C80D3294CF70F00263BE5 /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - 331C80DA294CF71000263BE5 /* PBXTargetDependency */, - ); - name = RunnerTests; - productName = RunnerTests; - productReference = 331C80D5294CF71000263BE5 /* RunnerTests.xctest */; - productType = "com.apple.product-type.bundle.unit-test"; - }; - 33CC10EC2044A3C60003C045 /* Runner */ = { - isa = PBXNativeTarget; - buildConfigurationList = 33CC10FB2044A3C60003C045 /* Build configuration list for PBXNativeTarget "Runner" */; - buildPhases = ( - 370419EFA4226E12C806FAA3 /* [CP] Check Pods Manifest.lock */, - 33CC10E92044A3C60003C045 /* Sources */, - 33CC10EA2044A3C60003C045 /* Frameworks */, - 33CC10EB2044A3C60003C045 /* Resources */, - 33CC110E2044A8840003C045 /* Bundle Framework */, - 3399D490228B24CF009A79C7 /* ShellScript */, - 9F6EC26B34D9BD2E254C77E4 /* [CP] Embed Pods Frameworks */, - ); - buildRules = ( - ); - dependencies = ( - 33CC11202044C79F0003C045 /* PBXTargetDependency */, - ); - name = Runner; - productName = Runner; - productReference = 33CC10ED2044A3C60003C045 /* connect.app */; - productType = "com.apple.product-type.application"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 33CC10E52044A3C60003C045 /* Project object */ = { - isa = PBXProject; - attributes = { - BuildIndependentTargetsInParallel = YES; - LastSwiftUpdateCheck = 0920; - LastUpgradeCheck = 1510; - ORGANIZATIONNAME = ""; - TargetAttributes = { - 331C80D4294CF70F00263BE5 = { - CreatedOnToolsVersion = 14.0; - TestTargetID = 33CC10EC2044A3C60003C045; - }; - 33CC10EC2044A3C60003C045 = { - CreatedOnToolsVersion = 9.2; - LastSwiftMigration = 1100; - ProvisioningStyle = Automatic; - SystemCapabilities = { - com.apple.Sandbox = { - enabled = 1; - }; - }; - }; - 33CC111A2044C6BA0003C045 = { - CreatedOnToolsVersion = 9.2; - ProvisioningStyle = Manual; - }; - }; - }; - buildConfigurationList = 33CC10E82044A3C60003C045 /* Build configuration list for PBXProject "Runner" */; - compatibilityVersion = "Xcode 9.3"; - developmentRegion = en; - hasScannedForEncodings = 0; - knownRegions = ( - en, - Base, - ); - mainGroup = 33CC10E42044A3C60003C045; - productRefGroup = 33CC10EE2044A3C60003C045 /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - 33CC10EC2044A3C60003C045 /* Runner */, - 331C80D4294CF70F00263BE5 /* RunnerTests */, - 33CC111A2044C6BA0003C045 /* Flutter Assemble */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXResourcesBuildPhase section */ - 331C80D3294CF70F00263BE5 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 33CC10EB2044A3C60003C045 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 33CC10F32044A3C60003C045 /* Assets.xcassets in Resources */, - 33CC10F62044A3C60003C045 /* MainMenu.xib in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXShellScriptBuildPhase section */ - 3399D490228B24CF009A79C7 /* ShellScript */ = { - isa = PBXShellScriptBuildPhase; - alwaysOutOfDate = 1; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - ); - inputPaths = ( - ); - outputFileListPaths = ( - ); - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "echo \"$PRODUCT_NAME.app\" > \"$PROJECT_DIR\"/Flutter/ephemeral/.app_filename && \"$FLUTTER_ROOT\"/packages/flutter_tools/bin/macos_assemble.sh embed\n"; - }; - 33CC111E2044C6BF0003C045 /* ShellScript */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - Flutter/ephemeral/FlutterInputs.xcfilelist, - ); - inputPaths = ( - Flutter/ephemeral/tripwire, - ); - outputFileListPaths = ( - Flutter/ephemeral/FlutterOutputs.xcfilelist, - ); - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"$FLUTTER_ROOT\"/packages/flutter_tools/bin/macos_assemble.sh && touch Flutter/ephemeral/tripwire"; - }; - 370419EFA4226E12C806FAA3 /* [CP] Check Pods Manifest.lock */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - ); - inputPaths = ( - "${PODS_PODFILE_DIR_PATH}/Podfile.lock", - "${PODS_ROOT}/Manifest.lock", - ); - name = "[CP] Check Pods Manifest.lock"; - outputFileListPaths = ( - ); - outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; - showEnvVarsInLog = 0; - }; - 9F6EC26B34D9BD2E254C77E4 /* [CP] Embed Pods Frameworks */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist", - ); - name = "[CP] Embed Pods Frameworks"; - outputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n"; - showEnvVarsInLog = 0; - }; - BF4817297D117DAC2F609608 /* [CP] Check Pods Manifest.lock */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - ); - inputPaths = ( - "${PODS_PODFILE_DIR_PATH}/Podfile.lock", - "${PODS_ROOT}/Manifest.lock", - ); - name = "[CP] Check Pods Manifest.lock"; - outputFileListPaths = ( - ); - outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-RunnerTests-checkManifestLockResult.txt", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; - showEnvVarsInLog = 0; - }; -/* End PBXShellScriptBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 331C80D1294CF70F00263BE5 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 331C80D8294CF71000263BE5 /* RunnerTests.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 33CC10E92044A3C60003C045 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 33CC11132044BFA00003C045 /* MainFlutterWindow.swift in Sources */, - 33CC10F12044A3C60003C045 /* AppDelegate.swift in Sources */, - 335BBD1B22A9A15E00E9071D /* GeneratedPluginRegistrant.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXTargetDependency section */ - 331C80DA294CF71000263BE5 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 33CC10EC2044A3C60003C045 /* Runner */; - targetProxy = 331C80D9294CF71000263BE5 /* PBXContainerItemProxy */; - }; - 33CC11202044C79F0003C045 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 33CC111A2044C6BA0003C045 /* Flutter Assemble */; - targetProxy = 33CC111F2044C79F0003C045 /* PBXContainerItemProxy */; - }; -/* End PBXTargetDependency section */ - -/* Begin PBXVariantGroup section */ - 33CC10F42044A3C60003C045 /* MainMenu.xib */ = { - isa = PBXVariantGroup; - children = ( - 33CC10F52044A3C60003C045 /* Base */, - ); - name = MainMenu.xib; - path = Runner; - sourceTree = ""; - }; -/* End PBXVariantGroup section */ - -/* Begin XCBuildConfiguration section */ - 331C80DB294CF71000263BE5 /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 1789A69B9BC449AC934B2739 /* Pods-RunnerTests.debug.xcconfig */; - buildSettings = { - BUNDLE_LOADER = "$(TEST_HOST)"; - CURRENT_PROJECT_VERSION = 1; - GENERATE_INFOPLIST_FILE = YES; - MARKETING_VERSION = 1.0; - PRODUCT_BUNDLE_IDENTIFIER = com.example.connect.RunnerTests; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 5.0; - TEST_HOST = "$(BUILT_PRODUCTS_DIR)/connect.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/connect"; - }; - name = Debug; - }; - 331C80DC294CF71000263BE5 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 29C6541DF6E6A63F5A5D3C23 /* Pods-RunnerTests.release.xcconfig */; - buildSettings = { - BUNDLE_LOADER = "$(TEST_HOST)"; - CURRENT_PROJECT_VERSION = 1; - GENERATE_INFOPLIST_FILE = YES; - MARKETING_VERSION = 1.0; - PRODUCT_BUNDLE_IDENTIFIER = com.example.connect.RunnerTests; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 5.0; - TEST_HOST = "$(BUILT_PRODUCTS_DIR)/connect.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/connect"; - }; - name = Release; - }; - 331C80DD294CF71000263BE5 /* Profile */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 17E8104198C1A0DDA47869A1 /* Pods-RunnerTests.profile.xcconfig */; - buildSettings = { - BUNDLE_LOADER = "$(TEST_HOST)"; - CURRENT_PROJECT_VERSION = 1; - GENERATE_INFOPLIST_FILE = YES; - MARKETING_VERSION = 1.0; - PRODUCT_BUNDLE_IDENTIFIER = com.example.connect.RunnerTests; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 5.0; - TEST_HOST = "$(BUILT_PRODUCTS_DIR)/connect.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/connect"; - }; - name = Profile; - }; - 338D0CE9231458BD00FA5F75 /* Profile */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; - CLANG_ANALYZER_NONNULL = YES; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CODE_SIGN_IDENTITY = "-"; - COPY_PHASE_STRIP = NO; - DEAD_CODE_STRIPPING = YES; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_USER_SCRIPT_SANDBOXING = NO; - GCC_C_LANGUAGE_STANDARD = gnu11; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.14; - MTL_ENABLE_DEBUG_INFO = NO; - SDKROOT = macosx; - SWIFT_COMPILATION_MODE = wholemodule; - SWIFT_OPTIMIZATION_LEVEL = "-O"; - }; - name = Profile; - }; - 338D0CEA231458BD00FA5F75 /* Profile */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 33E5194F232828860026EE4D /* AppInfo.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CLANG_ENABLE_MODULES = YES; - CODE_SIGN_ENTITLEMENTS = Runner/DebugProfile.entitlements; - CODE_SIGN_STYLE = Automatic; - COMBINE_HIDPI_IMAGES = YES; - INFOPLIST_FILE = Runner/Info.plist; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/../Frameworks", - ); - PROVISIONING_PROFILE_SPECIFIER = ""; - SWIFT_VERSION = 5.0; - }; - name = Profile; - }; - 338D0CEB231458BD00FA5F75 /* Profile */ = { - isa = XCBuildConfiguration; - buildSettings = { - CODE_SIGN_STYLE = Manual; - PRODUCT_NAME = "$(TARGET_NAME)"; - }; - name = Profile; - }; - 33CC10F92044A3C60003C045 /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; - CLANG_ANALYZER_NONNULL = YES; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CODE_SIGN_IDENTITY = "-"; - COPY_PHASE_STRIP = NO; - DEAD_CODE_STRIPPING = YES; - DEBUG_INFORMATION_FORMAT = dwarf; - ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_TESTABILITY = YES; - ENABLE_USER_SCRIPT_SANDBOXING = NO; - GCC_C_LANGUAGE_STANDARD = gnu11; - GCC_DYNAMIC_NO_PIC = NO; - GCC_NO_COMMON_BLOCKS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.14; - MTL_ENABLE_DEBUG_INFO = YES; - ONLY_ACTIVE_ARCH = YES; - SDKROOT = macosx; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - }; - name = Debug; - }; - 33CC10FA2044A3C60003C045 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; - CLANG_ANALYZER_NONNULL = YES; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CODE_SIGN_IDENTITY = "-"; - COPY_PHASE_STRIP = NO; - DEAD_CODE_STRIPPING = YES; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_USER_SCRIPT_SANDBOXING = NO; - GCC_C_LANGUAGE_STANDARD = gnu11; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.14; - MTL_ENABLE_DEBUG_INFO = NO; - SDKROOT = macosx; - SWIFT_COMPILATION_MODE = wholemodule; - SWIFT_OPTIMIZATION_LEVEL = "-O"; - }; - name = Release; - }; - 33CC10FC2044A3C60003C045 /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 33E5194F232828860026EE4D /* AppInfo.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CLANG_ENABLE_MODULES = YES; - CODE_SIGN_ENTITLEMENTS = Runner/DebugProfile.entitlements; - CODE_SIGN_STYLE = Automatic; - COMBINE_HIDPI_IMAGES = YES; - INFOPLIST_FILE = Runner/Info.plist; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/../Frameworks", - ); - PROVISIONING_PROFILE_SPECIFIER = ""; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 5.0; - }; - name = Debug; - }; - 33CC10FD2044A3C60003C045 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 33E5194F232828860026EE4D /* AppInfo.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CLANG_ENABLE_MODULES = YES; - CODE_SIGN_ENTITLEMENTS = Runner/Release.entitlements; - CODE_SIGN_STYLE = Automatic; - COMBINE_HIDPI_IMAGES = YES; - INFOPLIST_FILE = Runner/Info.plist; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/../Frameworks", - ); - PROVISIONING_PROFILE_SPECIFIER = ""; - SWIFT_VERSION = 5.0; - }; - name = Release; - }; - 33CC111C2044C6BA0003C045 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - CODE_SIGN_STYLE = Manual; - PRODUCT_NAME = "$(TARGET_NAME)"; - }; - name = Debug; - }; - 33CC111D2044C6BA0003C045 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - CODE_SIGN_STYLE = Automatic; - PRODUCT_NAME = "$(TARGET_NAME)"; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 331C80DE294CF71000263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 331C80DB294CF71000263BE5 /* Debug */, - 331C80DC294CF71000263BE5 /* Release */, - 331C80DD294CF71000263BE5 /* Profile */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 33CC10E82044A3C60003C045 /* Build configuration list for PBXProject "Runner" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 33CC10F92044A3C60003C045 /* Debug */, - 33CC10FA2044A3C60003C045 /* Release */, - 338D0CE9231458BD00FA5F75 /* Profile */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 33CC10FB2044A3C60003C045 /* Build configuration list for PBXNativeTarget "Runner" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 33CC10FC2044A3C60003C045 /* Debug */, - 33CC10FD2044A3C60003C045 /* Release */, - 338D0CEA231458BD00FA5F75 /* Profile */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 33CC111B2044C6BA0003C045 /* Build configuration list for PBXAggregateTarget "Flutter Assemble" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 33CC111C2044C6BA0003C045 /* Debug */, - 33CC111D2044C6BA0003C045 /* Release */, - 338D0CEB231458BD00FA5F75 /* Profile */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 33CC10E52044A3C60003C045 /* Project object */; -} diff --git a/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist deleted file mode 100644 index 18d9810..0000000 --- a/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEDidComputeMac32BitWarning - - - diff --git a/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme deleted file mode 100644 index 731b1fb..0000000 --- a/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme +++ /dev/null @@ -1,98 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/macos/Runner.xcworkspace/contents.xcworkspacedata b/macos/Runner.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 21a3cc1..0000000 --- a/macos/Runner.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - diff --git a/macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist deleted file mode 100644 index 18d9810..0000000 --- a/macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEDidComputeMac32BitWarning - - - diff --git a/macos/Runner/AppDelegate.swift b/macos/Runner/AppDelegate.swift deleted file mode 100644 index 8e02df2..0000000 --- a/macos/Runner/AppDelegate.swift +++ /dev/null @@ -1,9 +0,0 @@ -import Cocoa -import FlutterMacOS - -@main -class AppDelegate: FlutterAppDelegate { - override func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool { - return true - } -} diff --git a/macos/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json b/macos/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json deleted file mode 100644 index a2ec33f..0000000 --- a/macos/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json +++ /dev/null @@ -1,68 +0,0 @@ -{ - "images" : [ - { - "size" : "16x16", - "idiom" : "mac", - "filename" : "app_icon_16.png", - "scale" : "1x" - }, - { - "size" : "16x16", - "idiom" : "mac", - "filename" : "app_icon_32.png", - "scale" : "2x" - }, - { - "size" : "32x32", - "idiom" : "mac", - "filename" : "app_icon_32.png", - "scale" : "1x" - }, - { - "size" : "32x32", - "idiom" : "mac", - "filename" : "app_icon_64.png", - "scale" : "2x" - }, - { - "size" : "128x128", - "idiom" : "mac", - "filename" : "app_icon_128.png", - "scale" : "1x" - }, - { - "size" : "128x128", - "idiom" : "mac", - "filename" : "app_icon_256.png", - "scale" : "2x" - }, - { - "size" : "256x256", - "idiom" : "mac", - "filename" : "app_icon_256.png", - "scale" : "1x" - }, - { - "size" : "256x256", - "idiom" : "mac", - "filename" : "app_icon_512.png", - "scale" : "2x" - }, - { - "size" : "512x512", - "idiom" : "mac", - "filename" : "app_icon_512.png", - "scale" : "1x" - }, - { - "size" : "512x512", - "idiom" : "mac", - "filename" : "app_icon_1024.png", - "scale" : "2x" - } - ], - "info" : { - "version" : 1, - "author" : "xcode" - } -} diff --git a/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png b/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png deleted file mode 100644 index 82b6f9d..0000000 Binary files a/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png and /dev/null differ diff --git a/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png b/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png deleted file mode 100644 index 13b35eb..0000000 Binary files a/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png and /dev/null differ diff --git a/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png b/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png deleted file mode 100644 index 0a3f5fa..0000000 Binary files a/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png and /dev/null differ diff --git a/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png b/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png deleted file mode 100644 index bdb5722..0000000 Binary files a/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png and /dev/null differ diff --git a/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png b/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png deleted file mode 100644 index f083318..0000000 Binary files a/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png and /dev/null differ diff --git a/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png b/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png deleted file mode 100644 index 326c0e7..0000000 Binary files a/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png and /dev/null differ diff --git a/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png b/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png deleted file mode 100644 index 2f1632c..0000000 Binary files a/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png and /dev/null differ diff --git a/macos/Runner/Base.lproj/MainMenu.xib b/macos/Runner/Base.lproj/MainMenu.xib deleted file mode 100644 index 80e867a..0000000 --- a/macos/Runner/Base.lproj/MainMenu.xib +++ /dev/null @@ -1,343 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/macos/Runner/Configs/AppInfo.xcconfig b/macos/Runner/Configs/AppInfo.xcconfig deleted file mode 100644 index 15307b7..0000000 --- a/macos/Runner/Configs/AppInfo.xcconfig +++ /dev/null @@ -1,14 +0,0 @@ -// Application-level settings for the Runner target. -// -// This may be replaced with something auto-generated from metadata (e.g., pubspec.yaml) in the -// future. If not, the values below would default to using the project name when this becomes a -// 'flutter create' template. - -// The application's name. By default this is also the title of the Flutter window. -PRODUCT_NAME = connect - -// The application's bundle identifier -PRODUCT_BUNDLE_IDENTIFIER = com.example.connect - -// The copyright displayed in application information -PRODUCT_COPYRIGHT = Copyright © 2024 com.example. All rights reserved. diff --git a/macos/Runner/Configs/Debug.xcconfig b/macos/Runner/Configs/Debug.xcconfig deleted file mode 100644 index 36b0fd9..0000000 --- a/macos/Runner/Configs/Debug.xcconfig +++ /dev/null @@ -1,2 +0,0 @@ -#include "../../Flutter/Flutter-Debug.xcconfig" -#include "Warnings.xcconfig" diff --git a/macos/Runner/Configs/Release.xcconfig b/macos/Runner/Configs/Release.xcconfig deleted file mode 100644 index dff4f49..0000000 --- a/macos/Runner/Configs/Release.xcconfig +++ /dev/null @@ -1,2 +0,0 @@ -#include "../../Flutter/Flutter-Release.xcconfig" -#include "Warnings.xcconfig" diff --git a/macos/Runner/Configs/Warnings.xcconfig b/macos/Runner/Configs/Warnings.xcconfig deleted file mode 100644 index 42bcbf4..0000000 --- a/macos/Runner/Configs/Warnings.xcconfig +++ /dev/null @@ -1,13 +0,0 @@ -WARNING_CFLAGS = -Wall -Wconditional-uninitialized -Wnullable-to-nonnull-conversion -Wmissing-method-return-type -Woverlength-strings -GCC_WARN_UNDECLARED_SELECTOR = YES -CLANG_UNDEFINED_BEHAVIOR_SANITIZER_NULLABILITY = YES -CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE -CLANG_WARN__DUPLICATE_METHOD_MATCH = YES -CLANG_WARN_PRAGMA_PACK = YES -CLANG_WARN_STRICT_PROTOTYPES = YES -CLANG_WARN_COMMA = YES -GCC_WARN_STRICT_SELECTOR_MATCH = YES -CLANG_WARN_OBJC_REPEATED_USE_OF_WEAK = YES -CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES -GCC_WARN_SHADOW = YES -CLANG_WARN_UNREACHABLE_CODE = YES diff --git a/macos/Runner/DebugProfile.entitlements b/macos/Runner/DebugProfile.entitlements deleted file mode 100644 index dddb8a3..0000000 --- a/macos/Runner/DebugProfile.entitlements +++ /dev/null @@ -1,12 +0,0 @@ - - - - - com.apple.security.app-sandbox - - com.apple.security.cs.allow-jit - - com.apple.security.network.server - - - diff --git a/macos/Runner/Info.plist b/macos/Runner/Info.plist deleted file mode 100644 index 4789daa..0000000 --- a/macos/Runner/Info.plist +++ /dev/null @@ -1,32 +0,0 @@ - - - - - CFBundleDevelopmentRegion - $(DEVELOPMENT_LANGUAGE) - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIconFile - - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - APPL - CFBundleShortVersionString - $(FLUTTER_BUILD_NAME) - CFBundleVersion - $(FLUTTER_BUILD_NUMBER) - LSMinimumSystemVersion - $(MACOSX_DEPLOYMENT_TARGET) - NSHumanReadableCopyright - $(PRODUCT_COPYRIGHT) - NSMainNibFile - MainMenu - NSPrincipalClass - NSApplication - - diff --git a/macos/Runner/MainFlutterWindow.swift b/macos/Runner/MainFlutterWindow.swift deleted file mode 100644 index 3cc05eb..0000000 --- a/macos/Runner/MainFlutterWindow.swift +++ /dev/null @@ -1,15 +0,0 @@ -import Cocoa -import FlutterMacOS - -class MainFlutterWindow: NSWindow { - override func awakeFromNib() { - let flutterViewController = FlutterViewController() - let windowFrame = self.frame - self.contentViewController = flutterViewController - self.setFrame(windowFrame, display: true) - - RegisterGeneratedPlugins(registry: flutterViewController) - - super.awakeFromNib() - } -} diff --git a/macos/Runner/Release.entitlements b/macos/Runner/Release.entitlements deleted file mode 100644 index 852fa1a..0000000 --- a/macos/Runner/Release.entitlements +++ /dev/null @@ -1,8 +0,0 @@ - - - - - com.apple.security.app-sandbox - - - diff --git a/macos/RunnerTests/RunnerTests.swift b/macos/RunnerTests/RunnerTests.swift deleted file mode 100644 index 61f3bd1..0000000 --- a/macos/RunnerTests/RunnerTests.swift +++ /dev/null @@ -1,12 +0,0 @@ -import Cocoa -import FlutterMacOS -import XCTest - -class RunnerTests: XCTestCase { - - func testExample() { - // If you add code to the Runner application, consider adding tests here. - // See https://developer.apple.com/documentation/xctest for more information about using XCTest. - } - -} diff --git a/pubspec.lock b/pubspec.lock index 94e4d81..2d5f919 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -5,15 +5,15 @@ packages: dependency: transitive description: name: _fe_analyzer_shared - sha256: f256b0c0ba6c7577c15e2e4e114755640a875e885099367bf6e012b19314c834 + sha256: "03f6da266a27a4538a69295ec142cb5717d7d4e5727b84658b63e1e1509bac9c" url: "https://pub.dev" source: hosted - version: "72.0.0" + version: "79.0.0" _macros: dependency: transitive description: dart source: sdk - version: "0.3.2" + version: "0.3.3" adaptive_number: dependency: transitive description: @@ -26,18 +26,18 @@ packages: dependency: transitive description: name: analyzer - sha256: b652861553cd3990d8ed361f7979dc6d7053a9ac8843fa73820ab68ce5410139 + sha256: c9040fc56483c22a5e04a9f6a251313118b1a3c42423770623128fa484115643 url: "https://pub.dev" source: hosted - version: "6.7.0" + version: "7.2.0" archive: dependency: transitive description: name: archive - sha256: cb6a278ef2dbb298455e1a713bda08524a175630ec643a242c399c932a0a1f7d + sha256: "6199c74e3db4fbfbd04f66d739e72fe11c8a8957d5f219f1f4482dbde6420b5a" url: "https://pub.dev" source: hosted - version: "3.6.1" + version: "4.0.2" args: dependency: transitive description: @@ -66,50 +66,50 @@ packages: dependency: transitive description: name: build - sha256: "80184af8b6cb3e5c1c4ec6d8544d27711700bc3e6d2efad04238c7b5290889f0" + sha256: cef23f1eda9b57566c81e2133d196f8e3df48f244b317368d65c5943d91148f0 url: "https://pub.dev" source: hosted - version: "2.4.1" + version: "2.4.2" build_config: dependency: transitive description: name: build_config - sha256: bf80fcfb46a29945b423bd9aad884590fb1dc69b330a4d4700cac476af1708d1 + sha256: "4ae2de3e1e67ea270081eaee972e1bd8f027d459f249e0f1186730784c2e7e33" url: "https://pub.dev" source: hosted - version: "1.1.1" + version: "1.1.2" build_daemon: dependency: transitive description: name: build_daemon - sha256: "79b2aef6ac2ed00046867ed354c88778c9c0f029df8a20fe10b5436826721ef9" + sha256: "294a2edaf4814a378725bfe6358210196f5ea37af89ecd81bfa32960113d4948" url: "https://pub.dev" source: hosted - version: "4.0.2" + version: "4.0.3" build_resolvers: dependency: transitive description: name: build_resolvers - sha256: "339086358431fa15d7eca8b6a36e5d783728cf025e559b834f4609a1fcfb7b0a" + sha256: "99d3980049739a985cf9b21f30881f46db3ebc62c5b8d5e60e27440876b1ba1e" url: "https://pub.dev" source: hosted - version: "2.4.2" + version: "2.4.3" build_runner: dependency: "direct dev" description: name: build_runner - sha256: "028819cfb90051c6b5440c7e574d1896f8037e3c96cf17aaeb054c9311cfbf4d" + sha256: "74691599a5bc750dc96a6b4bfd48f7d9d66453eab04c7f4063134800d6a5c573" url: "https://pub.dev" source: hosted - version: "2.4.13" + version: "2.4.14" build_runner_core: dependency: transitive description: name: build_runner_core - sha256: f8126682b87a7282a339b871298cc12009cb67109cfa1614d6436fb0289193e0 + sha256: "22e3aa1c80e0ada3722fe5b63fd43d9c8990759d0a2cf489c8c5d7b2bdebc021" url: "https://pub.dev" source: hosted - version: "7.3.2" + version: "8.0.0" built_collection: dependency: transitive description: @@ -122,10 +122,10 @@ packages: dependency: transitive description: name: built_value - sha256: c7913a9737ee4007efedaffc968c049fd0f3d0e49109e778edc10de9426005cb + sha256: "28a712df2576b63c6c005c465989a348604960c0958d28be5303ba9baa841ac2" url: "https://pub.dev" source: hosted - version: "8.9.2" + version: "8.9.3" camera: dependency: "direct main" description: @@ -138,26 +138,26 @@ packages: dependency: transitive description: name: camera_android_camerax - sha256: e3627fdc2132d89212b8a8676679f5b07008c7e3d8ae00cea775c3397f9e742b + sha256: "7cc6adf1868bdcf4e63a56b24b41692dfbad2bec1cdceea451c77798f6a605c3" url: "https://pub.dev" source: hosted - version: "0.6.10" + version: "0.6.13" camera_avfoundation: dependency: transitive description: name: camera_avfoundation - sha256: "2e4c568f70e406ccb87376bc06b53d2f5bebaab71e2fbcc1a950e31449381bcf" + sha256: "3f81ee3e88a79b0b010f0233d42625926299551b05d5dc995267a0b35bc33247" url: "https://pub.dev" source: hosted - version: "0.9.17+5" + version: "0.9.18" camera_platform_interface: dependency: transitive description: name: camera_platform_interface - sha256: b3ede1f171532e0d83111fe0980b46d17f1aa9788a07a2fbed07366bbdbb9061 + sha256: "953e7baed3a7c8fae92f7200afeb2be503ff1a17c3b4e4ed7b76f008c2810a31" url: "https://pub.dev" source: hosted - version: "2.8.0" + version: "2.9.0" camera_web: dependency: transitive description: @@ -210,10 +210,10 @@ packages: dependency: "direct main" description: name: collection - sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a + sha256: a1ace0a119f20aabc852d165077c036cd864315bd99b7eaa10a60100341941bf url: "https://pub.dev" source: hosted - version: "1.18.0" + version: "1.19.0" convert: dependency: transitive description: @@ -250,26 +250,26 @@ packages: dependency: transitive description: name: dart_style - sha256: "7856d364b589d1f08986e140938578ed36ed948581fbc3bc9aef1805039ac5ab" + sha256: "27eb0ae77836989a3bc541ce55595e8ceee0992807f14511552a898ddd0d88ac" url: "https://pub.dev" source: hosted - version: "2.3.7" + version: "3.0.1" device_info_plus: dependency: transitive description: name: device_info_plus - sha256: f545ffbadee826f26f2e1a0f0cbd667ae9a6011cc0f77c0f8f00a969655e6e95 + sha256: b37d37c2f912ad4e8ec694187de87d05de2a3cb82b465ff1f65f65a2d05de544 url: "https://pub.dev" source: hosted - version: "11.1.1" + version: "11.2.1" device_info_plus_platform_interface: dependency: transitive description: name: device_info_plus_platform_interface - sha256: "282d3cf731045a2feb66abfe61bbc40870ae50a3ed10a4d3d217556c35c8c2ba" + sha256: "0b04e02b30791224b31969eb1b50d723498f402971bff3630bca2ba839bd1ed2" url: "https://pub.dev" source: hosted - version: "7.0.1" + version: "7.0.2" ed25519_edwards: dependency: transitive description: @@ -311,7 +311,7 @@ packages: source: hosted version: "7.0.1" fixnum: - dependency: transitive + dependency: "direct main" description: name: fixnum sha256: b6dc7065e46c974bc7c5f143080a6764ec7a4be6da1285ececdc37be96de53be @@ -327,10 +327,10 @@ packages: dependency: "direct dev" description: name: flutter_launcher_icons - sha256: "619817c4b65b322b5104b6bb6dfe6cda62d9729bd7ad4303ecc8b4e690a67a77" + sha256: bfa04787c85d80ecb3f8777bde5fc10c3de809240c48fa061a2c2bf15ea5211c url: "https://pub.dev" source: hosted - version: "0.14.1" + version: "0.14.3" flutter_lints: dependency: "direct dev" description: @@ -348,34 +348,34 @@ packages: dependency: transitive description: name: flutter_plugin_android_lifecycle - sha256: "9b78450b89f059e96c9ebb355fa6b3df1d6b330436e0b885fb49594c41721398" + sha256: "615a505aef59b151b46bbeef55b36ce2b6ed299d160c51d84281946f0aa0ce0e" url: "https://pub.dev" source: hosted - version: "2.0.23" + version: "2.0.24" flutter_secure_storage: dependency: "direct main" description: name: flutter_secure_storage - sha256: "165164745e6afb5c0e3e3fcc72a012fb9e58496fb26ffb92cf22e16a821e85d0" + sha256: "9cad52d75ebc511adfae3d447d5d13da15a55a92c9410e50f67335b6d21d16ea" url: "https://pub.dev" source: hosted - version: "9.2.2" + version: "9.2.4" flutter_secure_storage_linux: dependency: transitive description: name: flutter_secure_storage_linux - sha256: "4d91bfc23047422cbcd73ac684bc169859ee766482517c22172c86596bf1464b" + sha256: bf7404619d7ab5c0a1151d7c4e802edad8f33535abfbeff2f9e1fe1274e2d705 url: "https://pub.dev" source: hosted - version: "1.2.1" + version: "1.2.2" flutter_secure_storage_macos: dependency: transitive description: name: flutter_secure_storage_macos - sha256: "1693ab11121a5f925bbea0be725abfcfbbcf36c1e29e571f84a0c0f436147a81" + sha256: "6c0a2795a2d1de26ae202a0d78527d163f4acbb11cde4c75c670f3a0fc064247" url: "https://pub.dev" source: hosted - version: "3.1.2" + version: "3.1.3" flutter_secure_storage_platform_interface: dependency: transitive description: @@ -454,26 +454,26 @@ packages: dependency: transitive description: name: http_multi_server - sha256: "97486f20f9c2f7be8f514851703d0119c3596d14ea63227af6f7a481ef2b2f8b" + sha256: aa6199f908078bb1c5efb8d8638d4ae191aac11b311132c3ef48ce352fb52ef8 url: "https://pub.dev" source: hosted - version: "3.2.1" + version: "3.2.2" http_parser: dependency: transitive description: name: http_parser - sha256: "2aa08ce0341cc9b354a498388e30986515406668dbcc4f7c950c3e715496693b" + sha256: "178d74305e7866013777bab2c3d8726205dc5a4dd935297175b19a23a2e66571" url: "https://pub.dev" source: hosted - version: "4.0.2" + version: "4.1.2" image: dependency: "direct main" description: name: image - sha256: f31d52537dc417fdcde36088fdf11d191026fd5e4fae742491ebd40e5a8bea7d + sha256: "8346ad4b5173924b5ddddab782fc7d8a6300178c8b1dc427775405a01701c4a6" url: "https://pub.dev" source: hosted - version: "4.3.0" + version: "4.5.2" intl: dependency: transitive description: @@ -486,10 +486,10 @@ packages: dependency: transitive description: name: io - sha256: "2ec25704aba361659e10e3e5f5d672068d332fc8ac516421d483a11e5cbd061e" + sha256: dfd5a80599cf0165756e3181807ed3e77daf6dd4137caaad72d0b7931597650b url: "https://pub.dev" source: hosted - version: "1.0.4" + version: "1.0.5" js: dependency: transitive description: @@ -510,26 +510,26 @@ packages: dependency: "direct dev" description: name: json_serializable - sha256: ea1432d167339ea9b5bb153f0571d0039607a873d6e04e0117af043f14a1fd4b + sha256: b0a98230538fe5d0b60a22fb6bf1b6cb03471b53e3324ff6069c591679dd59c9 url: "https://pub.dev" source: hosted - version: "6.8.0" + version: "6.9.3" leak_tracker: dependency: transitive description: name: leak_tracker - sha256: "3f87a60e8c63aecc975dda1ceedbc8f24de75f09e4856ea27daf8958f2f0ce05" + sha256: "7bb2830ebd849694d1ec25bf1f44582d6ac531a57a365a803a6034ff751d2d06" url: "https://pub.dev" source: hosted - version: "10.0.5" + version: "10.0.7" leak_tracker_flutter_testing: dependency: transitive description: name: leak_tracker_flutter_testing - sha256: "932549fb305594d82d7183ecd9fa93463e9914e1b67cacc34bc40906594a1806" + sha256: "9491a714cca3667b60b5c420da8217e6de0d1ba7a5ec322fab01758f6998f379" url: "https://pub.dev" source: hosted - version: "3.0.5" + version: "3.0.8" leak_tracker_testing: dependency: transitive description: @@ -550,10 +550,10 @@ packages: dependency: transitive description: name: lints - sha256: "3315600f3fb3b135be672bf4a178c55f274bebe368325ae18462c89ac1e3b413" + sha256: c35bb79562d980e9a453fc715854e1ed39e24e7d0297a880ef54e17f9874a9d7 url: "https://pub.dev" source: hosted - version: "5.0.0" + version: "5.1.1" logging: dependency: "direct main" description: @@ -566,10 +566,10 @@ packages: dependency: transitive description: name: macros - sha256: "0acaed5d6b7eab89f63350bccd82119e6c602df0f391260d0e32b5e23db79536" + sha256: "1d9e801cd66f7ea3663c45fc708450db1fa57f988142c64289142c9b7ee80656" url: "https://pub.dev" source: hosted - version: "0.1.2-main.4" + version: "0.1.3-main.0" matcher: dependency: transitive description: @@ -606,10 +606,10 @@ packages: dependency: "direct main" description: name: mobile_scanner - sha256: "728828a798d1a2ee506beb652ca23d974c542c96ed03dcbd5eaf97bef96cdaad" + sha256: "57d6269d10912d5d583606b46d963d7c5d0299d2c37add8b7192dd769d40a319" url: "https://pub.dev" source: hosted - version: "6.0.2" + version: "6.0.3" optional: dependency: transitive description: @@ -622,10 +622,10 @@ packages: dependency: transitive description: name: package_config - sha256: "1c5b77ccc91e4823a5af61ee74e6b972db1ef98c2ff5a18d3161c982a55448bd" + sha256: "92d4488434b520a62570293fbd33bb556c7d49230791c1b4bbd973baf6d2dc67" url: "https://pub.dev" source: hosted - version: "2.1.0" + version: "2.1.1" path: dependency: "direct main" description: @@ -646,18 +646,18 @@ packages: dependency: transitive description: name: path_provider_android - sha256: c464428172cb986b758c6d1724c603097febb8fb855aa265aeecc9280c294d4a + sha256: "4adf4fd5423ec60a29506c76581bc05854c55e3a0b72d35bb28d661c9686edf2" url: "https://pub.dev" source: hosted - version: "2.2.12" + version: "2.2.15" path_provider_foundation: dependency: transitive description: name: path_provider_foundation - sha256: f234384a3fdd67f989b4d54a5d73ca2a6c422fa55ae694381ae0f4375cd1ea16 + sha256: "4843174df4d288f5e29185bd6e72a6fbdf5a4a4602717eed565497429f179942" url: "https://pub.dev" source: hosted - version: "2.4.0" + version: "2.4.1" path_provider_linux: dependency: transitive description: @@ -710,10 +710,10 @@ packages: dependency: transitive description: name: permission_handler_html - sha256: "6b9cb54b7135073841a35513fba39e598b421702d5f4d92319992fd6eb5532a9" + sha256: "38f000e83355abb3392140f6bc3030660cfaef189e1f87824facb76300b4ff24" url: "https://pub.dev" source: hosted - version: "0.1.3+4" + version: "0.1.3+5" permission_handler_platform_interface: dependency: transitive description: @@ -770,14 +770,22 @@ packages: url: "https://pub.dev" source: hosted version: "1.5.1" + posix: + dependency: transitive + description: + name: posix + sha256: a0117dc2167805aa9125b82eee515cc891819bac2f538c83646d355b16f58b9a + url: "https://pub.dev" + source: hosted + version: "6.0.1" pro_image_editor: dependency: "direct main" description: name: pro_image_editor - sha256: "419691ffe116b0282c8c4467aa1098d76e1dc2671002f8269d54715e349ebe24" + sha256: "27190b0333af71e9949f366ac303496511ef6d67607f6f9797c9f136371a321f" url: "https://pub.dev" source: hosted - version: "6.1.3" + version: "6.2.3" protobuf: dependency: transitive description: @@ -790,18 +798,18 @@ packages: dependency: transitive description: name: pub_semver - sha256: "40d3ab1bbd474c4c2328c91e3a7df8c6dd629b79ece4c4bd04bee496a224fb0c" + sha256: "7b3cfbf654f3edd0c6298ecd5be782ce997ddf0e00531b9464b55245185bbbbd" url: "https://pub.dev" source: hosted - version: "2.1.4" + version: "2.1.5" pubspec_parse: dependency: transitive description: name: pubspec_parse - sha256: c799b721d79eb6ee6fa56f00c04b472dcd44a30d258fac2174a6ec57302678f8 + sha256: "0560ba233314abbed0a48a2956f7f022cce7c3e1e73df540277da7544cad4082" url: "https://pub.dev" source: hosted - version: "1.3.0" + version: "1.5.0" restart_app: dependency: "direct main" description: @@ -814,26 +822,26 @@ packages: dependency: transitive description: name: shared_preferences - sha256: "95f9997ca1fb9799d494d0cb2a780fd7be075818d59f00c43832ed112b158a82" + sha256: a752ce92ea7540fc35a0d19722816e04d0e72828a4200e83a98cf1a1eb524c9a url: "https://pub.dev" source: hosted - version: "2.3.3" + version: "2.3.5" shared_preferences_android: dependency: transitive description: name: shared_preferences_android - sha256: "3b9febd815c9ca29c9e3520d50ec32f49157711e143b7a4ca039eb87e8ade5ab" + sha256: "138b7bbbc7f59c56236e426c37afb8f78cbc57b094ac64c440e0bb90e380a4f5" url: "https://pub.dev" source: hosted - version: "2.3.3" + version: "2.4.2" shared_preferences_foundation: dependency: transitive description: name: shared_preferences_foundation - sha256: "07e050c7cd39bad516f8d64c455f04508d09df104be326d8c02551590a0d513d" + sha256: "6a52cfcdaeac77cad8c97b539ff688ccfc458c007b4db12be584fbe5c0e49e03" url: "https://pub.dev" source: hosted - version: "2.5.3" + version: "2.5.4" shared_preferences_linux: dependency: transitive description: @@ -870,39 +878,39 @@ packages: dependency: transitive description: name: shelf - sha256: ad29c505aee705f41a4d8963641f91ac4cee3c8fad5947e033390a7bd8180fa4 + sha256: e7dd780a7ffb623c57850b33f43309312fc863fb6aa3d276a754bb299839ef12 url: "https://pub.dev" source: hosted - version: "1.4.1" + version: "1.4.2" shelf_web_socket: dependency: transitive description: name: shelf_web_socket - sha256: "073c147238594ecd0d193f3456a5fe91c4b0abbcc68bf5cd95b36c4e194ac611" + sha256: cc36c297b52866d203dbf9332263c94becc2fe0ceaa9681d07b6ef9807023b67 url: "https://pub.dev" source: hosted - version: "2.0.0" + version: "2.0.1" sky_engine: dependency: transitive description: flutter source: sdk - version: "0.0.99" + version: "0.0.0" source_gen: dependency: transitive description: name: source_gen - sha256: "14658ba5f669685cd3d63701d01b31ea748310f7ab854e471962670abcf57832" + sha256: "35c8150ece9e8c8d263337a265153c3329667640850b9304861faea59fc98f6b" url: "https://pub.dev" source: hosted - version: "1.5.0" + version: "2.0.0" source_helper: dependency: transitive description: name: source_helper - sha256: "6adebc0006c37dd63fe05bca0a929b99f06402fc95aa35bf36d67f5c06de01fd" + sha256: "86d247119aedce8e63f4751bd9626fc9613255935558447569ad42f9f5b48b3c" url: "https://pub.dev" source: hosted - version: "1.3.4" + version: "1.3.5" source_span: dependency: transitive description: @@ -931,10 +939,10 @@ packages: dependency: transitive description: name: stack_trace - sha256: "73713990125a6d93122541237550ee3352a2d84baad52d375a4cad2eb9b7ce0b" + sha256: "9f47fd3630d76be3ab26f0ee06d213679aa425996925ff3feffdec504931c377" url: "https://pub.dev" source: hosted - version: "1.11.1" + version: "1.12.0" stream_channel: dependency: transitive description: @@ -947,18 +955,18 @@ packages: dependency: transitive description: name: stream_transform - sha256: "14a00e794c7c11aa145a170587321aedce29769c08d7f58b1d141da75e3b1c6f" + sha256: ad47125e588cfd37a9a7f86c7d6356dde8dfe89d071d293f80ca9e9273a33871 url: "https://pub.dev" source: hosted - version: "2.1.0" + version: "2.1.1" string_scanner: dependency: transitive description: name: string_scanner - sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde" + sha256: "688af5ed3402a4bde5b3a6c15fd768dbf2621a614950b17f04626c431ab3c4c3" url: "https://pub.dev" source: hosted - version: "1.2.0" + version: "1.3.0" synchronized: dependency: transitive description: @@ -979,18 +987,18 @@ packages: dependency: transitive description: name: test_api - sha256: "5b8a98dafc4d5c4c9c72d8b31ab2b23fc13422348d2997120294d3bac86b4ddb" + sha256: "664d3a9a64782fcdeb83ce9c6b39e78fd2971d4e37827b9b06c3aa1edc5e760c" url: "https://pub.dev" source: hosted - version: "0.7.2" + version: "0.7.3" timing: dependency: transitive description: name: timing - sha256: "70a3b636575d4163c477e6de42f247a23b315ae20e86442bebe32d3cabf61c32" + sha256: "62ee18aca144e4a9f29d212f5a4c6a053be252b895ab14b5821996cff4ed90fe" url: "https://pub.dev" source: hosted - version: "1.0.1" + version: "1.0.2" typed_data: dependency: transitive description: @@ -1019,34 +1027,34 @@ packages: dependency: transitive description: name: vibration - sha256: f0af02af2d63132135ae0332a3e54d5de718e214ee94c4f082176ef6ce624a4b + sha256: "3b08a0579c2f9c18d5d78cb5c74f1005f731e02eeca6d72561a2e8059bf98ec3" url: "https://pub.dev" source: hosted - version: "2.0.1" + version: "2.1.0" vibration_platform_interface: dependency: transitive description: name: vibration_platform_interface - sha256: f66b39aab2447038978c16f3d6f77228e49ef5717556e3da02313e044e4a7600 + sha256: "6ffeee63547562a6fef53c05a41d4fdcae2c0595b83ef59a4813b0612cd2bc36" url: "https://pub.dev" source: hosted - version: "0.0.2" + version: "0.0.3" vm_service: dependency: transitive description: name: vm_service - sha256: "5c5f338a667b4c644744b661f309fb8080bb94b18a7e91ef1dbd343bed00ed6d" + sha256: f6be3ed8bd01289b34d679c2b62226f63c0e69f9fd2e50a6b3c1c729a961041b url: "https://pub.dev" source: hosted - version: "14.2.5" + version: "14.3.0" watcher: dependency: transitive description: name: watcher - sha256: "3d2ad6751b3c16cf07c7fca317a1413b3f26530319181b37e3b9039b84fc01d8" + sha256: "69da27e49efa56a15f8afe8f4438c4ec02eff0a117df1b22ea4aad194fe1c104" url: "https://pub.dev" source: hosted - version: "1.1.0" + version: "1.1.1" web: dependency: transitive description: @@ -1075,10 +1083,10 @@ packages: dependency: transitive description: name: win32 - sha256: "84ba388638ed7a8cb3445a320c8273136ab2631cd5f2c57888335504ddab1bc2" + sha256: "154360849a56b7b67331c21f09a386562d88903f90a1099c5987afc1912e1f29" url: "https://pub.dev" source: hosted - version: "5.8.0" + version: "5.10.0" win32_registry: dependency: transitive description: @@ -1115,10 +1123,10 @@ packages: dependency: transitive description: name: yaml - sha256: "75769501ea3489fca56601ff33454fe45507ea3bfb014161abc3b43ae25989d5" + sha256: b9da305ac7c39faa3f030eccd175340f968459dae4af175130b3fc47e40d76ce url: "https://pub.dev" source: hosted - version: "3.1.2" + version: "3.1.3" sdks: - dart: ">=3.5.4 <4.0.0" - flutter: ">=3.24.0" + dart: ">=3.6.0 <4.0.0" + flutter: ">=3.27.0" diff --git a/pubspec.yaml b/pubspec.yaml index 0ecf289..cc754b3 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,5 +1,5 @@ -name: connect -description: "Connect securely with your friends." +name: twonly +description: "Send pictures to friends in real time and be sure you are the only two people who can see them." # Prevent accidental publishing to pub.dev. publish_to: 'none' @@ -13,6 +13,7 @@ dependencies: camera: ^0.11.0+2 collection: ^1.18.0 cv: ^1.1.3 + fixnum: ^1.1.1 flutter: sdk: flutter flutter_localizations: @@ -41,10 +42,13 @@ dev_dependencies: flutter_launcher_icons: ^0.14.1 flutter_launcher_icons: - android: "launcher_icon" - ios: true + android: true + ios: false image_path: "assets/images/logo.png" + adaptive_icon_foreground: "assets/images/logo.png" min_sdk_android: 21 # android min sdk min:16, default 21 + remove_alpha_ios: true + adaptive_icon_background: "#FF57CC99" flutter: uses-material-design: true diff --git a/web/favicon.png b/web/favicon.png deleted file mode 100644 index 8aaa46a..0000000 Binary files a/web/favicon.png and /dev/null differ diff --git a/web/icons/Icon-192.png b/web/icons/Icon-192.png deleted file mode 100644 index b749bfe..0000000 Binary files a/web/icons/Icon-192.png and /dev/null differ diff --git a/web/icons/Icon-512.png b/web/icons/Icon-512.png deleted file mode 100644 index 88cfd48..0000000 Binary files a/web/icons/Icon-512.png and /dev/null differ diff --git a/web/icons/Icon-maskable-192.png b/web/icons/Icon-maskable-192.png deleted file mode 100644 index eb9b4d7..0000000 Binary files a/web/icons/Icon-maskable-192.png and /dev/null differ diff --git a/web/icons/Icon-maskable-512.png b/web/icons/Icon-maskable-512.png deleted file mode 100644 index d69c566..0000000 Binary files a/web/icons/Icon-maskable-512.png and /dev/null differ diff --git a/web/index.html b/web/index.html deleted file mode 100644 index 85c6dab..0000000 --- a/web/index.html +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - - - - - - - - - - - - - - - connect - - - - - - diff --git a/web/manifest.json b/web/manifest.json deleted file mode 100644 index 57574b7..0000000 --- a/web/manifest.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "name": "connect", - "short_name": "connect", - "start_url": ".", - "display": "standalone", - "background_color": "#0175C2", - "theme_color": "#0175C2", - "description": "A new Flutter project.", - "orientation": "portrait-primary", - "prefer_related_applications": false, - "icons": [ - { - "src": "icons/Icon-192.png", - "sizes": "192x192", - "type": "image/png" - }, - { - "src": "icons/Icon-512.png", - "sizes": "512x512", - "type": "image/png" - }, - { - "src": "icons/Icon-maskable-192.png", - "sizes": "192x192", - "type": "image/png", - "purpose": "maskable" - }, - { - "src": "icons/Icon-maskable-512.png", - "sizes": "512x512", - "type": "image/png", - "purpose": "maskable" - } - ] -} diff --git a/windows/.gitignore b/windows/.gitignore deleted file mode 100644 index d492d0d..0000000 --- a/windows/.gitignore +++ /dev/null @@ -1,17 +0,0 @@ -flutter/ephemeral/ - -# Visual Studio user-specific files. -*.suo -*.user -*.userosscache -*.sln.docstates - -# Visual Studio build-related files. -x64/ -x86/ - -# Visual Studio cache files -# files ending in .cache can be ignored -*.[Cc]ache -# but keep track of directories ending in .cache -!*.[Cc]ache/ diff --git a/windows/CMakeLists.txt b/windows/CMakeLists.txt deleted file mode 100644 index 4bdc26d..0000000 --- a/windows/CMakeLists.txt +++ /dev/null @@ -1,108 +0,0 @@ -# Project-level configuration. -cmake_minimum_required(VERSION 3.14) -project(connect LANGUAGES CXX) - -# The name of the executable created for the application. Change this to change -# the on-disk name of your application. -set(BINARY_NAME "connect") - -# Explicitly opt in to modern CMake behaviors to avoid warnings with recent -# versions of CMake. -cmake_policy(VERSION 3.14...3.25) - -# Define build configuration option. -get_property(IS_MULTICONFIG GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG) -if(IS_MULTICONFIG) - set(CMAKE_CONFIGURATION_TYPES "Debug;Profile;Release" - CACHE STRING "" FORCE) -else() - if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES) - set(CMAKE_BUILD_TYPE "Debug" CACHE - STRING "Flutter build mode" FORCE) - set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS - "Debug" "Profile" "Release") - endif() -endif() -# Define settings for the Profile build mode. -set(CMAKE_EXE_LINKER_FLAGS_PROFILE "${CMAKE_EXE_LINKER_FLAGS_RELEASE}") -set(CMAKE_SHARED_LINKER_FLAGS_PROFILE "${CMAKE_SHARED_LINKER_FLAGS_RELEASE}") -set(CMAKE_C_FLAGS_PROFILE "${CMAKE_C_FLAGS_RELEASE}") -set(CMAKE_CXX_FLAGS_PROFILE "${CMAKE_CXX_FLAGS_RELEASE}") - -# Use Unicode for all projects. -add_definitions(-DUNICODE -D_UNICODE) - -# Compilation settings that should be applied to most targets. -# -# Be cautious about adding new options here, as plugins use this function by -# default. In most cases, you should add new options to specific targets instead -# of modifying this function. -function(APPLY_STANDARD_SETTINGS TARGET) - target_compile_features(${TARGET} PUBLIC cxx_std_17) - target_compile_options(${TARGET} PRIVATE /W4 /WX /wd"4100") - target_compile_options(${TARGET} PRIVATE /EHsc) - target_compile_definitions(${TARGET} PRIVATE "_HAS_EXCEPTIONS=0") - target_compile_definitions(${TARGET} PRIVATE "$<$:_DEBUG>") -endfunction() - -# Flutter library and tool build rules. -set(FLUTTER_MANAGED_DIR "${CMAKE_CURRENT_SOURCE_DIR}/flutter") -add_subdirectory(${FLUTTER_MANAGED_DIR}) - -# Application build; see runner/CMakeLists.txt. -add_subdirectory("runner") - - -# Generated plugin build rules, which manage building the plugins and adding -# them to the application. -include(flutter/generated_plugins.cmake) - - -# === Installation === -# Support files are copied into place next to the executable, so that it can -# run in place. This is done instead of making a separate bundle (as on Linux) -# so that building and running from within Visual Studio will work. -set(BUILD_BUNDLE_DIR "$") -# Make the "install" step default, as it's required to run. -set(CMAKE_VS_INCLUDE_INSTALL_TO_DEFAULT_BUILD 1) -if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) - set(CMAKE_INSTALL_PREFIX "${BUILD_BUNDLE_DIR}" CACHE PATH "..." FORCE) -endif() - -set(INSTALL_BUNDLE_DATA_DIR "${CMAKE_INSTALL_PREFIX}/data") -set(INSTALL_BUNDLE_LIB_DIR "${CMAKE_INSTALL_PREFIX}") - -install(TARGETS ${BINARY_NAME} RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}" - COMPONENT Runtime) - -install(FILES "${FLUTTER_ICU_DATA_FILE}" DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" - COMPONENT Runtime) - -install(FILES "${FLUTTER_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" - COMPONENT Runtime) - -if(PLUGIN_BUNDLED_LIBRARIES) - install(FILES "${PLUGIN_BUNDLED_LIBRARIES}" - DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" - COMPONENT Runtime) -endif() - -# Copy the native assets provided by the build.dart from all packages. -set(NATIVE_ASSETS_DIR "${PROJECT_BUILD_DIR}native_assets/windows/") -install(DIRECTORY "${NATIVE_ASSETS_DIR}" - DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" - COMPONENT Runtime) - -# Fully re-copy the assets directory on each build to avoid having stale files -# from a previous install. -set(FLUTTER_ASSET_DIR_NAME "flutter_assets") -install(CODE " - file(REMOVE_RECURSE \"${INSTALL_BUNDLE_DATA_DIR}/${FLUTTER_ASSET_DIR_NAME}\") - " COMPONENT Runtime) -install(DIRECTORY "${PROJECT_BUILD_DIR}/${FLUTTER_ASSET_DIR_NAME}" - DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" COMPONENT Runtime) - -# Install the AOT library on non-Debug builds only. -install(FILES "${AOT_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" - CONFIGURATIONS Profile;Release - COMPONENT Runtime) diff --git a/windows/flutter/CMakeLists.txt b/windows/flutter/CMakeLists.txt deleted file mode 100644 index 903f489..0000000 --- a/windows/flutter/CMakeLists.txt +++ /dev/null @@ -1,109 +0,0 @@ -# This file controls Flutter-level build steps. It should not be edited. -cmake_minimum_required(VERSION 3.14) - -set(EPHEMERAL_DIR "${CMAKE_CURRENT_SOURCE_DIR}/ephemeral") - -# Configuration provided via flutter tool. -include(${EPHEMERAL_DIR}/generated_config.cmake) - -# TODO: Move the rest of this into files in ephemeral. See -# https://github.com/flutter/flutter/issues/57146. -set(WRAPPER_ROOT "${EPHEMERAL_DIR}/cpp_client_wrapper") - -# Set fallback configurations for older versions of the flutter tool. -if (NOT DEFINED FLUTTER_TARGET_PLATFORM) - set(FLUTTER_TARGET_PLATFORM "windows-x64") -endif() - -# === Flutter Library === -set(FLUTTER_LIBRARY "${EPHEMERAL_DIR}/flutter_windows.dll") - -# Published to parent scope for install step. -set(FLUTTER_LIBRARY ${FLUTTER_LIBRARY} PARENT_SCOPE) -set(FLUTTER_ICU_DATA_FILE "${EPHEMERAL_DIR}/icudtl.dat" PARENT_SCOPE) -set(PROJECT_BUILD_DIR "${PROJECT_DIR}/build/" PARENT_SCOPE) -set(AOT_LIBRARY "${PROJECT_DIR}/build/windows/app.so" PARENT_SCOPE) - -list(APPEND FLUTTER_LIBRARY_HEADERS - "flutter_export.h" - "flutter_windows.h" - "flutter_messenger.h" - "flutter_plugin_registrar.h" - "flutter_texture_registrar.h" -) -list(TRANSFORM FLUTTER_LIBRARY_HEADERS PREPEND "${EPHEMERAL_DIR}/") -add_library(flutter INTERFACE) -target_include_directories(flutter INTERFACE - "${EPHEMERAL_DIR}" -) -target_link_libraries(flutter INTERFACE "${FLUTTER_LIBRARY}.lib") -add_dependencies(flutter flutter_assemble) - -# === Wrapper === -list(APPEND CPP_WRAPPER_SOURCES_CORE - "core_implementations.cc" - "standard_codec.cc" -) -list(TRANSFORM CPP_WRAPPER_SOURCES_CORE PREPEND "${WRAPPER_ROOT}/") -list(APPEND CPP_WRAPPER_SOURCES_PLUGIN - "plugin_registrar.cc" -) -list(TRANSFORM CPP_WRAPPER_SOURCES_PLUGIN PREPEND "${WRAPPER_ROOT}/") -list(APPEND CPP_WRAPPER_SOURCES_APP - "flutter_engine.cc" - "flutter_view_controller.cc" -) -list(TRANSFORM CPP_WRAPPER_SOURCES_APP PREPEND "${WRAPPER_ROOT}/") - -# Wrapper sources needed for a plugin. -add_library(flutter_wrapper_plugin STATIC - ${CPP_WRAPPER_SOURCES_CORE} - ${CPP_WRAPPER_SOURCES_PLUGIN} -) -apply_standard_settings(flutter_wrapper_plugin) -set_target_properties(flutter_wrapper_plugin PROPERTIES - POSITION_INDEPENDENT_CODE ON) -set_target_properties(flutter_wrapper_plugin PROPERTIES - CXX_VISIBILITY_PRESET hidden) -target_link_libraries(flutter_wrapper_plugin PUBLIC flutter) -target_include_directories(flutter_wrapper_plugin PUBLIC - "${WRAPPER_ROOT}/include" -) -add_dependencies(flutter_wrapper_plugin flutter_assemble) - -# Wrapper sources needed for the runner. -add_library(flutter_wrapper_app STATIC - ${CPP_WRAPPER_SOURCES_CORE} - ${CPP_WRAPPER_SOURCES_APP} -) -apply_standard_settings(flutter_wrapper_app) -target_link_libraries(flutter_wrapper_app PUBLIC flutter) -target_include_directories(flutter_wrapper_app PUBLIC - "${WRAPPER_ROOT}/include" -) -add_dependencies(flutter_wrapper_app flutter_assemble) - -# === Flutter tool backend === -# _phony_ is a non-existent file to force this command to run every time, -# since currently there's no way to get a full input/output list from the -# flutter tool. -set(PHONY_OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/_phony_") -set_source_files_properties("${PHONY_OUTPUT}" PROPERTIES SYMBOLIC TRUE) -add_custom_command( - OUTPUT ${FLUTTER_LIBRARY} ${FLUTTER_LIBRARY_HEADERS} - ${CPP_WRAPPER_SOURCES_CORE} ${CPP_WRAPPER_SOURCES_PLUGIN} - ${CPP_WRAPPER_SOURCES_APP} - ${PHONY_OUTPUT} - COMMAND ${CMAKE_COMMAND} -E env - ${FLUTTER_TOOL_ENVIRONMENT} - "${FLUTTER_ROOT}/packages/flutter_tools/bin/tool_backend.bat" - ${FLUTTER_TARGET_PLATFORM} $ - VERBATIM -) -add_custom_target(flutter_assemble DEPENDS - "${FLUTTER_LIBRARY}" - ${FLUTTER_LIBRARY_HEADERS} - ${CPP_WRAPPER_SOURCES_CORE} - ${CPP_WRAPPER_SOURCES_PLUGIN} - ${CPP_WRAPPER_SOURCES_APP} -) diff --git a/windows/flutter/generated_plugin_registrant.cc b/windows/flutter/generated_plugin_registrant.cc deleted file mode 100644 index 8d54613..0000000 --- a/windows/flutter/generated_plugin_registrant.cc +++ /dev/null @@ -1,20 +0,0 @@ -// -// Generated file. Do not edit. -// - -// clang-format off - -#include "generated_plugin_registrant.h" - -#include -#include -#include - -void RegisterPlugins(flutter::PluginRegistry* registry) { - EmojiPickerFlutterPluginCApiRegisterWithRegistrar( - registry->GetRegistrarForPlugin("EmojiPickerFlutterPluginCApi")); - FlutterSecureStorageWindowsPluginRegisterWithRegistrar( - registry->GetRegistrarForPlugin("FlutterSecureStorageWindowsPlugin")); - PermissionHandlerWindowsPluginRegisterWithRegistrar( - registry->GetRegistrarForPlugin("PermissionHandlerWindowsPlugin")); -} diff --git a/windows/flutter/generated_plugin_registrant.h b/windows/flutter/generated_plugin_registrant.h deleted file mode 100644 index dc139d8..0000000 --- a/windows/flutter/generated_plugin_registrant.h +++ /dev/null @@ -1,15 +0,0 @@ -// -// Generated file. Do not edit. -// - -// clang-format off - -#ifndef GENERATED_PLUGIN_REGISTRANT_ -#define GENERATED_PLUGIN_REGISTRANT_ - -#include - -// Registers Flutter plugins. -void RegisterPlugins(flutter::PluginRegistry* registry); - -#endif // GENERATED_PLUGIN_REGISTRANT_ diff --git a/windows/flutter/generated_plugins.cmake b/windows/flutter/generated_plugins.cmake deleted file mode 100644 index 138b578..0000000 --- a/windows/flutter/generated_plugins.cmake +++ /dev/null @@ -1,26 +0,0 @@ -# -# Generated file, do not edit. -# - -list(APPEND FLUTTER_PLUGIN_LIST - emoji_picker_flutter - flutter_secure_storage_windows - permission_handler_windows -) - -list(APPEND FLUTTER_FFI_PLUGIN_LIST -) - -set(PLUGIN_BUNDLED_LIBRARIES) - -foreach(plugin ${FLUTTER_PLUGIN_LIST}) - add_subdirectory(flutter/ephemeral/.plugin_symlinks/${plugin}/windows plugins/${plugin}) - target_link_libraries(${BINARY_NAME} PRIVATE ${plugin}_plugin) - list(APPEND PLUGIN_BUNDLED_LIBRARIES $) - list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${plugin}_bundled_libraries}) -endforeach(plugin) - -foreach(ffi_plugin ${FLUTTER_FFI_PLUGIN_LIST}) - add_subdirectory(flutter/ephemeral/.plugin_symlinks/${ffi_plugin}/windows plugins/${ffi_plugin}) - list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${ffi_plugin}_bundled_libraries}) -endforeach(ffi_plugin) diff --git a/windows/runner/CMakeLists.txt b/windows/runner/CMakeLists.txt deleted file mode 100644 index 394917c..0000000 --- a/windows/runner/CMakeLists.txt +++ /dev/null @@ -1,40 +0,0 @@ -cmake_minimum_required(VERSION 3.14) -project(runner LANGUAGES CXX) - -# Define the application target. To change its name, change BINARY_NAME in the -# top-level CMakeLists.txt, not the value here, or `flutter run` will no longer -# work. -# -# Any new source files that you add to the application should be added here. -add_executable(${BINARY_NAME} WIN32 - "flutter_window.cpp" - "main.cpp" - "utils.cpp" - "win32_window.cpp" - "${FLUTTER_MANAGED_DIR}/generated_plugin_registrant.cc" - "Runner.rc" - "runner.exe.manifest" -) - -# Apply the standard set of build settings. This can be removed for applications -# that need different build settings. -apply_standard_settings(${BINARY_NAME}) - -# Add preprocessor definitions for the build version. -target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION=\"${FLUTTER_VERSION}\"") -target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION_MAJOR=${FLUTTER_VERSION_MAJOR}") -target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION_MINOR=${FLUTTER_VERSION_MINOR}") -target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION_PATCH=${FLUTTER_VERSION_PATCH}") -target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION_BUILD=${FLUTTER_VERSION_BUILD}") - -# Disable Windows macros that collide with C++ standard library functions. -target_compile_definitions(${BINARY_NAME} PRIVATE "NOMINMAX") - -# Add dependency libraries and include directories. Add any application-specific -# dependencies here. -target_link_libraries(${BINARY_NAME} PRIVATE flutter flutter_wrapper_app) -target_link_libraries(${BINARY_NAME} PRIVATE "dwmapi.lib") -target_include_directories(${BINARY_NAME} PRIVATE "${CMAKE_SOURCE_DIR}") - -# Run the Flutter tool portions of the build. This must not be removed. -add_dependencies(${BINARY_NAME} flutter_assemble) diff --git a/windows/runner/Runner.rc b/windows/runner/Runner.rc deleted file mode 100644 index 5cd677d..0000000 --- a/windows/runner/Runner.rc +++ /dev/null @@ -1,121 +0,0 @@ -// Microsoft Visual C++ generated resource script. -// -#pragma code_page(65001) -#include "resource.h" - -#define APSTUDIO_READONLY_SYMBOLS -///////////////////////////////////////////////////////////////////////////// -// -// Generated from the TEXTINCLUDE 2 resource. -// -#include "winres.h" - -///////////////////////////////////////////////////////////////////////////// -#undef APSTUDIO_READONLY_SYMBOLS - -///////////////////////////////////////////////////////////////////////////// -// English (United States) resources - -#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) -LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US - -#ifdef APSTUDIO_INVOKED -///////////////////////////////////////////////////////////////////////////// -// -// TEXTINCLUDE -// - -1 TEXTINCLUDE -BEGIN - "resource.h\0" -END - -2 TEXTINCLUDE -BEGIN - "#include ""winres.h""\r\n" - "\0" -END - -3 TEXTINCLUDE -BEGIN - "\r\n" - "\0" -END - -#endif // APSTUDIO_INVOKED - - -///////////////////////////////////////////////////////////////////////////// -// -// Icon -// - -// Icon with lowest ID value placed first to ensure application icon -// remains consistent on all systems. -IDI_APP_ICON ICON "resources\\app_icon.ico" - - -///////////////////////////////////////////////////////////////////////////// -// -// Version -// - -#if defined(FLUTTER_VERSION_MAJOR) && defined(FLUTTER_VERSION_MINOR) && defined(FLUTTER_VERSION_PATCH) && defined(FLUTTER_VERSION_BUILD) -#define VERSION_AS_NUMBER FLUTTER_VERSION_MAJOR,FLUTTER_VERSION_MINOR,FLUTTER_VERSION_PATCH,FLUTTER_VERSION_BUILD -#else -#define VERSION_AS_NUMBER 1,0,0,0 -#endif - -#if defined(FLUTTER_VERSION) -#define VERSION_AS_STRING FLUTTER_VERSION -#else -#define VERSION_AS_STRING "1.0.0" -#endif - -VS_VERSION_INFO VERSIONINFO - FILEVERSION VERSION_AS_NUMBER - PRODUCTVERSION VERSION_AS_NUMBER - FILEFLAGSMASK VS_FFI_FILEFLAGSMASK -#ifdef _DEBUG - FILEFLAGS VS_FF_DEBUG -#else - FILEFLAGS 0x0L -#endif - FILEOS VOS__WINDOWS32 - FILETYPE VFT_APP - FILESUBTYPE 0x0L -BEGIN - BLOCK "StringFileInfo" - BEGIN - BLOCK "040904e4" - BEGIN - VALUE "CompanyName", "com.example" "\0" - VALUE "FileDescription", "connect" "\0" - VALUE "FileVersion", VERSION_AS_STRING "\0" - VALUE "InternalName", "connect" "\0" - VALUE "LegalCopyright", "Copyright (C) 2024 com.example. All rights reserved." "\0" - VALUE "OriginalFilename", "connect.exe" "\0" - VALUE "ProductName", "connect" "\0" - VALUE "ProductVersion", VERSION_AS_STRING "\0" - END - END - BLOCK "VarFileInfo" - BEGIN - VALUE "Translation", 0x409, 1252 - END -END - -#endif // English (United States) resources -///////////////////////////////////////////////////////////////////////////// - - - -#ifndef APSTUDIO_INVOKED -///////////////////////////////////////////////////////////////////////////// -// -// Generated from the TEXTINCLUDE 3 resource. -// - - -///////////////////////////////////////////////////////////////////////////// -#endif // not APSTUDIO_INVOKED diff --git a/windows/runner/flutter_window.cpp b/windows/runner/flutter_window.cpp deleted file mode 100644 index 955ee30..0000000 --- a/windows/runner/flutter_window.cpp +++ /dev/null @@ -1,71 +0,0 @@ -#include "flutter_window.h" - -#include - -#include "flutter/generated_plugin_registrant.h" - -FlutterWindow::FlutterWindow(const flutter::DartProject& project) - : project_(project) {} - -FlutterWindow::~FlutterWindow() {} - -bool FlutterWindow::OnCreate() { - if (!Win32Window::OnCreate()) { - return false; - } - - RECT frame = GetClientArea(); - - // The size here must match the window dimensions to avoid unnecessary surface - // creation / destruction in the startup path. - flutter_controller_ = std::make_unique( - frame.right - frame.left, frame.bottom - frame.top, project_); - // Ensure that basic setup of the controller was successful. - if (!flutter_controller_->engine() || !flutter_controller_->view()) { - return false; - } - RegisterPlugins(flutter_controller_->engine()); - SetChildContent(flutter_controller_->view()->GetNativeWindow()); - - flutter_controller_->engine()->SetNextFrameCallback([&]() { - this->Show(); - }); - - // Flutter can complete the first frame before the "show window" callback is - // registered. The following call ensures a frame is pending to ensure the - // window is shown. It is a no-op if the first frame hasn't completed yet. - flutter_controller_->ForceRedraw(); - - return true; -} - -void FlutterWindow::OnDestroy() { - if (flutter_controller_) { - flutter_controller_ = nullptr; - } - - Win32Window::OnDestroy(); -} - -LRESULT -FlutterWindow::MessageHandler(HWND hwnd, UINT const message, - WPARAM const wparam, - LPARAM const lparam) noexcept { - // Give Flutter, including plugins, an opportunity to handle window messages. - if (flutter_controller_) { - std::optional result = - flutter_controller_->HandleTopLevelWindowProc(hwnd, message, wparam, - lparam); - if (result) { - return *result; - } - } - - switch (message) { - case WM_FONTCHANGE: - flutter_controller_->engine()->ReloadSystemFonts(); - break; - } - - return Win32Window::MessageHandler(hwnd, message, wparam, lparam); -} diff --git a/windows/runner/flutter_window.h b/windows/runner/flutter_window.h deleted file mode 100644 index 6da0652..0000000 --- a/windows/runner/flutter_window.h +++ /dev/null @@ -1,33 +0,0 @@ -#ifndef RUNNER_FLUTTER_WINDOW_H_ -#define RUNNER_FLUTTER_WINDOW_H_ - -#include -#include - -#include - -#include "win32_window.h" - -// A window that does nothing but host a Flutter view. -class FlutterWindow : public Win32Window { - public: - // Creates a new FlutterWindow hosting a Flutter view running |project|. - explicit FlutterWindow(const flutter::DartProject& project); - virtual ~FlutterWindow(); - - protected: - // Win32Window: - bool OnCreate() override; - void OnDestroy() override; - LRESULT MessageHandler(HWND window, UINT const message, WPARAM const wparam, - LPARAM const lparam) noexcept override; - - private: - // The project to run. - flutter::DartProject project_; - - // The Flutter instance hosted by this window. - std::unique_ptr flutter_controller_; -}; - -#endif // RUNNER_FLUTTER_WINDOW_H_ diff --git a/windows/runner/main.cpp b/windows/runner/main.cpp deleted file mode 100644 index e5e5d90..0000000 --- a/windows/runner/main.cpp +++ /dev/null @@ -1,43 +0,0 @@ -#include -#include -#include - -#include "flutter_window.h" -#include "utils.h" - -int APIENTRY wWinMain(_In_ HINSTANCE instance, _In_opt_ HINSTANCE prev, - _In_ wchar_t *command_line, _In_ int show_command) { - // Attach to console when present (e.g., 'flutter run') or create a - // new console when running with a debugger. - if (!::AttachConsole(ATTACH_PARENT_PROCESS) && ::IsDebuggerPresent()) { - CreateAndAttachConsole(); - } - - // Initialize COM, so that it is available for use in the library and/or - // plugins. - ::CoInitializeEx(nullptr, COINIT_APARTMENTTHREADED); - - flutter::DartProject project(L"data"); - - std::vector command_line_arguments = - GetCommandLineArguments(); - - project.set_dart_entrypoint_arguments(std::move(command_line_arguments)); - - FlutterWindow window(project); - Win32Window::Point origin(10, 10); - Win32Window::Size size(1280, 720); - if (!window.Create(L"connect", origin, size)) { - return EXIT_FAILURE; - } - window.SetQuitOnClose(true); - - ::MSG msg; - while (::GetMessage(&msg, nullptr, 0, 0)) { - ::TranslateMessage(&msg); - ::DispatchMessage(&msg); - } - - ::CoUninitialize(); - return EXIT_SUCCESS; -} diff --git a/windows/runner/resource.h b/windows/runner/resource.h deleted file mode 100644 index 66a65d1..0000000 --- a/windows/runner/resource.h +++ /dev/null @@ -1,16 +0,0 @@ -//{{NO_DEPENDENCIES}} -// Microsoft Visual C++ generated include file. -// Used by Runner.rc -// -#define IDI_APP_ICON 101 - -// Next default values for new objects -// -#ifdef APSTUDIO_INVOKED -#ifndef APSTUDIO_READONLY_SYMBOLS -#define _APS_NEXT_RESOURCE_VALUE 102 -#define _APS_NEXT_COMMAND_VALUE 40001 -#define _APS_NEXT_CONTROL_VALUE 1001 -#define _APS_NEXT_SYMED_VALUE 101 -#endif -#endif diff --git a/windows/runner/resources/app_icon.ico b/windows/runner/resources/app_icon.ico deleted file mode 100644 index c04e20c..0000000 Binary files a/windows/runner/resources/app_icon.ico and /dev/null differ diff --git a/windows/runner/runner.exe.manifest b/windows/runner/runner.exe.manifest deleted file mode 100644 index 153653e..0000000 --- a/windows/runner/runner.exe.manifest +++ /dev/null @@ -1,14 +0,0 @@ - - - - - PerMonitorV2 - - - - - - - - - diff --git a/windows/runner/utils.cpp b/windows/runner/utils.cpp deleted file mode 100644 index 3a0b465..0000000 --- a/windows/runner/utils.cpp +++ /dev/null @@ -1,65 +0,0 @@ -#include "utils.h" - -#include -#include -#include -#include - -#include - -void CreateAndAttachConsole() { - if (::AllocConsole()) { - FILE *unused; - if (freopen_s(&unused, "CONOUT$", "w", stdout)) { - _dup2(_fileno(stdout), 1); - } - if (freopen_s(&unused, "CONOUT$", "w", stderr)) { - _dup2(_fileno(stdout), 2); - } - std::ios::sync_with_stdio(); - FlutterDesktopResyncOutputStreams(); - } -} - -std::vector GetCommandLineArguments() { - // Convert the UTF-16 command line arguments to UTF-8 for the Engine to use. - int argc; - wchar_t** argv = ::CommandLineToArgvW(::GetCommandLineW(), &argc); - if (argv == nullptr) { - return std::vector(); - } - - std::vector command_line_arguments; - - // Skip the first argument as it's the binary name. - for (int i = 1; i < argc; i++) { - command_line_arguments.push_back(Utf8FromUtf16(argv[i])); - } - - ::LocalFree(argv); - - return command_line_arguments; -} - -std::string Utf8FromUtf16(const wchar_t* utf16_string) { - if (utf16_string == nullptr) { - return std::string(); - } - unsigned int target_length = ::WideCharToMultiByte( - CP_UTF8, WC_ERR_INVALID_CHARS, utf16_string, - -1, nullptr, 0, nullptr, nullptr) - -1; // remove the trailing null character - int input_length = (int)wcslen(utf16_string); - std::string utf8_string; - if (target_length == 0 || target_length > utf8_string.max_size()) { - return utf8_string; - } - utf8_string.resize(target_length); - int converted_length = ::WideCharToMultiByte( - CP_UTF8, WC_ERR_INVALID_CHARS, utf16_string, - input_length, utf8_string.data(), target_length, nullptr, nullptr); - if (converted_length == 0) { - return std::string(); - } - return utf8_string; -} diff --git a/windows/runner/utils.h b/windows/runner/utils.h deleted file mode 100644 index 3879d54..0000000 --- a/windows/runner/utils.h +++ /dev/null @@ -1,19 +0,0 @@ -#ifndef RUNNER_UTILS_H_ -#define RUNNER_UTILS_H_ - -#include -#include - -// Creates a console for the process, and redirects stdout and stderr to -// it for both the runner and the Flutter library. -void CreateAndAttachConsole(); - -// Takes a null-terminated wchar_t* encoded in UTF-16 and returns a std::string -// encoded in UTF-8. Returns an empty std::string on failure. -std::string Utf8FromUtf16(const wchar_t* utf16_string); - -// Gets the command line arguments passed in as a std::vector, -// encoded in UTF-8. Returns an empty std::vector on failure. -std::vector GetCommandLineArguments(); - -#endif // RUNNER_UTILS_H_ diff --git a/windows/runner/win32_window.cpp b/windows/runner/win32_window.cpp deleted file mode 100644 index 60608d0..0000000 --- a/windows/runner/win32_window.cpp +++ /dev/null @@ -1,288 +0,0 @@ -#include "win32_window.h" - -#include -#include - -#include "resource.h" - -namespace { - -/// Window attribute that enables dark mode window decorations. -/// -/// Redefined in case the developer's machine has a Windows SDK older than -/// version 10.0.22000.0. -/// See: https://docs.microsoft.com/windows/win32/api/dwmapi/ne-dwmapi-dwmwindowattribute -#ifndef DWMWA_USE_IMMERSIVE_DARK_MODE -#define DWMWA_USE_IMMERSIVE_DARK_MODE 20 -#endif - -constexpr const wchar_t kWindowClassName[] = L"FLUTTER_RUNNER_WIN32_WINDOW"; - -/// Registry key for app theme preference. -/// -/// A value of 0 indicates apps should use dark mode. A non-zero or missing -/// value indicates apps should use light mode. -constexpr const wchar_t kGetPreferredBrightnessRegKey[] = - L"Software\\Microsoft\\Windows\\CurrentVersion\\Themes\\Personalize"; -constexpr const wchar_t kGetPreferredBrightnessRegValue[] = L"AppsUseLightTheme"; - -// The number of Win32Window objects that currently exist. -static int g_active_window_count = 0; - -using EnableNonClientDpiScaling = BOOL __stdcall(HWND hwnd); - -// Scale helper to convert logical scaler values to physical using passed in -// scale factor -int Scale(int source, double scale_factor) { - return static_cast(source * scale_factor); -} - -// Dynamically loads the |EnableNonClientDpiScaling| from the User32 module. -// This API is only needed for PerMonitor V1 awareness mode. -void EnableFullDpiSupportIfAvailable(HWND hwnd) { - HMODULE user32_module = LoadLibraryA("User32.dll"); - if (!user32_module) { - return; - } - auto enable_non_client_dpi_scaling = - reinterpret_cast( - GetProcAddress(user32_module, "EnableNonClientDpiScaling")); - if (enable_non_client_dpi_scaling != nullptr) { - enable_non_client_dpi_scaling(hwnd); - } - FreeLibrary(user32_module); -} - -} // namespace - -// Manages the Win32Window's window class registration. -class WindowClassRegistrar { - public: - ~WindowClassRegistrar() = default; - - // Returns the singleton registrar instance. - static WindowClassRegistrar* GetInstance() { - if (!instance_) { - instance_ = new WindowClassRegistrar(); - } - return instance_; - } - - // Returns the name of the window class, registering the class if it hasn't - // previously been registered. - const wchar_t* GetWindowClass(); - - // Unregisters the window class. Should only be called if there are no - // instances of the window. - void UnregisterWindowClass(); - - private: - WindowClassRegistrar() = default; - - static WindowClassRegistrar* instance_; - - bool class_registered_ = false; -}; - -WindowClassRegistrar* WindowClassRegistrar::instance_ = nullptr; - -const wchar_t* WindowClassRegistrar::GetWindowClass() { - if (!class_registered_) { - WNDCLASS window_class{}; - window_class.hCursor = LoadCursor(nullptr, IDC_ARROW); - window_class.lpszClassName = kWindowClassName; - window_class.style = CS_HREDRAW | CS_VREDRAW; - window_class.cbClsExtra = 0; - window_class.cbWndExtra = 0; - window_class.hInstance = GetModuleHandle(nullptr); - window_class.hIcon = - LoadIcon(window_class.hInstance, MAKEINTRESOURCE(IDI_APP_ICON)); - window_class.hbrBackground = 0; - window_class.lpszMenuName = nullptr; - window_class.lpfnWndProc = Win32Window::WndProc; - RegisterClass(&window_class); - class_registered_ = true; - } - return kWindowClassName; -} - -void WindowClassRegistrar::UnregisterWindowClass() { - UnregisterClass(kWindowClassName, nullptr); - class_registered_ = false; -} - -Win32Window::Win32Window() { - ++g_active_window_count; -} - -Win32Window::~Win32Window() { - --g_active_window_count; - Destroy(); -} - -bool Win32Window::Create(const std::wstring& title, - const Point& origin, - const Size& size) { - Destroy(); - - const wchar_t* window_class = - WindowClassRegistrar::GetInstance()->GetWindowClass(); - - const POINT target_point = {static_cast(origin.x), - static_cast(origin.y)}; - HMONITOR monitor = MonitorFromPoint(target_point, MONITOR_DEFAULTTONEAREST); - UINT dpi = FlutterDesktopGetDpiForMonitor(monitor); - double scale_factor = dpi / 96.0; - - HWND window = CreateWindow( - window_class, title.c_str(), WS_OVERLAPPEDWINDOW, - Scale(origin.x, scale_factor), Scale(origin.y, scale_factor), - Scale(size.width, scale_factor), Scale(size.height, scale_factor), - nullptr, nullptr, GetModuleHandle(nullptr), this); - - if (!window) { - return false; - } - - UpdateTheme(window); - - return OnCreate(); -} - -bool Win32Window::Show() { - return ShowWindow(window_handle_, SW_SHOWNORMAL); -} - -// static -LRESULT CALLBACK Win32Window::WndProc(HWND const window, - UINT const message, - WPARAM const wparam, - LPARAM const lparam) noexcept { - if (message == WM_NCCREATE) { - auto window_struct = reinterpret_cast(lparam); - SetWindowLongPtr(window, GWLP_USERDATA, - reinterpret_cast(window_struct->lpCreateParams)); - - auto that = static_cast(window_struct->lpCreateParams); - EnableFullDpiSupportIfAvailable(window); - that->window_handle_ = window; - } else if (Win32Window* that = GetThisFromHandle(window)) { - return that->MessageHandler(window, message, wparam, lparam); - } - - return DefWindowProc(window, message, wparam, lparam); -} - -LRESULT -Win32Window::MessageHandler(HWND hwnd, - UINT const message, - WPARAM const wparam, - LPARAM const lparam) noexcept { - switch (message) { - case WM_DESTROY: - window_handle_ = nullptr; - Destroy(); - if (quit_on_close_) { - PostQuitMessage(0); - } - return 0; - - case WM_DPICHANGED: { - auto newRectSize = reinterpret_cast(lparam); - LONG newWidth = newRectSize->right - newRectSize->left; - LONG newHeight = newRectSize->bottom - newRectSize->top; - - SetWindowPos(hwnd, nullptr, newRectSize->left, newRectSize->top, newWidth, - newHeight, SWP_NOZORDER | SWP_NOACTIVATE); - - return 0; - } - case WM_SIZE: { - RECT rect = GetClientArea(); - if (child_content_ != nullptr) { - // Size and position the child window. - MoveWindow(child_content_, rect.left, rect.top, rect.right - rect.left, - rect.bottom - rect.top, TRUE); - } - return 0; - } - - case WM_ACTIVATE: - if (child_content_ != nullptr) { - SetFocus(child_content_); - } - return 0; - - case WM_DWMCOLORIZATIONCOLORCHANGED: - UpdateTheme(hwnd); - return 0; - } - - return DefWindowProc(window_handle_, message, wparam, lparam); -} - -void Win32Window::Destroy() { - OnDestroy(); - - if (window_handle_) { - DestroyWindow(window_handle_); - window_handle_ = nullptr; - } - if (g_active_window_count == 0) { - WindowClassRegistrar::GetInstance()->UnregisterWindowClass(); - } -} - -Win32Window* Win32Window::GetThisFromHandle(HWND const window) noexcept { - return reinterpret_cast( - GetWindowLongPtr(window, GWLP_USERDATA)); -} - -void Win32Window::SetChildContent(HWND content) { - child_content_ = content; - SetParent(content, window_handle_); - RECT frame = GetClientArea(); - - MoveWindow(content, frame.left, frame.top, frame.right - frame.left, - frame.bottom - frame.top, true); - - SetFocus(child_content_); -} - -RECT Win32Window::GetClientArea() { - RECT frame; - GetClientRect(window_handle_, &frame); - return frame; -} - -HWND Win32Window::GetHandle() { - return window_handle_; -} - -void Win32Window::SetQuitOnClose(bool quit_on_close) { - quit_on_close_ = quit_on_close; -} - -bool Win32Window::OnCreate() { - // No-op; provided for subclasses. - return true; -} - -void Win32Window::OnDestroy() { - // No-op; provided for subclasses. -} - -void Win32Window::UpdateTheme(HWND const window) { - DWORD light_mode; - DWORD light_mode_size = sizeof(light_mode); - LSTATUS result = RegGetValue(HKEY_CURRENT_USER, kGetPreferredBrightnessRegKey, - kGetPreferredBrightnessRegValue, - RRF_RT_REG_DWORD, nullptr, &light_mode, - &light_mode_size); - - if (result == ERROR_SUCCESS) { - BOOL enable_dark_mode = light_mode == 0; - DwmSetWindowAttribute(window, DWMWA_USE_IMMERSIVE_DARK_MODE, - &enable_dark_mode, sizeof(enable_dark_mode)); - } -} diff --git a/windows/runner/win32_window.h b/windows/runner/win32_window.h deleted file mode 100644 index e901dde..0000000 --- a/windows/runner/win32_window.h +++ /dev/null @@ -1,102 +0,0 @@ -#ifndef RUNNER_WIN32_WINDOW_H_ -#define RUNNER_WIN32_WINDOW_H_ - -#include - -#include -#include -#include - -// A class abstraction for a high DPI-aware Win32 Window. Intended to be -// inherited from by classes that wish to specialize with custom -// rendering and input handling -class Win32Window { - public: - struct Point { - unsigned int x; - unsigned int y; - Point(unsigned int x, unsigned int y) : x(x), y(y) {} - }; - - struct Size { - unsigned int width; - unsigned int height; - Size(unsigned int width, unsigned int height) - : width(width), height(height) {} - }; - - Win32Window(); - virtual ~Win32Window(); - - // Creates a win32 window with |title| that is positioned and sized using - // |origin| and |size|. New windows are created on the default monitor. Window - // sizes are specified to the OS in physical pixels, hence to ensure a - // consistent size this function will scale the inputted width and height as - // as appropriate for the default monitor. The window is invisible until - // |Show| is called. Returns true if the window was created successfully. - bool Create(const std::wstring& title, const Point& origin, const Size& size); - - // Show the current window. Returns true if the window was successfully shown. - bool Show(); - - // Release OS resources associated with window. - void Destroy(); - - // Inserts |content| into the window tree. - void SetChildContent(HWND content); - - // Returns the backing Window handle to enable clients to set icon and other - // window properties. Returns nullptr if the window has been destroyed. - HWND GetHandle(); - - // If true, closing this window will quit the application. - void SetQuitOnClose(bool quit_on_close); - - // Return a RECT representing the bounds of the current client area. - RECT GetClientArea(); - - protected: - // Processes and route salient window messages for mouse handling, - // size change and DPI. Delegates handling of these to member overloads that - // inheriting classes can handle. - virtual LRESULT MessageHandler(HWND window, - UINT const message, - WPARAM const wparam, - LPARAM const lparam) noexcept; - - // Called when CreateAndShow is called, allowing subclass window-related - // setup. Subclasses should return false if setup fails. - virtual bool OnCreate(); - - // Called when Destroy is called. - virtual void OnDestroy(); - - private: - friend class WindowClassRegistrar; - - // OS callback called by message pump. Handles the WM_NCCREATE message which - // is passed when the non-client area is being created and enables automatic - // non-client DPI scaling so that the non-client area automatically - // responds to changes in DPI. All other messages are handled by - // MessageHandler. - static LRESULT CALLBACK WndProc(HWND const window, - UINT const message, - WPARAM const wparam, - LPARAM const lparam) noexcept; - - // Retrieves a class instance pointer for |window| - static Win32Window* GetThisFromHandle(HWND const window) noexcept; - - // Update the window frame's theme to match the system theme. - static void UpdateTheme(HWND const window); - - bool quit_on_close_ = false; - - // window handle for top level window. - HWND window_handle_ = nullptr; - - // window handle for hosted content. - HWND child_content_ = nullptr; -}; - -#endif // RUNNER_WIN32_WINDOW_H_