├── app ├── .gitignore ├── src │ ├── test │ │ └── resources │ │ │ └── org.robolectric.Config.properties │ └── main │ │ ├── assets │ │ └── README.txt │ │ ├── res │ │ ├── drawable-nodpi │ │ │ ├── p2.png │ │ │ ├── p3.png │ │ │ ├── p4.png │ │ │ ├── welcome.png │ │ │ ├── logo_icon_300.png │ │ │ ├── logo_text_256.png │ │ │ ├── logo_vert_text_300.png │ │ │ └── logo_loading_icon_300.png │ │ ├── drawable-hdpi │ │ │ ├── ic_qrcode.png │ │ │ ├── ic_check_grey600_24dp.png │ │ │ ├── ic_close_grey600_24dp.png │ │ │ ├── ic_error_white_36dp.png │ │ │ ├── ic_folder_white_36dp.png │ │ │ ├── ic_refresh_white_36dp.png │ │ │ ├── ic_folder_grey600_36dp.png │ │ │ ├── ic_cloud_circle_white_24dp.png │ │ │ ├── ic_computer_grey600_36dp.png │ │ │ ├── ic_more_vert_grey600_24dp.png │ │ │ ├── ic_settings_grey600_36dp.png │ │ │ └── ic_dots_vertical_grey600_24dp.png │ │ ├── drawable-xhdpi │ │ │ ├── ic_qrcode.png │ │ │ ├── ic_error_white_36dp.png │ │ │ ├── ic_folder_white_36dp.png │ │ │ ├── ic_check_grey600_24dp.png │ │ │ ├── ic_close_grey600_24dp.png │ │ │ ├── ic_folder_grey600_36dp.png │ │ │ ├── ic_refresh_white_36dp.png │ │ │ ├── ic_computer_grey600_36dp.png │ │ │ ├── ic_more_vert_grey600_24dp.png │ │ │ ├── ic_settings_grey600_36dp.png │ │ │ ├── ic_cloud_circle_white_24dp.png │ │ │ └── ic_dots_vertical_grey600_24dp.png │ │ ├── drawable-xxhdpi │ │ │ ├── ic_qrcode.png │ │ │ ├── ic_error_white_36dp.png │ │ │ ├── ic_check_grey600_24dp.png │ │ │ ├── ic_close_grey600_24dp.png │ │ │ ├── ic_folder_white_36dp.png │ │ │ ├── ic_refresh_white_36dp.png │ │ │ ├── ic_computer_grey600_36dp.png │ │ │ ├── ic_folder_grey600_36dp.png │ │ │ ├── ic_settings_grey600_36dp.png │ │ │ ├── ic_cloud_circle_white_24dp.png │ │ │ ├── ic_more_vert_grey600_24dp.png │ │ │ └── ic_dots_vertical_grey600_24dp.png │ │ ├── mipmap-hdpi │ │ │ └── ic_launcher.png │ │ ├── mipmap-xhdpi │ │ │ └── ic_launcher.png │ │ ├── mipmap-xxhdpi │ │ │ └── ic_launcher.png │ │ ├── drawable-xxxhdpi │ │ │ ├── ic_error_white_36dp.png │ │ │ ├── ic_folder_white_36dp.png │ │ │ ├── ic_check_grey600_24dp.png │ │ │ ├── ic_close_grey600_24dp.png │ │ │ ├── ic_folder_grey600_36dp.png │ │ │ ├── ic_refresh_white_36dp.png │ │ │ ├── ic_computer_grey600_36dp.png │ │ │ ├── ic_more_vert_grey600_24dp.png │ │ │ ├── ic_settings_grey600_36dp.png │ │ │ ├── ic_cloud_circle_white_24dp.png │ │ │ └── ic_dots_vertical_grey600_24dp.png │ │ ├── drawable-mdpi │ │ │ └── ic_dots_vertical_grey600_24dp.png │ │ ├── anim │ │ │ └── rotate_indefinitely.xml │ │ ├── drawable-v21 │ │ │ └── dots_vertical_grey600_24dp.xml │ │ ├── values-large │ │ │ └── themes.xml │ │ ├── values │ │ │ ├── dimens.xml │ │ │ └── arrays.xml │ │ ├── drawable │ │ │ └── dots_vertical_grey600_24dp.xml │ │ ├── xml │ │ │ └── prefs_ui.xml │ │ ├── menu │ │ │ ├── new_folder.xml │ │ │ ├── folder_ignores.xml │ │ │ ├── service_settings.xml │ │ │ ├── apikey_overflow.xml │ │ │ └── popup_login_manage.xml │ │ ├── layout │ │ │ ├── activity_login.xml │ │ │ ├── banner.xml │ │ │ └── session_header.xml │ │ └── values-v21 │ │ │ └── themes.xml │ │ └── java │ │ ├── org │ │ └── opensilk │ │ │ └── common │ │ │ └── rx │ │ │ └── RxBus.java │ │ └── syncthing │ │ ├── api │ │ ├── SessionScope.java │ │ ├── NullHostNameVerifier.java │ │ ├── SessionManagerComponent.java │ │ ├── SessionComponent.java │ │ └── SessionModule.java │ │ └── android │ │ ├── ui │ │ ├── binding │ │ │ ├── ViewBinderComponent.java │ │ │ ├── ViewBinder.java │ │ │ └── BindingSubscriptionsHolder.java │ │ ├── common │ │ │ ├── Expandable.java │ │ │ └── ActivityRequestCodes.java │ │ ├── SyncthingActivityModule.java │ │ ├── welcome │ │ │ ├── WelcomePageComponent.java │ │ │ ├── WelcomePage0.java │ │ │ ├── WelcomePage1.java │ │ │ ├── WelcomePage2.java │ │ │ ├── WelcomePage3.java │ │ │ ├── WelcomePage4.java │ │ │ ├── WelcomePage5.java │ │ │ └── WelcomeFragment.java │ │ ├── session │ │ │ ├── HeaderCardView.java │ │ │ ├── SessionModule.java │ │ │ ├── NotifCardRej.java │ │ │ └── NotifCardRestart.java │ │ ├── settings │ │ │ ├── SettingsActivityComponent.java │ │ │ └── UiSettingsFragment.java │ │ ├── sessionsettings │ │ │ ├── SettingsComponent.java │ │ │ ├── EditDeviceComponent.java │ │ │ ├── EditFolderComponent.java │ │ │ └── EditIgnoresComponent.java │ │ └── login │ │ │ └── ManageFragment.java │ │ ├── service │ │ ├── SyncthingInstanceScope.java │ │ └── SyncthingInstanceModule.java │ │ └── identicon │ │ ├── IdenticonComponent.java │ │ └── IdenticonBinding.java └── proguard-rules.pro ├── common-core ├── .gitignore └── src │ └── main │ ├── java │ └── org │ │ └── opensilk │ │ └── common │ │ └── core │ │ ├── mortar │ │ └── HasScope.java │ │ ├── dagger2 │ │ ├── ForActivity.java │ │ ├── ForApplication.java │ │ ├── ScreenScope.java │ │ ├── SubScreenScope.java │ │ ├── ActivityScope.java │ │ └── ForScreen.java │ │ ├── rx │ │ ├── HoldsSubscription.java │ │ ├── SimpleObserver.java │ │ └── RxLoader.java │ │ └── app │ │ └── SimpleComponentCallbacks.java │ └── AndroidManifest.xml ├── common-ui ├── .gitignore └── src │ └── main │ ├── java │ └── org │ │ └── opensilk │ │ └── common │ │ └── ui │ │ ├── mortar │ │ ├── ComponentFactory.java │ │ ├── WithComponentFactory.java │ │ ├── WithComponent.java │ │ ├── HasName.java │ │ ├── ActivityResultsListener.java │ │ ├── HasOptionsMenu.java │ │ ├── Lifecycle.java │ │ ├── DrawerOwnerActivity.java │ │ ├── DialogPresenterActivity.java │ │ ├── DialogFactory.java │ │ ├── DrawerController.java │ │ ├── ActionModeActivity.java │ │ ├── DrawerListenerRegistrar.java │ │ ├── ScreenTitle.java │ │ ├── ActivityResultsOwnerModule.java │ │ ├── ActivityResultsActivity.java │ │ ├── ActivityResultsController.java │ │ └── ToolbarOwnerActivity.java │ │ ├── mortarfragment │ │ └── FragmentManagerOwnerActivity.java │ │ ├── recycler │ │ ├── NoDecorate.java │ │ └── DragSwipeViewHolder.java │ │ └── impl │ │ └── SimpleAnimationListener.java │ ├── res │ ├── values-sw600dp │ │ ├── theme_base.xml │ │ └── dimens.xml │ ├── values-sw600dp-land │ │ └── dimens.xml │ ├── values-sw800dp-land │ │ └── theme_base.xml │ ├── values │ │ ├── ids.xml │ │ └── strings.xml │ ├── values-land │ │ └── dimens.xml │ ├── values-sw320dp │ │ └── dimens.xml │ ├── values-sw360dp │ │ └── dimens.xml │ ├── values-sw384dp │ │ └── dimens.xml │ ├── values-v21 │ │ ├── dimens.xml │ │ └── styles_material.xml │ ├── layout │ │ ├── mtrl_list_item_oneline_text.xml │ │ ├── mtrl_list_item_oneline_icontext.xml │ │ ├── mtrl_list_item_twoline_avatartext.xml │ │ └── mtrl_list_item_twoline_textcontainer.xml │ ├── animator-v21 │ │ └── fab_elevation.xml │ ├── values-large │ │ └── dimens.xml │ ├── values-sw760dp │ │ └── dimens.xml │ ├── values-sw800dp │ │ └── dimens.xml │ └── values-xlarge │ │ └── dimens.xml │ └── AndroidManifest.xml ├── app-rest-client ├── .gitignore ├── src │ ├── test │ │ └── resources │ │ │ ├── org.robolectric.Config.properties │ │ │ └── event_downloadprogress.json │ └── main │ │ ├── AndroidManifest.xml │ │ └── java │ │ └── syncthing │ │ └── api │ │ ├── model │ │ ├── Ok.java │ │ ├── Ping.java │ │ ├── FolderStats.java │ │ ├── ConfigStats.java │ │ ├── DeviceId.java │ │ ├── SystemMessage.java │ │ ├── Connections.java │ │ ├── LastFile.java │ │ ├── Completion.java │ │ ├── SystemErrors.java │ │ ├── SystemMessages.java │ │ ├── Need.java │ │ ├── event │ │ │ ├── Ping.java │ │ │ ├── StartupComplete.java │ │ │ ├── UnknownEvent.java │ │ │ ├── ConfigSaved.java │ │ │ ├── Starting.java │ │ │ ├── DeviceResumed.java │ │ │ ├── DevicePaused.java │ │ │ ├── DeviceRejected.java │ │ │ ├── FolderRejected.java │ │ │ ├── LocalIndexUpdated.java │ │ │ ├── DeviceDisconnected.java │ │ │ ├── Event.java │ │ │ ├── FolderCompletion.java │ │ │ ├── RemoteIndexUpdated.java │ │ │ ├── DeviceConnected.java │ │ │ ├── FolderScanProgress.java │ │ │ ├── ItemStarted.java │ │ │ ├── StateChanged.java │ │ │ ├── RelayStateChanged.java │ │ │ ├── ItemFinished.java │ │ │ ├── DeviceDiscovered.java │ │ │ ├── FolderErrors.java │ │ │ └── FolderSummary.java │ │ ├── JsonDBFileInfo.java │ │ ├── Ignores.java │ │ ├── Compression.java │ │ ├── ItemAction.java │ │ ├── DeviceStats.java │ │ ├── ModelState.java │ │ ├── VersioningType.java │ │ ├── ConnectionType.java │ │ ├── Config.java │ │ ├── PullOrder.java │ │ ├── Versioning.java │ │ ├── VersioningNone.java │ │ ├── ConnectionInfo.java │ │ ├── Model.java │ │ ├── GUIConfig.java │ │ ├── FolderDeviceConfig.java │ │ └── SystemInfo.java │ │ └── ApiUtils.java └── proguard-rules.pro ├── golang └── .gitignore ├── settings.gradle ├── screenshots ├── p1.graffle ├── p2.graffle ├── p3.graffle ├── p4.graffle └── logo_text_300.png ├── make-docker-image.bash ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── .gitignore ├── make-all-mac.bash ├── notices ├── syncthing.txt ├── rxandroid.txt ├── mortar.txt ├── okhttp.txt ├── retrofit.txt ├── timber.txt ├── butterknife.txt ├── gson.txt ├── dagger.txt ├── joda-time.txt ├── android-support-v4.txt ├── android-support-v7-appcompat.txt ├── android-support-v7-cardview.txt ├── android-support-v7-recyclerview.txt ├── zt-zip.txt ├── commons-io.txt └── commons-lang3.txt ├── make-all.bash ├── .gitmodules ├── TODO ├── docker └── do-build.sh ├── make-syncthing-docker.bash └── gradle.properties /app/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /common-core/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /common-ui/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /app-rest-client/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /golang/.gitignore: -------------------------------------------------------------------------------- 1 | /dist 2 | /build 3 | -------------------------------------------------------------------------------- /app/src/test/resources/org.robolectric.Config.properties: -------------------------------------------------------------------------------- 1 | emulateSdk=18 2 | -------------------------------------------------------------------------------- /app/src/main/assets/README.txt: -------------------------------------------------------------------------------- 1 | Copy the syncthing binary here... Its in gitignore -------------------------------------------------------------------------------- /app-rest-client/src/test/resources/org.robolectric.Config.properties: -------------------------------------------------------------------------------- 1 | emulateSdk=18 2 | -------------------------------------------------------------------------------- /settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app', 'app-rest-client' 2 | include ':common-core', ':common-ui' 3 | -------------------------------------------------------------------------------- /screenshots/p1.graffle: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenSilk/SyncthingAndroid/HEAD/screenshots/p1.graffle -------------------------------------------------------------------------------- /screenshots/p2.graffle: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenSilk/SyncthingAndroid/HEAD/screenshots/p2.graffle -------------------------------------------------------------------------------- /screenshots/p3.graffle: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenSilk/SyncthingAndroid/HEAD/screenshots/p3.graffle -------------------------------------------------------------------------------- /screenshots/p4.graffle: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenSilk/SyncthingAndroid/HEAD/screenshots/p4.graffle -------------------------------------------------------------------------------- /make-docker-image.bash: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | docker build --force-rm=true -t syncthing-build-android docker -------------------------------------------------------------------------------- /screenshots/logo_text_300.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenSilk/SyncthingAndroid/HEAD/screenshots/logo_text_300.png -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenSilk/SyncthingAndroid/HEAD/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .gradle 2 | /local.properties 3 | /.idea 4 | .DS_Store 5 | /build 6 | *.iml 7 | 8 | /app/src/main/assets/syncthing* 9 | -------------------------------------------------------------------------------- /app/src/main/res/drawable-nodpi/p2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenSilk/SyncthingAndroid/HEAD/app/src/main/res/drawable-nodpi/p2.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-nodpi/p3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenSilk/SyncthingAndroid/HEAD/app/src/main/res/drawable-nodpi/p3.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-nodpi/p4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenSilk/SyncthingAndroid/HEAD/app/src/main/res/drawable-nodpi/p4.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-nodpi/welcome.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenSilk/SyncthingAndroid/HEAD/app/src/main/res/drawable-nodpi/welcome.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_qrcode.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenSilk/SyncthingAndroid/HEAD/app/src/main/res/drawable-hdpi/ic_qrcode.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_qrcode.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenSilk/SyncthingAndroid/HEAD/app/src/main/res/drawable-xhdpi/ic_qrcode.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_qrcode.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenSilk/SyncthingAndroid/HEAD/app/src/main/res/drawable-xxhdpi/ic_qrcode.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenSilk/SyncthingAndroid/HEAD/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenSilk/SyncthingAndroid/HEAD/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenSilk/SyncthingAndroid/HEAD/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-nodpi/logo_icon_300.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenSilk/SyncthingAndroid/HEAD/app/src/main/res/drawable-nodpi/logo_icon_300.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-nodpi/logo_text_256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenSilk/SyncthingAndroid/HEAD/app/src/main/res/drawable-nodpi/logo_text_256.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_check_grey600_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenSilk/SyncthingAndroid/HEAD/app/src/main/res/drawable-hdpi/ic_check_grey600_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_close_grey600_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenSilk/SyncthingAndroid/HEAD/app/src/main/res/drawable-hdpi/ic_close_grey600_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_error_white_36dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenSilk/SyncthingAndroid/HEAD/app/src/main/res/drawable-hdpi/ic_error_white_36dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_folder_white_36dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenSilk/SyncthingAndroid/HEAD/app/src/main/res/drawable-hdpi/ic_folder_white_36dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_refresh_white_36dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenSilk/SyncthingAndroid/HEAD/app/src/main/res/drawable-hdpi/ic_refresh_white_36dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-nodpi/logo_vert_text_300.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenSilk/SyncthingAndroid/HEAD/app/src/main/res/drawable-nodpi/logo_vert_text_300.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_error_white_36dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenSilk/SyncthingAndroid/HEAD/app/src/main/res/drawable-xhdpi/ic_error_white_36dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_folder_white_36dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenSilk/SyncthingAndroid/HEAD/app/src/main/res/drawable-xhdpi/ic_folder_white_36dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_error_white_36dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenSilk/SyncthingAndroid/HEAD/app/src/main/res/drawable-xxhdpi/ic_error_white_36dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_folder_grey600_36dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenSilk/SyncthingAndroid/HEAD/app/src/main/res/drawable-hdpi/ic_folder_grey600_36dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-nodpi/logo_loading_icon_300.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenSilk/SyncthingAndroid/HEAD/app/src/main/res/drawable-nodpi/logo_loading_icon_300.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_check_grey600_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenSilk/SyncthingAndroid/HEAD/app/src/main/res/drawable-xhdpi/ic_check_grey600_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_close_grey600_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenSilk/SyncthingAndroid/HEAD/app/src/main/res/drawable-xhdpi/ic_close_grey600_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_folder_grey600_36dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenSilk/SyncthingAndroid/HEAD/app/src/main/res/drawable-xhdpi/ic_folder_grey600_36dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_refresh_white_36dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenSilk/SyncthingAndroid/HEAD/app/src/main/res/drawable-xhdpi/ic_refresh_white_36dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_check_grey600_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenSilk/SyncthingAndroid/HEAD/app/src/main/res/drawable-xxhdpi/ic_check_grey600_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_close_grey600_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenSilk/SyncthingAndroid/HEAD/app/src/main/res/drawable-xxhdpi/ic_close_grey600_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_folder_white_36dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenSilk/SyncthingAndroid/HEAD/app/src/main/res/drawable-xxhdpi/ic_folder_white_36dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_refresh_white_36dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenSilk/SyncthingAndroid/HEAD/app/src/main/res/drawable-xxhdpi/ic_refresh_white_36dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/ic_error_white_36dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenSilk/SyncthingAndroid/HEAD/app/src/main/res/drawable-xxxhdpi/ic_error_white_36dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/ic_folder_white_36dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenSilk/SyncthingAndroid/HEAD/app/src/main/res/drawable-xxxhdpi/ic_folder_white_36dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_cloud_circle_white_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenSilk/SyncthingAndroid/HEAD/app/src/main/res/drawable-hdpi/ic_cloud_circle_white_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_computer_grey600_36dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenSilk/SyncthingAndroid/HEAD/app/src/main/res/drawable-hdpi/ic_computer_grey600_36dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_more_vert_grey600_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenSilk/SyncthingAndroid/HEAD/app/src/main/res/drawable-hdpi/ic_more_vert_grey600_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_settings_grey600_36dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenSilk/SyncthingAndroid/HEAD/app/src/main/res/drawable-hdpi/ic_settings_grey600_36dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_computer_grey600_36dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenSilk/SyncthingAndroid/HEAD/app/src/main/res/drawable-xhdpi/ic_computer_grey600_36dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_more_vert_grey600_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenSilk/SyncthingAndroid/HEAD/app/src/main/res/drawable-xhdpi/ic_more_vert_grey600_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_settings_grey600_36dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenSilk/SyncthingAndroid/HEAD/app/src/main/res/drawable-xhdpi/ic_settings_grey600_36dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_computer_grey600_36dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenSilk/SyncthingAndroid/HEAD/app/src/main/res/drawable-xxhdpi/ic_computer_grey600_36dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_folder_grey600_36dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenSilk/SyncthingAndroid/HEAD/app/src/main/res/drawable-xxhdpi/ic_folder_grey600_36dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_settings_grey600_36dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenSilk/SyncthingAndroid/HEAD/app/src/main/res/drawable-xxhdpi/ic_settings_grey600_36dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/ic_check_grey600_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenSilk/SyncthingAndroid/HEAD/app/src/main/res/drawable-xxxhdpi/ic_check_grey600_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/ic_close_grey600_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenSilk/SyncthingAndroid/HEAD/app/src/main/res/drawable-xxxhdpi/ic_close_grey600_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/ic_folder_grey600_36dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenSilk/SyncthingAndroid/HEAD/app/src/main/res/drawable-xxxhdpi/ic_folder_grey600_36dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/ic_refresh_white_36dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenSilk/SyncthingAndroid/HEAD/app/src/main/res/drawable-xxxhdpi/ic_refresh_white_36dp.png -------------------------------------------------------------------------------- /make-all-mac.bash: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | export GOROOT_BOOTSTRAP=/usr/local/opt/go/libexec 4 | export ANDROID_NDK=/Users/$(whoami)/Library/Android/sdk/ndk-bundle 5 | ./make-all.bash 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_cloud_circle_white_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenSilk/SyncthingAndroid/HEAD/app/src/main/res/drawable-xhdpi/ic_cloud_circle_white_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_cloud_circle_white_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenSilk/SyncthingAndroid/HEAD/app/src/main/res/drawable-xxhdpi/ic_cloud_circle_white_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_more_vert_grey600_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenSilk/SyncthingAndroid/HEAD/app/src/main/res/drawable-xxhdpi/ic_more_vert_grey600_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/ic_computer_grey600_36dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenSilk/SyncthingAndroid/HEAD/app/src/main/res/drawable-xxxhdpi/ic_computer_grey600_36dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/ic_more_vert_grey600_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenSilk/SyncthingAndroid/HEAD/app/src/main/res/drawable-xxxhdpi/ic_more_vert_grey600_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/ic_settings_grey600_36dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenSilk/SyncthingAndroid/HEAD/app/src/main/res/drawable-xxxhdpi/ic_settings_grey600_36dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_dots_vertical_grey600_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenSilk/SyncthingAndroid/HEAD/app/src/main/res/drawable-hdpi/ic_dots_vertical_grey600_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-mdpi/ic_dots_vertical_grey600_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenSilk/SyncthingAndroid/HEAD/app/src/main/res/drawable-mdpi/ic_dots_vertical_grey600_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_dots_vertical_grey600_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenSilk/SyncthingAndroid/HEAD/app/src/main/res/drawable-xhdpi/ic_dots_vertical_grey600_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_dots_vertical_grey600_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenSilk/SyncthingAndroid/HEAD/app/src/main/res/drawable-xxhdpi/ic_dots_vertical_grey600_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/ic_cloud_circle_white_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenSilk/SyncthingAndroid/HEAD/app/src/main/res/drawable-xxxhdpi/ic_cloud_circle_white_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/ic_dots_vertical_grey600_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenSilk/SyncthingAndroid/HEAD/app/src/main/res/drawable-xxxhdpi/ic_dots_vertical_grey600_24dp.png -------------------------------------------------------------------------------- /notices/syncthing.txt: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2014 The Syncthing Authors. 2 | // 3 | // This Source Code Form is subject to the terms of the Mozilla Public 4 | // License, v. 2.0. If a copy of the MPL was not distributed with this file, 5 | // You can obtain one at http://mozilla.org/MPL/2.0/. -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Wed Apr 10 15:27:10 PDT 2013 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-2.2.1-all.zip 7 | -------------------------------------------------------------------------------- /make-all.bash: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -e 4 | 5 | MYDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" 6 | 7 | ${MYDIR}/make-go.bash arm 8 | ${MYDIR}/make-go.bash 386 9 | ${MYDIR}/make-go.bash amd64 10 | 11 | ${MYDIR}/make-syncthing.bash arm 12 | ${MYDIR}/make-syncthing.bash 386 13 | ${MYDIR}/make-syncthing.bash amd64 -------------------------------------------------------------------------------- /app/src/main/res/anim/rotate_indefinitely.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "syncthing"] 2 | path = syncthing/src/github.com/syncthing/syncthing 3 | url = https://github.com/syncthing/syncthing 4 | [submodule "go"] 5 | path = golang/go 6 | url = https://go.googlesource.com/go 7 | [submodule "syncthing/src/github.com/syncthing/syncthing-inotify"] 8 | path = syncthing/src/github.com/syncthing/syncthing-inotify 9 | url = https://github.com/syncthing/syncthing-inotify 10 | -------------------------------------------------------------------------------- /common-ui/src/main/java/org/opensilk/common/ui/mortar/ComponentFactory.java: -------------------------------------------------------------------------------- 1 | package org.opensilk.common.ui.mortar; 2 | 3 | import android.content.res.Resources; 4 | 5 | import mortar.MortarScope; 6 | 7 | /** @see org.opensilk.common.mortar.WithComponentFactory */ 8 | public abstract class ComponentFactory { 9 | protected abstract Object createDaggerComponent(Resources resources, MortarScope parentScope, T screen); 10 | } 11 | -------------------------------------------------------------------------------- /TODO: -------------------------------------------------------------------------------- 1 | --Critical-- 2 | * Integration tests 3 | 4 | --Normal-- 5 | * Allow backgrounding sessions. 6 | leave long poll running in a service and show notifications on events/errors 7 | 8 | --Low-- 9 | * Updates ui (i use custom builds on all nodes so this is useless for me) 10 | 11 | --Wish list-- 12 | * Use go bind (gomobile) and syncthings discovery protocol to dynamically locate remote instances, 13 | or less ambitiously allow multiple ips/hosts -------------------------------------------------------------------------------- /app-rest-client/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /app-rest-client/src/main/java/syncthing/api/model/Ok.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015 OpenSilk Productions LLC 3 | * 4 | * This Source Code Form is subject to the terms of the Mozilla Public 5 | * License, v. 2.0. If a copy of the MPL was not distributed with this 6 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 7 | * 8 | */ 9 | 10 | package syncthing.api.model; 11 | 12 | /** 13 | * Created by drew on 5/31/15. 14 | */ 15 | public class Ok { 16 | public String ok; 17 | } 18 | -------------------------------------------------------------------------------- /app-rest-client/src/main/java/syncthing/api/model/Ping.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015 OpenSilk Productions LLC 3 | * 4 | * This Source Code Form is subject to the terms of the Mozilla Public 5 | * License, v. 2.0. If a copy of the MPL was not distributed with this 6 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 7 | * 8 | */ 9 | 10 | package syncthing.api.model; 11 | 12 | /** 13 | * Created by drew on 3/8/15. 14 | */ 15 | public class Ping { 16 | public String ping; 17 | } 18 | -------------------------------------------------------------------------------- /app-rest-client/src/main/java/syncthing/api/model/FolderStats.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015 OpenSilk Productions LLC 3 | * 4 | * This Source Code Form is subject to the terms of the Mozilla Public 5 | * License, v. 2.0. If a copy of the MPL was not distributed with this 6 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 7 | * 8 | */ 9 | 10 | package syncthing.api.model; 11 | 12 | /** 13 | * Created by drew on 3/4/15. 14 | */ 15 | public class FolderStats { 16 | public LastFile lastFile; 17 | } 18 | -------------------------------------------------------------------------------- /app-rest-client/src/main/java/syncthing/api/model/ConfigStats.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015 OpenSilk Productions LLC 3 | * 4 | * This Source Code Form is subject to the terms of the Mozilla Public 5 | * License, v. 2.0. If a copy of the MPL was not distributed with this 6 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 7 | * 8 | */ 9 | 10 | package syncthing.api.model; 11 | 12 | /** 13 | * Created by drew on 3/4/15. 14 | */ 15 | public class ConfigStats { 16 | public boolean configInSync; 17 | } 18 | -------------------------------------------------------------------------------- /app-rest-client/src/main/java/syncthing/api/model/DeviceId.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015 OpenSilk Productions LLC 3 | * 4 | * This Source Code Form is subject to the terms of the Mozilla Public 5 | * License, v. 2.0. If a copy of the MPL was not distributed with this 6 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 7 | * 8 | */ 9 | 10 | package syncthing.api.model; 11 | 12 | /** 13 | * Created by drew on 3/2/15. 14 | */ 15 | public class DeviceId { 16 | public String id; 17 | public String error; 18 | } 19 | -------------------------------------------------------------------------------- /notices/rxandroid.txt: -------------------------------------------------------------------------------- 1 | Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at 2 | 3 | http://www.apache.org/licenses/LICENSE-2.0 4 | 5 | Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. -------------------------------------------------------------------------------- /app-rest-client/src/test/resources/event_downloadprogress.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "id" : 6032, 4 | "data" : { 5 | "pkg" : { 6 | "randomdata.dat" : { 7 | "copiedFromElsewhere" : 0, 8 | "pulled" : 10403, 9 | "copiedFromOrigin" : 0, 10 | "bytesTotal" : 2107965440, 11 | "reused" : 0, 12 | "bytesDone" : 1363476480, 13 | "total" : 16083, 14 | "pulling" : 17 15 | } 16 | } 17 | }, 18 | "type" : "DownloadProgress", 19 | "time" : "2015-11-07T17:49:14.340074607-06:00" 20 | } 21 | ] -------------------------------------------------------------------------------- /app-rest-client/src/main/java/syncthing/api/model/SystemMessage.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015 OpenSilk Productions LLC 3 | * 4 | * This Source Code Form is subject to the terms of the Mozilla Public 5 | * License, v. 2.0. If a copy of the MPL was not distributed with this 6 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 7 | * 8 | */ 9 | 10 | package syncthing.api.model; 11 | 12 | import org.joda.time.DateTime; 13 | 14 | /** 15 | * Created by drew on 3/15/15. 16 | */ 17 | public class SystemMessage { 18 | public DateTime when; 19 | public String message; 20 | } 21 | -------------------------------------------------------------------------------- /app-rest-client/src/main/java/syncthing/api/model/Connections.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015 OpenSilk Productions LLC 3 | * 4 | * This Source Code Form is subject to the terms of the Mozilla Public 5 | * License, v. 2.0. If a copy of the MPL was not distributed with this 6 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 7 | * 8 | */ 9 | 10 | package syncthing.api.model; 11 | 12 | /** 13 | * Created by drew on 4/11/15. 14 | */ 15 | public class Connections { 16 | public ConnectionInfo total; 17 | public ConnectionInfoMap connections = ConnectionInfoMap.EMPTY; 18 | } 19 | -------------------------------------------------------------------------------- /app/src/main/res/drawable-v21/dots_vertical_grey600_24dp.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 9 | -------------------------------------------------------------------------------- /notices/mortar.txt: -------------------------------------------------------------------------------- 1 | Copyright 2013 Square, Inc. 2 | 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | 7 | http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, software 10 | distributed under the License is distributed on an "AS IS" BASIS, 11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | See the License for the specific language governing permissions and 13 | limitations under the License. -------------------------------------------------------------------------------- /notices/okhttp.txt: -------------------------------------------------------------------------------- 1 | Copyright 2014 Square, Inc. 2 | 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | 7 | http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, software 10 | distributed under the License is distributed on an "AS IS" BASIS, 11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | See the License for the specific language governing permissions and 13 | limitations under the License. -------------------------------------------------------------------------------- /notices/retrofit.txt: -------------------------------------------------------------------------------- 1 | Copyright 2013 Square, Inc. 2 | 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | 7 | http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, software 10 | distributed under the License is distributed on an "AS IS" BASIS, 11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | See the License for the specific language governing permissions and 13 | limitations under the License. -------------------------------------------------------------------------------- /notices/timber.txt: -------------------------------------------------------------------------------- 1 | Copyright 2013 Jake Wharton 2 | 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | 7 | http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, software 10 | distributed under the License is distributed on an "AS IS" BASIS, 11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | See the License for the specific language governing permissions and 13 | limitations under the License. -------------------------------------------------------------------------------- /app-rest-client/src/main/java/syncthing/api/model/LastFile.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015 OpenSilk Productions LLC 3 | * 4 | * This Source Code Form is subject to the terms of the Mozilla Public 5 | * License, v. 2.0. If a copy of the MPL was not distributed with this 6 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 7 | * 8 | */ 9 | 10 | package syncthing.api.model; 11 | 12 | import org.joda.time.DateTime; 13 | 14 | /** 15 | * Created by drew on 3/17/15. 16 | */ 17 | public class LastFile { 18 | public DateTime at; 19 | public String filename; 20 | public boolean deleted; 21 | } 22 | -------------------------------------------------------------------------------- /notices/butterknife.txt: -------------------------------------------------------------------------------- 1 | Copyright 2013 Jake Wharton 2 | 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | 7 | http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, software 10 | distributed under the License is distributed on an "AS IS" BASIS, 11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | See the License for the specific language governing permissions and 13 | limitations under the License. -------------------------------------------------------------------------------- /notices/gson.txt: -------------------------------------------------------------------------------- 1 | Copyright (c) 2008-2009 Google Inc. 2 | 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | 7 | http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, software 10 | distributed under the License is distributed on an "AS IS" BASIS, 11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | See the License for the specific language governing permissions and 13 | limitations under the License. -------------------------------------------------------------------------------- /app-rest-client/src/main/java/syncthing/api/model/Completion.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015 OpenSilk Productions LLC 3 | * 4 | * This Source Code Form is subject to the terms of the Mozilla Public 5 | * License, v. 2.0. If a copy of the MPL was not distributed with this 6 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 7 | * 8 | */ 9 | 10 | package syncthing.api.model; 11 | 12 | /** 13 | * Created by drew on 3/4/15. 14 | */ 15 | public class Completion { 16 | public float completion; 17 | 18 | public Completion(float completion) { 19 | this.completion = completion; 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /app-rest-client/src/main/java/syncthing/api/model/SystemErrors.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015 OpenSilk Productions LLC 3 | * 4 | * This Source Code Form is subject to the terms of the Mozilla Public 5 | * License, v. 2.0. If a copy of the MPL was not distributed with this 6 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 7 | * 8 | */ 9 | 10 | package syncthing.api.model; 11 | 12 | import java.util.Collections; 13 | import java.util.List; 14 | 15 | /** 16 | * Created by drew on 3/15/15. 17 | */ 18 | public class SystemErrors { 19 | public List errors = Collections.emptyList(); 20 | } 21 | -------------------------------------------------------------------------------- /app-rest-client/src/main/java/syncthing/api/model/SystemMessages.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015 OpenSilk Productions LLC 3 | * 4 | * This Source Code Form is subject to the terms of the Mozilla Public 5 | * License, v. 2.0. If a copy of the MPL was not distributed with this 6 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 7 | * 8 | */ 9 | 10 | package syncthing.api.model; 11 | 12 | import java.util.Collections; 13 | import java.util.List; 14 | 15 | /** 16 | * Created by drew on 11/4/15. 17 | */ 18 | public class SystemMessages { 19 | public List messages = Collections.emptyList(); 20 | } 21 | -------------------------------------------------------------------------------- /notices/dagger.txt: -------------------------------------------------------------------------------- 1 | Copyright 2014 Google, Inc. 2 | Copyright 2012 Square, Inc. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. -------------------------------------------------------------------------------- /docker/do-build.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | if [ -n "$1" ]; then 4 | echo Skipping build. Do what you want. 5 | exec "$@" 6 | elif [ ! -d src/github.com/syncthing/syncthing ]; then 7 | echo "Fatal: Must mount GOPATH at /opt/workspace" 8 | exit 1 9 | else 10 | export CC=${TOOLCHAIN_ROOT}/bin/arm-linux-androideabi-gcc 11 | export CXX=${TOOLCHAIN_ROOT}/bin/arm-linux-androideabi-g++ 12 | export CGO_ENABLED=1 13 | export GOARM=7 14 | 15 | cd src/github.com/syncthing/syncthing 16 | go run build.go -goos=android -goarch=arm clean 17 | go run build.go -goos=android -goarch=arm -no-upgrade build 18 | fi -------------------------------------------------------------------------------- /app-rest-client/src/main/java/syncthing/api/model/Need.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015 OpenSilk Productions LLC 3 | * 4 | * This Source Code Form is subject to the terms of the Mozilla Public 5 | * License, v. 2.0. If a copy of the MPL was not distributed with this 6 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 7 | * 8 | */ 9 | 10 | package syncthing.api.model; 11 | 12 | /** 13 | * Created by drew on 3/4/15. 14 | */ 15 | public class Need { 16 | public JsonDBFileInfo[] progress; 17 | public JsonDBFileInfo[] queued; 18 | public JsonDBFileInfo[] rest; 19 | int total; 20 | int page; 21 | int perpage; 22 | } 23 | -------------------------------------------------------------------------------- /app-rest-client/src/main/java/syncthing/api/model/event/Ping.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015 OpenSilk Productions LLC 3 | * 4 | * This Source Code Form is subject to the terms of the Mozilla Public 5 | * License, v. 2.0. If a copy of the MPL was not distributed with this 6 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 7 | * 8 | */ 9 | 10 | package syncthing.api.model.event; 11 | 12 | import org.joda.time.DateTime; 13 | 14 | /** 15 | * Created by drew on 10/11/15. 16 | */ 17 | public class Ping extends Event { 18 | public Ping(long id, DateTime time, EventType type) { 19 | super(id, time, type, null); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /app-rest-client/src/main/java/syncthing/api/model/JsonDBFileInfo.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015 OpenSilk Productions LLC 3 | * 4 | * This Source Code Form is subject to the terms of the Mozilla Public 5 | * License, v. 2.0. If a copy of the MPL was not distributed with this 6 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 7 | * 8 | */ 9 | 10 | package syncthing.api.model; 11 | 12 | /** 13 | * Created by drew on 3/17/15. 14 | */ 15 | public class JsonDBFileInfo { 16 | public String name; 17 | public int flags; 18 | public long modified; 19 | public int version; 20 | public int localVersion; 21 | public long size; 22 | } 23 | -------------------------------------------------------------------------------- /make-syncthing-docker.bash: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -e 4 | 5 | MYDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" 6 | ASSETSDIR=${MYDIR}/app/src/main/assets/ 7 | 8 | #Update submodule 9 | git submodule update --init syncthing/src/github.com/syncthing/syncthing 10 | 11 | #Apply patches 12 | pushd syncthing/src/github.com/syncthing/syncthing 13 | git am -3 ../../../../../patches/* 14 | popd 15 | 16 | #Do build 17 | docker run --rm -t -u $(id -u) -v ${MYDIR}/syncthing:/opt/workspace syncthing-build-android 18 | 19 | #Copy synching 20 | mv ${MYDIR}/syncthing/src/github.com/syncthing/syncthing/syncthing ${ASSETSDIR}/syncthing.arm 21 | chmod 644 ${ASSETSDIR}/syncthing.arm -------------------------------------------------------------------------------- /app-rest-client/src/main/java/syncthing/api/model/Ignores.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015 OpenSilk Productions LLC 3 | * 4 | * This Source Code Form is subject to the terms of the Mozilla Public 5 | * License, v. 2.0. If a copy of the MPL was not distributed with this 6 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 7 | * 8 | */ 9 | 10 | package syncthing.api.model; 11 | 12 | import java.io.Serializable; 13 | 14 | /** 15 | * Created by drew on 3/4/15. 16 | */ 17 | public class Ignores implements Serializable { 18 | private static final long serialVersionUID = -9077298927333528483L; 19 | public String[] ignore; 20 | public String[] patterns; 21 | } 22 | -------------------------------------------------------------------------------- /notices/joda-time.txt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2001-2014 Stephen Colebourne 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ -------------------------------------------------------------------------------- /app-rest-client/src/main/java/syncthing/api/model/Compression.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015 OpenSilk Productions LLC 3 | * 4 | * This Source Code Form is subject to the terms of the Mozilla Public 5 | * License, v. 2.0. If a copy of the MPL was not distributed with this 6 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 7 | * 8 | */ 9 | 10 | package syncthing.api.model; 11 | 12 | import com.google.gson.annotations.SerializedName; 13 | 14 | /** 15 | * Created by drew on 3/18/15. 16 | */ 17 | public enum Compression { 18 | @SerializedName("always") ALWAYS, 19 | @SerializedName("metadata") METADATA, 20 | @SerializedName("never") NEVER, 21 | UNKNOWN, 22 | } 23 | -------------------------------------------------------------------------------- /app-rest-client/src/main/java/syncthing/api/model/event/StartupComplete.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015 OpenSilk Productions LLC 3 | * 4 | * This Source Code Form is subject to the terms of the Mozilla Public 5 | * License, v. 2.0. If a copy of the MPL was not distributed with this 6 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 7 | * 8 | */ 9 | 10 | package syncthing.api.model.event; 11 | 12 | import org.joda.time.DateTime; 13 | 14 | /** 15 | * Created by drew on 10/11/15. 16 | */ 17 | public class StartupComplete extends Event { 18 | public StartupComplete(long id, DateTime time, EventType type) { 19 | super(id, time, type, null); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /app-rest-client/src/main/java/syncthing/api/model/event/UnknownEvent.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015 OpenSilk Productions LLC 3 | * 4 | * This Source Code Form is subject to the terms of the Mozilla Public 5 | * License, v. 2.0. If a copy of the MPL was not distributed with this 6 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 7 | * 8 | */ 9 | 10 | package syncthing.api.model.event; 11 | 12 | import org.joda.time.DateTime; 13 | 14 | /** 15 | * Created by drew on 10/11/15. 16 | */ 17 | public class UnknownEvent extends Event { 18 | public UnknownEvent(long id, DateTime time, String json) { 19 | super(id, time, EventType.UNKNOWN, json); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /notices/android-support-v4.txt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2011 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ -------------------------------------------------------------------------------- /notices/android-support-v7-appcompat.txt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2012 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ -------------------------------------------------------------------------------- /notices/android-support-v7-cardview.txt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2014 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ -------------------------------------------------------------------------------- /notices/android-support-v7-recyclerview.txt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2014 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ -------------------------------------------------------------------------------- /app-rest-client/src/main/java/syncthing/api/model/ItemAction.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015 OpenSilk Productions LLC 3 | * 4 | * This Source Code Form is subject to the terms of the Mozilla Public 5 | * License, v. 2.0. If a copy of the MPL was not distributed with this 6 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 7 | * 8 | */ 9 | 10 | package syncthing.api.model; 11 | 12 | import com.google.gson.annotations.SerializedName; 13 | 14 | /** 15 | * Used by ItemStarted/ItemFinished 16 | * Created by drew on 10/11/15. 17 | */ 18 | public enum ItemAction { 19 | @SerializedName("update") UPDATE, 20 | @SerializedName("metadata") METADATA, 21 | @SerializedName("delete") DELETE 22 | } 23 | -------------------------------------------------------------------------------- /app-rest-client/src/main/java/syncthing/api/model/DeviceStats.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015 OpenSilk Productions LLC 3 | * 4 | * This Source Code Form is subject to the terms of the Mozilla Public 5 | * License, v. 2.0. If a copy of the MPL was not distributed with this 6 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 7 | * 8 | */ 9 | 10 | package syncthing.api.model; 11 | 12 | import org.joda.time.DateTime; 13 | 14 | import syncthing.api.ApiUtils; 15 | 16 | /** 17 | * Created by drew on 3/4/15. 18 | */ 19 | public class DeviceStats { 20 | public DateTime lastSeen; 21 | 22 | @Override 23 | public String toString() { 24 | return ApiUtils.reflectionToString(this); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # By default, the flags in this file are appended to flags specified 3 | # in /opt/android2/sdk/tools/proguard/proguard-android.txt 4 | # You can edit the include path and order by changing the proguardFiles 5 | # directive in build.gradle. 6 | # 7 | # For more details, see 8 | # http://developer.android.com/guide/developing/tools/proguard.html 9 | 10 | # Add any project specific keep options here: 11 | 12 | # If your project uses WebView with JS, uncomment the following 13 | # and specify the fully qualified class name to the JavaScript interface 14 | # class: 15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 16 | # public *; 17 | #} 18 | -------------------------------------------------------------------------------- /notices/zt-zip.txt: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (C) 2012 ZeroTurnaround LLC 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ -------------------------------------------------------------------------------- /app-rest-client/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # By default, the flags in this file are appended to flags specified 3 | # in /opt/android/sdk/tools/proguard/proguard-android.txt 4 | # You can edit the include path and order by changing the proguardFiles 5 | # directive in build.gradle. 6 | # 7 | # For more details, see 8 | # http://developer.android.com/guide/developing/tools/proguard.html 9 | 10 | # Add any project specific keep options here: 11 | 12 | # If your project uses WebView with JS, uncomment the following 13 | # and specify the fully qualified class name to the JavaScript interface 14 | # class: 15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 16 | # public *; 17 | #} 18 | -------------------------------------------------------------------------------- /common-ui/src/main/java/org/opensilk/common/ui/mortar/WithComponentFactory.java: -------------------------------------------------------------------------------- 1 | package org.opensilk.common.ui.mortar; 2 | 3 | import java.lang.annotation.ElementType; 4 | import java.lang.annotation.Retention; 5 | import java.lang.annotation.RetentionPolicy; 6 | import java.lang.annotation.Target; 7 | 8 | import mortar.MortarScope; 9 | 10 | /** 11 | * Marks a screen as defining a {@link MortarScope}, with a factory class to 12 | * create its Dagger module. 13 | * 14 | * @see org.opensilk.common.mortar.WithComponent 15 | * @see org.opensilk.common.mortar.ScreenScoper 16 | */ 17 | @Target(ElementType.TYPE) @Retention(RetentionPolicy.RUNTIME) 18 | public @interface WithComponentFactory { 19 | Class value(); 20 | } 21 | -------------------------------------------------------------------------------- /app-rest-client/src/main/java/syncthing/api/model/ModelState.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015 OpenSilk Productions LLC 3 | * 4 | * This Source Code Form is subject to the terms of the Mozilla Public 5 | * License, v. 2.0. If a copy of the MPL was not distributed with this 6 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 7 | * 8 | */ 9 | 10 | package syncthing.api.model; 11 | 12 | import com.google.gson.annotations.SerializedName; 13 | 14 | /** 15 | * Created by drew on 3/17/15. 16 | */ 17 | public enum ModelState { 18 | @SerializedName("idle") IDLE, 19 | @SerializedName("scanning") SCANNING, 20 | @SerializedName("syncing") SYNCING, 21 | @SerializedName("error") ERROR, 22 | @SerializedName("unknown") UNKNOWN, 23 | } 24 | -------------------------------------------------------------------------------- /app-rest-client/src/main/java/syncthing/api/model/event/ConfigSaved.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015 OpenSilk Productions LLC 3 | * 4 | * This Source Code Form is subject to the terms of the Mozilla Public 5 | * License, v. 2.0. If a copy of the MPL was not distributed with this 6 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 7 | * 8 | */ 9 | 10 | package syncthing.api.model.event; 11 | 12 | import org.joda.time.DateTime; 13 | 14 | import syncthing.api.model.Config; 15 | 16 | /** 17 | * Created by drew on 10/11/15. 18 | */ 19 | public class ConfigSaved extends Event { 20 | 21 | public ConfigSaved(long id, DateTime time, EventType type, Config data) { 22 | super(id, time, type, data); 23 | } 24 | 25 | } 26 | -------------------------------------------------------------------------------- /app-rest-client/src/main/java/syncthing/api/model/VersioningType.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015 OpenSilk Productions LLC 3 | * 4 | * This Source Code Form is subject to the terms of the Mozilla Public 5 | * License, v. 2.0. If a copy of the MPL was not distributed with this 6 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 7 | * 8 | */ 9 | 10 | package syncthing.api.model; 11 | 12 | import com.google.gson.annotations.SerializedName; 13 | 14 | /** 15 | * Created by drew on 3/17/15. 16 | */ 17 | public enum VersioningType { 18 | @SerializedName("trashcan") TRASHCAN, 19 | @SerializedName("simple") SIMPLE, 20 | @SerializedName("staggered") STAGGERED, 21 | @SerializedName("external") EXTERNAL, 22 | @SerializedName("") NONE, 23 | } 24 | -------------------------------------------------------------------------------- /app-rest-client/src/main/java/syncthing/api/ApiUtils.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015 OpenSilk Productions LLC 3 | * 4 | * This Source Code Form is subject to the terms of the Mozilla Public 5 | * License, v. 2.0. If a copy of the MPL was not distributed with this 6 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 7 | * 8 | */ 9 | 10 | package syncthing.api; 11 | 12 | import org.apache.commons.lang3.builder.ReflectionToStringBuilder; 13 | import org.apache.commons.lang3.builder.ToStringStyle; 14 | 15 | /** 16 | * Created by drew on 4/11/15. 17 | */ 18 | public class ApiUtils { 19 | public static String reflectionToString(T obj) { 20 | return ReflectionToStringBuilder.toString(obj, ToStringStyle.SHORT_PREFIX_STYLE, true); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /app-rest-client/src/main/java/syncthing/api/model/event/Starting.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015 OpenSilk Productions LLC 3 | * 4 | * This Source Code Form is subject to the terms of the Mozilla Public 5 | * License, v. 2.0. If a copy of the MPL was not distributed with this 6 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 7 | * 8 | */ 9 | 10 | package syncthing.api.model.event; 11 | 12 | import org.joda.time.DateTime; 13 | 14 | /** 15 | * Created by drew on 10/11/15. 16 | */ 17 | public class Starting extends Event { 18 | public Starting(long id, DateTime time, EventType type, Data data) { 19 | super(id, time, type, data); 20 | } 21 | 22 | public static class Data { 23 | public String home; 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /app-rest-client/src/main/java/syncthing/api/model/ConnectionType.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015 OpenSilk Productions LLC 3 | * 4 | * This Source Code Form is subject to the terms of the Mozilla Public 5 | * License, v. 2.0. If a copy of the MPL was not distributed with this 6 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 7 | * 8 | */ 9 | 10 | package syncthing.api.model; 11 | 12 | import com.google.gson.annotations.SerializedName; 13 | 14 | /** 15 | * Created by drew on 11/6/15. 16 | */ 17 | public enum ConnectionType { 18 | @SerializedName("direct-accept") DIRECT_ACCEPT, 19 | @SerializedName("direct-dial") DIRECT_DIAL, 20 | @SerializedName("relay-accept") RELAY_ACCEPT, 21 | @SerializedName("relay-dial") RELAY_DIAL, 22 | UNKNOWN 23 | } 24 | -------------------------------------------------------------------------------- /app-rest-client/src/main/java/syncthing/api/model/event/DeviceResumed.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015 OpenSilk Productions LLC 3 | * 4 | * This Source Code Form is subject to the terms of the Mozilla Public 5 | * License, v. 2.0. If a copy of the MPL was not distributed with this 6 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 7 | * 8 | */ 9 | 10 | package syncthing.api.model.event; 11 | 12 | import org.joda.time.DateTime; 13 | 14 | /** 15 | * Created by drew on 11/7/15. 16 | */ 17 | public class DeviceResumed extends Event { 18 | 19 | public DeviceResumed(long id, DateTime time, EventType type, Data data) { 20 | super(id, time, type, data); 21 | } 22 | 23 | public static class Data { 24 | public String device; 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /common-ui/src/main/res/values-sw600dp/theme_base.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /app-rest-client/src/main/java/syncthing/api/model/event/DevicePaused.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015 OpenSilk Productions LLC 3 | * 4 | * This Source Code Form is subject to the terms of the Mozilla Public 5 | * License, v. 2.0. If a copy of the MPL was not distributed with this 6 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 7 | * 8 | */ 9 | 10 | package syncthing.api.model.event; 11 | 12 | import org.joda.time.DateTime; 13 | 14 | /** 15 | * Created by drew on 11/7/15. 16 | */ 17 | public class DevicePaused extends Event { 18 | 19 | public DevicePaused(long id, DateTime time, EventType type, DevicePaused.Data data) { 20 | super(id, time, type, data); 21 | } 22 | 23 | public static class Data { 24 | public String device; 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /app-rest-client/src/main/java/syncthing/api/model/event/DeviceRejected.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015 OpenSilk Productions LLC 3 | * 4 | * This Source Code Form is subject to the terms of the Mozilla Public 5 | * License, v. 2.0. If a copy of the MPL was not distributed with this 6 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 7 | * 8 | */ 9 | 10 | package syncthing.api.model.event; 11 | 12 | import org.joda.time.DateTime; 13 | 14 | /** 15 | * Created by drew on 10/11/15. 16 | */ 17 | public class DeviceRejected extends Event { 18 | public DeviceRejected(long id, DateTime time, EventType type, Data data) { 19 | super(id, time, type, data); 20 | } 21 | 22 | public static class Data { 23 | public String address; 24 | public String device; 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /app-rest-client/src/main/java/syncthing/api/model/event/FolderRejected.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015 OpenSilk Productions LLC 3 | * 4 | * This Source Code Form is subject to the terms of the Mozilla Public 5 | * License, v. 2.0. If a copy of the MPL was not distributed with this 6 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 7 | * 8 | */ 9 | 10 | package syncthing.api.model.event; 11 | 12 | import org.joda.time.DateTime; 13 | 14 | /** 15 | * Created by drew on 10/11/15. 16 | */ 17 | public class FolderRejected extends Event { 18 | public FolderRejected(long id, DateTime time, EventType type, Data data) { 19 | super(id, time, type, data); 20 | } 21 | 22 | public static class Data { 23 | public String device; 24 | public String folder; 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /app-rest-client/src/main/java/syncthing/api/model/event/LocalIndexUpdated.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015 OpenSilk Productions LLC 3 | * 4 | * This Source Code Form is subject to the terms of the Mozilla Public 5 | * License, v. 2.0. If a copy of the MPL was not distributed with this 6 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 7 | * 8 | */ 9 | 10 | package syncthing.api.model.event; 11 | 12 | import org.joda.time.DateTime; 13 | 14 | /** 15 | * Created by drew on 10/11/15. 16 | */ 17 | public class LocalIndexUpdated extends Event { 18 | public LocalIndexUpdated(long id, DateTime time, EventType type, Data data) { 19 | super(id, time, type, data); 20 | } 21 | 22 | public static class Data { 23 | public String folder; 24 | public long items; 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /app-rest-client/src/main/java/syncthing/api/model/Config.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015 OpenSilk Productions LLC 3 | * 4 | * This Source Code Form is subject to the terms of the Mozilla Public 5 | * License, v. 2.0. If a copy of the MPL was not distributed with this 6 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 7 | * 8 | */ 9 | 10 | package syncthing.api.model; 11 | 12 | import java.util.Collections; 13 | import java.util.List; 14 | 15 | /** 16 | * Created by drew on 3/1/15. 17 | */ 18 | public class Config { 19 | public int version; 20 | public List folders = Collections.emptyList(); 21 | public List devices = Collections.emptyList(); 22 | public GUIConfig gui; 23 | public OptionsConfig options; 24 | public List ignoredDevices = Collections.emptyList(); 25 | } 26 | -------------------------------------------------------------------------------- /app-rest-client/src/main/java/syncthing/api/model/event/DeviceDisconnected.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015 OpenSilk Productions LLC 3 | * 4 | * This Source Code Form is subject to the terms of the Mozilla Public 5 | * License, v. 2.0. If a copy of the MPL was not distributed with this 6 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 7 | * 8 | */ 9 | 10 | package syncthing.api.model.event; 11 | 12 | import org.joda.time.DateTime; 13 | 14 | /** 15 | * Created by drew on 10/11/15. 16 | */ 17 | public class DeviceDisconnected extends Event { 18 | public DeviceDisconnected(long id, DateTime time, EventType type, Data data) { 19 | super(id, time, type, data); 20 | } 21 | 22 | public static class Data { 23 | public String error; 24 | public String id; 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /common-ui/src/main/res/values-sw600dp-land/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 19 | 128dp 20 | -------------------------------------------------------------------------------- /app-rest-client/src/main/java/syncthing/api/model/event/Event.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015 OpenSilk Productions LLC 3 | * 4 | * This Source Code Form is subject to the terms of the Mozilla Public 5 | * License, v. 2.0. If a copy of the MPL was not distributed with this 6 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 7 | * 8 | */ 9 | 10 | package syncthing.api.model.event; 11 | 12 | import org.joda.time.DateTime; 13 | 14 | /** 15 | * Created by drew on 3/2/15. 16 | */ 17 | public abstract class Event { 18 | public final long id; 19 | public final DateTime time; 20 | public final EventType type; 21 | public final T data; 22 | public Event(long id, DateTime time, EventType type, T data) { 23 | this.id = id; 24 | this.time = time; 25 | this.type = type; 26 | this.data = data; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /notices/commons-io.txt: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ -------------------------------------------------------------------------------- /notices/commons-lang3.txt: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ -------------------------------------------------------------------------------- /app-rest-client/src/main/java/syncthing/api/model/event/FolderCompletion.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015 OpenSilk Productions LLC 3 | * 4 | * This Source Code Form is subject to the terms of the Mozilla Public 5 | * License, v. 2.0. If a copy of the MPL was not distributed with this 6 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 7 | * 8 | */ 9 | 10 | package syncthing.api.model.event; 11 | 12 | import org.joda.time.DateTime; 13 | 14 | /** 15 | * Created by drew on 10/11/15. 16 | */ 17 | public class FolderCompletion extends Event { 18 | public FolderCompletion(long id, DateTime time, EventType type, Data data) { 19 | super(id, time, type, data); 20 | } 21 | 22 | public static class Data { 23 | public int completion; 24 | public String device; 25 | public String folder; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /app-rest-client/src/main/java/syncthing/api/model/event/RemoteIndexUpdated.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015 OpenSilk Productions LLC 3 | * 4 | * This Source Code Form is subject to the terms of the Mozilla Public 5 | * License, v. 2.0. If a copy of the MPL was not distributed with this 6 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 7 | * 8 | */ 9 | 10 | package syncthing.api.model.event; 11 | 12 | import org.joda.time.DateTime; 13 | 14 | /** 15 | * Created by drew on 10/11/15. 16 | */ 17 | public class RemoteIndexUpdated extends Event { 18 | public RemoteIndexUpdated(long id, DateTime time, EventType type, Data data) { 19 | super(id, time, type, data); 20 | } 21 | 22 | public static class Data { 23 | public String device; 24 | public String folder; 25 | public long items; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /common-ui/src/main/java/org/opensilk/common/ui/mortar/WithComponent.java: -------------------------------------------------------------------------------- 1 | package org.opensilk.common.ui.mortar; 2 | 3 | import java.lang.annotation.ElementType; 4 | import java.lang.annotation.Retention; 5 | import java.lang.annotation.RetentionPolicy; 6 | import java.lang.annotation.Target; 7 | 8 | import mortar.MortarScope; 9 | 10 | /** 11 | * Marks a screen as defining a {@link MortarScope}, with the class of a Dagger module 12 | * to instantiate via reflection. The module must be a static type with a default 13 | * constructor. For more flexibility, use {@link WithComponentFactory}. 14 | * 15 | * @deprecated Use {@link WithComponentFactory} from now on. 16 | * 17 | * @see org.opensilk.common.mortar.ScreenScoper 18 | */ 19 | @Deprecated 20 | @Target(ElementType.TYPE) @Retention(RetentionPolicy.RUNTIME) 21 | public @interface WithComponent { 22 | Class value(); 23 | } 24 | -------------------------------------------------------------------------------- /app-rest-client/src/main/java/syncthing/api/model/PullOrder.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015 OpenSilk Productions LLC 3 | * 4 | * This Source Code Form is subject to the terms of the Mozilla Public 5 | * License, v. 2.0. If a copy of the MPL was not distributed with this 6 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 7 | * 8 | */ 9 | 10 | package syncthing.api.model; 11 | 12 | import com.google.gson.annotations.SerializedName; 13 | 14 | /** 15 | * Created by drew on 4/25/15. 16 | */ 17 | public enum PullOrder { 18 | @SerializedName("random") RANDOM, 19 | @SerializedName("alphabetic") ALPHABETIC, 20 | @SerializedName("smallestFirst") SMALLESTFIRST, 21 | @SerializedName("largestFirst") LARGESTFIRST, 22 | @SerializedName("oldestFirst") OLDESTFIRST, 23 | @SerializedName("newestFirst") NEWESTFIRST, 24 | @SerializedName("unknown") UNKNOWN, 25 | } 26 | -------------------------------------------------------------------------------- /app/src/main/res/values-large/themes.xml: -------------------------------------------------------------------------------- 1 | 2 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /app-rest-client/src/main/java/syncthing/api/model/event/DeviceConnected.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015 OpenSilk Productions LLC 3 | * 4 | * This Source Code Form is subject to the terms of the Mozilla Public 5 | * License, v. 2.0. If a copy of the MPL was not distributed with this 6 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 7 | * 8 | */ 9 | 10 | package syncthing.api.model.event; 11 | 12 | import org.joda.time.DateTime; 13 | 14 | /** 15 | * Created by drew on 10/11/15. 16 | */ 17 | public class DeviceConnected extends Event { 18 | public DeviceConnected(long id, DateTime time, EventType type, Data data) { 19 | super(id, time, type, data); 20 | } 21 | 22 | public static class Data { 23 | public String addr; 24 | public String id; 25 | public String clientName; 26 | public String clientVersion; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /common-ui/src/main/res/values-sw800dp-land/theme_base.xml: -------------------------------------------------------------------------------- 1 | 2 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /gradle.properties: -------------------------------------------------------------------------------- 1 | # Project-wide Gradle settings. 2 | 3 | # IDE (e.g. Android Studio) users: 4 | # Gradle settings configured through the IDE *will override* 5 | # any settings specified in this file. 6 | 7 | # For more details on how to configure your build environment visit 8 | # http://www.gradle.org/docs/current/userguide/build_environment.html 9 | 10 | # Specifies the JVM arguments used for the daemon process. 11 | # The setting is particularly useful for tweaking memory settings. 12 | # Default value: -Xmx10248m -XX:MaxPermSize=256m 13 | # org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 14 | 15 | # When configured, Gradle will run in incubating parallel mode. 16 | # This option should only be used with decoupled projects. More details, visit 17 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects 18 | # org.gradle.parallel=true -------------------------------------------------------------------------------- /app-rest-client/src/main/java/syncthing/api/model/event/FolderScanProgress.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015 OpenSilk Productions LLC 3 | * 4 | * This Source Code Form is subject to the terms of the Mozilla Public 5 | * License, v. 2.0. If a copy of the MPL was not distributed with this 6 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 7 | * 8 | */ 9 | 10 | package syncthing.api.model.event; 11 | 12 | import org.joda.time.DateTime; 13 | 14 | /** 15 | * Created by drew on 11/7/15. 16 | */ 17 | public class FolderScanProgress extends Event { 18 | 19 | public FolderScanProgress(long id, DateTime time, EventType type, Data data) { 20 | super(id, time, type, data); 21 | } 22 | 23 | public static class Data { 24 | public String folder; 25 | public long current; 26 | public long total; 27 | public long rate; //bytes / sec 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /app/src/main/res/values/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 18 | 19 | 20 | 36dp 21 | -------------------------------------------------------------------------------- /app-rest-client/src/main/java/syncthing/api/model/event/ItemStarted.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015 OpenSilk Productions LLC 3 | * 4 | * This Source Code Form is subject to the terms of the Mozilla Public 5 | * License, v. 2.0. If a copy of the MPL was not distributed with this 6 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 7 | * 8 | */ 9 | 10 | package syncthing.api.model.event; 11 | 12 | import org.joda.time.DateTime; 13 | 14 | import syncthing.api.model.ItemAction; 15 | 16 | /** 17 | * Created by drew on 10/11/15. 18 | */ 19 | public class ItemStarted extends Event { 20 | public ItemStarted(long id, DateTime time, EventType type, Data data) { 21 | super(id, time, type, data); 22 | } 23 | 24 | public static class Data { 25 | public String item; 26 | public String folder; 27 | public String type; 28 | public ItemAction action; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /common-ui/src/main/res/values/ids.xml: -------------------------------------------------------------------------------- 1 | 2 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /common-ui/src/main/res/values-sw600dp/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 19 | 20 | 400dp 21 | 22 | 128dp 23 | -------------------------------------------------------------------------------- /app-rest-client/src/main/java/syncthing/api/model/event/StateChanged.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015 OpenSilk Productions LLC 3 | * 4 | * This Source Code Form is subject to the terms of the Mozilla Public 5 | * License, v. 2.0. If a copy of the MPL was not distributed with this 6 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 7 | * 8 | */ 9 | 10 | package syncthing.api.model.event; 11 | 12 | import org.joda.time.DateTime; 13 | 14 | import syncthing.api.model.ModelState; 15 | 16 | /** 17 | * Created by drew on 10/11/15. 18 | */ 19 | public class StateChanged extends Event { 20 | public StateChanged(long id, DateTime time, EventType type, Data data) { 21 | super(id, time, type, data); 22 | } 23 | 24 | public static class Data { 25 | public String folder; 26 | public ModelState from; 27 | public ModelState to; 28 | public double duration; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /common-core/src/main/java/org/opensilk/common/core/mortar/HasScope.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2015 OpenSilk Productions LLC 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.opensilk.common.core.mortar; 18 | 19 | import mortar.MortarScope; 20 | 21 | /** 22 | * Created by drew on 10/5/14. 23 | */ 24 | public interface HasScope { 25 | MortarScope getScope(); 26 | } 27 | -------------------------------------------------------------------------------- /app-rest-client/src/main/java/syncthing/api/model/event/RelayStateChanged.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015 OpenSilk Productions LLC 3 | * 4 | * This Source Code Form is subject to the terms of the Mozilla Public 5 | * License, v. 2.0. If a copy of the MPL was not distributed with this 6 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 7 | * 8 | */ 9 | 10 | package syncthing.api.model.event; 11 | 12 | import com.google.gson.annotations.SerializedName; 13 | 14 | import org.joda.time.DateTime; 15 | 16 | /** 17 | * Created by drew on 11/7/15. 18 | */ 19 | public class RelayStateChanged extends Event { 20 | 21 | public RelayStateChanged(long id, DateTime time, EventType type, Data data) { 22 | super(id, time, type, data); 23 | } 24 | 25 | public static class Data { 26 | @SerializedName("new") String[] newRelays; 27 | @SerializedName("old") String[] oldRelays; 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /common-ui/src/main/res/values-land/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 18 | 19 | 20 | 96dp 21 | -------------------------------------------------------------------------------- /app/src/main/java/org/opensilk/common/rx/RxBus.java: -------------------------------------------------------------------------------- 1 | package org.opensilk.common.rx; 2 | 3 | import org.opensilk.common.core.dagger2.ActivityScope; 4 | 5 | import javax.inject.Inject; 6 | 7 | import rx.Subscription; 8 | import rx.functions.Action1; 9 | import rx.subjects.BehaviorSubject; 10 | 11 | /** 12 | * Uber simple event bus. all access must be on main thread 13 | * 14 | * Created by drew on 3/12/15. 15 | */ 16 | @ActivityScope 17 | public class RxBus { 18 | public static final String SERVICE_NAME = RxBus.class.getName(); 19 | 20 | final BehaviorSubject monitorSubject = BehaviorSubject.create(); 21 | 22 | @Inject 23 | public RxBus() { 24 | } 25 | 26 | public void post(Object event) { 27 | monitorSubject.onNext(event); 28 | } 29 | 30 | public Subscription subscribe(Action1 onNext, Class type) { 31 | return monitorSubject.asObservable().ofType(type).subscribe(onNext); 32 | } 33 | 34 | } 35 | -------------------------------------------------------------------------------- /app-rest-client/src/main/java/syncthing/api/model/event/ItemFinished.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015 OpenSilk Productions LLC 3 | * 4 | * This Source Code Form is subject to the terms of the Mozilla Public 5 | * License, v. 2.0. If a copy of the MPL was not distributed with this 6 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 7 | * 8 | */ 9 | 10 | package syncthing.api.model.event; 11 | 12 | import org.joda.time.DateTime; 13 | 14 | import syncthing.api.model.ItemAction; 15 | 16 | /** 17 | * Created by drew on 10/11/15. 18 | */ 19 | public class ItemFinished extends Event { 20 | public ItemFinished(long id, DateTime time, EventType type, Data data) { 21 | super(id, time, type, data); 22 | } 23 | 24 | public static class Data { 25 | public String item; 26 | public String folder; 27 | public String error; 28 | public String type; 29 | public ItemAction action; 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /common-ui/src/main/res/values-sw320dp/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 18 | 19 | 20 | 21 | 264dp 22 | -------------------------------------------------------------------------------- /common-ui/src/main/res/values-sw360dp/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 18 | 19 | 20 | 21 | 304dp 22 | -------------------------------------------------------------------------------- /common-ui/src/main/res/values-sw384dp/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 18 | 19 | 20 | 21 | 320dp 22 | -------------------------------------------------------------------------------- /app/src/main/java/syncthing/api/SessionScope.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015 OpenSilk Productions LLC 3 | * 4 | * This program is free software: you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation, either version 3 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program. If not, see . 16 | */ 17 | 18 | package syncthing.api; 19 | 20 | import javax.inject.Scope; 21 | 22 | /** 23 | * Created by drew on 3/4/15. 24 | */ 25 | @Scope 26 | public @interface SessionScope { 27 | } 28 | -------------------------------------------------------------------------------- /common-ui/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 17 | 18 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /app-rest-client/src/main/java/syncthing/api/model/event/DeviceDiscovered.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015 OpenSilk Productions LLC 3 | * 4 | * This Source Code Form is subject to the terms of the Mozilla Public 5 | * License, v. 2.0. If a copy of the MPL was not distributed with this 6 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 7 | * 8 | */ 9 | 10 | package syncthing.api.model.event; 11 | 12 | import org.joda.time.DateTime; 13 | 14 | /** 15 | * Created by drew on 10/11/15. 16 | */ 17 | public class DeviceDiscovered extends Event { 18 | public DeviceDiscovered(long id, DateTime time, EventType type, Data data) { 19 | super(id, time, type, data); 20 | } 21 | 22 | public static class Data { 23 | public String device; 24 | public String[] addrs; 25 | public Relay[] relays; 26 | } 27 | 28 | public static class Relay { 29 | public String url; 30 | public int latency; 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /common-core/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 17 | 18 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /common-ui/src/main/java/org/opensilk/common/ui/mortar/HasName.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015 OpenSilk Productions LLC 3 | * 4 | * This program is free software: you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation, either version 3 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program. If not, see . 16 | */ 17 | 18 | package org.opensilk.common.ui.mortar; 19 | 20 | /** 21 | * Created by drew on 5/5/15. 22 | */ 23 | public interface HasName { 24 | String getName(); 25 | } 26 | -------------------------------------------------------------------------------- /common-ui/src/main/res/values-v21/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 18 | 19 | 20 | 4dp 21 | 8dp 22 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/dots_vertical_grey600_24dp.xml: -------------------------------------------------------------------------------- 1 | 2 | 18 | 19 | -------------------------------------------------------------------------------- /app/src/main/java/syncthing/android/ui/binding/ViewBinderComponent.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015 OpenSilk Productions LLC 3 | * 4 | * This program is free software: you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation, either version 3 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program. If not, see . 16 | */ 17 | 18 | package syncthing.android.ui.binding; 19 | 20 | /** 21 | * Created by drew on 11/11/15. 22 | */ 23 | public interface ViewBinderComponent { 24 | ViewBinder viewBinder(); 25 | } 26 | -------------------------------------------------------------------------------- /common-core/src/main/java/org/opensilk/common/core/dagger2/ForActivity.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2013 Square, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.opensilk.common.core.dagger2; 18 | 19 | import java.lang.annotation.Retention; 20 | 21 | import javax.inject.Qualifier; 22 | 23 | import static java.lang.annotation.RetentionPolicy.RUNTIME; 24 | 25 | @Qualifier @Retention(RUNTIME) 26 | public @interface ForActivity { 27 | } 28 | -------------------------------------------------------------------------------- /common-core/src/main/java/org/opensilk/common/core/dagger2/ForApplication.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2013 Square, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.opensilk.common.core.dagger2; 18 | 19 | import java.lang.annotation.Retention; 20 | 21 | import javax.inject.Qualifier; 22 | 23 | import static java.lang.annotation.RetentionPolicy.RUNTIME; 24 | 25 | @Qualifier @Retention(RUNTIME) 26 | public @interface ForApplication { 27 | } 28 | -------------------------------------------------------------------------------- /common-ui/src/main/java/org/opensilk/common/ui/mortar/ActivityResultsListener.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2015 OpenSilk Productions LLC 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.opensilk.common.ui.mortar; 18 | 19 | import android.content.Intent; 20 | 21 | /** 22 | * Created by drew on 3/10/15. 23 | */ 24 | public interface ActivityResultsListener { 25 | boolean onActivityResult(int requestCode, int resultCode, Intent data); 26 | } 27 | -------------------------------------------------------------------------------- /common-ui/src/main/java/org/opensilk/common/ui/mortar/HasOptionsMenu.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015 OpenSilk Productions LLC 3 | * 4 | * This program is free software: you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation, either version 3 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program. If not, see . 16 | */ 17 | 18 | package org.opensilk.common.ui.mortar; 19 | 20 | /** 21 | * Created by drew on 5/5/15. 22 | */ 23 | public interface HasOptionsMenu { 24 | ActionBarMenuHandler getMenuConfig(); 25 | } 26 | -------------------------------------------------------------------------------- /common-ui/src/main/java/org/opensilk/common/ui/mortar/Lifecycle.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015 OpenSilk Productions LLC 3 | * 4 | * This program is free software: you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation, either version 3 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program. If not, see . 16 | */ 17 | 18 | package org.opensilk.common.ui.mortar; 19 | 20 | /** 21 | * Created by drew on 10/12/15. 22 | */ 23 | public enum Lifecycle { 24 | START, 25 | RESUME, 26 | PAUSE, 27 | STOP, 28 | } 29 | -------------------------------------------------------------------------------- /app/src/main/java/syncthing/android/service/SyncthingInstanceScope.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015 OpenSilk Productions LLC 3 | * 4 | * This program is free software: you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation, either version 3 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program. If not, see . 16 | */ 17 | 18 | package syncthing.android.service; 19 | 20 | import javax.inject.Scope; 21 | 22 | /** 23 | * Created by drew on 3/21/15. 24 | */ 25 | @Scope 26 | public @interface SyncthingInstanceScope { 27 | } 28 | -------------------------------------------------------------------------------- /app-rest-client/src/main/java/syncthing/api/model/event/FolderErrors.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015 OpenSilk Productions LLC 3 | * 4 | * This Source Code Form is subject to the terms of the Mozilla Public 5 | * License, v. 2.0. If a copy of the MPL was not distributed with this 6 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 7 | * 8 | */ 9 | 10 | package syncthing.api.model.event; 11 | 12 | import org.joda.time.DateTime; 13 | 14 | import java.util.Collections; 15 | import java.util.List; 16 | 17 | /** 18 | * Created by drew on 10/11/15. 19 | */ 20 | public class FolderErrors extends Event { 21 | public FolderErrors(long id, DateTime time, EventType type, Data data) { 22 | super(id, time, type, data); 23 | } 24 | 25 | public static class Data { 26 | public List errors = Collections.emptyList(); 27 | public String folder; 28 | } 29 | public static class Error { 30 | public String error; 31 | public String path; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /app/src/main/java/syncthing/android/ui/binding/ViewBinder.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015 OpenSilk Productions LLC 3 | * 4 | * This program is free software: you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation, either version 3 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program. If not, see . 16 | */ 17 | 18 | package syncthing.android.ui.binding; 19 | 20 | import android.view.View; 21 | 22 | /** 23 | * Created by drew on 11/11/15. 24 | */ 25 | public interface ViewBinder { 26 | void bindView(View view); 27 | } 28 | -------------------------------------------------------------------------------- /common-ui/src/main/res/layout/mtrl_list_item_oneline_text.xml: -------------------------------------------------------------------------------- 1 | 2 | 18 | 19 | -------------------------------------------------------------------------------- /common-ui/src/main/res/layout/mtrl_list_item_oneline_icontext.xml: -------------------------------------------------------------------------------- 1 | 2 | 18 | 19 | -------------------------------------------------------------------------------- /app-rest-client/src/main/java/syncthing/api/model/Versioning.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015 OpenSilk Productions LLC 3 | * 4 | * This Source Code Form is subject to the terms of the Mozilla Public 5 | * License, v. 2.0. If a copy of the MPL was not distributed with this 6 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 7 | * 8 | */ 9 | 10 | package syncthing.api.model; 11 | 12 | import java.io.Serializable; 13 | 14 | /** 15 | * Created by drew on 11/10/15. 16 | */ 17 | public abstract class Versioning implements Serializable, Cloneable { 18 | private static final long serialVersionUID = -317033636068012348L; 19 | public VersioningType type; 20 | public T params; 21 | protected Versioning(VersioningType type, T params) { 22 | this.type = type; 23 | this.params = params; 24 | } 25 | public Versioning clone() { 26 | try { 27 | return (Versioning) super.clone(); 28 | } catch (CloneNotSupportedException e) { 29 | throw new RuntimeException(e); 30 | } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /app-rest-client/src/main/java/syncthing/api/model/event/FolderSummary.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015 OpenSilk Productions LLC 3 | * 4 | * This Source Code Form is subject to the terms of the Mozilla Public 5 | * License, v. 2.0. If a copy of the MPL was not distributed with this 6 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 7 | * 8 | */ 9 | 10 | package syncthing.api.model.event; 11 | 12 | import org.joda.time.DateTime; 13 | 14 | import syncthing.api.model.Model; 15 | 16 | /** 17 | * Created by drew on 10/11/15. 18 | */ 19 | public class FolderSummary extends Event { 20 | public FolderSummary(long id, DateTime time, EventType type, Data data) { 21 | super(id, time, type, data); 22 | } 23 | 24 | public static class Data { 25 | public String folder; 26 | public Model summary; 27 | 28 | public Data() { 29 | } 30 | 31 | public Data(String folder, Model summary) { 32 | this.folder = folder; 33 | this.summary = summary; 34 | } 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /app/src/main/java/syncthing/android/identicon/IdenticonComponent.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015 OpenSilk Productions LLC 3 | * 4 | * This program is free software: you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation, either version 3 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program. If not, see . 16 | */ 17 | 18 | package syncthing.android.identicon; 19 | 20 | /** 21 | * Created by drew on 10/13/15. 22 | */ 23 | public interface IdenticonComponent extends android.databinding.DataBindingComponent { 24 | IdenticonGenerator identiconGenerator(); 25 | } 26 | -------------------------------------------------------------------------------- /common-ui/src/main/java/org/opensilk/common/ui/mortar/DrawerOwnerActivity.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015 OpenSilk Productions LLC 3 | * 4 | * This program is free software: you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation, either version 3 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program. If not, see . 16 | */ 17 | 18 | package org.opensilk.common.ui.mortar; 19 | 20 | import org.opensilk.common.core.mortar.HasScope; 21 | 22 | /** 23 | * Created by drew on 9/19/15. 24 | */ 25 | public interface DrawerOwnerActivity extends DrawerController, HasScope { 26 | } 27 | -------------------------------------------------------------------------------- /common-ui/src/main/res/animator-v21/fab_elevation.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 7 | 8 | 14 | 15 | 16 | 17 | 18 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /common-ui/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 18 | 19 | 20 | 22 | sans-serif-light 23 | -------------------------------------------------------------------------------- /app-rest-client/src/main/java/syncthing/api/model/VersioningNone.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015 OpenSilk Productions LLC 3 | * 4 | * This Source Code Form is subject to the terms of the Mozilla Public 5 | * License, v. 2.0. If a copy of the MPL was not distributed with this 6 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 7 | * 8 | */ 9 | 10 | package syncthing.api.model; 11 | 12 | import java.io.Serializable; 13 | 14 | /** 15 | * Created by drew on 11/10/15. 16 | */ 17 | public class VersioningNone extends Versioning { 18 | private static final long serialVersionUID = -3409061834421610335L; 19 | 20 | public VersioningNone(VersioningType type) { 21 | super(type, Params.INSTANCE); 22 | } 23 | 24 | public static class Params implements Serializable, Cloneable { 25 | private static final long serialVersionUID = 7458696063620732833L; 26 | private static final Params INSTANCE = new Params(); 27 | } 28 | 29 | @Override 30 | public VersioningNone clone() { 31 | return (VersioningNone) super.clone(); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /app/src/main/java/syncthing/android/ui/common/Expandable.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015 OpenSilk Productions LLC 3 | * 4 | * This program is free software: you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation, either version 3 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program. If not, see . 16 | */ 17 | 18 | package syncthing.android.ui.common; 19 | 20 | import android.support.annotation.IdRes; 21 | 22 | /** 23 | * Created by drew on 3/20/15. 24 | */ 25 | public interface Expandable { 26 | void setExpanded(boolean expanded); 27 | boolean isExpanded(); 28 | @IdRes int getExpandableViewId(); 29 | } 30 | -------------------------------------------------------------------------------- /app/src/main/java/syncthing/api/NullHostNameVerifier.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015 OpenSilk Productions LLC 3 | * 4 | * This program is free software: you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation, either version 3 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program. If not, see . 16 | */ 17 | 18 | package syncthing.api; 19 | 20 | import javax.net.ssl.HostnameVerifier; 21 | import javax.net.ssl.SSLSession; 22 | 23 | public class NullHostNameVerifier implements HostnameVerifier { 24 | @Override 25 | public boolean verify(String hostname, SSLSession session) { 26 | return true; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /common-core/src/main/java/org/opensilk/common/core/rx/HoldsSubscription.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014 OpenSilk Productions LLC 3 | * 4 | * This program is free software: you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation, either version 3 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program. If not, see . 16 | */ 17 | 18 | package org.opensilk.common.core.rx; 19 | 20 | import rx.Subscription; 21 | 22 | /** 23 | * Created by drew on 10/22/14. 24 | */ 25 | public interface HoldsSubscription { 26 | void addSubscription(Subscription subscription); 27 | void removeSubscription(Subscription subscription); 28 | } 29 | -------------------------------------------------------------------------------- /app/src/main/res/xml/prefs_ui.xml: -------------------------------------------------------------------------------- 1 | 2 | 18 | 19 | 20 | 21 | 25 | 26 | -------------------------------------------------------------------------------- /app/src/main/res/menu/new_folder.xml: -------------------------------------------------------------------------------- 1 | 2 | 18 | 19 | 21 | 22 | 26 | 27 | -------------------------------------------------------------------------------- /app/src/main/java/syncthing/android/ui/binding/BindingSubscriptionsHolder.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015 OpenSilk Productions LLC 3 | * 4 | * This program is free software: you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation, either version 3 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program. If not, see . 16 | */ 17 | 18 | package syncthing.android.ui.binding; 19 | 20 | import rx.subscriptions.CompositeSubscription; 21 | 22 | /** 23 | * Created by drew on 11/11/15. 24 | */ 25 | public interface BindingSubscriptionsHolder extends android.databinding.DataBindingComponent { 26 | CompositeSubscription bindingSubscriptions(); 27 | } 28 | -------------------------------------------------------------------------------- /common-ui/src/main/java/org/opensilk/common/ui/mortar/DialogPresenterActivity.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015 OpenSilk Productions LLC 3 | * 4 | * This program is free software: you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation, either version 3 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program. If not, see . 16 | */ 17 | 18 | package org.opensilk.common.ui.mortar; 19 | 20 | import org.opensilk.common.core.mortar.HasScope; 21 | 22 | /** 23 | * Created by drew on 10/15/15. 24 | */ 25 | public interface DialogPresenterActivity extends HasScope { 26 | void showDialog(DialogFactory factory); 27 | void dismissDialog(); 28 | } 29 | -------------------------------------------------------------------------------- /app/src/main/res/menu/folder_ignores.xml: -------------------------------------------------------------------------------- 1 | 2 | 18 | 19 | 21 | 22 | 26 | 27 | -------------------------------------------------------------------------------- /app-rest-client/src/main/java/syncthing/api/model/ConnectionInfo.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015 OpenSilk Productions LLC 3 | * 4 | * This Source Code Form is subject to the terms of the Mozilla Public 5 | * License, v. 2.0. If a copy of the MPL was not distributed with this 6 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 7 | * 8 | */ 9 | 10 | package syncthing.api.model; 11 | 12 | import org.joda.time.DateTime; 13 | 14 | import syncthing.api.ApiUtils; 15 | 16 | /** 17 | * Created by drew on 3/1/15. 18 | */ 19 | public class ConnectionInfo { 20 | public DateTime at; 21 | public long inBytesTotal; 22 | public long outBytesTotal; 23 | public String address; 24 | public String clientVersion; 25 | public boolean paused; 26 | public boolean connected; 27 | public ConnectionType type = ConnectionType.UNKNOWN; 28 | //pojo only 29 | public transient String deviceId; 30 | public transient long inbps; 31 | public transient long outbps; 32 | public transient long lastUpdate; 33 | 34 | @Override 35 | public String toString() { 36 | return ApiUtils.reflectionToString(this); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /common-core/src/main/java/org/opensilk/common/core/dagger2/ScreenScope.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015 OpenSilk Productions LLC 3 | * 4 | * This program is free software: you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation, either version 3 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program. If not, see . 16 | */ 17 | 18 | package org.opensilk.common.core.dagger2; 19 | 20 | import java.lang.annotation.Retention; 21 | 22 | import javax.inject.Scope; 23 | 24 | import static java.lang.annotation.RetentionPolicy.RUNTIME; 25 | 26 | /** 27 | * Created by drew on 4/28/15. 28 | */ 29 | @Scope 30 | @Retention(RUNTIME) 31 | public @interface ScreenScope { 32 | } 33 | -------------------------------------------------------------------------------- /common-core/src/main/java/org/opensilk/common/core/dagger2/SubScreenScope.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015 OpenSilk Productions LLC 3 | * 4 | * This program is free software: you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation, either version 3 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program. If not, see . 16 | */ 17 | 18 | package org.opensilk.common.core.dagger2; 19 | 20 | import java.lang.annotation.Retention; 21 | import java.lang.annotation.RetentionPolicy; 22 | 23 | import javax.inject.Scope; 24 | 25 | /** 26 | * Created by drew on 9/17/15. 27 | */ 28 | @Scope 29 | @Retention(RetentionPolicy.RUNTIME) 30 | public @interface SubScreenScope { 31 | } 32 | -------------------------------------------------------------------------------- /common-ui/src/main/java/org/opensilk/common/ui/mortar/DialogFactory.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015 OpenSilk Productions LLC 3 | * 4 | * This program is free software: you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation, either version 3 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program. If not, see . 16 | */ 17 | 18 | package org.opensilk.common.ui.mortar; 19 | 20 | import android.app.Dialog; 21 | import android.content.Context; 22 | 23 | import java.io.Serializable; 24 | 25 | import rx.functions.Func1; 26 | 27 | /** 28 | * Created by drew on 10/15/15. 29 | */ 30 | public interface DialogFactory extends Func1, Serializable { 31 | } 32 | -------------------------------------------------------------------------------- /common-ui/src/main/java/org/opensilk/common/ui/mortar/DrawerController.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2014 OpenSilk Productions LLC 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.opensilk.common.ui.mortar; 18 | 19 | /** 20 | * Allows presenters to control drawers 21 | * 22 | * Created by drew on 3/24/15. 23 | */ 24 | public interface DrawerController { 25 | void openDrawer(int gravity); 26 | void openDrawers(); 27 | void closeDrawer(int gravity); 28 | void closeDrawers(); 29 | void enableDrawer(int gravity, boolean enable); 30 | void enableDrawers(boolean enable); 31 | } 32 | -------------------------------------------------------------------------------- /app-rest-client/src/main/java/syncthing/api/model/Model.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015 OpenSilk Productions LLC 3 | * 4 | * This Source Code Form is subject to the terms of the Mozilla Public 5 | * License, v. 2.0. If a copy of the MPL was not distributed with this 6 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 7 | * 8 | */ 9 | 10 | package syncthing.api.model; 11 | 12 | import org.joda.time.DateTime; 13 | 14 | import syncthing.api.ApiUtils; 15 | 16 | /** 17 | * Created by drew on 3/1/15. 18 | */ 19 | public class Model { 20 | public long globalBytes; 21 | public long globalDeleted; 22 | public long globalFiles; 23 | public long localBytes; 24 | public long localDeleted; 25 | public long localFiles; 26 | public long inSyncBytes; 27 | public long inSyncFiles; 28 | public long needBytes; 29 | public long needFiles; 30 | public ModelState state; 31 | public String invalid; 32 | public DateTime stateChanged; 33 | public boolean ignorePatterns; 34 | public long version; 35 | 36 | @Override 37 | public String toString() { 38 | return ApiUtils.reflectionToString(this); 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /common-core/src/main/java/org/opensilk/common/core/dagger2/ActivityScope.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015 OpenSilk Productions LLC 3 | * 4 | * This program is free software: you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation, either version 3 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program. If not, see . 16 | */ 17 | 18 | package org.opensilk.common.core.dagger2; 19 | 20 | import java.lang.annotation.Retention; 21 | 22 | import javax.inject.Scope; 23 | 24 | import static java.lang.annotation.RetentionPolicy.RUNTIME; 25 | 26 | /** 27 | * Created by drew on 4/28/15. 28 | */ 29 | @Scope 30 | @Retention(RUNTIME) 31 | public @interface ActivityScope { 32 | } 33 | -------------------------------------------------------------------------------- /common-core/src/main/java/org/opensilk/common/core/dagger2/ForScreen.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014 OpenSilk Productions LLC 3 | * 4 | * This program is free software: you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation, either version 3 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program. If not, see . 16 | */ 17 | 18 | package org.opensilk.common.core.dagger2; 19 | 20 | /** 21 | * Created by drew on 6/20/14. 22 | */ 23 | 24 | import java.lang.annotation.Retention; 25 | 26 | import javax.inject.Qualifier; 27 | 28 | import static java.lang.annotation.RetentionPolicy.RUNTIME; 29 | 30 | @Qualifier @Retention(RUNTIME) 31 | public @interface ForScreen { 32 | } 33 | -------------------------------------------------------------------------------- /app/src/main/java/syncthing/android/ui/SyncthingActivityModule.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015 OpenSilk Productions LLC 3 | * 4 | * This program is free software: you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation, either version 3 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program. If not, see . 16 | */ 17 | 18 | package syncthing.android.ui; 19 | 20 | import org.opensilk.common.ui.mortar.ActivityResultsOwnerModule; 21 | 22 | import dagger.Module; 23 | 24 | /** 25 | * Created by drew on 11/3/15. 26 | */ 27 | @Module( 28 | includes = { 29 | ActivityResultsOwnerModule.class 30 | } 31 | ) 32 | public class SyncthingActivityModule { 33 | } 34 | -------------------------------------------------------------------------------- /common-ui/src/main/java/org/opensilk/common/ui/mortarfragment/FragmentManagerOwnerActivity.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2015 OpenSilk Productions LLC 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.opensilk.common.ui.mortarfragment; 18 | 19 | import android.support.annotation.IdRes; 20 | import android.support.v4.app.FragmentManager; 21 | 22 | import org.opensilk.common.core.mortar.HasScope; 23 | 24 | /** 25 | * Created by drew on 3/24/15. 26 | */ 27 | public interface FragmentManagerOwnerActivity extends HasScope { 28 | FragmentManager getSupportFragmentManager(); 29 | @IdRes int getContainerViewId(); 30 | } 31 | -------------------------------------------------------------------------------- /app/src/main/java/syncthing/api/SessionManagerComponent.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015 OpenSilk Productions LLC 3 | * 4 | * This program is free software: you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation, either version 3 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program. If not, see . 16 | */ 17 | 18 | package syncthing.api; 19 | 20 | import com.google.gson.Gson; 21 | import com.squareup.okhttp.OkHttpClient; 22 | 23 | /** 24 | * Created by drew on 10/10/15. 25 | */ 26 | public interface SessionManagerComponent { 27 | Gson gson(); 28 | OkHttpClient okClient(); 29 | SessionManager sessionManager(); 30 | SessionComponent newSession(SessionModule module); 31 | } 32 | -------------------------------------------------------------------------------- /app/src/main/java/syncthing/android/ui/welcome/WelcomePageComponent.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015 OpenSilk Productions LLC 3 | * 4 | * This program is free software: you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation, either version 3 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program. If not, see . 16 | */ 17 | 18 | package syncthing.android.ui.welcome; 19 | 20 | import org.opensilk.common.core.dagger2.SubScreenScope; 21 | 22 | import dagger.Component; 23 | 24 | /** 25 | * Created by drew on 10/14/15. 26 | */ 27 | @SubScreenScope 28 | @Component(dependencies = WelcomeComponent.class) 29 | public interface WelcomePageComponent { 30 | void inject(WelcomePage5View view); 31 | } 32 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_login.xml: -------------------------------------------------------------------------------- 1 | 2 | 18 | 19 | -------------------------------------------------------------------------------- /common-ui/src/main/res/values-v21/styles_material.xml: -------------------------------------------------------------------------------- 1 | 2 | 18 | 19 | 20 | 23 | 24 | 27 | -------------------------------------------------------------------------------- /common-ui/src/main/java/org/opensilk/common/ui/mortar/ActionModeActivity.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015 OpenSilk Productions LLC 3 | * 4 | * This program is free software: you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation, either version 3 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program. If not, see . 16 | */ 17 | 18 | package org.opensilk.common.ui.mortar; 19 | 20 | import android.support.v7.view.ActionMode; 21 | 22 | import org.opensilk.common.core.mortar.HasScope; 23 | 24 | /** 25 | * Created by drew on 10/1/15. 26 | */ 27 | public interface ActionModeActivity extends HasScope { 28 | ActionMode startSupportActionMode(ActionMode.Callback callback); 29 | void cancelActionMode(); 30 | } 31 | -------------------------------------------------------------------------------- /common-ui/src/main/java/org/opensilk/common/ui/mortar/DrawerListenerRegistrar.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015 OpenSilk Productions LLC 3 | * 4 | * This program is free software: you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation, either version 3 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program. If not, see . 16 | */ 17 | 18 | package org.opensilk.common.ui.mortar; 19 | 20 | import android.support.v4.widget.DrawerLayout; 21 | 22 | import mortar.MortarScope; 23 | 24 | /** 25 | * Allows presenters to register for drawer events 26 | * 27 | * Created by drew on 9/19/15. 28 | */ 29 | public interface DrawerListenerRegistrar { 30 | void register(MortarScope scope, DrawerLayout.DrawerListener listener); 31 | } 32 | -------------------------------------------------------------------------------- /common-ui/src/main/java/org/opensilk/common/ui/recycler/NoDecorate.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015 OpenSilk Productions LLC 3 | * 4 | * This program is free software: you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation, either version 3 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program. If not, see . 16 | */ 17 | 18 | package org.opensilk.common.ui.recycler; 19 | 20 | import java.lang.annotation.ElementType; 21 | import java.lang.annotation.Retention; 22 | import java.lang.annotation.RetentionPolicy; 23 | import java.lang.annotation.Target; 24 | 25 | /** 26 | * Created by drew on 3/13/15. 27 | */ 28 | @Target(ElementType.TYPE) 29 | @Retention(RetentionPolicy.RUNTIME) 30 | public @interface NoDecorate { 31 | } 32 | -------------------------------------------------------------------------------- /common-ui/src/main/java/org/opensilk/common/ui/mortar/ScreenTitle.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015 OpenSilk Productions LLC 3 | * 4 | * This program is free software: you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation, either version 3 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program. If not, see . 16 | */ 17 | 18 | package org.opensilk.common.ui.mortar; 19 | 20 | import java.lang.annotation.ElementType; 21 | import java.lang.annotation.Retention; 22 | import java.lang.annotation.RetentionPolicy; 23 | import java.lang.annotation.Target; 24 | 25 | /** 26 | * Created by drew on 5/5/15. 27 | */ 28 | @Target(ElementType.TYPE) @Retention(RetentionPolicy.RUNTIME) 29 | public @interface ScreenTitle { 30 | int value(); 31 | } -------------------------------------------------------------------------------- /common-ui/src/main/java/org/opensilk/common/ui/mortar/ActivityResultsOwnerModule.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2015 OpenSilk Productions LLC 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.opensilk.common.ui.mortar; 18 | 19 | import org.opensilk.common.core.dagger2.ActivityScope; 20 | 21 | import dagger.Provides; 22 | 23 | /** 24 | * Created by drew on 3/24/15. 25 | */ 26 | @dagger.Module 27 | public class ActivityResultsOwnerModule { 28 | //Proxy to hide ActivityResultsOwner 29 | @Provides @ActivityScope 30 | public ActivityResultsController provideActivityResultsController(ActivityResultsOwner owner) { 31 | return owner; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /app/src/main/res/menu/service_settings.xml: -------------------------------------------------------------------------------- 1 | 2 | 18 | 19 | 21 | 22 | 28 | 29 | -------------------------------------------------------------------------------- /common-ui/src/main/res/values-large/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 18 | 19 | 20 | 85% 21 | 90% 22 | 90% 23 | 80% 24 | -------------------------------------------------------------------------------- /common-ui/src/main/res/values-sw760dp/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 18 | 19 | 20 | 80% 21 | 70% 22 | 80% 23 | 80% 24 | -------------------------------------------------------------------------------- /common-ui/src/main/res/values-sw800dp/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 18 | 19 | 20 | 70% 21 | 80% 22 | 80% 23 | 70% 24 | -------------------------------------------------------------------------------- /common-ui/src/main/res/values-xlarge/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 18 | 19 | 20 | 70% 21 | 80% 22 | 80% 23 | 70% 24 | -------------------------------------------------------------------------------- /common-ui/src/main/java/org/opensilk/common/ui/mortar/ActivityResultsActivity.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2015 OpenSilk Productions LLC 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.opensilk.common.ui.mortar; 18 | 19 | import android.content.Intent; 20 | import android.os.Bundle; 21 | 22 | import org.opensilk.common.core.mortar.HasScope; 23 | 24 | /** 25 | * Created by drew on 3/10/15. 26 | */ 27 | public interface ActivityResultsActivity extends HasScope { 28 | void startActivityForResult(Intent intent, int requestCode); 29 | void startActivityForResult(Intent intent, int requestCode, Bundle options); 30 | void setResultAndFinish(int resultCode, Intent data); 31 | } 32 | -------------------------------------------------------------------------------- /common-ui/src/main/java/org/opensilk/common/ui/recycler/DragSwipeViewHolder.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2015 Paul Burke 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.opensilk.common.ui.recycler; 18 | 19 | import android.support.v7.widget.helper.ItemTouchHelper; 20 | import android.view.View; 21 | 22 | /** 23 | * Interface to notify an item ViewHolder of relevant callbacks from {@link 24 | * android.support.v7.widget.helper.ItemTouchHelper.Callback}. 25 | * 26 | * @author Paul Burke (ipaulpro) 27 | */ 28 | public interface DragSwipeViewHolder extends SelectableItemViewHolder { 29 | /** 30 | * @return View to install touch listener on 31 | */ 32 | View getDragHandle(); 33 | } -------------------------------------------------------------------------------- /app/src/main/res/menu/apikey_overflow.xml: -------------------------------------------------------------------------------- 1 | 2 | 18 | 19 | 21 | 22 | 26 | 27 | 31 | 32 | -------------------------------------------------------------------------------- /app/src/main/java/syncthing/android/ui/common/ActivityRequestCodes.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015 OpenSilk Productions LLC 3 | * 4 | * This program is free software: you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation, either version 3 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program. If not, see . 16 | */ 17 | 18 | package syncthing.android.ui.common; 19 | 20 | /** 21 | * Created by drew on 3/12/15. 22 | */ 23 | public interface ActivityRequestCodes { 24 | int _BASE = 200; 25 | int LOGIN_ACTIVITY = _BASE << 1; 26 | int SCAN_QR = _BASE << 2; 27 | int DIRECTORY_PICKER = _BASE << 3; 28 | int IMPORT_CONFIG = _BASE << 4; 29 | int MANAGE_ACTIVITY = _BASE << 5; 30 | int WELCOME_ACTIVITY = _BASE << 6; 31 | int FOLDER_PICKER = _BASE << 7; 32 | } 33 | -------------------------------------------------------------------------------- /app/src/main/java/syncthing/android/ui/welcome/WelcomePage0.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015 OpenSilk Productions LLC 3 | * 4 | * This program is free software: you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation, either version 3 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program. If not, see . 16 | */ 17 | 18 | package syncthing.android.ui.welcome; 19 | 20 | import org.opensilk.common.ui.mortar.Layout; 21 | import org.opensilk.common.ui.mortar.Screen; 22 | import org.opensilk.common.ui.mortar.WithComponentFactory; 23 | 24 | import syncthing.android.R; 25 | 26 | /** 27 | * Created by drew on 10/14/15. 28 | */ 29 | @Layout(R.layout.screen_welcome_p0) 30 | @WithComponentFactory(WelcomePageComponentFactory.class) 31 | public class WelcomePage0 extends Screen { 32 | 33 | } 34 | -------------------------------------------------------------------------------- /app/src/main/java/syncthing/android/ui/welcome/WelcomePage1.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015 OpenSilk Productions LLC 3 | * 4 | * This program is free software: you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation, either version 3 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program. If not, see . 16 | */ 17 | 18 | package syncthing.android.ui.welcome; 19 | 20 | import org.opensilk.common.ui.mortar.Layout; 21 | import org.opensilk.common.ui.mortar.Screen; 22 | import org.opensilk.common.ui.mortar.WithComponentFactory; 23 | 24 | import syncthing.android.R; 25 | 26 | /** 27 | * Created by drew on 10/14/15. 28 | */ 29 | @Layout(R.layout.screen_welcome_p1) 30 | @WithComponentFactory(WelcomePageComponentFactory.class) 31 | public class WelcomePage1 extends Screen { 32 | 33 | } 34 | -------------------------------------------------------------------------------- /app/src/main/java/syncthing/android/ui/welcome/WelcomePage2.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015 OpenSilk Productions LLC 3 | * 4 | * This program is free software: you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation, either version 3 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program. If not, see . 16 | */ 17 | 18 | package syncthing.android.ui.welcome; 19 | 20 | import org.opensilk.common.ui.mortar.Layout; 21 | import org.opensilk.common.ui.mortar.Screen; 22 | import org.opensilk.common.ui.mortar.WithComponentFactory; 23 | 24 | import syncthing.android.R; 25 | 26 | /** 27 | * Created by drew on 10/14/15. 28 | */ 29 | @Layout(R.layout.screen_welcome_p2) 30 | @WithComponentFactory(WelcomePageComponentFactory.class) 31 | public class WelcomePage2 extends Screen { 32 | 33 | } 34 | -------------------------------------------------------------------------------- /app/src/main/java/syncthing/android/ui/welcome/WelcomePage3.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015 OpenSilk Productions LLC 3 | * 4 | * This program is free software: you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation, either version 3 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program. If not, see . 16 | */ 17 | 18 | package syncthing.android.ui.welcome; 19 | 20 | import org.opensilk.common.ui.mortar.Layout; 21 | import org.opensilk.common.ui.mortar.Screen; 22 | import org.opensilk.common.ui.mortar.WithComponentFactory; 23 | 24 | import syncthing.android.R; 25 | 26 | /** 27 | * Created by drew on 10/14/15. 28 | */ 29 | @Layout(R.layout.screen_welcome_p3) 30 | @WithComponentFactory(WelcomePageComponentFactory.class) 31 | public class WelcomePage3 extends Screen { 32 | 33 | } 34 | -------------------------------------------------------------------------------- /app/src/main/java/syncthing/android/ui/welcome/WelcomePage4.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015 OpenSilk Productions LLC 3 | * 4 | * This program is free software: you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation, either version 3 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program. If not, see . 16 | */ 17 | 18 | package syncthing.android.ui.welcome; 19 | 20 | import org.opensilk.common.ui.mortar.Layout; 21 | import org.opensilk.common.ui.mortar.Screen; 22 | import org.opensilk.common.ui.mortar.WithComponentFactory; 23 | 24 | import syncthing.android.R; 25 | 26 | /** 27 | * Created by drew on 10/14/15. 28 | */ 29 | @Layout(R.layout.screen_welcome_p4) 30 | @WithComponentFactory(WelcomePageComponentFactory.class) 31 | public class WelcomePage4 extends Screen { 32 | 33 | } 34 | -------------------------------------------------------------------------------- /app/src/main/java/syncthing/android/ui/welcome/WelcomePage5.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015 OpenSilk Productions LLC 3 | * 4 | * This program is free software: you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation, either version 3 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program. If not, see . 16 | */ 17 | 18 | package syncthing.android.ui.welcome; 19 | 20 | import org.opensilk.common.ui.mortar.Layout; 21 | import org.opensilk.common.ui.mortar.Screen; 22 | import org.opensilk.common.ui.mortar.WithComponentFactory; 23 | 24 | import syncthing.android.R; 25 | 26 | /** 27 | * Created by drew on 10/14/15. 28 | */ 29 | @Layout(R.layout.screen_welcome_pl) 30 | @WithComponentFactory(WelcomePageComponentFactory.class) 31 | public class WelcomePage5 extends Screen { 32 | 33 | } 34 | -------------------------------------------------------------------------------- /app/src/main/java/syncthing/api/SessionComponent.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015 OpenSilk Productions LLC 3 | * 4 | * This program is free software: you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation, either version 3 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program. If not, see . 16 | */ 17 | 18 | package syncthing.api; 19 | 20 | import dagger.Subcomponent; 21 | 22 | /** 23 | * Created by drew on 10/10/15. 24 | */ 25 | @SessionScope 26 | @Subcomponent( 27 | modules = { 28 | SessionModule.class, 29 | SyncthingApiModule.class, 30 | SyncthingApiLongpollModule.class 31 | } 32 | ) 33 | public interface SessionComponent { 34 | SessionController controller(); 35 | SyncthingApi syncthingApi(); 36 | } 37 | -------------------------------------------------------------------------------- /app/src/main/res/layout/banner.xml: -------------------------------------------------------------------------------- 1 | 2 | 18 | -------------------------------------------------------------------------------- /app/src/main/java/syncthing/api/SessionModule.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015 OpenSilk Productions LLC 3 | * 4 | * This program is free software: you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation, either version 3 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program. If not, see . 16 | */ 17 | 18 | package syncthing.api; 19 | 20 | import dagger.Module; 21 | import dagger.Provides; 22 | 23 | /** 24 | * Created by drew on 10/10/15. 25 | */ 26 | @Module 27 | public class SessionModule { 28 | 29 | final SyncthingApiConfig config; 30 | 31 | public SessionModule(SyncthingApiConfig config) { 32 | this.config = config; 33 | } 34 | 35 | @Provides @SessionScope 36 | public SyncthingApiConfig provideConfig(){ 37 | return config; 38 | } 39 | 40 | } 41 | -------------------------------------------------------------------------------- /common-ui/src/main/java/org/opensilk/common/ui/mortar/ActivityResultsController.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2015 OpenSilk Productions LLC 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.opensilk.common.ui.mortar; 18 | 19 | import android.content.Intent; 20 | import android.os.Bundle; 21 | import android.support.annotation.Nullable; 22 | 23 | import mortar.MortarScope; 24 | 25 | /** 26 | * Created by drew on 3/10/15. 27 | */ 28 | public interface ActivityResultsController { 29 | void register(MortarScope scope, ActivityResultsListener listener); 30 | void startActivityForResult(Intent intent, int requestCode, @Nullable Bundle options); 31 | void setResultAndFinish(int resultCode, @Nullable Intent data); 32 | } 33 | -------------------------------------------------------------------------------- /app/src/main/java/syncthing/android/ui/session/HeaderCardView.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015 OpenSilk Productions LLC 3 | * 4 | * This program is free software: you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation, either version 3 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program. If not, see . 16 | */ 17 | 18 | package syncthing.android.ui.session; 19 | 20 | import android.content.Context; 21 | import android.util.AttributeSet; 22 | import android.widget.TextView; 23 | 24 | import org.opensilk.common.ui.recycler.NoDecorate; 25 | 26 | 27 | /** 28 | * Created by drew on 3/1/15. 29 | */ 30 | @NoDecorate 31 | public class HeaderCardView extends TextView { 32 | 33 | public HeaderCardView(Context context, AttributeSet attrs) { 34 | super(context, attrs); 35 | } 36 | 37 | } 38 | -------------------------------------------------------------------------------- /app-rest-client/src/main/java/syncthing/api/model/GUIConfig.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015 OpenSilk Productions LLC 3 | * 4 | * This Source Code Form is subject to the terms of the Mozilla Public 5 | * License, v. 2.0. If a copy of the MPL was not distributed with this 6 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 7 | * 8 | */ 9 | 10 | package syncthing.api.model; 11 | 12 | import java.io.Serializable; 13 | 14 | /** 15 | * Created by drew on 3/1/15. 16 | */ 17 | public class GUIConfig implements Serializable, Cloneable { 18 | private static final long serialVersionUID = -3114592263160879843L; 19 | public boolean enabled; 20 | public String address; 21 | public String user; 22 | public String password; 23 | public boolean useTLS; 24 | public String apiKey; 25 | public boolean insecureAdminAccess; 26 | 27 | public static GUIConfig withDefaults() { 28 | GUIConfig c = new GUIConfig(); 29 | c.enabled = true; 30 | c.address = "127.0.0.1:8384"; 31 | return c; 32 | } 33 | 34 | @Override 35 | public GUIConfig clone() { 36 | try { 37 | return (GUIConfig) super.clone(); 38 | } catch (CloneNotSupportedException e) { 39 | throw new RuntimeException(e); 40 | } 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /app-rest-client/src/main/java/syncthing/api/model/FolderDeviceConfig.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015 OpenSilk Productions LLC 3 | * 4 | * This Source Code Form is subject to the terms of the Mozilla Public 5 | * License, v. 2.0. If a copy of the MPL was not distributed with this 6 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 7 | * 8 | */ 9 | 10 | package syncthing.api.model; 11 | 12 | import java.io.Serializable; 13 | 14 | /** 15 | * Created by drew on 3/17/15. 16 | */ 17 | public class FolderDeviceConfig implements Serializable { 18 | private static final long serialVersionUID = 6021159249890537441L; 19 | public String deviceID; 20 | 21 | public FolderDeviceConfig(String deviceID) { 22 | this.deviceID = deviceID; 23 | } 24 | 25 | @Override 26 | public boolean equals(Object o) { 27 | if (this == o) return true; 28 | if (o == null || getClass() != o.getClass()) return false; 29 | 30 | FolderDeviceConfig that = (FolderDeviceConfig) o; 31 | 32 | if (deviceID != null ? !deviceID.equals(that.deviceID) : that.deviceID != null) 33 | return false; 34 | 35 | return true; 36 | } 37 | 38 | @Override 39 | public int hashCode() { 40 | return deviceID != null ? deviceID.hashCode() : 0; 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /app/src/main/java/syncthing/android/ui/session/SessionModule.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015 OpenSilk Productions LLC 3 | * 4 | * This program is free software: you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation, either version 3 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program. If not, see . 16 | */ 17 | 18 | package syncthing.android.ui.session; 19 | 20 | import dagger.Provides; 21 | import syncthing.api.Credentials; 22 | 23 | /** 24 | * Created by drew on 3/11/15. 25 | */ 26 | @dagger.Module 27 | public class SessionModule { 28 | final SessionScreen screen; 29 | 30 | public SessionModule(SessionScreen screen) { 31 | this.screen = screen; 32 | } 33 | 34 | @Provides 35 | public Credentials provideCredentials(){ 36 | return screen.credentials; 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /app/src/main/java/syncthing/android/ui/settings/SettingsActivityComponent.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015 OpenSilk Productions LLC 3 | * 4 | * This program is free software: you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation, either version 3 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program. If not, see . 16 | */ 17 | 18 | package syncthing.android.ui.settings; 19 | 20 | import org.opensilk.common.core.dagger2.ActivityScope; 21 | 22 | import dagger.Component; 23 | import syncthing.android.AppComponent; 24 | 25 | /** 26 | * Created by drew on 10/13/15. 27 | */ 28 | @ActivityScope 29 | @Component( 30 | dependencies = { 31 | AppComponent.class, 32 | } 33 | ) 34 | public interface SettingsActivityComponent { 35 | void inject(ServiceSettingsFragment fragment); 36 | } 37 | -------------------------------------------------------------------------------- /app/src/main/java/syncthing/android/ui/settings/UiSettingsFragment.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015 OpenSilk Productions LLC 3 | * 4 | * This program is free software: you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation, either version 3 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program. If not, see . 16 | */ 17 | 18 | package syncthing.android.ui.settings; 19 | 20 | import android.os.Bundle; 21 | import android.preference.PreferenceFragment; 22 | 23 | import syncthing.android.R; 24 | 25 | /** 26 | * Created by drew on 4/7/15. 27 | */ 28 | public class UiSettingsFragment extends PreferenceFragment { 29 | 30 | @Override 31 | public void onCreate(Bundle savedInstanceState) { 32 | super.onCreate(savedInstanceState); 33 | addPreferencesFromResource(R.xml.prefs_ui); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /app/src/main/res/layout/session_header.xml: -------------------------------------------------------------------------------- 1 | 2 | 18 | 19 | 22 | 23 | 24 | 25 | 28 | 29 | -------------------------------------------------------------------------------- /common-core/src/main/java/org/opensilk/common/core/rx/SimpleObserver.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014 OpenSilk Productions LLC 3 | * 4 | * This program is free software: you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation, either version 3 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program. If not, see . 16 | */ 17 | 18 | package org.opensilk.common.core.rx; 19 | 20 | import rx.Observer; 21 | import timber.log.Timber; 22 | 23 | /** 24 | * Created by drew on 10/27/14. 25 | */ 26 | public class SimpleObserver implements Observer { 27 | @Override 28 | public void onCompleted() { 29 | 30 | } 31 | 32 | @Override 33 | public void onError(Throwable e) { 34 | Timber.w(e, "SimpleObserver onError()"); 35 | } 36 | 37 | @Override 38 | public void onNext(T t) { 39 | 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /common-ui/src/main/java/org/opensilk/common/ui/mortar/ToolbarOwnerActivity.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015 OpenSilk Productions LLC 3 | * 4 | * This program is free software: you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation, either version 3 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program. If not, see . 16 | */ 17 | 18 | package org.opensilk.common.ui.mortar; 19 | 20 | import android.support.v7.widget.Toolbar; 21 | 22 | import org.opensilk.common.core.mortar.HasScope; 23 | 24 | /** 25 | * Created by drew on 4/30/15. 26 | */ 27 | public interface ToolbarOwnerActivity extends HasScope { 28 | void setSupportActionBar(Toolbar toolbar); 29 | 30 | void setToolbarMenu(ActionBarMenuHandler menuConfig); 31 | 32 | void onToolbarAttached(Toolbar toolbar); 33 | 34 | void onToolbarDetached(Toolbar toolbar); 35 | } 36 | -------------------------------------------------------------------------------- /app/src/main/java/syncthing/android/ui/welcome/WelcomeFragment.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015 OpenSilk Productions LLC 3 | * 4 | * This program is free software: you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation, either version 3 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program. If not, see . 16 | */ 17 | 18 | package syncthing.android.ui.welcome; 19 | 20 | import org.opensilk.common.ui.mortar.Screen; 21 | import org.opensilk.common.ui.mortarfragment.MortarFragment; 22 | 23 | public class WelcomeFragment extends MortarFragment { 24 | public static String NAME = WelcomeFragment.class.getName(); 25 | 26 | public static WelcomeFragment newInstance() { 27 | return new WelcomeFragment(); 28 | } 29 | 30 | @Override 31 | protected Screen newScreen() { 32 | return new WelcomeScreen(); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /common-ui/src/main/res/layout/mtrl_list_item_twoline_avatartext.xml: -------------------------------------------------------------------------------- 1 | 2 | 18 | 19 | 23 | 24 | 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /app/src/main/java/syncthing/android/service/SyncthingInstanceModule.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015 OpenSilk Productions LLC 3 | * 4 | * This program is free software: you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation, either version 3 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program. If not, see . 16 | */ 17 | 18 | package syncthing.android.service; 19 | 20 | import dagger.Module; 21 | import dagger.Provides; 22 | 23 | /** 24 | * Created by drew on 3/21/15. 25 | */ 26 | @Module 27 | public class SyncthingInstanceModule { 28 | final SyncthingInstance service; 29 | 30 | public SyncthingInstanceModule(SyncthingInstance service) { 31 | this.service = service; 32 | } 33 | 34 | @Provides @SyncthingInstanceScope 35 | public SyncthingInstance provideService() { 36 | return service; 37 | } 38 | 39 | } 40 | -------------------------------------------------------------------------------- /common-core/src/main/java/org/opensilk/common/core/rx/RxLoader.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014 OpenSilk Productions LLC 3 | * 4 | * This program is free software: you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation, either version 3 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program. If not, see . 16 | */ 17 | 18 | package org.opensilk.common.core.rx; 19 | 20 | import java.util.List; 21 | 22 | import rx.Observable; 23 | 24 | /** 25 | * Created by drew on 10/24/14. 26 | */ 27 | public interface RxLoader { 28 | interface ContentChangedListener { 29 | void reload(); 30 | } 31 | Observable getObservable(); 32 | Observable> getListObservable(); 33 | void addContentChangedListener(ContentChangedListener l); 34 | void removeContentChangedListener(ContentChangedListener l); 35 | void reset(); 36 | } 37 | -------------------------------------------------------------------------------- /app/src/main/res/menu/popup_login_manage.xml: -------------------------------------------------------------------------------- 1 | 2 | 18 | 19 | 21 | 22 | 26 | 27 | 31 | 32 | 36 | 37 | -------------------------------------------------------------------------------- /common-ui/src/main/java/org/opensilk/common/ui/impl/SimpleAnimationListener.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014 OpenSilk Productions LLC 3 | * 4 | * This program is free software: you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation, either version 3 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program. If not, see . 16 | */ 17 | 18 | package org.opensilk.common.ui.impl; 19 | 20 | import android.view.animation.Animation; 21 | 22 | /** 23 | * Created by drew on 11/2/14. 24 | */ 25 | public class SimpleAnimationListener implements Animation.AnimationListener { 26 | @Override 27 | public void onAnimationStart(Animation animation) { 28 | 29 | } 30 | 31 | @Override 32 | public void onAnimationEnd(Animation animation) { 33 | 34 | } 35 | 36 | @Override 37 | public void onAnimationRepeat(Animation animation) { 38 | 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /app/src/main/java/syncthing/android/ui/sessionsettings/SettingsComponent.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015 OpenSilk Productions LLC 3 | * 4 | * This program is free software: you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation, either version 3 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program. If not, see . 16 | */ 17 | 18 | package syncthing.android.ui.sessionsettings; 19 | 20 | import org.opensilk.common.core.dagger2.ScreenScope; 21 | 22 | import dagger.Component; 23 | import syncthing.android.ui.ManageActivityComponent; 24 | import syncthing.android.ui.binding.ViewBinderComponent; 25 | 26 | /** 27 | * Created by drew on 3/17/15. 28 | */ 29 | @ScreenScope 30 | @Component ( 31 | dependencies = ManageActivityComponent.class, 32 | modules = SettingsModule.class 33 | ) 34 | public interface SettingsComponent extends ViewBinderComponent { 35 | } 36 | -------------------------------------------------------------------------------- /app-rest-client/src/main/java/syncthing/api/model/SystemInfo.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015 OpenSilk Productions LLC 3 | * 4 | * This Source Code Form is subject to the terms of the Mozilla Public 5 | * License, v. 2.0. If a copy of the MPL was not distributed with this 6 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. 7 | * 8 | */ 9 | 10 | package syncthing.api.model; 11 | 12 | import org.joda.time.DateTime; 13 | 14 | import java.util.Collections; 15 | import java.util.Map; 16 | 17 | import syncthing.api.ApiUtils; 18 | 19 | /** 20 | * Created by drew on 3/1/15. 21 | */ 22 | public class SystemInfo { 23 | public long alloc; 24 | public double cpuPercent; 25 | public int goroutines; 26 | public String myID; 27 | public long sys; 28 | public String pathSeparator; 29 | public long uptime; 30 | public DateTime startTime; 31 | public String tilde; 32 | public boolean discoveryEnabled; 33 | public int discoveryMethods; 34 | public Map discoveryErrors = Collections.emptyMap(); 35 | public boolean relaysEnabled; 36 | public Map relayClientStatus = Collections.emptyMap(); 37 | public Map relayClientLatency = Collections.emptyMap(); 38 | 39 | @Override 40 | public String toString() { 41 | return ApiUtils.reflectionToString(this); 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /app/src/main/java/syncthing/android/ui/sessionsettings/EditDeviceComponent.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015 OpenSilk Productions LLC 3 | * 4 | * This program is free software: you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation, either version 3 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program. If not, see . 16 | */ 17 | 18 | package syncthing.android.ui.sessionsettings; 19 | 20 | import org.opensilk.common.core.dagger2.ScreenScope; 21 | 22 | import dagger.Component; 23 | import syncthing.android.ui.ManageActivityComponent; 24 | import syncthing.android.ui.binding.ViewBinderComponent; 25 | 26 | /** 27 | * Created by drew on 3/16/15. 28 | */ 29 | @ScreenScope 30 | @Component( 31 | dependencies = ManageActivityComponent.class, 32 | modules = EditDeviceModule.class 33 | ) 34 | public interface EditDeviceComponent extends ViewBinderComponent { 35 | } 36 | -------------------------------------------------------------------------------- /app/src/main/java/syncthing/android/ui/sessionsettings/EditFolderComponent.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015 OpenSilk Productions LLC 3 | * 4 | * This program is free software: you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation, either version 3 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program. If not, see . 16 | */ 17 | 18 | package syncthing.android.ui.sessionsettings; 19 | 20 | import org.opensilk.common.core.dagger2.ScreenScope; 21 | 22 | import dagger.Component; 23 | import syncthing.android.ui.ManageActivityComponent; 24 | import syncthing.android.ui.binding.ViewBinderComponent; 25 | 26 | /** 27 | * Created by drew on 3/16/15. 28 | */ 29 | @ScreenScope 30 | @Component( 31 | dependencies = ManageActivityComponent.class, 32 | modules = EditFolderModule.class 33 | ) 34 | public interface EditFolderComponent extends ViewBinderComponent { 35 | } 36 | -------------------------------------------------------------------------------- /app/src/main/java/syncthing/android/ui/session/NotifCardRej.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015 OpenSilk Productions LLC 3 | * 4 | * This program is free software: you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation, either version 3 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program. If not, see . 16 | */ 17 | 18 | package syncthing.android.ui.session; 19 | 20 | import syncthing.api.model.event.Event; 21 | 22 | /** 23 | * Created by drew on 3/10/15. 24 | */ 25 | public abstract class NotifCardRej extends NotifCard { 26 | 27 | final String key; 28 | final E event; 29 | 30 | public NotifCardRej(SessionPresenter presenter, Kind kind, String key, E event) { 31 | super(presenter, kind); 32 | this.key = key; 33 | this.event = event; 34 | } 35 | 36 | public String getKey() { 37 | return key; 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /app/src/main/java/syncthing/android/ui/sessionsettings/EditIgnoresComponent.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015 OpenSilk Productions LLC 3 | * 4 | * This program is free software: you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation, either version 3 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program. If not, see . 16 | */ 17 | 18 | package syncthing.android.ui.sessionsettings; 19 | 20 | import org.opensilk.common.core.dagger2.ScreenScope; 21 | 22 | import dagger.Component; 23 | import syncthing.android.ui.ManageActivityComponent; 24 | import syncthing.android.ui.binding.ViewBinderComponent; 25 | 26 | /** 27 | * Created by drew on 3/23/15. 28 | */ 29 | @ScreenScope 30 | @Component( 31 | dependencies = ManageActivityComponent.class, 32 | modules = EditIgnoresModule.class 33 | ) 34 | public interface EditIgnoresComponent extends ViewBinderComponent { 35 | } 36 | -------------------------------------------------------------------------------- /app/src/main/res/values-v21/themes.xml: -------------------------------------------------------------------------------- 1 | 2 | 18 | 19 | 20 | 21 | 25 | 26 | 30 | 31 | -------------------------------------------------------------------------------- /app/src/main/java/syncthing/android/identicon/IdenticonBinding.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015 OpenSilk Productions LLC 3 | * 4 | * This program is free software: you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation, either version 3 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program. If not, see . 16 | */ 17 | 18 | package syncthing.android.identicon; 19 | 20 | import android.databinding.BindingAdapter; 21 | import android.graphics.Bitmap; 22 | import android.widget.ImageView; 23 | 24 | import rx.Subscriber; 25 | 26 | /** 27 | * Created by drew on 10/13/15. 28 | */ 29 | public class IdenticonBinding { 30 | @BindingAdapter("identicon") 31 | public static void loadIdenticon(IdenticonComponent cmp, ImageView imageView, String name) { 32 | cmp.identiconGenerator().generateAsync(name) 33 | .subscribe(imageView::setImageBitmap); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /common-core/src/main/java/org/opensilk/common/core/app/SimpleComponentCallbacks.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015 OpenSilk Productions LLC 3 | * 4 | * This program is free software: you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation, either version 3 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program. If not, see . 16 | */ 17 | 18 | package org.opensilk.common.core.app; 19 | 20 | import android.content.ComponentCallbacks2; 21 | import android.content.res.Configuration; 22 | 23 | /** 24 | * Created by drew on 5/1/15. 25 | */ 26 | public class SimpleComponentCallbacks implements ComponentCallbacks2 { 27 | @Override 28 | public void onTrimMemory(int level) { 29 | 30 | } 31 | 32 | @Override 33 | public void onConfigurationChanged(Configuration newConfig) { 34 | 35 | } 36 | 37 | @Override 38 | public void onLowMemory() { 39 | 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /app/src/main/res/values/arrays.xml: -------------------------------------------------------------------------------- 1 | 2 | 18 | 19 | 20 | 21 | 22 | @string/run_always 23 | @string/run_between_times 24 | 25 | 26 | 27 | always 28 | scheduled 29 | 30 | 31 | 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /common-ui/src/main/res/layout/mtrl_list_item_twoline_textcontainer.xml: -------------------------------------------------------------------------------- 1 | 2 | 18 | 19 | 23 | 24 | 27 | 28 | 31 | 32 | -------------------------------------------------------------------------------- /app/src/main/java/syncthing/android/ui/login/ManageFragment.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015 OpenSilk Productions LLC 3 | * 4 | * This program is free software: you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation, either version 3 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program. If not, see . 16 | */ 17 | 18 | package syncthing.android.ui.login; 19 | 20 | import org.opensilk.common.ui.mortar.Screen; 21 | import org.opensilk.common.ui.mortarfragment.MortarFragment; 22 | 23 | /** 24 | * Created by drew on 3/15/15. 25 | */ 26 | public class ManageFragment extends MortarFragment { 27 | public static final String NAME = ManageFragment.class.getName(); 28 | 29 | public static ManageFragment newInstance() { 30 | return new ManageFragment(); 31 | } 32 | 33 | @Override 34 | protected Screen newScreen() { 35 | return new ManageScreen(); 36 | } 37 | 38 | } 39 | -------------------------------------------------------------------------------- /app/src/main/java/syncthing/android/ui/session/NotifCardRestart.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015 OpenSilk Productions LLC 3 | * 4 | * This program is free software: you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation, either version 3 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program. If not, see . 16 | */ 17 | 18 | package syncthing.android.ui.session; 19 | 20 | import android.view.View; 21 | 22 | import syncthing.android.R; 23 | 24 | /** 25 | * Created by drew on 3/6/15. 26 | */ 27 | public class NotifCardRestart extends NotifCard { 28 | 29 | public NotifCardRestart(SessionPresenter presenter) { 30 | super(presenter, Kind.RESTART); 31 | } 32 | 33 | @Override 34 | public int getLayout() { 35 | return R.layout.session_notif_restart; 36 | } 37 | 38 | public void restartSyncthing(View btn) { 39 | presenter.controller.restart(); 40 | } 41 | } 42 | --------------------------------------------------------------------------------