├── tests ├── ByteSync.Functions.UnitTests │ ├── Usings.cs │ └── Bruno │ │ ├── environments │ │ └── LocalDebug.bru │ │ ├── bruno.json │ │ ├── Get Announcements.bru │ │ ├── DateIsCopied (C2).bru │ │ └── ErrorOnTarget.bru ├── ByteSync.ServerCommon.Tests │ ├── Usings.cs │ └── server-common-tests.local.settings.template.json ├── ByteSync.Functions.IntegrationTests │ ├── GlobalUsings.cs │ ├── TestModule.cs │ ├── TestHelpers │ │ └── Autofac │ │ │ ├── LoadersModule.cs │ │ │ └── RepositoriesModule.cs │ └── functions-integration-tests.local.settings.template.json ├── ByteSync.Client.IntegrationTests │ ├── TestHelpers │ │ └── Http │ │ │ └── IFlakyCounter.cs │ └── client-integration-tests.local.settings.template.json └── ByteSync.Client.UnitTests │ ├── Services │ └── Navigations │ │ └── NavigationServiceTests.cs │ └── TestUtilities │ └── Helpers │ └── ByteSyncEndPointHelper.cs ├── assets ├── logo_bytesync_1280x640.png └── gallery │ ├── 2025-10-local-and-remote-sync.png │ ├── 2025-02-create-or-join-session.png │ ├── 2025-02-synchronization-status.png │ ├── 2025-02-settings-and-data-sources.png │ └── 2025-02-inventory-status-and-comparison-results.png ├── src ├── ByteSync.Client │ ├── Assets │ │ ├── ByteSync.ico │ │ └── ByteSyncLogo.png │ ├── Helpers │ │ └── RetryPolicyLogger.cs │ ├── Business │ │ ├── Comparisons │ │ │ ├── ConditionModes.cs │ │ │ ├── ComparisonProperty.cs │ │ │ ├── ConditionOperatorTypes.cs │ │ │ └── ContentRepartitionGroupMember.cs │ │ ├── LocalInventoryModes.cs │ │ ├── SessionModes.cs │ │ ├── Misc │ │ │ ├── ExecutionMode.cs │ │ │ ├── OperationMode.cs │ │ │ └── TimeTrackingComputerType.cs │ │ ├── FingerprintModes.cs │ │ ├── Themes │ │ │ └── ThemeModes.cs │ │ ├── Profiles │ │ │ ├── ProfileTypes.cs │ │ │ ├── ExecutionModes.cs │ │ │ ├── LocalSessionProfileOptions.cs │ │ │ ├── CloudSessionProfileOptions.cs │ │ │ ├── LocalSessionProfile.cs │ │ │ └── AbstractSessionProfile.cs │ │ ├── Sessions │ │ │ ├── AnalysisModes.cs │ │ │ ├── LinkingCases.cs │ │ │ ├── DataTypes.cs │ │ │ ├── Connecting │ │ │ │ ├── CreateSessionStatus.cs │ │ │ │ ├── CreateSessionError.cs │ │ │ │ └── JoinSessionError.cs │ │ │ ├── SessionConnectionStatus.cs │ │ │ ├── LobbyCloudSessionInfo.cs │ │ │ ├── SessionStatus.cs │ │ │ └── CreateCloudSessionRequest.cs │ │ ├── Communications │ │ │ ├── ConnectionModes.cs │ │ │ ├── ConnectionStatuses.cs │ │ │ ├── BuildConnectionResult.cs │ │ │ ├── Transfers │ │ │ │ └── FileUploaderSlice.cs │ │ │ ├── TrustedPublicKey.cs │ │ │ └── LocalSharedFile.cs │ │ ├── MessageBoxResult.cs │ │ ├── Actions │ │ │ ├── Shared │ │ │ │ └── SynchronizationStatus.cs │ │ │ └── Loose │ │ │ │ └── LooseAtomicAction.cs │ │ ├── SessionMembers │ │ │ └── SessionMemberPrivateData.cs │ │ ├── Filtering │ │ │ ├── Values │ │ │ │ └── PropertyValueType.cs │ │ │ ├── Expressions │ │ │ │ ├── FilterExpression.cs │ │ │ │ ├── TrueExpression.cs │ │ │ │ ├── OnlyExpression.cs │ │ │ │ ├── ExistsExpression.cs │ │ │ │ ├── NameExpression.cs │ │ │ │ ├── PathExpression.cs │ │ │ │ ├── NotExpression.cs │ │ │ │ ├── TextSearchExpression.cs │ │ │ │ ├── FutureStateExpression.cs │ │ │ │ ├── OrExpression.cs │ │ │ │ ├── AndExpression.cs │ │ │ │ └── FileSystemTypeExpression.cs │ │ │ ├── Parsing │ │ │ │ ├── FilterToken.cs │ │ │ │ ├── ComparisonOperator.cs │ │ │ │ └── FilterTokenType.cs │ │ │ └── Evaluators │ │ │ │ ├── TrueExpressionEvaluator.cs │ │ │ │ ├── FileSystemTypeExpressionEvaluator.cs │ │ │ │ └── TextSearchExpressionEvaluator.cs │ │ ├── Configurations │ │ │ ├── LocalApplicationDataConstants.cs │ │ │ └── ZoomConstants.cs │ │ ├── Updates │ │ │ ├── UpdateConstants.cs │ │ │ ├── UpdateProgressStatus.cs │ │ │ ├── UpdateData.cs │ │ │ └── UpdateProgress.cs │ │ ├── Inventories │ │ │ ├── InventoryTaskStatus.cs │ │ │ ├── InventoryStatistics.cs │ │ │ └── IndexedItem.cs │ │ ├── Navigations │ │ │ └── NavigationPanel.cs │ │ ├── Synchronizations │ │ │ └── SynchronizationProcessStatuses.cs │ │ └── DataNodes │ │ │ └── DataNode.cs │ ├── Interfaces │ │ ├── Communications │ │ │ ├── IPushReceiver.cs │ │ │ └── IFunctionsByteSyncInvoke.cs │ │ ├── Services │ │ │ ├── IRatingPromptService.cs │ │ │ ├── Sessions │ │ │ │ ├── IResetSessionService.cs │ │ │ │ ├── Connecting │ │ │ │ │ ├── IQuitSessionService.cs │ │ │ │ │ ├── Joining │ │ │ │ │ │ ├── IYouGaveAWrongPasswordService.cs │ │ │ │ │ │ ├── IYouJoinedSessionService.cs │ │ │ │ │ │ ├── ICloudSessionPasswordExchangeKeyGivenService.cs │ │ │ │ │ │ └── IJoinSessionService.cs │ │ │ │ │ ├── IAfterJoinSessionService.cs │ │ │ │ │ ├── Validating │ │ │ │ │ │ ├── ICheckCloudSessionPasswordExchangeKeyService.cs │ │ │ │ │ │ └── ICloudSessionPasswordExchangeKeyAskedService.cs │ │ │ │ │ └── ICreateSessionService.cs │ │ │ │ ├── ISessionInterruptor.cs │ │ │ │ ├── ISessionMemberMapper.cs │ │ │ │ ├── IComparisonItemsService.cs │ │ │ │ └── ISessionMemberService.cs │ │ │ ├── Filtering │ │ │ │ ├── IFilterParser.cs │ │ │ │ ├── IOperatorParser.cs │ │ │ │ ├── IFilterTokenizer.cs │ │ │ │ ├── IExpressionEvaluatorFactory.cs │ │ │ │ ├── IFilterService.cs │ │ │ │ ├── IPropertyValueExtractor.cs │ │ │ │ ├── IPropertyComparer.cs │ │ │ │ └── IExpressionEvaluator.cs │ │ │ ├── Communications │ │ │ │ ├── IConnectionConstantsService.cs │ │ │ │ └── IAuthenticationTokensRepository.cs │ │ │ └── Localizations │ │ │ │ └── IAtomicActionValidationFailureReasonService.cs │ │ ├── Controls │ │ │ ├── Themes │ │ │ │ ├── IThemeFactory.cs │ │ │ │ ├── IThemeBuilder.cs │ │ │ │ └── IThemeService.cs │ │ │ ├── Communications │ │ │ │ ├── IResourceManager.cs │ │ │ │ ├── IFileMerger.cs │ │ │ │ ├── IFileUploader.cs │ │ │ │ ├── IErrorManager.cs │ │ │ │ ├── IFilePartDownloadAsserter.cs │ │ │ │ ├── IFileUploadPreparer.cs │ │ │ │ ├── IPostDownloadHandlerProxy.cs │ │ │ │ ├── Http │ │ │ │ │ ├── IStatisticsApiClient.cs │ │ │ │ │ ├── IAnnouncementApiClient.cs │ │ │ │ │ └── IAuthApiClient.cs │ │ │ │ ├── IFileUploadWorker.cs │ │ │ │ ├── IFileSlicer.cs │ │ │ │ ├── IDownloadTargetBuilder.cs │ │ │ │ ├── ICloudProxy.cs │ │ │ │ ├── IFileUploadProcessor.cs │ │ │ │ ├── IExchangeKeysStorer.cs │ │ │ │ ├── ISynchronizationDownloadFinalizer.cs │ │ │ │ ├── IDownloadStrategy.cs │ │ │ │ ├── IDigitalSignaturesChecker.cs │ │ │ │ ├── IUploadStrategy.cs │ │ │ │ ├── IAdaptiveUploadController.cs │ │ │ │ └── IFileDownloader.cs │ │ │ ├── Bootstrapping │ │ │ │ ├── IPushReceiversStarter.cs │ │ │ │ ├── IBootstrapLogger.cs │ │ │ │ └── IBootstrapper.cs │ │ │ ├── Inventories │ │ │ │ ├── IBaseInventoryRunner.cs │ │ │ │ ├── IFullInventoryRunner.cs │ │ │ │ ├── IDataInventoryRunner.cs │ │ │ │ ├── IDataNodeCodeGenerator.cs │ │ │ │ ├── IDataSourceCodeGenerator.cs │ │ │ │ ├── IContentRepartitionGroupsComputer.cs │ │ │ │ ├── IInventoryStatisticsService.cs │ │ │ │ ├── IInventoryFinishedService.cs │ │ │ │ ├── IInitialStatusBuilder.cs │ │ │ │ ├── IInventoryComparer.cs │ │ │ │ ├── IDataInventoryStarter.cs │ │ │ │ ├── IInventorySaver.cs │ │ │ │ ├── IInventoryFileAnalyzer.cs │ │ │ │ ├── IDataNodeService.cs │ │ │ │ └── IFileSystemInspector.cs │ │ │ ├── Encryptions │ │ │ │ └── IMergerDecrypter.cs │ │ │ ├── Actions │ │ │ │ ├── ISharedActionsGroupComputer.cs │ │ │ │ ├── ISharedActionsGroupOrganizer.cs │ │ │ │ └── ISharedAtomicActionComputer.cs │ │ │ ├── TimeTracking │ │ │ │ ├── IDataTrackingStrategy.cs │ │ │ │ ├── ITimeTrackingCache.cs │ │ │ │ └── ITimeTrackingComputer.cs │ │ │ ├── Synchronizations │ │ │ │ ├── ISynchronizationStarter.cs │ │ │ │ ├── ISynchronizationLooper.cs │ │ │ │ ├── ISynchronizationStartFactory.cs │ │ │ │ ├── ISynchronizationDataReceiver.cs │ │ │ │ ├── ITemporaryFileManager.cs │ │ │ │ ├── ISynchronizationManager.cs │ │ │ │ ├── ISynchronizationActionRemoteUploader.cs │ │ │ │ ├── ISynchronizationDataLogger.cs │ │ │ │ ├── ISynchronizationActionHandler.cs │ │ │ │ ├── ISynchronizationRuleMatcher.cs │ │ │ │ ├── IDeltaManager.cs │ │ │ │ └── ISynchronizationRulesService.cs │ │ │ ├── Automating │ │ │ │ ├── IProfileAutoRunner.cs │ │ │ │ └── ICommandLineModeHandler.cs │ │ │ ├── Applications │ │ │ │ └── IZoomService.cs │ │ │ └── Navigations │ │ │ │ └── INavigationService.cs │ │ ├── Converters │ │ │ ├── IFormatKbSizeConverter.cs │ │ │ └── ISizeUnitConverter.cs │ │ ├── Updates │ │ │ ├── ISearchUpdateService.cs │ │ │ ├── IUpdateExtractor.cs │ │ │ ├── IUpdateHelperService.cs │ │ │ ├── IDeleteUpdateBackupSnippetsService.cs │ │ │ ├── IUpdateDownloader.cs │ │ │ ├── IUpdateNewFilesMover.cs │ │ │ ├── IAvailableUpdatesLister.cs │ │ │ ├── IUpdateService.cs │ │ │ ├── IApplyUpdateService.cs │ │ │ ├── IUpdateExistingFilesBackuper.cs │ │ │ └── IApplicationRestarter.cs │ │ ├── Announcements │ │ │ └── IAnnouncementService.cs │ │ ├── Factories │ │ │ ├── ISlicerEncrypterFactory.cs │ │ │ ├── IBootstrapperFactory.cs │ │ │ ├── IHubConnectionFactory.cs │ │ │ ├── IFileUploadPreparerFactory.cs │ │ │ ├── Proxies │ │ │ │ ├── IDataNodeProxyFactory.cs │ │ │ │ ├── IDataSourceProxyFactory.cs │ │ │ │ └── ISoftwareVersionProxyFactory.cs │ │ │ ├── ISynchronizationLooperFactory.cs │ │ │ ├── ITemporaryFileManagerFactory.cs │ │ │ ├── IInventoryBuilderFactory.cs │ │ │ ├── ITimeTrackingComputerFactory.cs │ │ │ ├── IFileDownloaderFactory.cs │ │ │ ├── ViewModels │ │ │ │ ├── IDataTypeViewModelFactory.cs │ │ │ │ ├── ILobbyMemberViewModelFactory.cs │ │ │ │ ├── IAnalysisModeViewModelFactory.cs │ │ │ │ ├── IMatchingModeViewModelFactory.cs │ │ │ │ ├── IComparisonItemViewModelFactory.cs │ │ │ │ ├── ISessionSettingsEditViewModelFactory.cs │ │ │ │ ├── IDataNodeViewModelFactory.cs │ │ │ │ ├── ISynchronizationRuleSummaryViewModelFactory.cs │ │ │ │ ├── IContentRepartitionViewModelFactory.cs │ │ │ │ ├── IItemSynchronizationStatusViewModelFactory.cs │ │ │ │ ├── ISynchronizationActionViewModelFactory.cs │ │ │ │ └── IContentIdentityViewModelFactory.cs │ │ │ ├── IConnectionFactory.cs │ │ │ ├── IInventoryComparerFactory.cs │ │ │ ├── IContentRepartitionGroupsComputerFactory.cs │ │ │ ├── IMergerDecrypterFactory.cs │ │ │ ├── IFileUploaderFactory.cs │ │ │ └── IFileUploadProcessorFactory.cs │ │ ├── Repositories │ │ │ ├── IAnnouncementRepository.cs │ │ │ ├── ISynchronizationRuleRepository.cs │ │ │ ├── IComparisonItemRepository.cs │ │ │ ├── IAvailableUpdateRepository.cs │ │ │ ├── ISharedAtomicActionRepository.cs │ │ │ ├── IAtomicActionRepository.cs │ │ │ ├── IInventoryFileRepository.cs │ │ │ ├── ISessionInvalidationCachePolicy.cs │ │ │ ├── Updates │ │ │ │ └── IUpdateRepository.cs │ │ │ ├── IPropertyIndexer.cs │ │ │ ├── IDataSourceRepository.cs │ │ │ └── IDataNodeRepository.cs │ │ ├── ILocalApplicationDataManager.cs │ │ ├── IDataSourceChecker.cs │ │ ├── IStatisticsService.cs │ │ ├── Dialogs │ │ │ ├── IMessageBoxViewModelFactory.cs │ │ │ └── IDialogView.cs │ │ ├── IFileDialogService.cs │ │ ├── IPolicyFactory.cs │ │ ├── Business │ │ │ └── Actions │ │ │ │ └── ISynchronizationRule.cs │ │ └── IApplicationSettingsRepository.cs │ ├── ViewModels │ │ ├── ViewModelBase.cs │ │ ├── ActivatableViewModelBase.cs │ │ └── Sessions │ │ │ └── Comparisons │ │ │ └── Actions │ │ │ └── Misc │ │ │ ├── BaseAtomicEditViewModel.cs │ │ │ └── SizeUnitViewModel.cs │ ├── FodyWeavers.xml │ ├── Views │ │ ├── Misc │ │ │ ├── ITagItemFactory.cs │ │ │ ├── MessageBoxView.axaml.cs │ │ │ ├── ErrorView.axaml.cs │ │ │ ├── SelectLocaleView.axaml.cs │ │ │ └── FlyoutContainerView.axaml.cs │ │ ├── TrustedNetworks │ │ │ ├── TrustedNetworkView.axaml.cs │ │ │ └── AddTrustedClientView.axaml.cs │ │ ├── Lobbies │ │ │ ├── LobbySynchronizationRuleView.axaml.cs │ │ │ ├── LobbyMainView.axaml.cs │ │ │ └── LobbyMemberView.axaml.cs │ │ ├── Sessions │ │ │ ├── Comparisons │ │ │ │ ├── Results │ │ │ │ │ ├── ContentIdentityView.axaml.cs │ │ │ │ │ ├── ContentRepartitionView.axaml.cs │ │ │ │ │ ├── SynchronizationActionView.axaml.cs │ │ │ │ │ ├── ItemSynchronizationStatusView.axaml.cs │ │ │ │ │ ├── SynchronizationRuleSummaryView.axaml.cs │ │ │ │ │ └── ManageSynchronizationRulesView.axaml.cs │ │ │ │ └── Actions │ │ │ │ │ ├── AtomicConditionEditView.axaml.cs │ │ │ │ │ ├── AtomicActionEditView.axaml.cs │ │ │ │ │ ├── TargetedActionGlobalView.axaml.cs │ │ │ │ │ ├── ImportRulesFromProfileView.axaml.cs │ │ │ │ │ └── SynchronizationRuleGlobalView.axaml.cs │ │ │ ├── Synchronizations │ │ │ │ ├── SynchronizationConfirmationView.axaml.cs │ │ │ │ ├── SynchronizationMainView.axaml.cs │ │ │ │ ├── SynchronizationBeforeStartView.axaml.cs │ │ │ │ ├── SynchronizationMainStatusView.axaml.cs │ │ │ │ └── SynchronizationStatisticsView.axaml.cs │ │ │ ├── DataNodes │ │ │ │ ├── DataNodeView.axaml.cs │ │ │ │ ├── DataNodeSourcesView.axaml.cs │ │ │ │ ├── DataNodeStatusView.axaml.cs │ │ │ │ └── DataNodeHeaderView.axaml.cs │ │ │ ├── SessionMainView.axaml.cs │ │ │ ├── Inventories │ │ │ │ ├── InventoryBeforeStartView.axaml.cs │ │ │ │ ├── InventoryLocalStatusView.axaml.cs │ │ │ │ ├── InventoryGlobalStatusView.axaml.cs │ │ │ │ ├── InventoryDeltaGenerationView.axaml.cs │ │ │ │ ├── InventoryLocalIdentificationView.axaml.cs │ │ │ │ └── InventoryMainView.axaml.cs │ │ │ └── Managing │ │ │ │ └── SessionSettingsEditView.axaml.cs │ │ ├── Ratings │ │ │ └── RatingPromptView.axaml.cs │ │ ├── Headers │ │ │ ├── UpdateDetailsView.axaml.cs │ │ │ ├── AboutApplicationView.axaml.cs │ │ │ ├── ConnectionStatusView.axaml.cs │ │ │ └── HeaderView.axaml.cs │ │ ├── Home │ │ │ ├── CreateCloudSessionView.axaml.cs │ │ │ └── HomeMainView.axaml.cs │ │ ├── Profiles │ │ │ └── ProfilesView.axaml.cs │ │ ├── Announcements │ │ │ └── AnnouncementView.axaml.cs │ │ └── AccountDetails │ │ │ ├── UsageStatisticsView.axaml.cs │ │ │ └── AccountDetailsView.axaml.cs │ ├── local.settings.template.json │ ├── Models │ │ ├── Inventories │ │ │ └── InventoryPartTypes.cs │ │ └── Comparisons │ │ │ └── Result │ │ │ └── ItemSynchronizationStatus.cs │ ├── Services │ │ ├── ContainerProvider.cs │ │ ├── Communications │ │ │ └── Functions │ │ │ │ └── FunctionsConnectionWrapper.cs │ │ ├── Converters │ │ │ ├── BooleanToCursorConverter.cs │ │ │ └── BaseConverters │ │ │ │ ├── Base26Converter.cs │ │ │ │ └── Base58Converter.cs │ │ ├── Applications │ │ │ └── IMsixPfnParser.cs │ │ ├── Misc │ │ │ └── VersionHelper.cs │ │ ├── Sessions │ │ │ └── SessionMemberLetterHelper.cs │ │ ├── Comparisons │ │ │ └── ConditionMatchers │ │ │ │ └── IConditionMatcher.cs │ │ └── Bootstrappers │ │ │ └── PushReceiversStarter.cs │ ├── GlobalUsings.cs │ ├── Directory.Build.props │ ├── Repositories │ │ ├── AnnouncementRepository.cs │ │ └── ComparisonItemRepository.cs │ ├── Factories │ │ └── FileUploadPreparerFactory.cs │ └── DependencyInjection │ │ └── Modules │ │ └── ExternalAssembliesModule.cs ├── ByteSync.ServerCommon │ ├── Entities │ │ ├── CloudSessionEntity.cs │ │ ├── CloudSessionMemberEntity.cs │ │ ├── EntityType.cs │ │ └── LobbyMemberCell.cs │ ├── Interfaces │ │ ├── Services │ │ │ ├── Storage │ │ │ │ ├── ICloudflareR2Service.cs │ │ │ │ ├── IAzureBlobStorageService.cs │ │ │ │ └── Factories │ │ │ │ │ ├── ICloudflareR2ClientFactory.cs │ │ │ │ │ └── IAzureBlobContainerClientFactory.cs │ │ │ ├── IInventoryService.cs │ │ │ ├── ISynchronizationService.cs │ │ │ ├── IInventoryMemberService.cs │ │ │ ├── Clients │ │ │ │ ├── IAuthService.cs │ │ │ │ └── IClientSoftwareVersionService.cs │ │ │ └── ISynchronizationStatusCheckerService.cs │ │ ├── Factories │ │ │ ├── ITokensFactory.cs │ │ │ ├── ILobbyFactory.cs │ │ │ ├── ICacheKeyFactory.cs │ │ │ ├── IClientsGroupIdFactory.cs │ │ │ ├── IHubContextFactory.cs │ │ │ └── IByteSyncEndpointFactory.cs │ │ ├── Loaders │ │ │ ├── IAnnouncementsLoader.cs │ │ │ └── IClientSoftwareVersionSettingsLoader.cs │ │ ├── Repositories │ │ │ ├── ICloudSessionProfileRepository.cs │ │ │ ├── IInventoryRepository.cs │ │ │ ├── IAnnouncementRepository.cs │ │ │ ├── ILobbyRepository.cs │ │ │ ├── IClientSoftwareVersionSettingsRepository.cs │ │ │ ├── IClientsRepository.cs │ │ │ ├── ISynchronizationRepository.cs │ │ │ └── ISharedFilesRepository.cs │ │ └── Mappers │ │ │ ├── ISessionMemberMapper.cs │ │ │ ├── ISynchronizationMapper.cs │ │ │ └── ITrackingActionMapper.cs │ ├── Business │ │ ├── Settings │ │ │ ├── SignalRSettings.cs │ │ │ ├── RedisSettings.cs │ │ │ ├── ClientSoftwareVersionSettings.cs │ │ │ ├── AzureBlobStorageSettings.cs │ │ │ └── CloudflareR2Settings.cs │ │ └── Repositories │ │ │ ├── UpdateEntityStatus.cs │ │ │ └── CacheKey.cs │ ├── Commands │ │ ├── Storage │ │ │ ├── CleanupCloudflareR2SnippetsRequest.cs │ │ │ └── CleanupAzureBlobStorageSnippetsRequest.cs │ │ ├── Announcements │ │ │ └── GetActiveAnnouncementsRequest.cs │ │ ├── Synchronizations │ │ │ ├── IActionErrorRequest.cs │ │ │ ├── IActionCompletedRequest.cs │ │ │ ├── MemberHasFinishedRequest.cs │ │ │ └── RequestSynchronizationAbortRequest.cs │ │ ├── SessionMembers │ │ │ ├── GetMembersInstanceIdsRequest.cs │ │ │ └── GetMembersRequest.cs │ │ ├── Lobbies │ │ │ └── QuitLobbyRequest.cs │ │ ├── CloudSessions │ │ │ ├── ResetSessionRequest.cs │ │ │ ├── ValidateJoinCloudSessionRequest.cs │ │ │ └── QuitSessionRequest.cs │ │ ├── Authentication │ │ │ └── AuthenticateRequest.cs │ │ └── Inventories │ │ │ ├── GetDataNodesRequest.cs │ │ │ └── StartInventoryRequest.cs │ ├── Constants │ │ └── SerialConstants.cs │ └── Exceptions │ │ └── BadRequestException.cs ├── ByteSync.Common │ ├── Business │ │ ├── Actions │ │ │ ├── SynchronizationTypes.cs │ │ │ ├── ClientInstanceIdAndNodeId.cs │ │ │ └── ActionOperatorTypes.cs │ │ ├── Inventories │ │ │ ├── FileSystemTypes.cs │ │ │ └── EncryptedDataSource.cs │ │ ├── Misc │ │ │ ├── UsageStatisticsRequest.cs │ │ │ ├── DeploymentModes.cs │ │ │ ├── OSPlatforms.cs │ │ │ ├── SizeUnits.cs │ │ │ ├── SizeConstants.cs │ │ │ └── UsageStatisticsSubPeriod.cs │ │ ├── Versions │ │ │ ├── Platform.cs │ │ │ ├── PriorityLevel.cs │ │ │ ├── ProtocolVersion.cs │ │ │ └── SoftwareVersionFile.cs │ │ ├── Lobbies │ │ │ ├── JoinLobbyModes.cs │ │ │ ├── LobbySessionModes.cs │ │ │ ├── LobbyCheckRecipient.cs │ │ │ ├── Connections │ │ │ │ ├── GetProfileDetailsPasswordParameters.cs │ │ │ │ └── JoinLobbyParameters.cs │ │ │ ├── LobbyCloudSessionCredentials.cs │ │ │ ├── LobbyMemberStatuses.cs │ │ │ └── LobbyCheckInfo.cs │ │ ├── Auth │ │ │ ├── RefreshTokensStatus.cs │ │ │ ├── InitialConnectionStatus.cs │ │ │ ├── LoginData.cs │ │ │ ├── RefreshTokensData.cs │ │ │ └── AuthenticationTokens.cs │ │ ├── Serials │ │ │ ├── BindSerialResponseStatus.cs │ │ │ └── SerialStatus.cs │ │ ├── Synchronizations │ │ │ ├── SynchronizationActionMetrics.cs │ │ │ ├── TrackingActionSummary.cs │ │ │ ├── SynchronizationStartRequest.cs │ │ │ ├── SynchronizationAbortRequest.cs │ │ │ └── SynchronizationEnd.cs │ │ ├── Profiles │ │ │ ├── CloudSessionProfileSlot.cs │ │ │ ├── DeleteCloudSessionProfileParameters.cs │ │ │ └── GetCloudSessionProfileDataParameters.cs │ │ ├── SharedFiles │ │ │ ├── FileStorageLocation.cs │ │ │ ├── SharedFileTypes.cs │ │ │ └── FileTransferPush.cs │ │ ├── Trust │ │ │ └── Connections │ │ │ │ ├── SetAuthCheckedParameters.cs │ │ │ │ ├── GiveMemberPublicKeyCheckDataParameters.cs │ │ │ │ └── SendDigitalSignaturesParameters.cs │ │ ├── EndPoints │ │ │ └── PublicKeyInfo.cs │ │ ├── Sessions │ │ │ ├── Local │ │ │ │ └── LocalSession.cs │ │ │ ├── EncryptedDataNode.cs │ │ │ ├── EncryptedSessionMemberPrivateData.cs │ │ │ ├── EncryptedSessionSettings.cs │ │ │ ├── Cloud │ │ │ │ ├── Connections │ │ │ │ │ ├── AskCloudSessionPasswordExchangeKeyPush.cs │ │ │ │ │ ├── StartTrustCheckResult.cs │ │ │ │ │ ├── TrustCheckParameters.cs │ │ │ │ │ └── InformProtocolVersionIncompatibleParameters.cs │ │ │ │ └── CloudSessionDetails.cs │ │ │ ├── DataNodeDTO.cs │ │ │ └── BaseSessionDto.cs │ │ └── Announcements │ │ │ └── Announcement.cs │ ├── Interfaces │ │ ├── IConfigurationReader.cs │ │ ├── IConfigurationWriter.cs │ │ ├── Business │ │ │ ├── IAction.cs │ │ │ ├── IAtomicAction.cs │ │ │ └── IEncryptedSessionData.cs │ │ └── IFileSystemAccessor.cs │ └── Helpers │ │ ├── MiscUtils.cs │ │ └── UrlUtils.cs └── ByteSync.Functions │ ├── Constants │ └── ErrorConstants.cs │ ├── Properties │ └── launchSettings.json │ └── host.json └── docs └── synchronization-rules.md /tests/ByteSync.Functions.UnitTests/Usings.cs: -------------------------------------------------------------------------------- 1 | global using NUnit.Framework; -------------------------------------------------------------------------------- /tests/ByteSync.ServerCommon.Tests/Usings.cs: -------------------------------------------------------------------------------- 1 | global using NUnit.Framework; -------------------------------------------------------------------------------- /tests/ByteSync.Functions.IntegrationTests/GlobalUsings.cs: -------------------------------------------------------------------------------- 1 | global using NUnit.Framework; -------------------------------------------------------------------------------- /assets/logo_bytesync_1280x640.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/POW-Software/ByteSync/HEAD/assets/logo_bytesync_1280x640.png -------------------------------------------------------------------------------- /src/ByteSync.Client/Assets/ByteSync.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/POW-Software/ByteSync/HEAD/src/ByteSync.Client/Assets/ByteSync.ico -------------------------------------------------------------------------------- /src/ByteSync.Client/Helpers/RetryPolicyLogger.cs: -------------------------------------------------------------------------------- 1 | namespace ByteSync.Helpers; 2 | 3 | public class RetryPolicyLogger 4 | { 5 | 6 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Assets/ByteSyncLogo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/POW-Software/ByteSync/HEAD/src/ByteSync.Client/Assets/ByteSyncLogo.png -------------------------------------------------------------------------------- /src/ByteSync.Client/Business/Comparisons/ConditionModes.cs: -------------------------------------------------------------------------------- 1 | namespace ByteSync.Business.Comparisons; 2 | 3 | public enum ConditionModes { Any, All } -------------------------------------------------------------------------------- /assets/gallery/2025-10-local-and-remote-sync.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/POW-Software/ByteSync/HEAD/assets/gallery/2025-10-local-and-remote-sync.png -------------------------------------------------------------------------------- /src/ByteSync.Client/Business/LocalInventoryModes.cs: -------------------------------------------------------------------------------- 1 | namespace ByteSync.Business; 2 | 3 | public enum LocalInventoryModes 4 | { 5 | Base, Full 6 | } -------------------------------------------------------------------------------- /assets/gallery/2025-02-create-or-join-session.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/POW-Software/ByteSync/HEAD/assets/gallery/2025-02-create-or-join-session.png -------------------------------------------------------------------------------- /assets/gallery/2025-02-synchronization-status.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/POW-Software/ByteSync/HEAD/assets/gallery/2025-02-synchronization-status.png -------------------------------------------------------------------------------- /src/ByteSync.Client/Business/SessionModes.cs: -------------------------------------------------------------------------------- 1 | namespace ByteSync.Business; 2 | 3 | public enum SessionModes 4 | { 5 | Cloud = 1, 6 | Local = 2 7 | } -------------------------------------------------------------------------------- /tests/ByteSync.Functions.IntegrationTests/TestModule.cs: -------------------------------------------------------------------------------- 1 | namespace ByteSync.Functions.IntegrationTests; 2 | 3 | public class TestModule 4 | { 5 | 6 | } -------------------------------------------------------------------------------- /tests/ByteSync.Functions.UnitTests/Bruno/environments/LocalDebug.bru: -------------------------------------------------------------------------------- 1 | vars { 2 | root-url: http://localhost:7174/api 3 | sessionId: SID_123456 4 | } 5 | -------------------------------------------------------------------------------- /assets/gallery/2025-02-settings-and-data-sources.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/POW-Software/ByteSync/HEAD/assets/gallery/2025-02-settings-and-data-sources.png -------------------------------------------------------------------------------- /src/ByteSync.Client/Business/Misc/ExecutionMode.cs: -------------------------------------------------------------------------------- 1 | namespace ByteSync.Business.Misc; 2 | 3 | public enum ExecutionMode 4 | { 5 | Debug, 6 | Regular 7 | } -------------------------------------------------------------------------------- /src/ByteSync.ServerCommon/Entities/CloudSessionEntity.cs: -------------------------------------------------------------------------------- 1 | namespace ByteSync.ServerCommon.Entities; 2 | 3 | public class CloudSessionEntity 4 | { 5 | 6 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Business/FingerprintModes.cs: -------------------------------------------------------------------------------- 1 | namespace ByteSync.Business; 2 | 3 | public enum FingerprintModes 4 | { 5 | Rsync = 1, 6 | Sha256 = 2, 7 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Business/Themes/ThemeModes.cs: -------------------------------------------------------------------------------- 1 | namespace ByteSync.Business.Themes; 2 | 3 | public enum ThemeModes 4 | { 5 | Light = 0, 6 | Dark = 1, 7 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Interfaces/Communications/IPushReceiver.cs: -------------------------------------------------------------------------------- 1 | namespace ByteSync.Interfaces.Communications; 2 | 3 | public interface IPushReceiver 4 | { 5 | 6 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Interfaces/Services/IRatingPromptService.cs: -------------------------------------------------------------------------------- 1 | namespace ByteSync.Interfaces.Services; 2 | 3 | public interface IRatingPromptService 4 | { 5 | } 6 | -------------------------------------------------------------------------------- /src/ByteSync.ServerCommon/Entities/CloudSessionMemberEntity.cs: -------------------------------------------------------------------------------- 1 | namespace ByteSync.ServerCommon.Entities; 2 | 3 | public class CloudSessionMemberEntity 4 | { 5 | 6 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Business/Profiles/ProfileTypes.cs: -------------------------------------------------------------------------------- 1 | namespace ByteSync.Business.Profiles; 2 | 3 | public enum ProfileTypes 4 | { 5 | Cloud = 1, 6 | Local = 2, 7 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/ViewModels/ViewModelBase.cs: -------------------------------------------------------------------------------- 1 | using ReactiveUI; 2 | 3 | namespace ByteSync.ViewModels; 4 | 5 | public abstract class ViewModelBase : ReactiveObject 6 | { 7 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Business/Misc/OperationMode.cs: -------------------------------------------------------------------------------- 1 | namespace ByteSync.Business.Misc; 2 | 3 | public enum OperationMode 4 | { 5 | GraphicalUserInterface, 6 | CommandLine 7 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Business/Sessions/AnalysisModes.cs: -------------------------------------------------------------------------------- 1 | namespace ByteSync.Business.Sessions; 2 | 3 | public enum AnalysisModes 4 | { 5 | Smart = 1, 6 | Checksum = 2, 7 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/FodyWeavers.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /src/ByteSync.Client/Business/Communications/ConnectionModes.cs: -------------------------------------------------------------------------------- 1 | namespace ByteSync.Business.Communications; 2 | 3 | public enum ConnectionModes 4 | { 5 | Off = 0, 6 | On = 1, 7 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Business/Sessions/LinkingCases.cs: -------------------------------------------------------------------------------- 1 | namespace ByteSync.Business.Sessions; 2 | 3 | public enum LinkingCases 4 | { 5 | Insensitive = 1, 6 | Sensitive = 2, 7 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Interfaces/Communications/IFunctionsByteSyncInvoke.cs: -------------------------------------------------------------------------------- 1 | namespace ByteSync.Interfaces.Communications; 2 | 3 | public class IFunctionsByteSyncInvoke 4 | { 5 | 6 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Views/Misc/ITagItemFactory.cs: -------------------------------------------------------------------------------- 1 | namespace ByteSync.Views.Misc; 2 | 3 | public interface ITagItemFactory 4 | { 5 | public TagItem CreateTagItem(string tagText); 6 | } -------------------------------------------------------------------------------- /assets/gallery/2025-02-inventory-status-and-comparison-results.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/POW-Software/ByteSync/HEAD/assets/gallery/2025-02-inventory-status-and-comparison-results.png -------------------------------------------------------------------------------- /src/ByteSync.Client/Business/MessageBoxResult.cs: -------------------------------------------------------------------------------- 1 | namespace ByteSync.Business; 2 | 3 | public enum MessageBoxResult 4 | { 5 | OK = 1, 6 | Yes = 2, 7 | No = 3, 8 | Cancel = 4, 9 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Business/Misc/TimeTrackingComputerType.cs: -------------------------------------------------------------------------------- 1 | namespace ByteSync.Business.Misc; 2 | 3 | public enum TimeTrackingComputerType 4 | { 5 | Inventory, 6 | Synchronization 7 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Interfaces/Controls/Themes/IThemeFactory.cs: -------------------------------------------------------------------------------- 1 | namespace ByteSync.Interfaces.Controls.Themes; 2 | 3 | public interface IThemeFactory 4 | { 5 | public void BuildThemes(); 6 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/local.settings.template.json: -------------------------------------------------------------------------------- 1 | { 2 | "LocalDebugUrl": "", 3 | "DevelopmentUrl": "", 4 | "StagingUrl": "", 5 | "ProductionUrl": "", 6 | "UpdatesDefinitionUrl": "" 7 | } -------------------------------------------------------------------------------- /src/ByteSync.Common/Business/Actions/SynchronizationTypes.cs: -------------------------------------------------------------------------------- 1 | namespace ByteSync.Common.Business.Actions; 2 | 3 | public enum SynchronizationTypes 4 | { 5 | Full = 1, 6 | Delta = 2, 7 | } -------------------------------------------------------------------------------- /src/ByteSync.Common/Business/Inventories/FileSystemTypes.cs: -------------------------------------------------------------------------------- 1 | namespace ByteSync.Common.Business.Inventories; 2 | 3 | public enum FileSystemTypes 4 | { 5 | Directory = 1, 6 | File = 2 7 | } -------------------------------------------------------------------------------- /src/ByteSync.Common/Business/Misc/UsageStatisticsRequest.cs: -------------------------------------------------------------------------------- 1 | namespace ByteSync.Common.Business.Misc; 2 | 3 | public class UsageStatisticsRequest 4 | { 5 | public int Year { get; set; } 6 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Business/Sessions/DataTypes.cs: -------------------------------------------------------------------------------- 1 | namespace ByteSync.Business.Sessions; 2 | 3 | public enum DataTypes 4 | { 5 | FilesDirectories = 1, 6 | Files = 2, 7 | Directories = 3 8 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Business/Actions/Shared/SynchronizationStatus.cs: -------------------------------------------------------------------------------- 1 | namespace ByteSync.Business.Actions.Shared; 2 | 3 | public enum SynchronizationStatus 4 | { 5 | Success = 1, 6 | Error = 2 7 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Interfaces/Controls/Communications/IResourceManager.cs: -------------------------------------------------------------------------------- 1 | namespace ByteSync.Interfaces.Controls.Communications; 2 | 3 | public interface IResourceManager 4 | { 5 | void Cleanup(); 6 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Interfaces/Converters/IFormatKbSizeConverter.cs: -------------------------------------------------------------------------------- 1 | namespace ByteSync.Interfaces.Converters; 2 | 3 | public interface IFormatKbSizeConverter 4 | { 5 | string Convert(long? value); 6 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Interfaces/Updates/ISearchUpdateService.cs: -------------------------------------------------------------------------------- 1 | namespace ByteSync.Interfaces.Updates; 2 | 3 | public interface ISearchUpdateService 4 | { 5 | Task SearchNextAvailableVersionsAsync(); 6 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Interfaces/Controls/Bootstrapping/IPushReceiversStarter.cs: -------------------------------------------------------------------------------- 1 | namespace ByteSync.Interfaces.Controls.Bootstrapping; 2 | 3 | public interface IPushReceiversStarter 4 | { 5 | void Start(); 6 | } -------------------------------------------------------------------------------- /src/ByteSync.Common/Business/Versions/Platform.cs: -------------------------------------------------------------------------------- 1 | namespace ByteSync.Common.Business.Versions; 2 | 3 | public enum Platform 4 | { 5 | Unknown = 0, 6 | Windows = 1, 7 | Linux = 2, 8 | Osx = 3 9 | } -------------------------------------------------------------------------------- /tests/ByteSync.Functions.UnitTests/Bruno/bruno.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "1", 3 | "name": "ByteSync.Functions", 4 | "type": "collection", 5 | "ignore": [ 6 | "node_modules", 7 | ".git" 8 | ] 9 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Interfaces/Controls/Communications/IFileMerger.cs: -------------------------------------------------------------------------------- 1 | namespace ByteSync.Interfaces.Controls.Communications; 2 | 3 | public interface IFileMerger 4 | { 5 | Task MergeAsync(int partToMerge); 6 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Interfaces/Services/Sessions/IResetSessionService.cs: -------------------------------------------------------------------------------- 1 | namespace ByteSync.Interfaces.Services.Sessions; 2 | 3 | public interface IResetSessionService 4 | { 5 | public Task ResetSession(); 6 | } -------------------------------------------------------------------------------- /src/ByteSync.ServerCommon/Interfaces/Services/Storage/ICloudflareR2Service.cs: -------------------------------------------------------------------------------- 1 | namespace ByteSync.ServerCommon.Interfaces.Services.Storage; 2 | 3 | public interface ICloudflareR2Service : IProviderService 4 | { 5 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Business/SessionMembers/SessionMemberPrivateData.cs: -------------------------------------------------------------------------------- 1 | namespace ByteSync.Business.SessionMembers; 2 | 3 | public class SessionMemberPrivateData 4 | { 5 | public string MachineName { get; set; } 6 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Interfaces/Services/Sessions/Connecting/IQuitSessionService.cs: -------------------------------------------------------------------------------- 1 | namespace ByteSync.Interfaces.Services.Sessions.Connecting; 2 | 3 | public interface IQuitSessionService 4 | { 5 | Task Process(); 6 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Interfaces/Updates/IUpdateExtractor.cs: -------------------------------------------------------------------------------- 1 | using System.Threading.Tasks; 2 | 3 | namespace ByteSync.Interfaces.Updates; 4 | 5 | public interface IUpdateExtractor 6 | { 7 | Task ExtractAsync(); 8 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Models/Inventories/InventoryPartTypes.cs: -------------------------------------------------------------------------------- 1 | //namespace PowCloudSynchronizer.Model.Inventories 2 | //{ 3 | // enum InventoryPartTypes 4 | // { 5 | // Directory, File 6 | // } 7 | //} 8 | -------------------------------------------------------------------------------- /src/ByteSync.Common/Business/Lobbies/JoinLobbyModes.cs: -------------------------------------------------------------------------------- 1 | namespace ByteSync.Common.Business.Lobbies; 2 | 3 | public enum JoinLobbyModes 4 | { 5 | RunSynchronization = 1, 6 | RunInventory = 2, 7 | Join = 3, 8 | } -------------------------------------------------------------------------------- /src/ByteSync.ServerCommon/Business/Settings/SignalRSettings.cs: -------------------------------------------------------------------------------- 1 | namespace ByteSync.ServerCommon.Business.Settings; 2 | 3 | public class SignalRSettings 4 | { 5 | public string ConnectionString { get; set; } = ""; 6 | } -------------------------------------------------------------------------------- /src/ByteSync.ServerCommon/Interfaces/Services/IInventoryService.cs: -------------------------------------------------------------------------------- 1 | namespace ByteSync.ServerCommon.Interfaces.Services; 2 | 3 | public interface IInventoryService 4 | { 5 | Task ResetSession(string sessionId); 6 | } -------------------------------------------------------------------------------- /src/ByteSync.ServerCommon/Interfaces/Services/Storage/IAzureBlobStorageService.cs: -------------------------------------------------------------------------------- 1 | namespace ByteSync.ServerCommon.Interfaces.Services.Storage; 2 | 3 | public interface IAzureBlobStorageService : IProviderService 4 | { 5 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Interfaces/Controls/Inventories/IBaseInventoryRunner.cs: -------------------------------------------------------------------------------- 1 | namespace ByteSync.Interfaces.Controls.Inventories; 2 | 3 | public interface IBaseInventoryRunner 4 | { 5 | Task RunBaseInventory(); 6 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Interfaces/Controls/Inventories/IFullInventoryRunner.cs: -------------------------------------------------------------------------------- 1 | namespace ByteSync.Interfaces.Controls.Inventories; 2 | 3 | public interface IFullInventoryRunner 4 | { 5 | Task RunFullInventory(); 6 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Services/ContainerProvider.cs: -------------------------------------------------------------------------------- 1 | using Autofac; 2 | 3 | namespace ByteSync.Services; 4 | 5 | public static class ContainerProvider 6 | { 7 | public static IContainer Container { get; set; } = null!; 8 | } -------------------------------------------------------------------------------- /tests/ByteSync.Client.IntegrationTests/TestHelpers/Http/IFlakyCounter.cs: -------------------------------------------------------------------------------- 1 | namespace ByteSync.Client.IntegrationTests.TestHelpers.Http; 2 | 3 | public interface IFlakyCounter 4 | { 5 | bool ShouldFail(HttpMethod method); 6 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Business/Filtering/Values/PropertyValueType.cs: -------------------------------------------------------------------------------- 1 | namespace ByteSync.Business.Filtering.Values; 2 | 3 | public enum PropertyValueType 4 | { 5 | String, 6 | DateTime, 7 | Numeric, 8 | Unknown 9 | } -------------------------------------------------------------------------------- /src/ByteSync.Common/Business/Lobbies/LobbySessionModes.cs: -------------------------------------------------------------------------------- 1 | namespace ByteSync.Common.Business.Lobbies; 2 | 3 | public enum LobbySessionModes 4 | { 5 | RunSynchronization = 1, 6 | RunInventory = 2, 7 | LoadOnly = 3, 8 | } -------------------------------------------------------------------------------- /src/ByteSync.Common/Business/Versions/PriorityLevel.cs: -------------------------------------------------------------------------------- 1 | namespace ByteSync.Common.Business.Versions; 2 | 3 | public enum PriorityLevel 4 | { 5 | Unknown = 0, 6 | Minimal = 1, 7 | Recommended = 2, 8 | Optional = 3 9 | } -------------------------------------------------------------------------------- /src/ByteSync.Common/Interfaces/IConfigurationReader.cs: -------------------------------------------------------------------------------- 1 | namespace ByteSync.Common.Interfaces; 2 | 3 | public interface IConfigurationReader where T : class 4 | { 5 | public T? GetConfiguration(string configurationPath); 6 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Business/Configurations/LocalApplicationDataConstants.cs: -------------------------------------------------------------------------------- 1 | namespace ByteSync.Business.Configurations; 2 | 3 | public class LocalApplicationDataConstants 4 | { 5 | public const string LOGS_DIRECTORY = "Logs"; 6 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Business/Filtering/Expressions/FilterExpression.cs: -------------------------------------------------------------------------------- 1 | using ByteSync.Models.Comparisons.Result; 2 | 3 | namespace ByteSync.Business.Filtering.Expressions; 4 | 5 | public abstract class FilterExpression 6 | { 7 | 8 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Interfaces/Announcements/IAnnouncementService.cs: -------------------------------------------------------------------------------- 1 | using System.Threading.Tasks; 2 | 3 | namespace ByteSync.Interfaces.Announcements; 4 | 5 | public interface IAnnouncementService 6 | { 7 | Task Start(); 8 | } 9 | -------------------------------------------------------------------------------- /src/ByteSync.Functions/Constants/ErrorConstants.cs: -------------------------------------------------------------------------------- 1 | namespace ByteSync.Functions.Constants; 2 | 3 | public static class ErrorConstants 4 | { 5 | public const string INTERNAL_SERVER_ERROR = "An internal server error occurred"; 6 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Business/Filtering/Expressions/TrueExpression.cs: -------------------------------------------------------------------------------- 1 | using ByteSync.Models.Comparisons.Result; 2 | 3 | namespace ByteSync.Business.Filtering.Expressions; 4 | 5 | public class TrueExpression : FilterExpression 6 | { 7 | 8 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Business/Profiles/ExecutionModes.cs: -------------------------------------------------------------------------------- 1 | // namespace ByteSync.Business.Profiles; 2 | // 3 | // public enum ExecutionModes 4 | // { 5 | // LoadOnly = 1, 6 | // RunInventory = 2, 7 | // RunSynchronization = 3, 8 | // } -------------------------------------------------------------------------------- /src/ByteSync.Client/Business/Sessions/Connecting/CreateSessionStatus.cs: -------------------------------------------------------------------------------- 1 | namespace ByteSync.Business.Sessions.Connecting; 2 | 3 | public enum CreateSessionStatus 4 | { 5 | Success = 1, 6 | Error = 2, 7 | CanceledByUser = 3, 8 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Interfaces/Controls/Communications/IFileUploader.cs: -------------------------------------------------------------------------------- 1 | using System.Threading.Tasks; 2 | 3 | namespace ByteSync.Interfaces.Controls.Communications; 4 | 5 | public interface IFileUploader 6 | { 7 | Task Upload(); 8 | } -------------------------------------------------------------------------------- /src/ByteSync.Functions/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "profiles": { 3 | "ByteSync.Functions": { 4 | "commandName": "Project", 5 | "commandLineArgs": "--port 7174", 6 | "launchBrowser": false 7 | } 8 | } 9 | } -------------------------------------------------------------------------------- /src/ByteSync.ServerCommon/Commands/Storage/CleanupCloudflareR2SnippetsRequest.cs: -------------------------------------------------------------------------------- 1 | using MediatR; 2 | 3 | namespace ByteSync.ServerCommon.Commands.Storage; 4 | 5 | public class CleanupCloudflareR2SnippetsRequest : IRequest 6 | { 7 | } -------------------------------------------------------------------------------- /tests/ByteSync.Client.UnitTests/Services/Navigations/NavigationServiceTests.cs: -------------------------------------------------------------------------------- 1 | using NUnit.Framework; 2 | 3 | namespace ByteSync.Client.UnitTests.Services.Navigations; 4 | 5 | [TestFixture] 6 | public class NavigationServiceTests 7 | { 8 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Business/Configurations/ZoomConstants.cs: -------------------------------------------------------------------------------- 1 | namespace ByteSync.Business.Configurations; 2 | 3 | public class ZoomConstants 4 | { 5 | public const int MAX_ZOOM_LEVEL = 150; 6 | public const int MIN_ZOOM_LEVEL = 50; 7 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Interfaces/Controls/Communications/IErrorManager.cs: -------------------------------------------------------------------------------- 1 | namespace ByteSync.Interfaces.Controls.Communications; 2 | 3 | public interface IErrorManager 4 | { 5 | Task SetOnErrorAsync(); 6 | Task IsErrorAsync(); 7 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Interfaces/Controls/Encryptions/IMergerDecrypter.cs: -------------------------------------------------------------------------------- 1 | using System.Threading.Tasks; 2 | 3 | namespace ByteSync.Interfaces.Controls.Encryptions; 4 | 5 | public interface IMergerDecrypter 6 | { 7 | Task MergeAndDecrypt(); 8 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Interfaces/Updates/IUpdateHelperService.cs: -------------------------------------------------------------------------------- 1 | using System.IO; 2 | 3 | namespace ByteSync.Interfaces.Updates; 4 | 5 | public interface IUpdateHelperService 6 | { 7 | public DirectoryInfo? GetApplicationBaseDirectory(); 8 | } -------------------------------------------------------------------------------- /src/ByteSync.Common/Business/Auth/RefreshTokensStatus.cs: -------------------------------------------------------------------------------- 1 | namespace ByteSync.Common.Business.Auth; 2 | 3 | public enum RefreshTokensStatus 4 | { 5 | RefreshTokenOk = 1, 6 | RefreshTokenNotFound = 2, 7 | RefreshTokenNotActive = 3, 8 | } -------------------------------------------------------------------------------- /src/ByteSync.Common/Business/Serials/BindSerialResponseStatus.cs: -------------------------------------------------------------------------------- 1 | namespace ByteSync.Common.Business.Serials; 2 | 3 | public enum BindSerialResponseStatus 4 | { 5 | OK = 1, 6 | NotSupplied = 2, 7 | NotFound = 3, 8 | Ignored, 9 | } -------------------------------------------------------------------------------- /src/ByteSync.Common/Interfaces/IConfigurationWriter.cs: -------------------------------------------------------------------------------- 1 | namespace ByteSync.Common.Interfaces; 2 | 3 | public interface IConfigurationWriter where T : class 4 | { 5 | public void SaveConfiguration(T config, string configurationPath); 6 | } -------------------------------------------------------------------------------- /src/ByteSync.ServerCommon/Commands/Storage/CleanupAzureBlobStorageSnippetsRequest.cs: -------------------------------------------------------------------------------- 1 | using MediatR; 2 | 3 | namespace ByteSync.ServerCommon.Commands.Storage; 4 | 5 | public class CleanupAzureBlobStorageSnippetsRequest : IRequest 6 | { 7 | } -------------------------------------------------------------------------------- /tests/ByteSync.Functions.UnitTests/Bruno/Get Announcements.bru: -------------------------------------------------------------------------------- 1 | meta { 2 | name: Get Announcements 3 | type: http 4 | seq: 10 5 | } 6 | 7 | get { 8 | url: {{root-url}}/announcements 9 | body: none 10 | auth: none 11 | } 12 | -------------------------------------------------------------------------------- /src/ByteSync.Client/Interfaces/Controls/Inventories/IDataInventoryRunner.cs: -------------------------------------------------------------------------------- 1 | using System.Threading.Tasks; 2 | 3 | namespace ByteSync.Interfaces.Controls.Inventories; 4 | 5 | public interface IDataInventoryRunner 6 | { 7 | Task RunDataInventory(); 8 | } -------------------------------------------------------------------------------- /src/ByteSync.Common/Business/Misc/DeploymentModes.cs: -------------------------------------------------------------------------------- 1 | namespace ByteSync.Common.Business.Misc; 2 | 3 | public enum DeploymentModes 4 | { 5 | Portable = 0, 6 | SetupInstallation = 1, 7 | MsixInstallation = 2, 8 | HomebrewInstallation = 3 9 | } -------------------------------------------------------------------------------- /src/ByteSync.Common/Business/Synchronizations/SynchronizationActionMetrics.cs: -------------------------------------------------------------------------------- 1 | namespace ByteSync.Common.Business.Synchronizations; 2 | 3 | public class SynchronizationActionMetrics 4 | { 5 | public long? TransferredBytes { get; set; } 6 | } 7 | 8 | -------------------------------------------------------------------------------- /src/ByteSync.ServerCommon/Constants/SerialConstants.cs: -------------------------------------------------------------------------------- 1 | namespace ByteSync.ServerCommon.Constants; 2 | 3 | public class SerialConstants 4 | { 5 | public const string EMAIL_HI_HN = "HiHN"; 6 | public const string PRICE_ID_ENTERPRISE_YEARLY = "7"; 7 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Business/Comparisons/ComparisonProperty.cs: -------------------------------------------------------------------------------- 1 | namespace ByteSync.Business.Comparisons; 2 | 3 | public enum ComparisonProperty 4 | { 5 | Content = 1, 6 | Date = 2, 7 | Size = 3, 8 | Presence = 4, 9 | Name = 5, 10 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Business/Sessions/SessionConnectionStatus.cs: -------------------------------------------------------------------------------- 1 | namespace ByteSync.Business.Sessions; 2 | 3 | public enum SessionConnectionStatus 4 | { 5 | NoSession = 0, 6 | JoiningSession = 1, 7 | CreatingSession = 2, 8 | InSession = 3, 9 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/GlobalUsings.cs: -------------------------------------------------------------------------------- 1 | global using Microsoft.Extensions.Logging; 2 | global using System; 3 | global using System.Collections.Generic; 4 | global using System.Linq; 5 | global using System.Threading.Tasks; 6 | global using ByteSync.Common.Helpers; -------------------------------------------------------------------------------- /src/ByteSync.Client/Interfaces/Controls/Bootstrapping/IBootstrapLogger.cs: -------------------------------------------------------------------------------- 1 | namespace ByteSync.Interfaces.Controls.Bootstrapping; 2 | 3 | public interface IBootstrapLogger 4 | { 5 | void LogBootstrapHeader(); 6 | 7 | void LogBootstrapContent(); 8 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Interfaces/Factories/ISlicerEncrypterFactory.cs: -------------------------------------------------------------------------------- 1 | using ByteSync.Interfaces.Controls.Encryptions; 2 | 3 | namespace ByteSync.Interfaces.Factories; 4 | 5 | public interface ISlicerEncrypterFactory 6 | { 7 | ISlicerEncrypter Create(); 8 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Interfaces/Services/Sessions/ISessionInterruptor.cs: -------------------------------------------------------------------------------- 1 | namespace ByteSync.Interfaces.Services.Sessions; 2 | 3 | public interface ISessionInterruptor 4 | { 5 | Task RequestQuitSession(); 6 | 7 | Task RequestRestartSession(); 8 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Interfaces/Converters/ISizeUnitConverter.cs: -------------------------------------------------------------------------------- 1 | using ByteSync.Common.Business.Misc; 2 | 3 | namespace ByteSync.Interfaces.Converters; 4 | 5 | public interface ISizeUnitConverter 6 | { 7 | string GetPrintableSizeUnit(SizeUnits? sizeUnit); 8 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Interfaces/Factories/IBootstrapperFactory.cs: -------------------------------------------------------------------------------- 1 | using ByteSync.Interfaces.Controls.Bootstrapping; 2 | 3 | namespace ByteSync.Interfaces.Factories; 4 | 5 | public interface IBootstrapperFactory 6 | { 7 | IBootstrapper CreateBootstrapper(); 8 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Interfaces/Factories/IHubConnectionFactory.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore.SignalR.Client; 2 | 3 | namespace ByteSync.Interfaces.Factories; 4 | 5 | public interface IHubConnectionFactory 6 | { 7 | Task BuildConnection(); 8 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Interfaces/Updates/IDeleteUpdateBackupSnippetsService.cs: -------------------------------------------------------------------------------- 1 | using System.Threading.Tasks; 2 | 3 | namespace ByteSync.Interfaces.Updates; 4 | 5 | public interface IDeleteUpdateBackupSnippetsService 6 | { 7 | Task DeleteBackupSnippetsAsync(); 8 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Business/Profiles/LocalSessionProfileOptions.cs: -------------------------------------------------------------------------------- 1 | using ByteSync.Business.Sessions; 2 | 3 | namespace ByteSync.Business.Profiles; 4 | 5 | public class LocalSessionProfileOptions 6 | { 7 | public SessionSettings Settings { get; set; } = null!; 8 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Interfaces/Controls/Actions/ISharedActionsGroupComputer.cs: -------------------------------------------------------------------------------- 1 | using System.Threading.Tasks; 2 | 3 | namespace ByteSync.Interfaces.Controls.Actions; 4 | 5 | public interface ISharedActionsGroupComputer 6 | { 7 | Task ComputeSharedActionsGroups(); 8 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Interfaces/Controls/Inventories/IDataNodeCodeGenerator.cs: -------------------------------------------------------------------------------- 1 | using ByteSync.Business.DataNodes; 2 | 3 | namespace ByteSync.Interfaces.Controls.Inventories; 4 | 5 | public interface IDataNodeCodeGenerator 6 | { 7 | void RecomputeCodes(); 8 | } 9 | -------------------------------------------------------------------------------- /src/ByteSync.Common/Business/Serials/SerialStatus.cs: -------------------------------------------------------------------------------- 1 | namespace ByteSync.Common.Business.Serials; 2 | 3 | public enum SerialStatus 4 | { 5 | OK = 1, 6 | // NotSupplied = 2, 7 | // NotFound = 3, 8 | Expired = 2, 9 | NoAvailableSlot = 3, 10 | } -------------------------------------------------------------------------------- /src/ByteSync.Common/Interfaces/Business/IAction.cs: -------------------------------------------------------------------------------- 1 | // using ByteSyncCommon.Business.Actions; 2 | // 3 | // namespace ByteSyncCommon.Interfaces.Business; 4 | // 5 | // public interface IAction 6 | // { 7 | // public ActionOperatorTypes Operator { get; set; } 8 | // } -------------------------------------------------------------------------------- /src/ByteSync.Client/Business/Filtering/Parsing/FilterToken.cs: -------------------------------------------------------------------------------- 1 | namespace ByteSync.Business.Filtering.Parsing; 2 | 3 | public class FilterToken 4 | { 5 | public required string Token { get; init; } 6 | 7 | public required FilterTokenType Type { get; init; } 8 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Interfaces/Controls/Actions/ISharedActionsGroupOrganizer.cs: -------------------------------------------------------------------------------- 1 | using System.Threading.Tasks; 2 | 3 | namespace ByteSync.Interfaces.Controls.Actions; 4 | 5 | public interface ISharedActionsGroupOrganizer 6 | { 7 | Task OrganizeSharedActionGroups(); 8 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Interfaces/Controls/TimeTracking/IDataTrackingStrategy.cs: -------------------------------------------------------------------------------- 1 | namespace ByteSync.Interfaces.Controls.TimeTracking; 2 | 3 | public interface IDataTrackingStrategy 4 | { 5 | IObservable<(long IdentifiedVolume, long ProcessedVolume)> GetDataObservable(); 6 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Interfaces/Factories/IFileUploadPreparerFactory.cs: -------------------------------------------------------------------------------- 1 | using ByteSync.Interfaces.Controls.Communications; 2 | 3 | namespace ByteSync.Interfaces.Factories; 4 | 5 | public interface IFileUploadPreparerFactory 6 | { 7 | IFileUploadPreparer Create(); 8 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Interfaces/Services/Sessions/Connecting/Joining/IYouGaveAWrongPasswordService.cs: -------------------------------------------------------------------------------- 1 | namespace ByteSync.Interfaces.Services.Sessions.Connecting.Joining; 2 | 3 | public interface IYouGaveAWrongPasswordService 4 | { 5 | Task Process(string sessionId); 6 | } -------------------------------------------------------------------------------- /src/ByteSync.Common/Business/Actions/ClientInstanceIdAndNodeId.cs: -------------------------------------------------------------------------------- 1 | namespace ByteSync.Common.Business.Actions; 2 | 3 | public record ClientInstanceIdAndNodeId 4 | { 5 | public string ClientInstanceId { get; init; } = null!; 6 | public string? NodeId { get; init; } 7 | } -------------------------------------------------------------------------------- /src/ByteSync.Common/Business/Lobbies/LobbyCheckRecipient.cs: -------------------------------------------------------------------------------- 1 | namespace ByteSync.Common.Business.Lobbies; 2 | 3 | public class LobbyCheckRecipient 4 | { 5 | public string ClientInstanceId { get; set; } = null!; 6 | 7 | public byte[] CheckData { get; set; } = null!; 8 | } -------------------------------------------------------------------------------- /src/ByteSync.ServerCommon/Business/Settings/RedisSettings.cs: -------------------------------------------------------------------------------- 1 | namespace ByteSync.ServerCommon.Business.Settings; 2 | 3 | public class RedisSettings 4 | { 5 | public string ConnectionString { get; set; } = ""; 6 | 7 | public string Prefix { get; set; } = ""; 8 | } -------------------------------------------------------------------------------- /src/ByteSync.ServerCommon/Interfaces/Factories/ITokensFactory.cs: -------------------------------------------------------------------------------- 1 | using ByteSync.ServerCommon.Business.Auth; 2 | 3 | namespace ByteSync.ServerCommon.Interfaces.Factories; 4 | 5 | public interface ITokensFactory 6 | { 7 | public JwtTokens BuildTokens(Client client); 8 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Business/Sessions/Connecting/CreateSessionError.cs: -------------------------------------------------------------------------------- 1 | namespace ByteSync.Business.Sessions.Connecting; 2 | 3 | public class CreateSessionError 4 | { 5 | public Exception? Exception { get; init; } 6 | public CreateSessionStatus Status { get; init; } 7 | } -------------------------------------------------------------------------------- /src/ByteSync.Common/Business/Profiles/CloudSessionProfileSlot.cs: -------------------------------------------------------------------------------- 1 | namespace ByteSync.Common.Business.Profiles; 2 | 3 | public class CloudSessionProfileSlot 4 | { 5 | public string ProfileClientId { get; set; } = null!; 6 | public string ClientId { get; set; } = null!; 7 | } -------------------------------------------------------------------------------- /src/ByteSync.ServerCommon/Interfaces/Loaders/IAnnouncementsLoader.cs: -------------------------------------------------------------------------------- 1 | using ByteSync.Common.Business.Announcements; 2 | 3 | namespace ByteSync.ServerCommon.Interfaces.Loaders; 4 | 5 | public interface IAnnouncementsLoader 6 | { 7 | Task> Load(); 8 | } 9 | -------------------------------------------------------------------------------- /src/ByteSync.Client/Interfaces/Repositories/IAnnouncementRepository.cs: -------------------------------------------------------------------------------- 1 | using ByteSync.Common.Business.Announcements; 2 | 3 | namespace ByteSync.Interfaces.Repositories; 4 | 5 | public interface IAnnouncementRepository : IBaseSourceCacheRepository 6 | { 7 | } 8 | -------------------------------------------------------------------------------- /src/ByteSync.Client/Interfaces/Updates/IUpdateDownloader.cs: -------------------------------------------------------------------------------- 1 | using System.Threading; 2 | using System.Threading.Tasks; 3 | 4 | namespace ByteSync.Interfaces.Updates; 5 | 6 | public interface IUpdateDownloader 7 | { 8 | Task DownloadAsync(CancellationToken cancellationToken); 9 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Services/Communications/Functions/FunctionsConnectionWrapper.cs: -------------------------------------------------------------------------------- 1 | using ByteSync.Interfaces.Communications; 2 | 3 | namespace ByteSync.Services.Communications.Functions; 4 | 5 | public class FunctionsConnectionWrapper : IFunctionsByteSyncInvoke 6 | { 7 | 8 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Views/Misc/MessageBoxView.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.Controls; 2 | 3 | namespace ByteSync.Views.Misc; 4 | 5 | public partial class MessageBoxView : UserControl 6 | { 7 | public MessageBoxView() 8 | { 9 | InitializeComponent(); 10 | } 11 | } -------------------------------------------------------------------------------- /src/ByteSync.ServerCommon/Business/Repositories/UpdateEntityStatus.cs: -------------------------------------------------------------------------------- 1 | namespace ByteSync.ServerCommon.Business.Repositories; 2 | 3 | public enum UpdateEntityStatus 4 | { 5 | Saved, 6 | Deleted, 7 | WaitingForTransaction, 8 | NotFound, 9 | NoOperation 10 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Business/Updates/UpdateConstants.cs: -------------------------------------------------------------------------------- 1 | namespace ByteSync.Business.Updates; 2 | 3 | public static class UpdateConstants 4 | { 5 | public const string BAK_EXTENSION = "bsa_upd_bak"; 6 | public const string UPDATE_UNZIP_EXTRACT_START_NAME = "bsa_upd_unzip_tmp_"; 7 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Interfaces/Factories/Proxies/IDataNodeProxyFactory.cs: -------------------------------------------------------------------------------- 1 | using ByteSync.Business.DataNodes; 2 | 3 | namespace ByteSync.Interfaces.Factories.Proxies; 4 | 5 | public interface IDataNodeProxyFactory 6 | { 7 | DataNodeProxy CreateDataNodeProxy(DataNode dataNode); 8 | } 9 | -------------------------------------------------------------------------------- /src/ByteSync.Client/Interfaces/Updates/IUpdateNewFilesMover.cs: -------------------------------------------------------------------------------- 1 | using System.Threading; 2 | using System.Threading.Tasks; 3 | 4 | namespace ByteSync.Interfaces.Updates; 5 | 6 | public interface IUpdateNewFilesMover 7 | { 8 | Task MoveNewFiles(CancellationToken cancellationToken); 9 | } -------------------------------------------------------------------------------- /src/ByteSync.Common/Business/Misc/OSPlatforms.cs: -------------------------------------------------------------------------------- 1 | namespace ByteSync.Common.Business.Misc; 2 | 3 | public enum OSPlatforms 4 | { 5 | Undefined = 0, 6 | Windows = 1, 7 | Linux = 2, 8 | MacOs = 3, 9 | Unknown4 = 4, 10 | Unknown5 = 5, 11 | Unknown6 = 6, 12 | } -------------------------------------------------------------------------------- /src/ByteSync.ServerCommon/Interfaces/Factories/ILobbyFactory.cs: -------------------------------------------------------------------------------- 1 | using ByteSync.ServerCommon.Entities; 2 | 3 | namespace ByteSync.ServerCommon.Interfaces.Factories; 4 | 5 | public interface ILobbyFactory 6 | { 7 | Lobby BuildLobby(CloudSessionProfileEntity cloudSessionProfileData); 8 | } -------------------------------------------------------------------------------- /src/ByteSync.ServerCommon/Interfaces/Services/Storage/Factories/ICloudflareR2ClientFactory.cs: -------------------------------------------------------------------------------- 1 | namespace ByteSync.ServerCommon.Interfaces.Services.Storage.Factories; 2 | 3 | using Amazon.S3; 4 | 5 | public interface ICloudflareR2ClientFactory 6 | { 7 | AmazonS3Client GetClient(); 8 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Business/Inventories/InventoryTaskStatus.cs: -------------------------------------------------------------------------------- 1 | namespace ByteSync.Business.Inventories; 2 | 3 | public enum InventoryTaskStatus 4 | { 5 | Pending = 0, 6 | Running = 1, 7 | Cancelled = 2, 8 | NotLaunched = 3, 9 | Error = 4, 10 | Success = 5, 11 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Interfaces/Controls/Synchronizations/ISynchronizationStarter.cs: -------------------------------------------------------------------------------- 1 | using System.Threading.Tasks; 2 | 3 | namespace ByteSync.Interfaces.Controls.Synchronizations; 4 | 5 | public interface ISynchronizationStarter 6 | { 7 | Task StartSynchronization(bool isLaunchedByUser); 8 | } -------------------------------------------------------------------------------- /src/ByteSync.Common/Business/Misc/SizeUnits.cs: -------------------------------------------------------------------------------- 1 | namespace ByteSync.Common.Business.Misc; 2 | 3 | public enum SizeUnits 4 | { 5 | Byte = 1, 6 | KB = 2, 7 | MB = 3, 8 | GB = 4, 9 | TB = 5, 10 | PB = 6, 11 | EB = 7, 12 | ZB = 8, 13 | YB = 9 14 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Interfaces/Controls/Inventories/IDataSourceCodeGenerator.cs: -------------------------------------------------------------------------------- 1 | using ByteSync.Business.DataSources; 2 | 3 | namespace ByteSync.Interfaces.Controls.Inventories; 4 | 5 | public interface IDataSourceCodeGenerator 6 | { 7 | void RecomputeCodesForNode(string dataNodeId); 8 | } 9 | -------------------------------------------------------------------------------- /src/ByteSync.Client/Interfaces/Factories/Proxies/IDataSourceProxyFactory.cs: -------------------------------------------------------------------------------- 1 | using ByteSync.Business.DataSources; 2 | 3 | namespace ByteSync.Interfaces.Factories.Proxies; 4 | 5 | public interface IDataSourceProxyFactory 6 | { 7 | DataSourceProxy CreateDataSourceProxy(DataSource dataSource); 8 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Interfaces/ILocalApplicationDataManager.cs: -------------------------------------------------------------------------------- 1 | namespace ByteSync.Interfaces; 2 | 3 | public interface ILocalApplicationDataManager 4 | { 5 | string ApplicationDataPath { get; } 6 | 7 | string? LogFilePath { get; } 8 | 9 | string? DebugLogFilePath { get; } 10 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Interfaces/Repositories/ISynchronizationRuleRepository.cs: -------------------------------------------------------------------------------- 1 | using ByteSync.Business.Actions.Local; 2 | 3 | namespace ByteSync.Interfaces.Repositories; 4 | 5 | public interface ISynchronizationRuleRepository : IBaseSourceCacheRepository 6 | { 7 | 8 | } -------------------------------------------------------------------------------- /src/ByteSync.Common/Business/Profiles/DeleteCloudSessionProfileParameters.cs: -------------------------------------------------------------------------------- 1 | namespace ByteSync.Common.Business.Profiles; 2 | 3 | public class DeleteCloudSessionProfileParameters 4 | { 5 | public string CloudSessionProfileId { get; set; } 6 | public string ProfileClientId { get; set; } 7 | } -------------------------------------------------------------------------------- /src/ByteSync.ServerCommon/Business/Settings/ClientSoftwareVersionSettings.cs: -------------------------------------------------------------------------------- 1 | using ByteSync.Common.Business.Versions; 2 | 3 | namespace ByteSync.ServerCommon.Business.Settings; 4 | 5 | public class ClientSoftwareVersionSettings 6 | { 7 | public SoftwareVersion? MinimalVersion { get; set; } 8 | } -------------------------------------------------------------------------------- /src/ByteSync.ServerCommon/Commands/Announcements/GetActiveAnnouncementsRequest.cs: -------------------------------------------------------------------------------- 1 | using ByteSync.Common.Business.Announcements; 2 | using MediatR; 3 | 4 | namespace ByteSync.ServerCommon.Commands.Announcements; 5 | 6 | public class GetActiveAnnouncementsRequest : IRequest>; 7 | -------------------------------------------------------------------------------- /src/ByteSync.Client/Business/Communications/ConnectionStatuses.cs: -------------------------------------------------------------------------------- 1 | namespace ByteSync.Business.Communications; 2 | 3 | public enum ConnectionStatuses 4 | { 5 | NotConnected = 0, 6 | Connecting = 1, 7 | Connected = 2, 8 | RetryConnectingSoon = 3, 9 | ConnectionFailed = 4, 10 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Business/Navigations/NavigationPanel.cs: -------------------------------------------------------------------------------- 1 | namespace ByteSync.Business.Navigations; 2 | 3 | public enum NavigationPanel 4 | { 5 | None, 6 | Home, 7 | CloudSynchronization, 8 | LocalSynchronization, 9 | ProfileSessionLobby, 10 | ProfileSessionDetails 11 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Interfaces/Controls/Inventories/IContentRepartitionGroupsComputer.cs: -------------------------------------------------------------------------------- 1 | using ByteSync.Business.Comparisons; 2 | 3 | namespace ByteSync.Interfaces.Controls.Inventories; 4 | 5 | public interface IContentRepartitionGroupsComputer 6 | { 7 | ContentRepartitionComputeResult Compute(); 8 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Interfaces/Controls/Synchronizations/ISynchronizationLooper.cs: -------------------------------------------------------------------------------- 1 | using System.Threading.Tasks; 2 | 3 | namespace ByteSync.Interfaces.Controls.Synchronizations; 4 | 5 | public interface ISynchronizationLooper : IAsyncDisposable 6 | { 7 | Task CloudSessionSynchronizationLoop(); 8 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Interfaces/Factories/ISynchronizationLooperFactory.cs: -------------------------------------------------------------------------------- 1 | using ByteSync.Interfaces.Controls.Synchronizations; 2 | 3 | namespace ByteSync.Interfaces.Factories; 4 | 5 | public interface ISynchronizationLooperFactory 6 | { 7 | ISynchronizationLooper CreateSynchronizationLooper(); 8 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Interfaces/Factories/ITemporaryFileManagerFactory.cs: -------------------------------------------------------------------------------- 1 | using ByteSync.Interfaces.Controls.Synchronizations; 2 | 3 | namespace ByteSync.Interfaces.Factories; 4 | 5 | public interface ITemporaryFileManagerFactory 6 | { 7 | ITemporaryFileManager Create(string destinationFullName); 8 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Interfaces/Updates/IAvailableUpdatesLister.cs: -------------------------------------------------------------------------------- 1 | using System.Threading.Tasks; 2 | using ByteSync.Common.Business.Versions; 3 | 4 | namespace ByteSync.Interfaces.Updates; 5 | 6 | public interface IAvailableUpdatesLister 7 | { 8 | Task> GetAvailableUpdates(); 9 | } -------------------------------------------------------------------------------- /src/ByteSync.ServerCommon/Interfaces/Repositories/ICloudSessionProfileRepository.cs: -------------------------------------------------------------------------------- 1 | using ByteSync.ServerCommon.Entities; 2 | 3 | namespace ByteSync.ServerCommon.Interfaces.Repositories; 4 | 5 | public interface ICloudSessionProfileRepository : IRepository 6 | { 7 | 8 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Business/Updates/UpdateProgressStatus.cs: -------------------------------------------------------------------------------- 1 | namespace ByteSync.Business.Updates; 2 | 3 | public enum UpdateProgressStatus 4 | { 5 | Downloading, 6 | Extracting, 7 | UpdatingFiles, 8 | BackingUpExistingFiles, 9 | MovingNewFiles, 10 | RestartingApplication 11 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Interfaces/Controls/Communications/IFilePartDownloadAsserter.cs: -------------------------------------------------------------------------------- 1 | using ByteSync.Common.Business.SharedFiles; 2 | 3 | namespace ByteSync.Interfaces.Controls.Communications; 4 | 5 | public interface IFilePartDownloadAsserter 6 | { 7 | Task AssertAsync(TransferParameters parameters); 8 | } -------------------------------------------------------------------------------- /src/ByteSync.Common/Business/SharedFiles/FileStorageLocation.cs: -------------------------------------------------------------------------------- 1 | namespace ByteSync.Common.Business.SharedFiles; 2 | 3 | public enum StorageProvider 4 | { 5 | AzureBlobStorage, 6 | CloudflareR2 7 | } 8 | 9 | public record FileStorageLocation(string Url, StorageProvider StorageProvider); 10 | -------------------------------------------------------------------------------- /src/ByteSync.Client/Interfaces/Services/Sessions/Connecting/IAfterJoinSessionService.cs: -------------------------------------------------------------------------------- 1 | using ByteSync.Business.Sessions.Connecting; 2 | 3 | namespace ByteSync.Interfaces.Services.Sessions.Connecting; 4 | 5 | public interface IAfterJoinSessionService 6 | { 7 | Task Process(AfterJoinSessionRequest request); 8 | } -------------------------------------------------------------------------------- /src/ByteSync.Common/Business/Trust/Connections/SetAuthCheckedParameters.cs: -------------------------------------------------------------------------------- 1 | namespace ByteSync.Common.Business.Trust.Connections; 2 | 3 | public class SetAuthCheckedParameters 4 | { 5 | public string SessionId { get; set; } = null!; 6 | 7 | public string CheckedClientInstanceId { get; set; } = null!; 8 | } -------------------------------------------------------------------------------- /src/ByteSync.ServerCommon/Interfaces/Loaders/IClientSoftwareVersionSettingsLoader.cs: -------------------------------------------------------------------------------- 1 | using ByteSync.ServerCommon.Business.Settings; 2 | 3 | namespace ByteSync.ServerCommon.Interfaces.Loaders; 4 | 5 | public interface IClientSoftwareVersionSettingsLoader 6 | { 7 | Task Load(); 8 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Interfaces/IDataSourceChecker.cs: -------------------------------------------------------------------------------- 1 | using System.Threading.Tasks; 2 | using ByteSync.Business.DataSources; 3 | 4 | namespace ByteSync.Interfaces; 5 | 6 | public interface IDataSourceChecker 7 | { 8 | Task CheckDataSource(DataSource dataSource, IEnumerable existingDataSources); 9 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Interfaces/IStatisticsService.cs: -------------------------------------------------------------------------------- 1 | using System.Threading.Tasks; 2 | using ByteSync.Common.Business.Misc; 3 | 4 | namespace ByteSync.Interfaces; 5 | 6 | public interface IStatisticsService 7 | { 8 | Task GetUsageStatistics(UsageStatisticsRequest usageStatisticsRequest); 9 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Interfaces/Services/Filtering/IFilterParser.cs: -------------------------------------------------------------------------------- 1 | using ByteSync.Business.Filtering.Expressions; 2 | using ByteSync.Business.Filtering.Parsing; 3 | 4 | namespace ByteSync.Interfaces.Services.Filtering; 5 | 6 | public interface IFilterParser 7 | { 8 | ParseResult TryParse(string filterText); 9 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Interfaces/Services/Filtering/IOperatorParser.cs: -------------------------------------------------------------------------------- 1 | using ByteSync.Business.Filtering; 2 | using ByteSync.Business.Filtering.Parsing; 3 | 4 | namespace ByteSync.Interfaces.Services.Filtering; 5 | 6 | public interface IOperatorParser 7 | { 8 | ComparisonOperator Parse(string operatorString); 9 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Views/TrustedNetworks/TrustedNetworkView.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.Controls; 2 | 3 | namespace ByteSync.Views.TrustedNetworks; 4 | 5 | public partial class TrustedNetworkView : UserControl 6 | { 7 | public TrustedNetworkView() 8 | { 9 | InitializeComponent(); 10 | } 11 | } -------------------------------------------------------------------------------- /src/ByteSync.Common/Business/Profiles/GetCloudSessionProfileDataParameters.cs: -------------------------------------------------------------------------------- 1 | namespace ByteSync.Common.Business.Profiles; 2 | 3 | public class GetCloudSessionProfileDataParameters 4 | { 5 | public string SessionId { get; set; } = null!; 6 | 7 | public string CloudSessionProfileId { get; set; } = null!; 8 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Business/Sessions/LobbyCloudSessionInfo.cs: -------------------------------------------------------------------------------- 1 | namespace ByteSync.Business.Sessions; 2 | 3 | public class LobbyCloudSessionInfo 4 | { 5 | public string SessionId { get; set; } 6 | 7 | public string SessionPassword { get; set; } 8 | 9 | public string LobbyId { get; set; } 10 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Interfaces/Controls/Communications/IFileUploadPreparer.cs: -------------------------------------------------------------------------------- 1 | using ByteSync.Common.Business.SharedFiles; 2 | 3 | namespace ByteSync.Interfaces.Controls.Communications; 4 | 5 | public interface IFileUploadPreparer 6 | { 7 | void PrepareUpload(SharedFileDefinition sharedFileDefinition, long length); 8 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Interfaces/Services/Filtering/IFilterTokenizer.cs: -------------------------------------------------------------------------------- 1 | using ByteSync.Business.Filtering.Parsing; 2 | 3 | namespace ByteSync.Interfaces.Services.Filtering; 4 | 5 | public interface IFilterTokenizer 6 | { 7 | void Initialize(string? filterText); 8 | 9 | FilterToken GetNextToken(); 10 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Interfaces/Services/Filtering/IExpressionEvaluatorFactory.cs: -------------------------------------------------------------------------------- 1 | using ByteSync.Business.Filtering.Expressions; 2 | 3 | namespace ByteSync.Interfaces.Services.Filtering; 4 | 5 | public interface IExpressionEvaluatorFactory 6 | { 7 | public IExpressionEvaluator GetEvaluator(FilterExpression expression); 8 | } -------------------------------------------------------------------------------- /src/ByteSync.Common/Business/EndPoints/PublicKeyInfo.cs: -------------------------------------------------------------------------------- 1 | namespace ByteSync.Common.Business.EndPoints; 2 | 3 | public class PublicKeyInfo 4 | { 5 | public string ClientId { get; set; } = null!; 6 | 7 | public byte[] PublicKey { get; set; } = null!; 8 | 9 | public int ProtocolVersion { get; set; } 10 | } -------------------------------------------------------------------------------- /src/ByteSync.Common/Business/Lobbies/Connections/GetProfileDetailsPasswordParameters.cs: -------------------------------------------------------------------------------- 1 | namespace ByteSync.Common.Business.Lobbies.Connections; 2 | 3 | public class GetProfileDetailsPasswordParameters 4 | { 5 | public string CloudSessionProfileId { get; set; } 6 | 7 | public string ProfileClientId { get; set; } 8 | } -------------------------------------------------------------------------------- /src/ByteSync.Common/Business/Lobbies/LobbyCloudSessionCredentials.cs: -------------------------------------------------------------------------------- 1 | namespace ByteSync.Common.Business.Lobbies; 2 | 3 | public class LobbyCloudSessionCredentials 4 | { 5 | public string LobbyId { get; set; } 6 | 7 | public byte[] Info { get; set; } 8 | 9 | public string Recipient { get; set; } 10 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Interfaces/Factories/IInventoryBuilderFactory.cs: -------------------------------------------------------------------------------- 1 | using ByteSync.Business.DataNodes; 2 | using ByteSync.Interfaces.Controls.Inventories; 3 | 4 | namespace ByteSync.Interfaces.Factories; 5 | 6 | public interface IInventoryBuilderFactory 7 | { 8 | IInventoryBuilder CreateInventoryBuilder(DataNode dataNode); 9 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Services/Converters/BooleanToCursorConverter.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.Input; 2 | 3 | namespace ByteSync.Services.Converters; 4 | 5 | public class BooleanToCursorConverter : BooleanConverter 6 | { 7 | public BooleanToCursorConverter() : base(StandardCursorType.Wait, StandardCursorType.Arrow) {} 8 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Views/Lobbies/LobbySynchronizationRuleView.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.Controls; 2 | 3 | namespace ByteSync.Views.Lobbies; 4 | 5 | public partial class LobbySynchronizationRuleView : UserControl 6 | { 7 | public LobbySynchronizationRuleView() 8 | { 9 | InitializeComponent(); 10 | } 11 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Views/Misc/ErrorView.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.ReactiveUI; 2 | using ByteSync.ViewModels.Misc; 3 | 4 | namespace ByteSync.Views.Misc; 5 | 6 | public partial class ErrorView : ReactiveUserControl 7 | { 8 | public ErrorView() 9 | { 10 | InitializeComponent(); 11 | } 12 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Interfaces/Controls/Actions/ISharedAtomicActionComputer.cs: -------------------------------------------------------------------------------- 1 | using System.Threading.Tasks; 2 | using ByteSync.Business.Actions.Shared; 3 | 4 | namespace ByteSync.Interfaces.Controls.Actions; 5 | 6 | public interface ISharedAtomicActionComputer 7 | { 8 | Task> ComputeSharedAtomicActions(); 9 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Interfaces/Dialogs/IMessageBoxViewModelFactory.cs: -------------------------------------------------------------------------------- 1 | using ByteSync.ViewModels.Misc; 2 | 3 | namespace ByteSync.Interfaces.Dialogs; 4 | 5 | public interface IMessageBoxViewModelFactory 6 | { 7 | MessageBoxViewModel CreateMessageBoxViewModel(string titleKey, string? messageKey, params string[]? messageArguments); 8 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Interfaces/Factories/ITimeTrackingComputerFactory.cs: -------------------------------------------------------------------------------- 1 | using ByteSync.Business.Misc; 2 | using ByteSync.Interfaces.Controls.TimeTracking; 3 | 4 | namespace ByteSync.Interfaces.Factories; 5 | 6 | public interface ITimeTrackingComputerFactory 7 | { 8 | ITimeTrackingComputer Create(TimeTrackingComputerType type); 9 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Interfaces/Repositories/IComparisonItemRepository.cs: -------------------------------------------------------------------------------- 1 | using ByteSync.Business.Inventories; 2 | using ByteSync.Models.Comparisons.Result; 3 | 4 | namespace ByteSync.Interfaces.Repositories; 5 | 6 | public interface IComparisonItemRepository : IBaseSourceCacheRepository 7 | { 8 | 9 | } -------------------------------------------------------------------------------- /src/ByteSync.ServerCommon/Interfaces/Factories/ICacheKeyFactory.cs: -------------------------------------------------------------------------------- 1 | using ByteSync.ServerCommon.Business.Repositories; 2 | using ByteSync.ServerCommon.Entities; 3 | 4 | namespace ByteSync.ServerCommon.Interfaces.Factories; 5 | 6 | public interface ICacheKeyFactory 7 | { 8 | CacheKey Create(EntityType entityType, string entityId); 9 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Interfaces/Controls/Bootstrapping/IBootstrapper.cs: -------------------------------------------------------------------------------- 1 | namespace ByteSync.Interfaces.Controls.Bootstrapping; 2 | 3 | public interface IBootstrapper 4 | { 5 | public void Start(); 6 | 7 | public Action? AttachConsole { get; set; } 8 | 9 | public void AfterFrameworkInitializationCompleted(); 10 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Interfaces/IFileDialogService.cs: -------------------------------------------------------------------------------- 1 | using System.Threading.Tasks; 2 | 3 | namespace ByteSync.Interfaces; 4 | 5 | public interface IFileDialogService 6 | { 7 | Task ShowOpenFileDialogAsync(string title, bool allowMultiple); 8 | 9 | Task ShowOpenFolderDialogAsync(string title); 10 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Services/Applications/IMsixPfnParser.cs: -------------------------------------------------------------------------------- 1 | namespace ByteSync.Services.Applications; 2 | 3 | public interface IMsixPfnParser 4 | { 5 | bool TryParse(string containerDirectoryName, out string? packageFamilyName); 6 | 7 | bool TryDetectMsix(string applicationLauncherFullName, out string? msixPackageFamilyName); 8 | } -------------------------------------------------------------------------------- /src/ByteSync.Common/Business/Synchronizations/TrackingActionSummary.cs: -------------------------------------------------------------------------------- 1 | namespace ByteSync.Common.Business.Synchronizations; 2 | 3 | public class TrackingActionSummary 4 | { 5 | public string ActionsGroupId { get; set; } = null!; 6 | 7 | public bool IsSuccess { get; set; } 8 | 9 | public bool IsError { get; set; } 10 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Business/Filtering/Parsing/ComparisonOperator.cs: -------------------------------------------------------------------------------- 1 | namespace ByteSync.Business.Filtering.Parsing; 2 | 3 | public enum ComparisonOperator 4 | { 5 | Equals, 6 | NotEquals, 7 | GreaterThan, 8 | LessThan, 9 | GreaterThanOrEqual, 10 | LessThanOrEqual, 11 | RegexMatch, 12 | RegexNotMatch, 13 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Interfaces/Controls/Automating/IProfileAutoRunner.cs: -------------------------------------------------------------------------------- 1 | using System.Threading.Tasks; 2 | using ByteSync.Common.Business.Lobbies; 3 | 4 | namespace ByteSync.Interfaces.Controls.Automating; 5 | 6 | public interface IProfileAutoRunner 7 | { 8 | Task OperateRunProfile(string? profileName, JoinLobbyModes? joinLobbyModes); 9 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Interfaces/Controls/Inventories/IInventoryStatisticsService.cs: -------------------------------------------------------------------------------- 1 | using ByteSync.Business.Inventories; 2 | 3 | namespace ByteSync.Interfaces.Controls.Inventories; 4 | 5 | public interface IInventoryStatisticsService 6 | { 7 | IObservable Statistics { get; } 8 | 9 | Task Compute(); 10 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Interfaces/Factories/IFileDownloaderFactory.cs: -------------------------------------------------------------------------------- 1 | using ByteSync.Common.Business.SharedFiles; 2 | using ByteSync.Interfaces.Controls.Communications; 3 | 4 | namespace ByteSync.Interfaces.Factories; 5 | 6 | public interface IFileDownloaderFactory 7 | { 8 | IFileDownloader Build(SharedFileDefinition sharedFileDefinition); 9 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Interfaces/Services/Communications/IConnectionConstantsService.cs: -------------------------------------------------------------------------------- 1 | using System.Threading.Tasks; 2 | 3 | namespace ByteSync.Interfaces.Services.Communications; 4 | 5 | public interface IConnectionConstantsService 6 | { 7 | public Task GetApiUrl(); 8 | 9 | public TimeSpan[] GetRetriesTimeSpans(); 10 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Interfaces/Services/Sessions/ISessionMemberMapper.cs: -------------------------------------------------------------------------------- 1 | using ByteSync.Business.SessionMembers; 2 | using ByteSync.Common.Business.Sessions.Cloud; 3 | 4 | namespace ByteSync.Interfaces.Services.Sessions; 5 | 6 | public interface ISessionMemberMapper 7 | { 8 | SessionMember Map(SessionMemberInfoDTO sessionMemberInfoDto); 9 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Views/Sessions/Comparisons/Results/ContentIdentityView.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.Controls; 2 | 3 | namespace ByteSync.Views.Sessions.Comparisons.Results; 4 | 5 | public partial class ContentIdentityView : UserControl 6 | { 7 | public ContentIdentityView() 8 | { 9 | InitializeComponent(); 10 | } 11 | } -------------------------------------------------------------------------------- /src/ByteSync.Functions/host.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "2.0", 3 | "logging": { 4 | "applicationInsights": { 5 | "samplingSettings": { 6 | "isEnabled": false, 7 | "excludedTypes": "Request" 8 | }, 9 | "enableLiveMetricsFilters": true 10 | } 11 | } 12 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Business/Sessions/Connecting/JoinSessionError.cs: -------------------------------------------------------------------------------- 1 | using ByteSync.Common.Business.Sessions.Cloud.Connections; 2 | 3 | namespace ByteSync.Business.Sessions.Connecting; 4 | 5 | public class JoinSessionError 6 | { 7 | public Exception? Exception { get; set; } 8 | 9 | public JoinSessionStatus Status { get; set; } 10 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Interfaces/Controls/Applications/IZoomService.cs: -------------------------------------------------------------------------------- 1 | namespace ByteSync.Interfaces.Controls.Applications; 2 | 3 | public interface IZoomService 4 | { 5 | public IObservable ZoomLevel { get; } 6 | 7 | public void Initialize(); 8 | 9 | void ApplicationZoomIn(); 10 | 11 | void ApplicationZoomOut(); 12 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Interfaces/Controls/Synchronizations/ISynchronizationStartFactory.cs: -------------------------------------------------------------------------------- 1 | using System.Threading.Tasks; 2 | using ByteSync.Business.Actions.Shared; 3 | 4 | namespace ByteSync.Interfaces.Controls.Synchronizations; 5 | 6 | public interface ISynchronizationStartFactory 7 | { 8 | Task PrepareSharedData(); 9 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Interfaces/Factories/ViewModels/IDataTypeViewModelFactory.cs: -------------------------------------------------------------------------------- 1 | using ByteSync.Business.Sessions; 2 | using ByteSync.ViewModels.Sessions.Managing; 3 | 4 | namespace ByteSync.Interfaces.Factories.ViewModels; 5 | 6 | public interface IDataTypeViewModelFactory 7 | { 8 | DataTypeViewModel CreateDataTypeViewModel(DataTypes dataType); 9 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Interfaces/Services/Localizations/IAtomicActionValidationFailureReasonService.cs: -------------------------------------------------------------------------------- 1 | using ByteSync.Business.Comparisons; 2 | 3 | namespace ByteSync.Interfaces.Services.Localizations; 4 | 5 | public interface IAtomicActionValidationFailureReasonService 6 | { 7 | string GetLocalizedMessage(AtomicActionValidationFailureReason reason); 8 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Views/Sessions/Comparisons/Actions/AtomicConditionEditView.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.Controls; 2 | 3 | namespace ByteSync.Views.Sessions.Comparisons.Actions; 4 | 5 | public partial class AtomicConditionEditView : UserControl 6 | { 7 | public AtomicConditionEditView() 8 | { 9 | InitializeComponent(); 10 | } 11 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Views/Sessions/Comparisons/Results/ContentRepartitionView.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.Controls; 2 | 3 | namespace ByteSync.Views.Sessions.Comparisons.Results; 4 | 5 | public partial class ContentRepartitionView : UserControl 6 | { 7 | public ContentRepartitionView() 8 | { 9 | InitializeComponent(); 10 | } 11 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Business/Synchronizations/SynchronizationProcessStatuses.cs: -------------------------------------------------------------------------------- 1 | namespace ByteSync.Business.Synchronizations; 2 | 3 | public enum SynchronizationProcessStatuses 4 | { 5 | Pending = 0, 6 | SynchronizationDataReady = 1, 7 | Running = 2, 8 | Cancelled = 3, 9 | NotLaunched = 4, 10 | Error = 5, 11 | Success = 6, 12 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Interfaces/Controls/Navigations/INavigationService.cs: -------------------------------------------------------------------------------- 1 | using ByteSync.Business.Navigations; 2 | 3 | namespace ByteSync.Interfaces.Controls.Navigations; 4 | 5 | public interface INavigationService 6 | { 7 | IObservable CurrentPanel { get; } 8 | 9 | void NavigateTo(NavigationPanel navigationPanel); 10 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Interfaces/Factories/IConnectionFactory.cs: -------------------------------------------------------------------------------- 1 | using System.Threading.Tasks; 2 | using ByteSync.Business.Communications; 3 | 4 | namespace ByteSync.Interfaces.Factories; 5 | 6 | public interface IConnectionFactory 7 | { 8 | Task BuildConnection(); 9 | 10 | Task RefreshAuthenticationTokens(); 11 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Interfaces/Factories/ViewModels/ILobbyMemberViewModelFactory.cs: -------------------------------------------------------------------------------- 1 | using ByteSync.Business.Lobbies; 2 | using ByteSync.ViewModels.Lobbies; 3 | 4 | namespace ByteSync.Interfaces.Factories.ViewModels; 5 | 6 | public interface ILobbyMemberViewModelFactory 7 | { 8 | LobbyMemberViewModel CreateLobbyMemberViewModel(LobbyMember lobbyMember); 9 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Services/Misc/VersionHelper.cs: -------------------------------------------------------------------------------- 1 | namespace ByteSync.Services.Misc; 2 | 3 | public static class VersionHelper 4 | { 5 | public static string GetVersionString(Version version) 6 | { 7 | string versionString = version.Major + "." + version.Minor + "." + version.Build; 8 | 9 | return versionString; 10 | } 11 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Views/Sessions/Comparisons/Results/SynchronizationActionView.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.Controls; 2 | 3 | namespace ByteSync.Views.Sessions.Comparisons.Results; 4 | 5 | public partial class SynchronizationActionView : UserControl 6 | { 7 | public SynchronizationActionView() 8 | { 9 | InitializeComponent(); 10 | } 11 | } -------------------------------------------------------------------------------- /src/ByteSync.Common/Interfaces/IFileSystemAccessor.cs: -------------------------------------------------------------------------------- 1 | using System.Threading.Tasks; 2 | 3 | namespace ByteSync.Common.Interfaces; 4 | 5 | public interface IFileSystemAccessor 6 | { 7 | Task OpenFile(string path); 8 | 9 | Task OpenDirectory(string path); 10 | 11 | Task OpenDirectoryAndSelectFile(string dataSourcePath); 12 | } -------------------------------------------------------------------------------- /src/ByteSync.ServerCommon/Interfaces/Mappers/ISessionMemberMapper.cs: -------------------------------------------------------------------------------- 1 | using ByteSync.Common.Business.Sessions.Cloud; 2 | using ByteSync.ServerCommon.Business.Sessions; 3 | 4 | namespace ByteSync.ServerCommon.Interfaces.Mappers; 5 | 6 | public interface ISessionMemberMapper 7 | { 8 | Task Convert(SessionMemberData sessionMemberData); 9 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Interfaces/Controls/Communications/IPostDownloadHandlerProxy.cs: -------------------------------------------------------------------------------- 1 | using System.Threading.Tasks; 2 | using ByteSync.Business.Communications; 3 | 4 | namespace ByteSync.Interfaces.Controls.Communications; 5 | 6 | public interface IPostDownloadHandlerProxy 7 | { 8 | Task HandleDownloadFinished(LocalSharedFile? downloadTargetLocalSharedFile); 9 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Interfaces/Repositories/IAvailableUpdateRepository.cs: -------------------------------------------------------------------------------- 1 | using ByteSync.Common.Business.Versions; 2 | 3 | namespace ByteSync.Interfaces.Repositories; 4 | 5 | public interface IAvailableUpdateRepository : IBaseSourceCacheRepository 6 | { 7 | public void UpdateAvailableUpdates(List availableUpdates); 8 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Interfaces/Updates/IUpdateService.cs: -------------------------------------------------------------------------------- 1 | using System.Threading; 2 | using System.Threading.Tasks; 3 | using ByteSync.Common.Business.Versions; 4 | 5 | namespace ByteSync.Interfaces.Updates; 6 | 7 | public interface IUpdateService 8 | { 9 | Task UpdateAsync(SoftwareVersion softwareVersion, CancellationToken cancellationToken); 10 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Services/Converters/BaseConverters/Base26Converter.cs: -------------------------------------------------------------------------------- 1 | namespace ByteSync.Services.Converters.BaseConverters; 2 | 3 | public class Base26Converter : AbstractBaseConverter 4 | { 5 | public override string BaseFigures 6 | { 7 | get 8 | { 9 | return "abcdefghijklmnopqrstuvwxyz"; 10 | } 11 | } 12 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Views/Ratings/RatingPromptView.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.ReactiveUI; 2 | using ByteSync.ViewModels.Ratings; 3 | 4 | namespace ByteSync.Views.Ratings; 5 | 6 | public partial class RatingPromptView : ReactiveUserControl 7 | { 8 | public RatingPromptView() 9 | { 10 | InitializeComponent(); 11 | } 12 | } -------------------------------------------------------------------------------- /src/ByteSync.ServerCommon/Interfaces/Factories/IClientsGroupIdFactory.cs: -------------------------------------------------------------------------------- 1 | namespace ByteSync.ServerCommon.Interfaces.Factories; 2 | 3 | public interface IClientsGroupIdFactory 4 | { 5 | string GetClientGroupId(string clientInstanceId); 6 | 7 | string GetSessionGroupId(string sessionId); 8 | 9 | string GetLobbyGroupId(string lobbyId); 10 | } -------------------------------------------------------------------------------- /src/ByteSync.ServerCommon/Interfaces/Mappers/ISynchronizationMapper.cs: -------------------------------------------------------------------------------- 1 | using ByteSync.Common.Business.Synchronizations; 2 | using ByteSync.ServerCommon.Entities; 3 | 4 | namespace ByteSync.ServerCommon.Interfaces.Mappers; 5 | 6 | public interface ISynchronizationMapper 7 | { 8 | Synchronization MapToSynchronization(SynchronizationEntity synchronizationEntity); 9 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Interfaces/Controls/Inventories/IInventoryFinishedService.cs: -------------------------------------------------------------------------------- 1 | using ByteSync.Business; 2 | using ByteSync.Models.Inventories; 3 | 4 | namespace ByteSync.Interfaces.Controls.Inventories; 5 | 6 | public interface IInventoryFinishedService 7 | { 8 | Task SetLocalInventoryFinished(List inventories, LocalInventoryModes localInventoryMode); 9 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Interfaces/Factories/Proxies/ISoftwareVersionProxyFactory.cs: -------------------------------------------------------------------------------- 1 | using ByteSync.Common.Business.Versions; 2 | using ByteSync.ViewModels.Headers; 3 | 4 | namespace ByteSync.Interfaces.Factories.Proxies; 5 | 6 | public interface ISoftwareVersionProxyFactory 7 | { 8 | SoftwareVersionProxy CreateSoftwareVersionProxy(SoftwareVersion softwareVersion); 9 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Interfaces/Repositories/ISharedAtomicActionRepository.cs: -------------------------------------------------------------------------------- 1 | using ByteSync.Business.Actions.Shared; 2 | 3 | namespace ByteSync.Interfaces.Repositories; 4 | 5 | public interface ISharedAtomicActionRepository : IBaseSourceCacheRepository 6 | { 7 | void SetSharedAtomicActions(List sharedAtomicActions); 8 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Views/Headers/UpdateDetailsView.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.ReactiveUI; 2 | using ByteSync.ViewModels.Headers; 3 | 4 | namespace ByteSync.Views.Headers; 5 | 6 | public partial class UpdateDetailsView : ReactiveUserControl 7 | { 8 | public UpdateDetailsView() 9 | { 10 | InitializeComponent(); 11 | } 12 | } -------------------------------------------------------------------------------- /src/ByteSync.Common/Interfaces/Business/IAtomicAction.cs: -------------------------------------------------------------------------------- 1 | using ByteSync.Common.Business.Actions; 2 | 3 | namespace ByteSync.Common.Interfaces.Business; 4 | 5 | public interface IAtomicAction 6 | { 7 | public string? SourceName { get; } 8 | 9 | public string? DestinationName { get; } 10 | 11 | public ActionOperatorTypes Operator { get; set; } 12 | } -------------------------------------------------------------------------------- /src/ByteSync.ServerCommon/Interfaces/Repositories/IInventoryRepository.cs: -------------------------------------------------------------------------------- 1 | using ByteSync.ServerCommon.Entities.Inventories; 2 | 3 | namespace ByteSync.ServerCommon.Interfaces.Repositories; 4 | 5 | public interface IInventoryRepository : IRepository 6 | { 7 | Task GetInventoryMember(string sessionId, string clientInstanceId); 8 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Interfaces/Controls/Communications/Http/IStatisticsApiClient.cs: -------------------------------------------------------------------------------- 1 | using System.Threading.Tasks; 2 | using ByteSync.Common.Business.Misc; 3 | 4 | namespace ByteSync.Interfaces.Controls.Communications.Http; 5 | 6 | public interface IStatisticsApiClient 7 | { 8 | Task GetUsageStatistics(UsageStatisticsRequest usageStatisticsRequest); 9 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Interfaces/Factories/ViewModels/IAnalysisModeViewModelFactory.cs: -------------------------------------------------------------------------------- 1 | using ByteSync.Business.Sessions; 2 | using ByteSync.ViewModels.Sessions.Managing; 3 | 4 | namespace ByteSync.Interfaces.Factories.ViewModels; 5 | 6 | public interface IAnalysisModeViewModelFactory 7 | { 8 | AnalysisModeViewModel CreateAnalysisModeViewModel(AnalysisModes analysisMode); 9 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Interfaces/Factories/ViewModels/IMatchingModeViewModelFactory.cs: -------------------------------------------------------------------------------- 1 | using ByteSync.Business.Sessions; 2 | using ByteSync.ViewModels.Sessions.Managing; 3 | 4 | namespace ByteSync.Interfaces.Factories.ViewModels; 5 | 6 | public interface IMatchingModeViewModelFactory 7 | { 8 | MatchingModeViewModel CreateMatchingModeViewModel(MatchingModes matchingMode); 9 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Interfaces/Services/Filtering/IFilterService.cs: -------------------------------------------------------------------------------- 1 | using ByteSync.Models.Comparisons.Result; 2 | 3 | namespace ByteSync.Interfaces.Services.Filtering; 4 | 5 | public interface IFilterService 6 | { 7 | Func BuildFilter(string filterText); 8 | 9 | Func BuildFilter(List filterTexts); 10 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Views/Sessions/Comparisons/Results/ItemSynchronizationStatusView.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.Controls; 2 | 3 | namespace ByteSync.Views.Sessions.Comparisons.Results; 4 | 5 | public partial class ItemSynchronizationStatusView : UserControl 6 | { 7 | public ItemSynchronizationStatusView() 8 | { 9 | InitializeComponent(); 10 | } 11 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Views/Sessions/Comparisons/Results/SynchronizationRuleSummaryView.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.Controls; 2 | 3 | namespace ByteSync.Views.Sessions.Comparisons.Results; 4 | 5 | public partial class SynchronizationRuleSummaryView : UserControl 6 | { 7 | public SynchronizationRuleSummaryView() 8 | { 9 | InitializeComponent(); 10 | } 11 | } -------------------------------------------------------------------------------- /src/ByteSync.ServerCommon/Interfaces/Mappers/ITrackingActionMapper.cs: -------------------------------------------------------------------------------- 1 | using ByteSync.Common.Business.Synchronizations; 2 | using ByteSync.ServerCommon.Entities; 3 | 4 | namespace ByteSync.ServerCommon.Interfaces.Mappers; 5 | 6 | public interface ITrackingActionMapper 7 | { 8 | TrackingActionSummary MapToTrackingActionSummary(TrackingActionEntity trackingActionEntity); 9 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Business/Sessions/SessionStatus.cs: -------------------------------------------------------------------------------- 1 | namespace ByteSync.Business.Sessions; 2 | 3 | public enum SessionStatus 4 | { 5 | None = 0, 6 | CloudSessionCreation = 1, 7 | CloudSessionJunction = 2, 8 | Preparation = 3, 9 | Inventory = 4, 10 | Comparison = 5, 11 | Synchronization = 6, 12 | FatalError = 7, 13 | RegularEnd = 8, 14 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Interfaces/Controls/Inventories/IInitialStatusBuilder.cs: -------------------------------------------------------------------------------- 1 | using ByteSync.Models.Comparisons.Result; 2 | using ByteSync.Models.Inventories; 3 | 4 | namespace ByteSync.Interfaces.Controls.Inventories; 5 | 6 | public interface IInitialStatusBuilder : IDisposable 7 | { 8 | void BuildStatus(ComparisonItem comparisonItem, IEnumerable inventories); 9 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Interfaces/Controls/TimeTracking/ITimeTrackingCache.cs: -------------------------------------------------------------------------------- 1 | using System.Threading.Tasks; 2 | using ByteSync.Business.Misc; 3 | 4 | namespace ByteSync.Interfaces.Controls.TimeTracking; 5 | 6 | public interface ITimeTrackingCache 7 | { 8 | Task GetTimeTrackingComputer(string sessionId, TimeTrackingComputerType timeTrackingComputerType); 9 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Interfaces/IPolicyFactory.cs: -------------------------------------------------------------------------------- 1 | using ByteSync.Common.Business.Communications.Transfers; 2 | using Polly.Retry; 3 | 4 | namespace ByteSync.Interfaces; 5 | 6 | public interface IPolicyFactory 7 | { 8 | AsyncRetryPolicy BuildFileDownloadPolicy(); 9 | 10 | AsyncRetryPolicy BuildFileUploadPolicy(); 11 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Views/Headers/AboutApplicationView.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.ReactiveUI; 2 | using ByteSync.ViewModels.Headers; 3 | 4 | namespace ByteSync.Views.Headers; 5 | 6 | public partial class AboutApplicationView : ReactiveUserControl 7 | { 8 | public AboutApplicationView() 9 | { 10 | InitializeComponent(); 11 | } 12 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Views/Headers/ConnectionStatusView.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.ReactiveUI; 2 | using ByteSync.ViewModels.Headers; 3 | 4 | namespace ByteSync.Views.Headers; 5 | 6 | public partial class ConnectionStatusView : ReactiveUserControl 7 | { 8 | public ConnectionStatusView() 9 | { 10 | InitializeComponent(); 11 | } 12 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Views/Home/CreateCloudSessionView.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.ReactiveUI; 2 | using ByteSync.ViewModels.Home; 3 | 4 | namespace ByteSync.Views.Home; 5 | 6 | public partial class CreateCloudSessionView : ReactiveUserControl 7 | { 8 | public CreateCloudSessionView() 9 | { 10 | InitializeComponent(); 11 | } 12 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Views/Sessions/Synchronizations/SynchronizationConfirmationView.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.Controls; 2 | 3 | namespace ByteSync.Views.Sessions.Synchronizations; 4 | 5 | public partial class SynchronizationConfirmationView : UserControl 6 | { 7 | public SynchronizationConfirmationView() 8 | { 9 | InitializeComponent(); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/ByteSync.Common/Business/Auth/InitialConnectionStatus.cs: -------------------------------------------------------------------------------- 1 | namespace ByteSync.Common.Business.Auth; 2 | 3 | public enum InitialConnectionStatus 4 | { 5 | Success = 1, 6 | VersionNotAllowed = 2, 7 | UndefinedClientId = 3, 8 | UndefinedClientInstanceId = 4, 9 | UnknownOsPlatform = 5, 10 | ClientAlreadyConnected = 10, 11 | UnknownError = 11, 12 | } -------------------------------------------------------------------------------- /src/ByteSync.ServerCommon/Commands/Synchronizations/IActionErrorRequest.cs: -------------------------------------------------------------------------------- 1 | using ByteSync.ServerCommon.Business.Auth; 2 | using MediatR; 3 | 4 | namespace ByteSync.ServerCommon.Commands.Synchronizations; 5 | 6 | public interface IActionErrorRequest : IRequest 7 | { 8 | string SessionId { get; } 9 | Client Client { get; } 10 | string? NodeId { get; } 11 | } 12 | -------------------------------------------------------------------------------- /src/ByteSync.ServerCommon/Interfaces/Services/ISynchronizationService.cs: -------------------------------------------------------------------------------- 1 | using ByteSync.ServerCommon.Entities; 2 | 3 | namespace ByteSync.ServerCommon.Interfaces.Services; 4 | 5 | public interface ISynchronizationService 6 | { 7 | Task ResetSession(string sessionId); 8 | 9 | bool CheckSynchronizationIsFinished(SynchronizationEntity synchronizationEntity); 10 | } -------------------------------------------------------------------------------- /tests/ByteSync.Functions.IntegrationTests/TestHelpers/Autofac/LoadersModule.cs: -------------------------------------------------------------------------------- 1 | namespace ByteSync.Functions.IntegrationTests.TestHelpers.Autofac; 2 | 3 | public class LoadersModule : BaseElementTypeModule 4 | { 5 | public LoadersModule(bool useConcrete) : base(useConcrete) 6 | { 7 | 8 | } 9 | 10 | protected override string ElementsType => "Loader"; 11 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Interfaces/Controls/Synchronizations/ISynchronizationDataReceiver.cs: -------------------------------------------------------------------------------- 1 | using System.Threading.Tasks; 2 | using ByteSync.Business.Communications; 3 | 4 | namespace ByteSync.Interfaces.Controls.Synchronizations; 5 | 6 | public interface ISynchronizationDataReceiver 7 | { 8 | Task OnSynchronizationDataFileDownloaded(LocalSharedFile downloadTargetLocalSharedFile); 9 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Views/Sessions/DataNodes/DataNodeView.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.ReactiveUI; 2 | using ByteSync.ViewModels.Sessions.DataNodes; 3 | 4 | namespace ByteSync.Views.Sessions.DataNodes; 5 | 6 | public partial class DataNodeView : ReactiveUserControl 7 | { 8 | public DataNodeView() 9 | { 10 | InitializeComponent(); 11 | } 12 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Business/Filtering/Parsing/FilterTokenType.cs: -------------------------------------------------------------------------------- 1 | namespace ByteSync.Business.Filtering.Parsing; 2 | 3 | public enum FilterTokenType 4 | { 5 | None, 6 | Identifier, 7 | Operator, 8 | String, 9 | Number, 10 | DateTime, 11 | OpenParenthesis, 12 | CloseParenthesis, 13 | LogicalOperator, 14 | Dot, 15 | Colon, 16 | End 17 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Directory.Build.props: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 0.1.220-* 6 | all 7 | 8 | 9 | -------------------------------------------------------------------------------- /src/ByteSync.Client/Interfaces/Factories/IInventoryComparerFactory.cs: -------------------------------------------------------------------------------- 1 | using ByteSync.Business; 2 | using ByteSync.Interfaces.Controls.Inventories; 3 | 4 | namespace ByteSync.Interfaces.Factories; 5 | 6 | public interface IInventoryComparerFactory 7 | { 8 | IInventoryComparer CreateInventoryComparer(LocalInventoryModes localInventoryMode, IInventoryIndexer? inventoryIndexer = null); 9 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Interfaces/Factories/ViewModels/IComparisonItemViewModelFactory.cs: -------------------------------------------------------------------------------- 1 | using ByteSync.Models.Comparisons.Result; 2 | using ByteSync.ViewModels.Sessions.Comparisons.Results.Misc; 3 | 4 | namespace ByteSync.Interfaces.Factories.ViewModels; 5 | 6 | public interface IComparisonItemViewModelFactory 7 | { 8 | ComparisonItemViewModel Create(ComparisonItem comparisonItem); 9 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Interfaces/Repositories/IAtomicActionRepository.cs: -------------------------------------------------------------------------------- 1 | using ByteSync.Business.Actions.Local; 2 | using ByteSync.Models.Comparisons.Result; 3 | 4 | namespace ByteSync.Interfaces.Repositories; 5 | 6 | public interface IAtomicActionRepository : IBaseSourceCacheRepository 7 | { 8 | List GetAtomicActions(ComparisonItem comparisonItem); 9 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Interfaces/Repositories/IInventoryFileRepository.cs: -------------------------------------------------------------------------------- 1 | using ByteSync.Business; 2 | using ByteSync.Business.Inventories; 3 | 4 | namespace ByteSync.Interfaces.Repositories; 5 | 6 | public interface IInventoryFileRepository : IBaseSourceCacheRepository 7 | { 8 | List GetAllInventoriesFiles(LocalInventoryModes localInventoryMode); 9 | } -------------------------------------------------------------------------------- /src/ByteSync.Common/Business/Inventories/EncryptedDataSource.cs: -------------------------------------------------------------------------------- 1 | using ByteSync.Common.Interfaces.Business; 2 | 3 | namespace ByteSync.Common.Business.Inventories; 4 | 5 | public class EncryptedDataSource : IEncryptedSessionData 6 | { 7 | public string Id { get; set; } = null!; 8 | 9 | public byte[] Data { get; set; } 10 | 11 | public byte[] IV { get; set; } 12 | } -------------------------------------------------------------------------------- /src/ByteSync.Common/Business/Sessions/Local/LocalSession.cs: -------------------------------------------------------------------------------- 1 | namespace ByteSync.Common.Business.Sessions.Local; 2 | 3 | public class LocalSession : AbstractSession 4 | { 5 | public LocalSession() 6 | { 7 | 8 | } 9 | 10 | public LocalSession(string sessionId, string creatorInstanceId) 11 | : base(sessionId, creatorInstanceId) 12 | { 13 | 14 | } 15 | } -------------------------------------------------------------------------------- /tests/ByteSync.Client.IntegrationTests/client-integration-tests.local.settings.template.json: -------------------------------------------------------------------------------- 1 | { 2 | "AzureBlobStorage": { 3 | "Endpoint": "", 4 | "Container": "", 5 | "AccountKey": "", 6 | "AccountName": "" 7 | }, 8 | "CloudflareR2": { 9 | "AccessKeyId": "", 10 | "BucketName": "", 11 | "Endpoint": "", 12 | "SecretAccessKey": "" 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /src/ByteSync.Client/Business/Filtering/Expressions/OnlyExpression.cs: -------------------------------------------------------------------------------- 1 | using ByteSync.Models.Comparisons.Result; 2 | 3 | namespace ByteSync.Business.Filtering.Expressions; 4 | 5 | public class OnlyExpression : FilterExpression 6 | { 7 | public string DataSource { get; } 8 | 9 | public OnlyExpression(string dataSource) 10 | { 11 | DataSource = dataSource; 12 | } 13 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Interfaces/Controls/Communications/Http/IAnnouncementApiClient.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Threading.Tasks; 3 | using ByteSync.Common.Business.Announcements; 4 | 5 | namespace ByteSync.Interfaces.Controls.Communications.Http; 6 | 7 | public interface IAnnouncementApiClient 8 | { 9 | Task> GetAnnouncements(); 10 | } 11 | -------------------------------------------------------------------------------- /src/ByteSync.Client/Interfaces/Repositories/ISessionInvalidationCachePolicy.cs: -------------------------------------------------------------------------------- 1 | using DynamicData; 2 | 3 | namespace ByteSync.Interfaces.Repositories; 4 | 5 | public interface ISessionInvalidationCachePolicy : IDisposable 6 | where TKey : notnull 7 | where TObject : notnull 8 | { 9 | void Initialize(SourceCache sourceCache, bool b, bool b1); 10 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Interfaces/Services/Sessions/Connecting/Joining/IYouJoinedSessionService.cs: -------------------------------------------------------------------------------- 1 | using ByteSync.Common.Business.Sessions.Cloud.Connections; 2 | 3 | namespace ByteSync.Interfaces.Services.Sessions.Connecting.Joining; 4 | 5 | public interface IYouJoinedSessionService 6 | { 7 | Task Process(CloudSessionResult cloudSessionResult, ValidateJoinCloudSessionParameters parameters); 8 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Interfaces/Services/Sessions/Connecting/Validating/ICheckCloudSessionPasswordExchangeKeyService.cs: -------------------------------------------------------------------------------- 1 | using ByteSync.Common.Business.Sessions.Cloud.Connections; 2 | 3 | namespace ByteSync.Interfaces.Services.Sessions.Connecting.Validating; 4 | 5 | public interface ICheckCloudSessionPasswordExchangeKeyService 6 | { 7 | Task Process(AskJoinCloudSessionParameters request); 8 | } -------------------------------------------------------------------------------- /src/ByteSync.Common/Business/SharedFiles/SharedFileTypes.cs: -------------------------------------------------------------------------------- 1 | namespace ByteSync.Common.Business.SharedFiles; 2 | 3 | public enum SharedFileTypes 4 | { 5 | BaseInventory = 1, 6 | FullInventory = 2, 7 | DeltaSynchronization = 3, 8 | FullSynchronization = 4, 9 | SynchronizationStartData = 5, 10 | ProfileDetails = 6, 11 | Undefined7 = 7, 12 | Undefined8 = 8, 13 | } -------------------------------------------------------------------------------- /src/ByteSync.ServerCommon/Business/Repositories/CacheKey.cs: -------------------------------------------------------------------------------- 1 | using ByteSync.ServerCommon.Entities; 2 | 3 | namespace ByteSync.ServerCommon.Business.Repositories; 4 | 5 | public class CacheKey 6 | { 7 | public required EntityType EntityType { get; init; } 8 | 9 | public required string EntityId { get; init; } 10 | 11 | public required string Value { get; init; } 12 | } -------------------------------------------------------------------------------- /src/ByteSync.ServerCommon/Entities/EntityType.cs: -------------------------------------------------------------------------------- 1 | namespace ByteSync.ServerCommon.Entities; 2 | 3 | public enum EntityType 4 | { 5 | Session, 6 | Inventory, 7 | Synchronization, 8 | SharedFile, 9 | SessionSharedFiles, 10 | TrackingAction, 11 | Client, 12 | ClientSoftwareVersionSettings, 13 | CloudSessionProfile, 14 | Lobby, 15 | Announcement 16 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Interfaces/Controls/Communications/IFileUploadWorker.cs: -------------------------------------------------------------------------------- 1 | using System.Threading.Channels; 2 | using ByteSync.Business.Communications.Transfers; 3 | 4 | namespace ByteSync.Interfaces.Controls.Communications; 5 | 6 | public interface IFileUploadWorker 7 | { 8 | Task UploadAvailableSlicesAdaptiveAsync(Channel availableSlices, UploadProgressState progressState); 9 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Interfaces/Services/Sessions/IComparisonItemsService.cs: -------------------------------------------------------------------------------- 1 | using System.Reactive.Subjects; 2 | using ByteSync.Models.Comparisons.Result; 3 | 4 | namespace ByteSync.Interfaces.Services.Sessions; 5 | 6 | public interface IComparisonItemsService 7 | { 8 | public ISubject ComparisonResult { get; set; } 9 | 10 | Task ApplySynchronizationRules(); 11 | } -------------------------------------------------------------------------------- /src/ByteSync.Common/Business/Sessions/EncryptedDataNode.cs: -------------------------------------------------------------------------------- 1 | using ByteSync.Common.Interfaces.Business; 2 | 3 | namespace ByteSync.Common.Business.Sessions; 4 | 5 | public class EncryptedDataNode : IEncryptedSessionData 6 | { 7 | public string Id { get; set; } = null!; 8 | 9 | public byte[] Data { get; set; } = null!; 10 | 11 | public byte[] IV { get; set; } = null!; 12 | } 13 | -------------------------------------------------------------------------------- /src/ByteSync.ServerCommon/Exceptions/BadRequestException.cs: -------------------------------------------------------------------------------- 1 | namespace ByteSync.ServerCommon.Exceptions; 2 | 3 | public class BadRequestException : Exception 4 | { 5 | public BadRequestException(string message) : base(message) 6 | { 7 | } 8 | 9 | public BadRequestException(string message, Exception innerException) : base(message, innerException) 10 | { 11 | } 12 | } -------------------------------------------------------------------------------- /src/ByteSync.ServerCommon/Interfaces/Repositories/IAnnouncementRepository.cs: -------------------------------------------------------------------------------- 1 | using ByteSync.Common.Business.Announcements; 2 | 3 | namespace ByteSync.ServerCommon.Interfaces.Repositories; 4 | 5 | public interface IAnnouncementRepository : IRepository> 6 | { 7 | Task?> GetAll(); 8 | 9 | Task SaveAll(List announcements); 10 | } 11 | -------------------------------------------------------------------------------- /src/ByteSync.Client/Business/Filtering/Expressions/ExistsExpression.cs: -------------------------------------------------------------------------------- 1 | using ByteSync.Models.Comparisons.Result; 2 | 3 | namespace ByteSync.Business.Filtering.Expressions; 4 | 5 | public class ExistsExpression : FilterExpression 6 | { 7 | public string DataSource { get; } 8 | 9 | public ExistsExpression(string dataSource) 10 | { 11 | DataSource = dataSource; 12 | } 13 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Interfaces/Controls/Inventories/IInventoryComparer.cs: -------------------------------------------------------------------------------- 1 | using ByteSync.Business.Inventories; 2 | using ByteSync.Models.Comparisons.Result; 3 | 4 | namespace ByteSync.Interfaces.Controls.Inventories; 5 | 6 | public interface IInventoryComparer : IDisposable 7 | { 8 | void AddInventories(ICollection inventoriesFiles); 9 | 10 | ComparisonResult Compare(); 11 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Interfaces/Repositories/Updates/IUpdateRepository.cs: -------------------------------------------------------------------------------- 1 | using ByteSync.Business.Updates; 2 | 3 | namespace ByteSync.Interfaces.Repositories.Updates; 4 | 5 | public interface IUpdateRepository 6 | { 7 | public Progress Progress { get; } 8 | 9 | UpdateData UpdateData { get; set; } 10 | 11 | void ReportProgress(UpdateProgress updateProgress); 12 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Interfaces/Services/Sessions/Connecting/Joining/ICloudSessionPasswordExchangeKeyGivenService.cs: -------------------------------------------------------------------------------- 1 | using ByteSync.Common.Business.Sessions.Cloud.Connections; 2 | 3 | namespace ByteSync.Interfaces.Services.Sessions.Connecting.Joining; 4 | 5 | public interface ICloudSessionPasswordExchangeKeyGivenService 6 | { 7 | Task Process(GiveCloudSessionPasswordExchangeKeyParameters request); 8 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Interfaces/Services/Sessions/Connecting/Validating/ICloudSessionPasswordExchangeKeyAskedService.cs: -------------------------------------------------------------------------------- 1 | using ByteSync.Common.Business.Sessions.Cloud.Connections; 2 | 3 | namespace ByteSync.Interfaces.Services.Sessions.Connecting.Validating; 4 | 5 | public interface ICloudSessionPasswordExchangeKeyAskedService 6 | { 7 | Task Process(AskCloudSessionPasswordExchangeKeyPush request); 8 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Services/Sessions/SessionMemberLetterHelper.cs: -------------------------------------------------------------------------------- 1 | using ByteSync.Business.SessionMembers; 2 | 3 | namespace ByteSync.Services.Sessions; 4 | 5 | public static class SessionMemberLetterHelper 6 | { 7 | // public static string GetLetter(this SessionMember sessionMember) 8 | // { 9 | // return ((char) ('A' + sessionMember.PositionInList)).ToString(); 10 | // } 11 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/ViewModels/ActivatableViewModelBase.cs: -------------------------------------------------------------------------------- 1 | using ReactiveUI; 2 | 3 | namespace ByteSync.ViewModels; 4 | 5 | public abstract class ActivatableViewModelBase : ViewModelBase, IActivatableViewModel 6 | { 7 | protected ActivatableViewModelBase() 8 | { 9 | Activator = new ViewModelActivator(); 10 | } 11 | 12 | public ViewModelActivator Activator { get; } 13 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Views/TrustedNetworks/AddTrustedClientView.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.ReactiveUI; 2 | using ByteSync.ViewModels.TrustedNetworks; 3 | 4 | namespace ByteSync.Views.TrustedNetworks; 5 | 6 | public partial class AddTrustedClientView : ReactiveUserControl 7 | { 8 | public AddTrustedClientView() 9 | { 10 | InitializeComponent(); 11 | } 12 | } -------------------------------------------------------------------------------- /src/ByteSync.Common/Business/Auth/LoginData.cs: -------------------------------------------------------------------------------- 1 | using ByteSync.Common.Business.Misc; 2 | 3 | namespace ByteSync.Common.Business.Auth; 4 | 5 | public class LoginData 6 | { 7 | public string ClientId { get; set; } 8 | 9 | public string ClientInstanceId { get; set; } 10 | 11 | public string Version { get; set; } 12 | 13 | public OSPlatforms? OsPlatform { get; set; } 14 | } -------------------------------------------------------------------------------- /tests/ByteSync.Functions.IntegrationTests/TestHelpers/Autofac/RepositoriesModule.cs: -------------------------------------------------------------------------------- 1 | namespace ByteSync.Functions.IntegrationTests.TestHelpers.Autofac; 2 | 3 | public class RepositoriesModule : BaseElementTypeModule 4 | { 5 | public RepositoriesModule(bool useConcrete) : base(useConcrete) 6 | { 7 | 8 | } 9 | 10 | protected override string ElementsType => "Repository"; 11 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Business/Filtering/Evaluators/TrueExpressionEvaluator.cs: -------------------------------------------------------------------------------- 1 | using ByteSync.Business.Filtering.Expressions; 2 | using ByteSync.Models.Comparisons.Result; 3 | 4 | namespace ByteSync.Business.Filtering.Evaluators; 5 | 6 | public class TrueExpressionEvaluator : ExpressionEvaluator 7 | { 8 | public override bool Evaluate(TrueExpression expression, ComparisonItem item) => true; 9 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Business/Filtering/Expressions/NameExpression.cs: -------------------------------------------------------------------------------- 1 | using ByteSync.Business.Filtering.Parsing; 2 | 3 | namespace ByteSync.Business.Filtering.Expressions; 4 | 5 | public class NameExpression : BaseElementPathExpression 6 | { 7 | public NameExpression(string searchText, ComparisonOperator comparisonOperator) 8 | : base(searchText, comparisonOperator) 9 | { 10 | } 11 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Business/Filtering/Expressions/PathExpression.cs: -------------------------------------------------------------------------------- 1 | using ByteSync.Business.Filtering.Parsing; 2 | 3 | namespace ByteSync.Business.Filtering.Expressions; 4 | 5 | public class PathExpression : BaseElementPathExpression 6 | { 7 | public PathExpression(string searchText, ComparisonOperator comparisonOperator) 8 | : base(searchText, comparisonOperator) 9 | { 10 | } 11 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Interfaces/Factories/ViewModels/ISessionSettingsEditViewModelFactory.cs: -------------------------------------------------------------------------------- 1 | using ByteSync.Business.Sessions; 2 | using ByteSync.ViewModels.Sessions.Managing; 3 | 4 | namespace ByteSync.Interfaces.Factories.ViewModels; 5 | 6 | public interface ISessionSettingsEditViewModelFactory 7 | { 8 | SessionSettingsEditViewModel CreateSessionSettingsEditViewModel(SessionSettings? sessionSettings); 9 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Interfaces/Updates/IApplyUpdateService.cs: -------------------------------------------------------------------------------- 1 | using System.Threading; 2 | using System.Threading.Tasks; 3 | using ByteSync.Common.Business.Versions; 4 | 5 | namespace ByteSync.Interfaces.Updates; 6 | 7 | public interface IApplyUpdateService 8 | { 9 | Task Update(SoftwareVersion softwareVersion, SoftwareVersionFile softwareFileVersion, CancellationToken cancellationToken); 10 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Interfaces/Updates/IUpdateExistingFilesBackuper.cs: -------------------------------------------------------------------------------- 1 | using System.Threading; 2 | using System.Threading.Tasks; 3 | 4 | namespace ByteSync.Interfaces.Updates; 5 | 6 | public interface IUpdateExistingFilesBackuper 7 | { 8 | List> BackedUpFileSystemInfos { get; } 9 | 10 | public Task BackupExistingFilesAsync(CancellationToken cancellationToken); 11 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Views/Sessions/DataNodes/DataNodeSourcesView.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.ReactiveUI; 2 | using ByteSync.ViewModels.Sessions.DataNodes; 3 | 4 | namespace ByteSync.Views.Sessions.DataNodes; 5 | 6 | public partial class DataNodeSourcesView : ReactiveUserControl 7 | { 8 | public DataNodeSourcesView() 9 | { 10 | InitializeComponent(); 11 | } 12 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Views/Sessions/DataNodes/DataNodeStatusView.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.ReactiveUI; 2 | using ByteSync.ViewModels.Sessions.DataNodes; 3 | 4 | namespace ByteSync.Views.Sessions.DataNodes; 5 | 6 | public partial class DataNodeStatusView : ReactiveUserControl 7 | { 8 | public DataNodeStatusView() 9 | { 10 | InitializeComponent(); 11 | } 12 | } -------------------------------------------------------------------------------- /src/ByteSync.Common/Business/Sessions/EncryptedSessionMemberPrivateData.cs: -------------------------------------------------------------------------------- 1 | using ByteSync.Common.Interfaces.Business; 2 | 3 | namespace ByteSync.Common.Business.Sessions; 4 | 5 | public class EncryptedSessionMemberPrivateData : IEncryptedSessionData 6 | { 7 | public string Id { get; set; } = null!; 8 | 9 | public byte[] Data { get; set; } 10 | 11 | public byte[] IV { get; set; } 12 | } -------------------------------------------------------------------------------- /src/ByteSync.Common/Business/Sessions/EncryptedSessionSettings.cs: -------------------------------------------------------------------------------- 1 | using ByteSync.Common.Interfaces.Business; 2 | 3 | namespace ByteSync.Common.Business.Sessions; 4 | 5 | public class EncryptedSessionSettings : IEncryptedSessionData 6 | { 7 | public string Id { get; set; } = null!; 8 | 9 | public byte[] Data { get; set; } = null!; 10 | 11 | public byte[] IV { get; set; } = null!; 12 | } -------------------------------------------------------------------------------- /src/ByteSync.ServerCommon/Interfaces/Factories/IHubContextFactory.cs: -------------------------------------------------------------------------------- 1 | using ByteSync.Common.Interfaces.Hub; 2 | using Microsoft.Azure.SignalR.Management; 3 | 4 | namespace ByteSync.ServerCommon.Interfaces.Factories; 5 | 6 | public interface IHubContextFactory 7 | { 8 | // Task> CreateHubContext(); 9 | ServiceHubContext CreateHubContext(); 10 | } -------------------------------------------------------------------------------- /src/ByteSync.ServerCommon/Interfaces/Services/IInventoryMemberService.cs: -------------------------------------------------------------------------------- 1 | using ByteSync.ServerCommon.Business.Auth; 2 | using ByteSync.ServerCommon.Entities.Inventories; 3 | 4 | namespace ByteSync.ServerCommon.Interfaces.Services; 5 | 6 | public interface IInventoryMemberService 7 | { 8 | InventoryMemberEntity GetOrCreateInventoryMember(InventoryEntity inventoryEntity, string sessionId, Client client); 9 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Business/Filtering/Expressions/NotExpression.cs: -------------------------------------------------------------------------------- 1 | using ByteSync.Models.Comparisons.Result; 2 | 3 | namespace ByteSync.Business.Filtering.Expressions; 4 | 5 | public class NotExpression : FilterExpression 6 | { 7 | public FilterExpression Expression { get; } 8 | 9 | public NotExpression(FilterExpression expression) 10 | { 11 | Expression = expression; 12 | } 13 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Business/Filtering/Expressions/TextSearchExpression.cs: -------------------------------------------------------------------------------- 1 | using ByteSync.Models.Comparisons.Result; 2 | 3 | namespace ByteSync.Business.Filtering.Expressions; 4 | 5 | public class TextSearchExpression : FilterExpression 6 | { 7 | public string SearchText { get; } 8 | 9 | public TextSearchExpression(string searchText) 10 | { 11 | SearchText = searchText; 12 | } 13 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Interfaces/Controls/Communications/IFileSlicer.cs: -------------------------------------------------------------------------------- 1 | using ByteSync.Business.Communications.Transfers; 2 | using ByteSync.Common.Business.SharedFiles; 3 | 4 | namespace ByteSync.Interfaces.Controls.Communications; 5 | 6 | public interface IFileSlicer 7 | { 8 | Task SliceAndEncryptAdaptiveAsync(SharedFileDefinition sharedFileDefinition, UploadProgressState progressState); 9 | } 10 | 11 | -------------------------------------------------------------------------------- /src/ByteSync.Client/Interfaces/Controls/Synchronizations/ITemporaryFileManager.cs: -------------------------------------------------------------------------------- 1 | namespace ByteSync.Interfaces.Controls.Synchronizations; 2 | 3 | public interface ITemporaryFileManager 4 | { 5 | // void Reset(string destinationFullName); 6 | 7 | string GetDestinationTemporaryPath(); 8 | 9 | void ValidateTemporaryFile(); 10 | 11 | void TryRevertOnError(Exception exception); 12 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Interfaces/Factories/ViewModels/IDataNodeViewModelFactory.cs: -------------------------------------------------------------------------------- 1 | using ByteSync.Business.DataNodes; 2 | using ByteSync.Business.SessionMembers; 3 | using ByteSync.ViewModels.Sessions.DataNodes; 4 | 5 | namespace ByteSync.Interfaces.Factories.ViewModels; 6 | 7 | public interface IDataNodeViewModelFactory 8 | { 9 | public DataNodeViewModel CreateDataNodeViewModel(DataNode dataNode); 10 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Views/Home/HomeMainView.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.ReactiveUI; 2 | using ByteSync.ViewModels.Home; 3 | using ReactiveUI; 4 | 5 | namespace ByteSync.Views.Home; 6 | 7 | public partial class HomeMainView : ReactiveUserControl 8 | { 9 | public HomeMainView() 10 | { 11 | InitializeComponent(); 12 | this.WhenActivated(disposables => { }); 13 | } 14 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Interfaces/Controls/Inventories/IDataInventoryStarter.cs: -------------------------------------------------------------------------------- 1 | using System.Threading.Tasks; 2 | using ByteSync.Common.Business.Inventories; 3 | 4 | namespace ByteSync.Interfaces.Controls.Inventories; 5 | 6 | public interface IDataInventoryStarter 7 | { 8 | Task StartDataInventory(bool isLaunchedByUser); 9 | 10 | IObservable CanCurrentUserStartInventory(); 11 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Interfaces/Factories/IContentRepartitionGroupsComputerFactory.cs: -------------------------------------------------------------------------------- 1 | using ByteSync.Interfaces.Controls.Inventories; 2 | using ByteSync.ViewModels.Sessions.Comparisons.Results; 3 | 4 | namespace ByteSync.Interfaces.Factories; 5 | 6 | public interface IContentRepartitionGroupsComputerFactory 7 | { 8 | IContentRepartitionGroupsComputer Build(ContentRepartitionViewModel contentRepartitionViewModel); 9 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Interfaces/Services/Communications/IAuthenticationTokensRepository.cs: -------------------------------------------------------------------------------- 1 | using System.Threading.Tasks; 2 | using ByteSync.Common.Business.Auth; 3 | 4 | namespace ByteSync.Interfaces.Services.Communications; 5 | 6 | public interface IAuthenticationTokensRepository 7 | { 8 | Task GetTokens(); 9 | 10 | Task Store(AuthenticationTokens authenticationTokens); 11 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Views/Headers/HeaderView.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.ReactiveUI; 2 | using ByteSync.ViewModels.Headers; 3 | using ReactiveUI; 4 | 5 | namespace ByteSync.Views.Headers; 6 | 7 | public partial class HeaderView : ReactiveUserControl 8 | { 9 | public HeaderView() 10 | { 11 | InitializeComponent(); 12 | this.WhenActivated(disposables => { }); 13 | } 14 | } -------------------------------------------------------------------------------- /tests/ByteSync.Functions.UnitTests/Bruno/DateIsCopied (C2).bru: -------------------------------------------------------------------------------- 1 | meta { 2 | name: DateIsCopied (C2) 3 | type: http 4 | seq: 7 5 | } 6 | 7 | post { 8 | url: {{root-url}}/session/{{sessionId}}/synchronization/dateIsCopied 9 | body: json 10 | auth: none 11 | } 12 | 13 | headers { 14 | Authorization: {{jwtToken2}} 15 | } 16 | 17 | body:json { 18 | [ 19 | "{{actionGroupId2}}" 20 | ] 21 | } 22 | -------------------------------------------------------------------------------- /src/ByteSync.Client/Interfaces/Factories/ViewModels/ISynchronizationRuleSummaryViewModelFactory.cs: -------------------------------------------------------------------------------- 1 | using ByteSync.Business.Actions.Local; 2 | using ByteSync.ViewModels.Sessions.Comparisons.Results; 3 | 4 | namespace ByteSync.Interfaces.Factories.ViewModels; 5 | 6 | public interface ISynchronizationRuleSummaryViewModelFactory 7 | { 8 | SynchronizationRuleSummaryViewModel Create(SynchronizationRule synchronizationRule); 9 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Repositories/AnnouncementRepository.cs: -------------------------------------------------------------------------------- 1 | using ByteSync.Common.Business.Announcements; 2 | using ByteSync.Interfaces.Repositories; 3 | 4 | namespace ByteSync.Repositories; 5 | 6 | public class AnnouncementRepository : BaseSourceCacheRepository, IAnnouncementRepository 7 | { 8 | protected override string KeySelector(Announcement announcement) => announcement.Id; 9 | } 10 | -------------------------------------------------------------------------------- /src/ByteSync.Common/Business/Actions/ActionOperatorTypes.cs: -------------------------------------------------------------------------------- 1 | namespace ByteSync.Common.Business.Actions; 2 | 3 | public enum ActionOperatorTypes 4 | { 5 | // File only 6 | SynchronizeContentOnly = 1, 7 | SynchronizeDate = 2, 8 | SynchronizeContentAndDate = 3, 9 | 10 | // Directory only 11 | Create = 5, 12 | 13 | // Common 14 | Delete = 10, 15 | DoNothing = 11 16 | } -------------------------------------------------------------------------------- /src/ByteSync.Common/Business/Misc/SizeConstants.cs: -------------------------------------------------------------------------------- 1 | namespace ByteSync.Common.Business.Misc; 2 | 3 | public class SizeConstants 4 | { 5 | public const int ONE_BYTE = 1; 6 | public const int ONE_KILO_BYTES = 1024; 7 | public const int ONE_MEGA_BYTES = 1024 * 1024; 8 | public const int ONE_GIGA_BYTES = 1024 * 1024 * 1024; 9 | public const long ONE_TERA_BYTES = (long) 1024 * 1024 * 1024 * 1024; 10 | } -------------------------------------------------------------------------------- /src/ByteSync.ServerCommon/Commands/SessionMembers/GetMembersInstanceIdsRequest.cs: -------------------------------------------------------------------------------- 1 | using MediatR; 2 | 3 | namespace ByteSync.ServerCommon.Commands.SessionMembers; 4 | 5 | public class GetMembersInstanceIdsRequest : IRequest> 6 | { 7 | public GetMembersInstanceIdsRequest(string sessionId) 8 | { 9 | SessionId = sessionId; 10 | } 11 | 12 | public string SessionId { get; } 13 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Interfaces/Controls/Communications/IDownloadTargetBuilder.cs: -------------------------------------------------------------------------------- 1 | using ByteSync.Business.Communications.Downloading; 2 | using ByteSync.Common.Business.SharedFiles; 3 | 4 | namespace ByteSync.Interfaces.Controls.Communications; 5 | 6 | public interface IDownloadTargetBuilder 7 | { 8 | DownloadTarget BuildDownloadTarget(SharedFileDefinition sharedFileDefinition); 9 | 10 | void ClearCache(); 11 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Interfaces/Controls/Inventories/IInventorySaver.cs: -------------------------------------------------------------------------------- 1 | using System.IO; 2 | using ByteSync.Models.Inventories; 3 | 4 | namespace ByteSync.Interfaces.Controls.Inventories; 5 | 6 | public interface IInventorySaver 7 | { 8 | void Start(string inventoryFullName); 9 | void AddSignature(string guid, MemoryStream memoryStream); 10 | void WriteInventory(Inventory inventory); 11 | void Stop(); 12 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Views/Lobbies/LobbyMainView.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.ReactiveUI; 2 | using ByteSync.ViewModels.Lobbies; 3 | using ReactiveUI; 4 | 5 | namespace ByteSync.Views.Lobbies; 6 | 7 | public partial class LobbyMainView : ReactiveUserControl 8 | { 9 | public LobbyMainView() 10 | { 11 | InitializeComponent(); 12 | this.WhenActivated(disposables => { }); 13 | } 14 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Views/Profiles/ProfilesView.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.ReactiveUI; 2 | using ByteSync.ViewModels.Profiles; 3 | using ReactiveUI; 4 | 5 | namespace ByteSync.Views.Profiles; 6 | 7 | public partial class ProfilesView : ReactiveUserControl 8 | { 9 | public ProfilesView() 10 | { 11 | InitializeComponent(); 12 | this.WhenActivated(disposables => { }); 13 | } 14 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Views/Sessions/SessionMainView.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.ReactiveUI; 2 | using ByteSync.ViewModels.Sessions; 3 | using ReactiveUI; 4 | 5 | namespace ByteSync.Views.Sessions; 6 | 7 | public partial class SessionMainView : ReactiveUserControl 8 | { 9 | public SessionMainView() 10 | { 11 | this.WhenActivated(_ => { }); 12 | InitializeComponent(); 13 | } 14 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Interfaces/Controls/Communications/ICloudProxy.cs: -------------------------------------------------------------------------------- 1 | using ByteSync.Common.Business.EndPoints; 2 | using ByteSync.Interfaces.Controls.Communications.SignalR; 3 | 4 | namespace ByteSync.Interfaces.Controls.Communications; 5 | 6 | public interface ICloudProxy 7 | { 8 | IHubPushHandler2 HubPushHandler2 { get; } 9 | ByteSyncEndpoint CurrentEndPoint { get; } 10 | string ClientInstanceId { get; } 11 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Interfaces/Repositories/IPropertyIndexer.cs: -------------------------------------------------------------------------------- 1 | using DynamicData; 2 | 3 | namespace ByteSync.Interfaces.Repositories; 4 | 5 | public interface IPropertyIndexer 6 | where TObject : notnull 7 | where TIndex : notnull 8 | { 9 | void Initialize(SourceCache sourceCache, Func indexSelector); 10 | 11 | List GetByIndex(TIndex index); 12 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Interfaces/Services/Filtering/IPropertyValueExtractor.cs: -------------------------------------------------------------------------------- 1 | using ByteSync.Business.Comparisons; 2 | using ByteSync.Business.Filtering.Values; 3 | using ByteSync.Models.Comparisons.Result; 4 | 5 | namespace ByteSync.Interfaces.Services.Filtering; 6 | 7 | public interface IPropertyValueExtractor 8 | { 9 | PropertyValueCollection GetPropertyValue(ComparisonItem item, DataPart? dataPart, string property); 10 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/ViewModels/Sessions/Comparisons/Actions/Misc/BaseAtomicEditViewModel.cs: -------------------------------------------------------------------------------- 1 | namespace ByteSync.ViewModels.Sessions.Comparisons.Actions.Misc; 2 | 3 | public class BaseAtomicEditViewModel : ViewModelBase 4 | { 5 | public event EventHandler? RemoveRequested; 6 | 7 | protected void RaiseRemoveRequested() 8 | { 9 | RemoveRequested?.Invoke(this, this); 10 | } 11 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Views/Misc/SelectLocaleView.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.ReactiveUI; 2 | using ByteSync.ViewModels.Misc; 3 | using ReactiveUI; 4 | 5 | namespace ByteSync.Views.Misc; 6 | 7 | public partial class SelectLocaleView : ReactiveUserControl 8 | { 9 | public SelectLocaleView() 10 | { 11 | InitializeComponent(); 12 | this.WhenActivated(disposables => { }); 13 | } 14 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Views/Sessions/Inventories/InventoryBeforeStartView.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.ReactiveUI; 2 | using ByteSync.ViewModels.Sessions.Inventories; 3 | 4 | namespace ByteSync.Views.Sessions.Inventories; 5 | 6 | public partial class InventoryBeforeStartView : ReactiveUserControl 7 | { 8 | public InventoryBeforeStartView() 9 | { 10 | InitializeComponent(); 11 | } 12 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Views/Sessions/Inventories/InventoryLocalStatusView.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.ReactiveUI; 2 | using ByteSync.ViewModels.Sessions.Inventories; 3 | 4 | namespace ByteSync.Views.Sessions.Inventories; 5 | 6 | public partial class InventoryLocalStatusView : ReactiveUserControl 7 | { 8 | public InventoryLocalStatusView() 9 | { 10 | InitializeComponent(); 11 | } 12 | } -------------------------------------------------------------------------------- /src/ByteSync.Common/Business/Synchronizations/SynchronizationStartRequest.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using ByteSync.Common.Business.Actions; 3 | 4 | namespace ByteSync.Common.Business.Synchronizations; 5 | 6 | public class SynchronizationStartRequest 7 | { 8 | public string SessionId { get; set; } = null!; 9 | 10 | public List ActionsGroupDefinitions { get; set; } = null!; 11 | } -------------------------------------------------------------------------------- /src/ByteSync.ServerCommon/Commands/Synchronizations/IActionCompletedRequest.cs: -------------------------------------------------------------------------------- 1 | using ByteSync.ServerCommon.Business.Auth; 2 | using MediatR; 3 | 4 | namespace ByteSync.ServerCommon.Commands.Synchronizations; 5 | 6 | public interface IActionCompletedRequest : IRequest 7 | { 8 | string SessionId { get; } 9 | Client Client { get; } 10 | List ActionsGroupIds { get; } 11 | string? NodeId { get; } 12 | } 13 | -------------------------------------------------------------------------------- /src/ByteSync.Client/Business/Profiles/CloudSessionProfileOptions.cs: -------------------------------------------------------------------------------- 1 | using ByteSync.Business.Sessions; 2 | 3 | namespace ByteSync.Business.Profiles; 4 | 5 | public class CloudSessionProfileOptions 6 | { 7 | public SessionSettings Settings { get; set; } = null!; 8 | 9 | public TimeSpan? MaxLobbyLifeTime 10 | { 11 | get 12 | { 13 | return TimeSpan.FromMinutes(5); 14 | } 15 | } 16 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Interfaces/Controls/Automating/ICommandLineModeHandler.cs: -------------------------------------------------------------------------------- 1 | using System.Threading.Tasks; 2 | using ByteSync.Common.Business.Lobbies; 3 | 4 | namespace ByteSync.Interfaces.Controls.Automating; 5 | 6 | public interface ICommandLineModeHandler 7 | { 8 | public Task Operate(); 9 | 10 | 11 | 12 | string? ProfileToRunName { get; } 13 | 14 | JoinLobbyModes? JoinLobbyMode { get; } 15 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Interfaces/Controls/Synchronizations/ISynchronizationManager.cs: -------------------------------------------------------------------------------- 1 | namespace ByteSync.Interfaces.Controls.Synchronizations; 2 | 3 | public interface ISynchronizationManager 4 | { 5 | // Task InitializeData(); 6 | // 7 | // 8 | // 9 | // 10 | // 11 | // Task CloudSessionSynchronizationLoop(List sharedActionsGroups, SynchronizationProgress synchronizationProgress); 12 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Views/Lobbies/LobbyMemberView.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.ReactiveUI; 2 | using ByteSync.ViewModels.Lobbies; 3 | using ReactiveUI; 4 | 5 | namespace ByteSync.Views.Lobbies; 6 | 7 | public partial class LobbyMemberView : ReactiveUserControl 8 | { 9 | public LobbyMemberView() 10 | { 11 | InitializeComponent(); 12 | this.WhenActivated(disposables => { }); 13 | } 14 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Views/Sessions/DataNodes/DataNodeHeaderView.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.Controls; 2 | using Avalonia.ReactiveUI; 3 | using ByteSync.ViewModels.Sessions.DataNodes; 4 | 5 | namespace ByteSync.Views.Sessions.DataNodes; 6 | 7 | public partial class DataNodeHeaderView : ReactiveUserControl 8 | { 9 | public DataNodeHeaderView() 10 | { 11 | InitializeComponent(); 12 | } 13 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Views/Sessions/Inventories/InventoryGlobalStatusView.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.ReactiveUI; 2 | using ByteSync.ViewModels.Sessions.Inventories; 3 | 4 | namespace ByteSync.Views.Sessions.Inventories; 5 | 6 | public partial class InventoryGlobalStatusView : ReactiveUserControl 7 | { 8 | public InventoryGlobalStatusView() 9 | { 10 | InitializeComponent(); 11 | } 12 | } -------------------------------------------------------------------------------- /src/ByteSync.Common/Business/Auth/RefreshTokensData.cs: -------------------------------------------------------------------------------- 1 | using ByteSync.Common.Business.Misc; 2 | 3 | namespace ByteSync.Common.Business.Auth; 4 | 5 | public class RefreshTokensData 6 | { 7 | public string Token { get; set; } = null!; 8 | 9 | public string ClientInstanceId { get; set; } = null!; 10 | 11 | public string Version { get; set; } = null!; 12 | 13 | public OSPlatforms? OsPlatform { get; set; } 14 | } -------------------------------------------------------------------------------- /src/ByteSync.Common/Business/Synchronizations/SynchronizationAbortRequest.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | 4 | namespace ByteSync.Common.Business.Synchronizations; 5 | 6 | public class SynchronizationAbortRequest 7 | { 8 | public string SessionId { get; set; } = null!; 9 | 10 | public DateTimeOffset RequestedOn { get; set; } 11 | 12 | public List RequestedBy { get; set; } = new(); 13 | } -------------------------------------------------------------------------------- /src/ByteSync.ServerCommon/Interfaces/Services/Clients/IAuthService.cs: -------------------------------------------------------------------------------- 1 | using ByteSync.Common.Business.Auth; 2 | 3 | namespace ByteSync.ServerCommon.Interfaces.Services.Clients; 4 | 5 | public interface IAuthService 6 | { 7 | Task Authenticate(LoginData loginData, string ipAddress); 8 | 9 | Task RefreshTokens(RefreshTokensData refreshTokensData, string ipAddress); 10 | } -------------------------------------------------------------------------------- /tests/ByteSync.Functions.UnitTests/Bruno/ErrorOnTarget.bru: -------------------------------------------------------------------------------- 1 | meta { 2 | name: ErrorOnTarget 3 | type: http 4 | seq: 9 5 | } 6 | 7 | post { 8 | url: {{root-url}}/session/{{sessionId}}/synchronization/errors 9 | body: json 10 | auth: none 11 | } 12 | 13 | headers { 14 | Authorization: {{jwtToken1}} 15 | } 16 | 17 | body:json { 18 | [ 19 | "{{actionGroupId1}}", 20 | "{{actionGroupId2}}" 21 | ] 22 | } 23 | -------------------------------------------------------------------------------- /src/ByteSync.Client/Business/Comparisons/ConditionOperatorTypes.cs: -------------------------------------------------------------------------------- 1 | namespace ByteSync.Business.Comparisons; 2 | 3 | public enum ConditionOperatorTypes 4 | { 5 | Equals = 1, 6 | NotEquals = 2, 7 | ExistsOn = 3, 8 | NotExistsOn = 4, 9 | //ExistsOnlyOnSpecificData, 10 | IsOlderThan = 5, 11 | IsNewerThan = 6, 12 | IsBiggerThan = 7, 13 | IsSmallerThan = 8, 14 | IsEmpty = 9, 15 | IsNotEmpty = 10, 16 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Interfaces/Controls/Communications/IFileUploadProcessor.cs: -------------------------------------------------------------------------------- 1 | using ByteSync.Common.Business.SharedFiles; 2 | 3 | namespace ByteSync.Interfaces.Controls.Communications; 4 | 5 | public interface IFileUploadProcessor 6 | { 7 | Task ProcessUpload(SharedFileDefinition sharedFileDefinition, int? maxSliceLength = null); 8 | 9 | int GetTotalCreatedSlices(); 10 | 11 | int GetMaxConcurrentUploads(); 12 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Interfaces/Factories/IMergerDecrypterFactory.cs: -------------------------------------------------------------------------------- 1 | using System.Threading; 2 | using ByteSync.Business.Communications.Downloading; 3 | using ByteSync.Interfaces.Controls.Encryptions; 4 | 5 | namespace ByteSync.Interfaces.Factories; 6 | 7 | public interface IMergerDecrypterFactory 8 | { 9 | IMergerDecrypter Build(string localPath, DownloadTarget downloadTarget, CancellationTokenSource cancellationTokenSource); 10 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Interfaces/Services/Sessions/Connecting/Joining/IJoinSessionService.cs: -------------------------------------------------------------------------------- 1 | using ByteSync.Business.Sessions.RunSessionInfos; 2 | 3 | namespace ByteSync.Interfaces.Services.Sessions.Connecting.Joining; 4 | 5 | public interface IJoinSessionService 6 | { 7 | Task JoinSession(string sessionId, string sessionPassword, RunCloudSessionProfileInfo? lobbySessionDetails); 8 | 9 | Task CancelJoinCloudSession(); 10 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Views/Misc/FlyoutContainerView.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.ReactiveUI; 2 | using ByteSync.ViewModels.Misc; 3 | using ReactiveUI; 4 | 5 | namespace ByteSync.Views.Misc; 6 | 7 | public partial class FlyoutContainerView : ReactiveUserControl 8 | { 9 | public FlyoutContainerView() 10 | { 11 | InitializeComponent(); 12 | this.WhenActivated(disposables => { }); 13 | } 14 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Views/Sessions/Comparisons/Actions/AtomicActionEditView.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.ReactiveUI; 2 | using ByteSync.ViewModels.Sessions.Comparisons.Actions; 3 | 4 | namespace ByteSync.Views.Sessions.Comparisons.Actions; 5 | 6 | public partial class AtomicActionEditView : ReactiveUserControl 7 | { 8 | public AtomicActionEditView() 9 | { 10 | InitializeComponent(); 11 | } 12 | } -------------------------------------------------------------------------------- /src/ByteSync.Common/Business/Sessions/Cloud/Connections/AskCloudSessionPasswordExchangeKeyPush.cs: -------------------------------------------------------------------------------- 1 | using ByteSync.Common.Business.EndPoints; 2 | 3 | namespace ByteSync.Common.Business.Sessions.Cloud.Connections; 4 | 5 | public class AskCloudSessionPasswordExchangeKeyPush 6 | { 7 | public string SessionId { get; set; } 8 | public PublicKeyInfo PublicKeyInfo { get; set; } 9 | public string RequesterInstanceId { get; set; } 10 | } -------------------------------------------------------------------------------- /src/ByteSync.ServerCommon/Interfaces/Services/ISynchronizationStatusCheckerService.cs: -------------------------------------------------------------------------------- 1 | using ByteSync.ServerCommon.Entities; 2 | 3 | namespace ByteSync.ServerCommon.Interfaces.Services; 4 | 5 | public interface ISynchronizationStatusCheckerService 6 | { 7 | bool CheckSynchronizationCanBeUpdated(SynchronizationEntity? synchronization); 8 | 9 | bool CheckSynchronizationCanBeAborted(SynchronizationEntity? synchronization); 10 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Business/Actions/Loose/LooseAtomicAction.cs: -------------------------------------------------------------------------------- 1 | using ByteSync.Common.Business.Actions; 2 | using ByteSync.Common.Interfaces.Business; 3 | 4 | namespace ByteSync.Business.Actions.Loose; 5 | 6 | public class LooseAtomicAction : IAtomicAction 7 | { 8 | public string? SourceName { get; set; } 9 | 10 | public string? DestinationName { get; set; } 11 | 12 | public ActionOperatorTypes Operator { get; set; } 13 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Interfaces/Controls/Synchronizations/ISynchronizationActionRemoteUploader.cs: -------------------------------------------------------------------------------- 1 | using System.Threading.Tasks; 2 | using ByteSync.Business.Actions.Shared; 3 | 4 | namespace ByteSync.Interfaces.Controls.Synchronizations; 5 | 6 | public interface ISynchronizationActionRemoteUploader 7 | { 8 | Task UploadForRemote(SharedActionsGroup sharedActionsGroup); 9 | 10 | Task Complete(); 11 | 12 | Task Abort(); 13 | } -------------------------------------------------------------------------------- /src/ByteSync.Common/Business/Lobbies/LobbyMemberStatuses.cs: -------------------------------------------------------------------------------- 1 | namespace ByteSync.Common.Business.Lobbies; 2 | 3 | public enum LobbyMemberStatuses 4 | { 5 | WaitingForJoin = 1, 6 | Joined = 2, 7 | SecurityChecksSuccess = 3, 8 | TrustCheckError = 4, 9 | SecurityChecksInProgress = 5, 10 | CrossCheckError = 6, 11 | JoinedSession = 7, 12 | CreatedSession = 8, 13 | UnexpectedError = 9, 14 | Unknown_10 = 10, 15 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Business/Filtering/Expressions/FutureStateExpression.cs: -------------------------------------------------------------------------------- 1 | using ByteSync.Models.Comparisons.Result; 2 | 3 | namespace ByteSync.Business.Filtering.Expressions; 4 | 5 | public class FutureStateExpression : FilterExpression 6 | { 7 | public FilterExpression BaseExpression { get; } 8 | 9 | public FutureStateExpression(FilterExpression baseExpression) 10 | { 11 | BaseExpression = baseExpression; 12 | } 13 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Interfaces/Controls/Communications/IExchangeKeysStorer.cs: -------------------------------------------------------------------------------- 1 | // using ByteSyncCommon.Business.EndPoints; 2 | // 3 | // namespace ByteSync.Interfaces.Communications; 4 | // 5 | // public interface IExchangeKeysStorer 6 | // { 7 | // void StoreKey(string clientInstanceId, PublicKeyCheckData publicKeyCheckData); 8 | // 9 | // PublicKeyCheckData? GetKey(string clientInstanceId); 10 | // 11 | // void Clear(); 12 | // } -------------------------------------------------------------------------------- /src/ByteSync.Client/Interfaces/Services/Filtering/IPropertyComparer.cs: -------------------------------------------------------------------------------- 1 | using ByteSync.Business.Filtering; 2 | using ByteSync.Business.Filtering.Parsing; 3 | using ByteSync.Business.Filtering.Values; 4 | 5 | namespace ByteSync.Interfaces.Services.Filtering; 6 | 7 | public interface IPropertyComparer 8 | { 9 | bool CompareValues(PropertyValueCollection collection1, PropertyValueCollection collection2, ComparisonOperator comparisonOperator); 10 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Interfaces/Services/Sessions/Connecting/ICreateSessionService.cs: -------------------------------------------------------------------------------- 1 | using ByteSync.Business.Sessions; 2 | using ByteSync.Common.Business.Sessions.Cloud.Connections; 3 | 4 | namespace ByteSync.Interfaces.Services.Sessions.Connecting; 5 | 6 | public interface ICreateSessionService 7 | { 8 | Task CreateCloudSession(CreateCloudSessionRequest request); 9 | 10 | Task CancelCreateCloudSession(); 11 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Views/Sessions/Inventories/InventoryDeltaGenerationView.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.ReactiveUI; 2 | using ByteSync.ViewModels.Sessions.Inventories; 3 | 4 | namespace ByteSync.Views.Sessions.Inventories; 5 | 6 | public partial class InventoryDeltaGenerationView : ReactiveUserControl 7 | { 8 | public InventoryDeltaGenerationView() 9 | { 10 | InitializeComponent(); 11 | } 12 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Views/Sessions/Synchronizations/SynchronizationMainView.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.ReactiveUI; 2 | using ByteSync.ViewModels.Sessions.Synchronizations; 3 | 4 | namespace ByteSync.Views.Sessions.Synchronizations; 5 | 6 | public partial class SynchronizationMainView : ReactiveUserControl 7 | { 8 | public SynchronizationMainView() 9 | { 10 | InitializeComponent(); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /src/ByteSync.Common/Business/Announcements/Announcement.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | 4 | namespace ByteSync.Common.Business.Announcements; 5 | 6 | public class Announcement 7 | { 8 | public string Id { get; set; } 9 | 10 | public DateTime StartDate { get; set; } 11 | 12 | public DateTime EndDate { get; set; } 13 | 14 | public Dictionary Message { get; set; } = new(); 15 | } 16 | -------------------------------------------------------------------------------- /src/ByteSync.ServerCommon/Commands/SessionMembers/GetMembersRequest.cs: -------------------------------------------------------------------------------- 1 | using ByteSync.Common.Business.Sessions.Cloud; 2 | using MediatR; 3 | 4 | namespace ByteSync.ServerCommon.Commands.SessionMembers; 5 | 6 | public class GetMembersRequest : IRequest> 7 | { 8 | public GetMembersRequest(string sessionId) 9 | { 10 | SessionId = sessionId; 11 | } 12 | 13 | public string SessionId { get; } 14 | } -------------------------------------------------------------------------------- /src/ByteSync.ServerCommon/Interfaces/Repositories/ILobbyRepository.cs: -------------------------------------------------------------------------------- 1 | using ByteSync.ServerCommon.Business.Repositories; 2 | using ByteSync.ServerCommon.Entities; 3 | using StackExchange.Redis; 4 | 5 | namespace ByteSync.ServerCommon.Interfaces.Repositories; 6 | 7 | public interface ILobbyRepository : IRepository 8 | { 9 | Task> QuitLobby(string lobbyId, string clientInstanceId, ITransaction transaction); 10 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Business/Inventories/InventoryStatistics.cs: -------------------------------------------------------------------------------- 1 | namespace ByteSync.Business.Inventories; 2 | 3 | public record InventoryStatistics 4 | { 5 | public int TotalAnalyzed { get; init; } 6 | 7 | public long ProcessedVolume { get; init; } 8 | 9 | public int AnalyzeSuccess { get; init; } 10 | 11 | public int AnalyzeErrors { get; init; } 12 | 13 | public int IdentificationErrors { get; init; } 14 | } 15 | -------------------------------------------------------------------------------- /src/ByteSync.Client/Factories/FileUploadPreparerFactory.cs: -------------------------------------------------------------------------------- 1 | using ByteSync.Interfaces.Controls.Communications; 2 | using ByteSync.Interfaces.Factories; 3 | using ByteSync.Services.Communications.Transfers.Uploading; 4 | 5 | namespace ByteSync.Factories; 6 | 7 | public class FileUploadPreparerFactory : IFileUploadPreparerFactory 8 | { 9 | public IFileUploadPreparer Create() 10 | { 11 | return new FileUploadPreparer(); 12 | } 13 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Interfaces/Controls/Communications/Http/IAuthApiClient.cs: -------------------------------------------------------------------------------- 1 | using System.Threading.Tasks; 2 | using ByteSync.Common.Business.Auth; 3 | 4 | namespace ByteSync.Interfaces.Controls.Communications.Http; 5 | 6 | public interface IAuthApiClient 7 | { 8 | Task Login(LoginData loginData); 9 | 10 | Task RefreshAuthenticationTokens(RefreshTokensData refreshTokensData); 11 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Interfaces/Repositories/IDataSourceRepository.cs: -------------------------------------------------------------------------------- 1 | using ByteSync.Business.DataSources; 2 | using DynamicData; 3 | 4 | namespace ByteSync.Interfaces.Repositories; 5 | 6 | public interface IDataSourceRepository : IBaseSourceCacheRepository 7 | { 8 | public IObservableCache CurrentMemberDataSources { get; } 9 | 10 | public IList SortedCurrentMemberDataSources { get; } 11 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Views/Sessions/Comparisons/Actions/TargetedActionGlobalView.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.ReactiveUI; 2 | using ByteSync.ViewModels.Sessions.Comparisons.Actions; 3 | 4 | namespace ByteSync.Views.Sessions.Comparisons.Actions; 5 | 6 | public partial class TargetedActionGlobalView : ReactiveUserControl 7 | { 8 | public TargetedActionGlobalView() 9 | { 10 | InitializeComponent(); 11 | } 12 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Views/Announcements/AnnouncementView.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.ReactiveUI; 2 | using ByteSync.ViewModels.Announcements; 3 | using ReactiveUI; 4 | 5 | namespace ByteSync.Views.Announcements; 6 | 7 | public partial class AnnouncementView : ReactiveUserControl 8 | { 9 | public AnnouncementView() 10 | { 11 | InitializeComponent(); 12 | this.WhenActivated(disposables => { }); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /src/ByteSync.Common/Helpers/MiscUtils.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Threading.Tasks; 3 | 4 | namespace ByteSync.Common.Helpers; 5 | 6 | public static class MiscUtils 7 | { 8 | public static string CreateGUID() 9 | { 10 | return Guid.NewGuid().ToString(); 11 | } 12 | 13 | public static bool In(this T @object, params T[] possibleValues) 14 | { 15 | return possibleValues.ToList().Contains(@object); 16 | } 17 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Business/Profiles/LocalSessionProfile.cs: -------------------------------------------------------------------------------- 1 | namespace ByteSync.Business.Profiles; 2 | 3 | public class LocalSessionProfile : AbstractSessionProfile 4 | { 5 | public LocalSessionProfile() 6 | { 7 | 8 | } 9 | 10 | public override int MembersCount 11 | { 12 | get 13 | { 14 | return 1; 15 | } 16 | } 17 | 18 | public override ProfileTypes ProfileType => ProfileTypes.Local; 19 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Views/Sessions/Inventories/InventoryLocalIdentificationView.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.ReactiveUI; 2 | using ByteSync.ViewModels.Sessions.Inventories; 3 | 4 | namespace ByteSync.Views.Sessions.Inventories; 5 | 6 | public partial class InventoryLocalIdentificationView : ReactiveUserControl 7 | { 8 | public InventoryLocalIdentificationView() 9 | { 10 | InitializeComponent(); 11 | } 12 | } -------------------------------------------------------------------------------- /src/ByteSync.Common/Interfaces/Business/IEncryptedSessionData.cs: -------------------------------------------------------------------------------- 1 | namespace ByteSync.Common.Interfaces.Business; 2 | 3 | public interface IEncryptedSessionData 4 | { 5 | /// 6 | /// Unique identifier of the encrypted payload. 7 | /// 8 | public string Id { get; set; } 9 | 10 | // public string SessionId { get; set; } 11 | 12 | public byte[] Data { get; set; } 13 | 14 | public byte[] IV { get; set; } 15 | } -------------------------------------------------------------------------------- /src/ByteSync.ServerCommon/Interfaces/Services/Clients/IClientSoftwareVersionService.cs: -------------------------------------------------------------------------------- 1 | using ByteSync.Common.Business.Auth; 2 | using ByteSync.ServerCommon.Business.Settings; 3 | 4 | namespace ByteSync.ServerCommon.Interfaces.Services.Clients; 5 | 6 | public interface IClientSoftwareVersionService 7 | { 8 | Task GetClientSoftwareVersionSettings(); 9 | 10 | Task IsClientVersionAllowed(LoginData loginData); 11 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/DependencyInjection/Modules/ExternalAssembliesModule.cs: -------------------------------------------------------------------------------- 1 | using Autofac; 2 | using ByteSync.Common.Controls; 3 | using ByteSync.Common.Interfaces; 4 | 5 | namespace ByteSync.DependencyInjection.Modules; 6 | 7 | public class ExternalAssembliesModule : Module 8 | { 9 | protected override void Load(ContainerBuilder builder) 10 | { 11 | 12 | builder.RegisterType().As(); 13 | } 14 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Interfaces/Controls/Communications/ISynchronizationDownloadFinalizer.cs: -------------------------------------------------------------------------------- 1 | using System.Threading.Tasks; 2 | using ByteSync.Business.Communications.Downloading; 3 | using ByteSync.Common.Business.SharedFiles; 4 | 5 | namespace ByteSync.Interfaces.Controls.Communications; 6 | 7 | public interface ISynchronizationDownloadFinalizer 8 | { 9 | Task FinalizeSynchronization(SharedFileDefinition sharedFileDefinition, DownloadTarget downloadTarget); 10 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Interfaces/Controls/Themes/IThemeBuilder.cs: -------------------------------------------------------------------------------- 1 | using ByteSync.Business.Themes; 2 | 3 | namespace ByteSync.Interfaces.Controls.Themes; 4 | 5 | public interface IThemeBuilder 6 | { 7 | Theme BuildTheme(string themeName, string primaryColorHex, ThemeModes themeMode); 8 | 9 | Theme BuildTheme(string themeName, string primaryColorHex, ThemeModes themeMode, double secondaryColorHueOffset); 10 | 11 | Theme BuildDefaultTheme(); 12 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Interfaces/Dialogs/IDialogView.cs: -------------------------------------------------------------------------------- 1 | using System.Threading.Tasks; 2 | using ByteSync.Business; 3 | using ByteSync.ViewModels.Misc; 4 | 5 | namespace ByteSync.Interfaces.Dialogs; 6 | 7 | public interface IDialogView 8 | { 9 | Task ShowMessageBoxAsync(MessageBoxViewModel messageBoxViewModel); 10 | 11 | void ShowFlyout(string titleKey, bool toggle, FlyoutElementViewModel flyout); 12 | 13 | void CloseFlyout(); 14 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Interfaces/Services/Sessions/ISessionMemberService.cs: -------------------------------------------------------------------------------- 1 | using ByteSync.Common.Business.Sessions; 2 | using ByteSync.Common.Business.Sessions.Cloud; 3 | 4 | namespace ByteSync.Interfaces.Services.Sessions; 5 | 6 | public interface ISessionMemberService 7 | { 8 | Task UpdateCurrentMemberGeneralStatus(SessionMemberGeneralStatus sessionMemberGeneralStatus); 9 | 10 | void AddOrUpdate(List sessionMemberInfoDtos); 11 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Repositories/ComparisonItemRepository.cs: -------------------------------------------------------------------------------- 1 | using ByteSync.Business.Inventories; 2 | using ByteSync.Interfaces.Repositories; 3 | using ByteSync.Models.Comparisons.Result; 4 | 5 | namespace ByteSync.Repositories; 6 | 7 | public class ComparisonItemRepository : BaseSourceCacheRepository, IComparisonItemRepository 8 | { 9 | protected override PathIdentity KeySelector(ComparisonItem element) => element.PathIdentity; 10 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Services/Comparisons/ConditionMatchers/IConditionMatcher.cs: -------------------------------------------------------------------------------- 1 | using ByteSync.Business.Actions.Local; 2 | using ByteSync.Business.Comparisons; 3 | using ByteSync.Models.Comparisons.Result; 4 | 5 | namespace ByteSync.Services.Comparisons.ConditionMatchers; 6 | 7 | public interface IConditionMatcher 8 | { 9 | ComparisonProperty SupportedProperty { get; } 10 | 11 | bool Matches(AtomicCondition condition, ComparisonItem comparisonItem); 12 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Interfaces/Updates/IApplicationRestarter.cs: -------------------------------------------------------------------------------- 1 | using System.Threading.Tasks; 2 | 3 | namespace ByteSync.Interfaces.Updates; 4 | 5 | public interface IApplicationRestarter 6 | { 7 | string ApplicationLauncherFullName { get; } 8 | 9 | Task StartNewInstance(); 10 | 11 | Task RestartAndScheduleShutdown(int secondsToWait); 12 | 13 | Task Shutdown(int secondsToWait); 14 | 15 | void RefreshApplicationLauncherFullName(); 16 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Views/AccountDetails/UsageStatisticsView.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.ReactiveUI; 2 | using ByteSync.ViewModels.AccountDetails; 3 | using ReactiveUI; 4 | 5 | namespace ByteSync.Views.AccountDetails; 6 | 7 | public partial class UsageStatisticsView : ReactiveUserControl 8 | { 9 | public UsageStatisticsView() 10 | { 11 | InitializeComponent(); 12 | 13 | this.WhenActivated(disposables => { }); 14 | } 15 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Views/Sessions/Synchronizations/SynchronizationBeforeStartView.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.ReactiveUI; 2 | using ByteSync.ViewModels.Sessions.Synchronizations; 3 | 4 | namespace ByteSync.Views.Sessions.Synchronizations; 5 | 6 | public partial class SynchronizationBeforeStartView : ReactiveUserControl 7 | { 8 | public SynchronizationBeforeStartView() 9 | { 10 | InitializeComponent(); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /src/ByteSync.Client/Views/Sessions/Synchronizations/SynchronizationMainStatusView.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.ReactiveUI; 2 | using ByteSync.ViewModels.Sessions.Synchronizations; 3 | 4 | namespace ByteSync.Views.Sessions.Synchronizations; 5 | 6 | public partial class SynchronizationMainStatusView : ReactiveUserControl 7 | { 8 | public SynchronizationMainStatusView() 9 | { 10 | InitializeComponent(); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /src/ByteSync.Client/Views/Sessions/Synchronizations/SynchronizationStatisticsView.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.ReactiveUI; 2 | using ByteSync.ViewModels.Sessions.Synchronizations; 3 | 4 | namespace ByteSync.Views.Sessions.Synchronizations; 5 | 6 | public partial class SynchronizationStatisticsView : ReactiveUserControl 7 | { 8 | public SynchronizationStatisticsView() 9 | { 10 | InitializeComponent(); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /src/ByteSync.Common/Business/Trust/Connections/GiveMemberPublicKeyCheckDataParameters.cs: -------------------------------------------------------------------------------- 1 | using ByteSync.Common.Business.EndPoints; 2 | 3 | namespace ByteSync.Common.Business.Trust.Connections; 4 | 5 | public class GiveMemberPublicKeyCheckDataParameters 6 | { 7 | public PublicKeyCheckData PublicKeyCheckData { get; set; } = null!; 8 | 9 | public string ClientInstanceId { get; set; } = null!; 10 | 11 | public string SessionId { get; set; } = null!; 12 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Business/Filtering/Expressions/OrExpression.cs: -------------------------------------------------------------------------------- 1 | using ByteSync.Models.Comparisons.Result; 2 | 3 | namespace ByteSync.Business.Filtering.Expressions; 4 | 5 | public class OrExpression : FilterExpression 6 | { 7 | public FilterExpression Left { get; } 8 | public FilterExpression Right { get; } 9 | 10 | public OrExpression(FilterExpression left, FilterExpression right) 11 | { 12 | Left = left; 13 | Right = right; 14 | } 15 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Views/AccountDetails/AccountDetailsView.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.ReactiveUI; 2 | using ByteSync.ViewModels.AccountDetails; 3 | using ReactiveUI; 4 | 5 | namespace ByteSync.Views.AccountDetails; 6 | 7 | public partial class AccountDetailsView : ReactiveUserControl 8 | { 9 | public AccountDetailsView() 10 | { 11 | InitializeComponent(); 12 | 13 | this.WhenActivated(disposables => { }); 14 | } 15 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Views/Sessions/Comparisons/Results/ManageSynchronizationRulesView.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.ReactiveUI; 2 | using ByteSync.ViewModels.Sessions.Comparisons.Results; 3 | 4 | namespace ByteSync.Views.Sessions.Comparisons.Results; 5 | 6 | public partial class ManageSynchronizationRulesView : ReactiveUserControl 7 | { 8 | public ManageSynchronizationRulesView() 9 | { 10 | InitializeComponent(); 11 | } 12 | } -------------------------------------------------------------------------------- /src/ByteSync.Common/Business/Lobbies/Connections/JoinLobbyParameters.cs: -------------------------------------------------------------------------------- 1 | using ByteSync.Common.Business.EndPoints; 2 | 3 | namespace ByteSync.Common.Business.Lobbies.Connections; 4 | 5 | public class JoinLobbyParameters 6 | { 7 | public string CloudSessionProfileId { get; set; } 8 | 9 | public string ProfileClientId { get; set; } 10 | 11 | public PublicKeyInfo PublicKeyInfo { get; set; } 12 | 13 | public JoinLobbyModes JoinMode { get; set; } 14 | } -------------------------------------------------------------------------------- /src/ByteSync.Common/Business/Sessions/Cloud/CloudSessionDetails.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace ByteSync.Common.Business.Sessions.Cloud; 4 | 5 | public class CloudSessionDetails 6 | { 7 | public CloudSession CloudSession { get; set; } 8 | 9 | public EncryptedSessionSettings SessionSettings { get; set; } 10 | 11 | public List Members { get; set; } 12 | 13 | public bool IsActivated { get; set; } 14 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Business/Filtering/Expressions/AndExpression.cs: -------------------------------------------------------------------------------- 1 | using ByteSync.Models.Comparisons.Result; 2 | 3 | namespace ByteSync.Business.Filtering.Expressions; 4 | 5 | public class AndExpression : FilterExpression 6 | { 7 | public FilterExpression Left { get; } 8 | public FilterExpression Right { get; } 9 | 10 | public AndExpression(FilterExpression left, FilterExpression right) 11 | { 12 | Left = left; 13 | Right = right; 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src/ByteSync.Client/Interfaces/Factories/IFileUploaderFactory.cs: -------------------------------------------------------------------------------- 1 | using System.IO; 2 | using ByteSync.Common.Business.SharedFiles; 3 | using ByteSync.Interfaces.Controls.Communications; 4 | 5 | namespace ByteSync.Interfaces.Factories; 6 | 7 | public interface IFileUploaderFactory 8 | { 9 | IFileUploader Build(string fullName, SharedFileDefinition sharedFileDefinition); 10 | 11 | IFileUploader Build(MemoryStream memoryStream, SharedFileDefinition sharedFileDefinition); 12 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Interfaces/Controls/Communications/IDownloadStrategy.cs: -------------------------------------------------------------------------------- 1 | using System.IO; 2 | using System.Threading; 3 | using ByteSync.Common.Business.Communications.Transfers; 4 | using ByteSync.Common.Business.SharedFiles; 5 | 6 | namespace ByteSync.Interfaces.Controls.Communications; 7 | 8 | public interface IDownloadStrategy 9 | { 10 | Task DownloadAsync(Stream memoryStream, FileStorageLocation storageLocation, CancellationToken cancellationToken); 11 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Interfaces/Factories/ViewModels/IContentRepartitionViewModelFactory.cs: -------------------------------------------------------------------------------- 1 | using ByteSync.Models.Comparisons.Result; 2 | using ByteSync.Models.Inventories; 3 | using ByteSync.ViewModels.Sessions.Comparisons.Results; 4 | 5 | namespace ByteSync.Interfaces.Factories.ViewModels; 6 | 7 | public interface IContentRepartitionViewModelFactory 8 | { 9 | ContentRepartitionViewModel CreateContentRepartitionViewModel(ComparisonItem comparisonItem, List inventories); 10 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Views/Sessions/Inventories/InventoryMainView.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.ReactiveUI; 2 | using ByteSync.ViewModels.Sessions.Inventories; 3 | using ReactiveUI; 4 | 5 | namespace ByteSync.Views.Sessions.Inventories; 6 | 7 | public partial class InventoryMainView : ReactiveUserControl 8 | { 9 | public InventoryMainView() 10 | { 11 | InitializeComponent(); 12 | 13 | this.WhenActivated(disposables => { }); 14 | } 15 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Views/Sessions/Managing/SessionSettingsEditView.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.ReactiveUI; 2 | using ByteSync.ViewModels.Sessions.Managing; 3 | using ReactiveUI; 4 | 5 | namespace ByteSync.Views.Sessions.Managing; 6 | 7 | public partial class SessionSettingsEditView : ReactiveUserControl 8 | { 9 | public SessionSettingsEditView() 10 | { 11 | InitializeComponent(); 12 | this.WhenActivated(disposables => { }); 13 | } 14 | } -------------------------------------------------------------------------------- /src/ByteSync.ServerCommon/Business/Settings/AzureBlobStorageSettings.cs: -------------------------------------------------------------------------------- 1 | namespace ByteSync.ServerCommon.Business.Settings; 2 | 3 | public class AzureBlobStorageSettings 4 | { 5 | public string AccountName { get; set; } = null!; 6 | 7 | public string AccountKey { get; set; } = null!; 8 | 9 | public string Endpoint { get; set; } = null!; 10 | 11 | public string Container { get; set; } = null!; 12 | 13 | public int RetentionDurationInDays { get; set; } 14 | } -------------------------------------------------------------------------------- /src/ByteSync.ServerCommon/Business/Settings/CloudflareR2Settings.cs: -------------------------------------------------------------------------------- 1 | namespace ByteSync.ServerCommon.Business.Settings; 2 | 3 | public class CloudflareR2Settings 4 | { 5 | public string AccessKeyId { get; set; } = null!; 6 | 7 | public string SecretAccessKey { get; set; } = null!; 8 | 9 | public string Endpoint { get; set; } = null!; 10 | 11 | public string BucketName { get; set; } = null!; 12 | 13 | public int RetentionDurationInDays { get; set; } 14 | } -------------------------------------------------------------------------------- /src/ByteSync.ServerCommon/Commands/Lobbies/QuitLobbyRequest.cs: -------------------------------------------------------------------------------- 1 | using ByteSync.ServerCommon.Business.Auth; 2 | using MediatR; 3 | 4 | namespace ByteSync.ServerCommon.Commands.Lobbies; 5 | 6 | public class QuitLobbyRequest : IRequest 7 | { 8 | public QuitLobbyRequest(string lobbyId, Client client) 9 | { 10 | LobbyId = lobbyId; 11 | Client = client; 12 | } 13 | 14 | public string LobbyId { get; } 15 | 16 | public Client Client { get; } 17 | } -------------------------------------------------------------------------------- /src/ByteSync.ServerCommon/Interfaces/Repositories/IClientSoftwareVersionSettingsRepository.cs: -------------------------------------------------------------------------------- 1 | using ByteSync.ServerCommon.Business.Settings; 2 | 3 | namespace ByteSync.ServerCommon.Interfaces.Repositories; 4 | 5 | public interface IClientSoftwareVersionSettingsRepository : IRepository 6 | { 7 | public Task GetUnique(); 8 | 9 | public Task SaveUnique(ClientSoftwareVersionSettings clientSoftwareVersionSettings); 10 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Business/Sessions/CreateCloudSessionRequest.cs: -------------------------------------------------------------------------------- 1 | using ByteSync.Business.Sessions.RunSessionInfos; 2 | 3 | namespace ByteSync.Business.Sessions; 4 | 5 | public class CreateCloudSessionRequest 6 | { 7 | public CreateCloudSessionRequest(RunCloudSessionProfileInfo? runCloudSessionProfileInfo) 8 | { 9 | RunCloudSessionProfileInfo = runCloudSessionProfileInfo; 10 | } 11 | 12 | public RunCloudSessionProfileInfo? RunCloudSessionProfileInfo { get; set; } 13 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Business/Filtering/Expressions/FileSystemTypeExpression.cs: -------------------------------------------------------------------------------- 1 | using ByteSync.Common.Business.Inventories; 2 | using ByteSync.Models.Comparisons.Result; 3 | 4 | namespace ByteSync.Business.Filtering.Expressions; 5 | 6 | public class FileSystemTypeExpression : FilterExpression 7 | { 8 | public FileSystemTypes FileSystemType { get; } 9 | 10 | public FileSystemTypeExpression(FileSystemTypes fileSystemType) 11 | { 12 | FileSystemType = fileSystemType; 13 | } 14 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Interfaces/Controls/Synchronizations/ISynchronizationDataLogger.cs: -------------------------------------------------------------------------------- 1 | using System.Threading.Tasks; 2 | using ByteSync.Business.Actions.Shared; 3 | 4 | namespace ByteSync.Interfaces.Controls.Synchronizations; 5 | 6 | public interface ISynchronizationDataLogger 7 | { 8 | Task LogSentSynchronizationData(SharedSynchronizationStartData sharedSynchronizationStartData); 9 | 10 | Task LogReceivedSynchronizationData(SharedSynchronizationStartData sharedSynchronizationStartData); 11 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Interfaces/Controls/Communications/IDigitalSignaturesChecker.cs: -------------------------------------------------------------------------------- 1 | using System.Threading.Tasks; 2 | using ByteSync.Common.Business.Sessions.Cloud.Connections; 3 | 4 | namespace ByteSync.Interfaces.Controls.Communications; 5 | 6 | public interface IDigitalSignaturesChecker 7 | { 8 | Task CheckExistingMembersDigitalSignatures(string dataId, ICollection clientInstanceIds); 9 | 10 | Task CheckDigitalSignature(DigitalSignatureCheckInfo digitalSignatureCheckInfo); 11 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/ViewModels/Sessions/Comparisons/Actions/Misc/SizeUnitViewModel.cs: -------------------------------------------------------------------------------- 1 | using ByteSync.Common.Business.Misc; 2 | 3 | namespace ByteSync.ViewModels.Sessions.Comparisons.Actions.Misc; 4 | 5 | class SizeUnitViewModel 6 | { 7 | public SizeUnitViewModel(SizeUnits sizeUnit, string shortName) 8 | { 9 | SizeUnit = sizeUnit; 10 | ShortName = shortName; 11 | } 12 | 13 | public SizeUnits SizeUnit { get; set; } 14 | 15 | public string ShortName { get; set; } 16 | } -------------------------------------------------------------------------------- /src/ByteSync.ServerCommon/Interfaces/Repositories/IClientsRepository.cs: -------------------------------------------------------------------------------- 1 | using ByteSync.Common.Business.EndPoints; 2 | using ByteSync.ServerCommon.Business.Auth; 3 | 4 | namespace ByteSync.ServerCommon.Interfaces.Repositories; 5 | 6 | public interface IClientsRepository : IRepository 7 | { 8 | public Task Get(ByteSyncEndpoint byteSyncEndpoint); 9 | 10 | public Task> GetClientsWithoutConnectionId(); 11 | 12 | public Task RemoveClient(Client client); 13 | } -------------------------------------------------------------------------------- /src/ByteSync.ServerCommon/Interfaces/Services/Storage/Factories/IAzureBlobContainerClientFactory.cs: -------------------------------------------------------------------------------- 1 | namespace ByteSync.ServerCommon.Interfaces.Services.Storage.Factories; 2 | 3 | using System.Threading; 4 | using System.Threading.Tasks; 5 | using Azure.Storage; 6 | using Azure.Storage.Blobs; 7 | 8 | public interface IAzureBlobContainerClientFactory 9 | { 10 | Task GetOrCreateContainer(CancellationToken cancellationToken); 11 | StorageSharedKeyCredential GetCredential(); 12 | } -------------------------------------------------------------------------------- /tests/ByteSync.ServerCommon.Tests/server-common-tests.local.settings.template.json: -------------------------------------------------------------------------------- 1 | { 2 | "Redis": { 3 | "ConnectionString": "", 4 | "Prefix": "" 5 | }, 6 | "AzureBlobStorage": { 7 | "Endpoint": "", 8 | "Container": "", 9 | "AccountKey": "", 10 | "AccountName": "" 11 | }, 12 | "CloudflareR2": { 13 | "ConfigurationTemplateToSetHere": "" 14 | }, 15 | "SignalR": { 16 | "ConnectionString": "" 17 | }, 18 | "AppSettings": { 19 | "Secret": "" 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /src/ByteSync.Client/Business/Comparisons/ContentRepartitionGroupMember.cs: -------------------------------------------------------------------------------- 1 | using ByteSync.Models.Inventories; 2 | 3 | namespace ByteSync.Business.Comparisons; 4 | 5 | internal class ContentRepartitionGroupMember 6 | { 7 | public required string Letter { get; init; } 8 | 9 | public bool IsMissing { get; init; } 10 | 11 | public Inventory? Inventory { get; set; } 12 | 13 | public InventoryPart? InventoryPart { get; set; } 14 | 15 | public object? Link { get; init; } 16 | } -------------------------------------------------------------------------------- /src/ByteSync.ServerCommon/Interfaces/Repositories/ISynchronizationRepository.cs: -------------------------------------------------------------------------------- 1 | using ByteSync.Common.Business.Actions; 2 | using ByteSync.ServerCommon.Entities; 3 | 4 | namespace ByteSync.ServerCommon.Interfaces.Repositories; 5 | 6 | public interface ISynchronizationRepository : IRepository 7 | { 8 | Task AddSynchronization(SynchronizationEntity synchronizationEntity, List actionsGroupDefinitions); 9 | 10 | Task ResetSession(string sessionId); 11 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Interfaces/Controls/Communications/IUploadStrategy.cs: -------------------------------------------------------------------------------- 1 | using System.Threading; 2 | using ByteSync.Business.Communications.Transfers; 3 | using ByteSync.Common.Business.Communications.Transfers; 4 | using ByteSync.Common.Business.SharedFiles; 5 | 6 | namespace ByteSync.Interfaces.Controls.Communications; 7 | 8 | public interface IUploadStrategy 9 | { 10 | Task UploadAsync(FileUploaderSlice slice, FileStorageLocation storageLocation, CancellationToken cancellationToken); 11 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Interfaces/Controls/Synchronizations/ISynchronizationActionHandler.cs: -------------------------------------------------------------------------------- 1 | using System.Threading; 2 | using ByteSync.Business.Actions.Shared; 3 | 4 | namespace ByteSync.Interfaces.Controls.Synchronizations; 5 | 6 | public interface ISynchronizationActionHandler 7 | { 8 | Task RunSynchronizationAction(SharedActionsGroup sharedActionsGroup, CancellationToken cancellationToken = default); 9 | 10 | Task RunPendingSynchronizationActions(CancellationToken cancellationToken = default); 11 | } -------------------------------------------------------------------------------- /src/ByteSync.Common/Business/Lobbies/LobbyCheckInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace ByteSync.Common.Business.Lobbies; 4 | 5 | public class LobbyCheckInfo 6 | { 7 | public LobbyCheckInfo() 8 | { 9 | Recipients = new List(); 10 | } 11 | 12 | public string LobbyId { get; set; } = null!; 13 | 14 | public string SenderClientInstanceId { get; set; } = null!; 15 | 16 | public List Recipients { get; set; } 17 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Business/Communications/BuildConnectionResult.cs: -------------------------------------------------------------------------------- 1 | using ByteSync.Common.Business.Auth; 2 | using ByteSync.Common.Business.EndPoints; 3 | using Microsoft.AspNetCore.SignalR.Client; 4 | 5 | namespace ByteSync.Business.Communications; 6 | 7 | public record BuildConnectionResult 8 | { 9 | public ByteSyncEndpoint? EndPoint { get; init; } 10 | 11 | public HubConnection? HubConnection { get; init; } 12 | 13 | public InitialConnectionStatus? AuthenticateResponseStatus { get; set; } 14 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Interfaces/Controls/Communications/IAdaptiveUploadController.cs: -------------------------------------------------------------------------------- 1 | namespace ByteSync.Interfaces.Controls.Communications; 2 | 3 | public interface IAdaptiveUploadController 4 | { 5 | int CurrentChunkSizeBytes { get; } 6 | 7 | int CurrentParallelism { get; } 8 | 9 | int GetNextChunkSizeBytes(); 10 | 11 | void RecordUploadResult(TimeSpan elapsed, bool isSuccess, int partNumber, int? statusCode = null, 12 | Exception? exception = null, string? fileId = null, long actualBytes = -1); 13 | } 14 | -------------------------------------------------------------------------------- /src/ByteSync.Client/Interfaces/Factories/ViewModels/IItemSynchronizationStatusViewModelFactory.cs: -------------------------------------------------------------------------------- 1 | using ByteSync.Models.Comparisons.Result; 2 | using ByteSync.Models.Inventories; 3 | using ByteSync.ViewModels.Sessions.Comparisons.Results; 4 | 5 | namespace ByteSync.Interfaces.Factories.ViewModels; 6 | 7 | public interface IItemSynchronizationStatusViewModelFactory 8 | { 9 | ItemSynchronizationStatusViewModel CreateItemSynchronizationStatusViewModel(ComparisonItem comparisonItem, List inventories); 10 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Interfaces/Repositories/IDataNodeRepository.cs: -------------------------------------------------------------------------------- 1 | using ByteSync.Business.DataNodes; 2 | using DynamicData; 3 | 4 | namespace ByteSync.Interfaces.Repositories; 5 | 6 | public interface IDataNodeRepository : IBaseSourceCacheRepository 7 | { 8 | IObservableCache CurrentMemberDataNodes { get; } 9 | 10 | IList SortedCurrentMemberDataNodes { get; } 11 | 12 | IEnumerable GetDataNodesByClientInstanceId(string clientInstanceId); 13 | } 14 | -------------------------------------------------------------------------------- /src/ByteSync.Common/Business/Misc/UsageStatisticsSubPeriod.cs: -------------------------------------------------------------------------------- 1 | namespace ByteSync.Common.Business.Misc; 2 | 3 | public class UsageStatisticsSubPeriod 4 | { 5 | public UsageStatisticsSubPeriod() 6 | { 7 | 8 | } 9 | 10 | public UsageStatisticsSubPeriod(string name, long uploadedVolume) 11 | { 12 | Name = name; 13 | UploadedVolume = uploadedVolume; 14 | } 15 | 16 | public string Name { get; set; } = null!; 17 | 18 | public long UploadedVolume { get; set; } 19 | } -------------------------------------------------------------------------------- /src/ByteSync.Common/Business/SharedFiles/FileTransferPush.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace ByteSync.Common.Business.SharedFiles; 4 | 5 | public class FileTransferPush 6 | { 7 | public string SessionId { get; set; } = null!; 8 | 9 | public SharedFileDefinition SharedFileDefinition { get; set; } = null!; 10 | 11 | public int? PartNumber{ get; set; } 12 | 13 | public int? TotalParts { get; set; } 14 | 15 | public List? ActionsGroupIds { get; set; } 16 | } -------------------------------------------------------------------------------- /src/ByteSync.Common/Business/Trust/Connections/SendDigitalSignaturesParameters.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using ByteSync.Common.Business.Sessions.Cloud.Connections; 3 | 4 | namespace ByteSync.Common.Business.Trust.Connections; 5 | 6 | public class SendDigitalSignaturesParameters 7 | { 8 | public string DataId { get; set; } = null!; 9 | 10 | public List DigitalSignatureCheckInfos { get; set; } = null!; 11 | 12 | public bool IsAuthCheckOK { get; set; } 13 | } -------------------------------------------------------------------------------- /src/ByteSync.ServerCommon/Commands/CloudSessions/ResetSessionRequest.cs: -------------------------------------------------------------------------------- 1 | using ByteSync.ServerCommon.Business.Auth; 2 | using MediatR; 3 | 4 | namespace ByteSync.ServerCommon.Commands.CloudSessions; 5 | 6 | public class ResetSessionRequest : IRequest 7 | { 8 | public ResetSessionRequest(string sessionId, Client client) 9 | { 10 | SessionId = sessionId; 11 | Client = client; 12 | } 13 | 14 | public string SessionId { get; } 15 | 16 | public Client Client { get; } 17 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Interfaces/Services/Filtering/IExpressionEvaluator.cs: -------------------------------------------------------------------------------- 1 | using ByteSync.Business.Filtering.Expressions; 2 | using ByteSync.Models.Comparisons.Result; 3 | 4 | namespace ByteSync.Interfaces.Services.Filtering; 5 | 6 | public interface IExpressionEvaluator 7 | { 8 | bool Evaluate(FilterExpression expression, ComparisonItem item); 9 | } 10 | 11 | public interface IExpressionEvaluator : IExpressionEvaluator where T : FilterExpression 12 | { 13 | bool Evaluate(T expression, ComparisonItem item); 14 | } -------------------------------------------------------------------------------- /src/ByteSync.Common/Business/Sessions/DataNodeDTO.cs: -------------------------------------------------------------------------------- 1 | namespace ByteSync.Common.Business.Sessions; 2 | 3 | public class DataNodeDTO : BaseSessionDto 4 | { 5 | public DataNodeDTO() 6 | { 7 | } 8 | 9 | public DataNodeDTO(string sessionId, string clientInstanceId, EncryptedDataNode encryptedDataNode) 10 | : base(sessionId, clientInstanceId) 11 | { 12 | EncryptedDataNode = encryptedDataNode; 13 | } 14 | 15 | public EncryptedDataNode EncryptedDataNode { get; set; } = null!; 16 | } 17 | -------------------------------------------------------------------------------- /src/ByteSync.Client/Interfaces/Controls/Inventories/IInventoryFileAnalyzer.cs: -------------------------------------------------------------------------------- 1 | using System.IO; 2 | using System.Threading; 3 | using ByteSync.Models.FileSystems; 4 | 5 | namespace ByteSync.Interfaces.Controls.Inventories; 6 | 7 | public interface IInventoryFileAnalyzer 8 | { 9 | bool IsAllIdentified { get; set; } 10 | 11 | ManualResetEvent HasFinished { get; } 12 | 13 | void Start(); 14 | 15 | void Stop(); 16 | 17 | void RegisterFile(FileDescription fileDescription, FileInfo fileInfo); 18 | } -------------------------------------------------------------------------------- /src/ByteSync.ServerCommon/Commands/Synchronizations/MemberHasFinishedRequest.cs: -------------------------------------------------------------------------------- 1 | using ByteSync.ServerCommon.Business.Auth; 2 | using MediatR; 3 | 4 | namespace ByteSync.ServerCommon.Commands.Synchronizations; 5 | 6 | public class MemberHasFinishedRequest : IRequest 7 | { 8 | public MemberHasFinishedRequest(string sessionId, Client client) 9 | { 10 | SessionId = sessionId; 11 | Client = client; 12 | } 13 | 14 | public string SessionId { get; set; } 15 | public Client Client { get; set; } 16 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Business/DataNodes/DataNode.cs: -------------------------------------------------------------------------------- 1 | using ByteSync.Business.DataSources; 2 | using ReactiveUI.Fody.Helpers; 3 | 4 | namespace ByteSync.Business.DataNodes; 5 | 6 | public class DataNode 7 | { 8 | public DataNode() 9 | { 10 | 11 | } 12 | 13 | public string Id { get; set; } = null!; 14 | 15 | public string ClientInstanceId { get; set; } = null!; 16 | 17 | [Reactive] 18 | public string Code { get; set; } 19 | 20 | [Reactive] 21 | public int OrderIndex { get; set; } 22 | } 23 | -------------------------------------------------------------------------------- /src/ByteSync.Client/Interfaces/Controls/Inventories/IDataNodeService.cs: -------------------------------------------------------------------------------- 1 | using ByteSync.Business.DataNodes; 2 | 3 | namespace ByteSync.Interfaces.Controls.Inventories; 4 | 5 | public interface IDataNodeService 6 | { 7 | Task TryAddDataNode(DataNode dataNode); 8 | 9 | Task CreateAndTryAddDataNode(string? nodeId = null); 10 | 11 | void ApplyAddDataNodeLocally(DataNode dataNode); 12 | 13 | Task TryRemoveDataNode(DataNode dataNode); 14 | 15 | void ApplyRemoveDataNodeLocally(DataNode dataNode); 16 | } 17 | -------------------------------------------------------------------------------- /src/ByteSync.Client/Interfaces/Controls/Inventories/IFileSystemInspector.cs: -------------------------------------------------------------------------------- 1 | using System.IO; 2 | using ByteSync.Common.Business.Misc; 3 | 4 | namespace ByteSync.Interfaces.Controls.Inventories; 5 | 6 | public interface IFileSystemInspector 7 | { 8 | bool IsHidden(FileSystemInfo fsi, OSPlatforms os); 9 | bool IsSystem(FileInfo fileInfo); 10 | bool IsReparsePoint(FileSystemInfo fsi); 11 | bool Exists(FileInfo fileInfo); 12 | bool IsOffline(FileInfo fileInfo); 13 | bool IsRecallOnDataAccess(FileInfo fileInfo); 14 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Models/Comparisons/Result/ItemSynchronizationStatus.cs: -------------------------------------------------------------------------------- 1 | using ByteSync.Business.Inventories; 2 | 3 | namespace ByteSync.Models.Comparisons.Result; 4 | 5 | public class ItemSynchronizationStatus 6 | { 7 | public ItemSynchronizationStatus(PathIdentity pathIdentity) 8 | { 9 | PathIdentity = pathIdentity; 10 | } 11 | 12 | public PathIdentity PathIdentity { get; } 13 | 14 | public bool IsSuccessStatus { get; set; } 15 | 16 | public bool IsErrorStatus { get; set; } 17 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Services/Converters/BaseConverters/Base58Converter.cs: -------------------------------------------------------------------------------- 1 | namespace ByteSync.Services.Converters.BaseConverters; 2 | 3 | public class Base58Converter : AbstractBaseConverter 4 | { 5 | public Base58Converter() 6 | { 7 | 8 | } 9 | 10 | 11 | public override string BaseFigures 12 | { 13 | get 14 | { 15 | // Basé sur https://en.wikipedia.org/wiki/Base62 16 | return "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"; 17 | } 18 | } 19 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Views/Sessions/Comparisons/Actions/ImportRulesFromProfileView.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.ReactiveUI; 2 | using ByteSync.ViewModels.Sessions.Comparisons.Actions; 3 | using ReactiveUI; 4 | 5 | namespace ByteSync.Views.Sessions.Comparisons.Actions; 6 | 7 | public partial class ImportRulesFromProfileView : ReactiveUserControl 8 | { 9 | public ImportRulesFromProfileView() 10 | { 11 | InitializeComponent(); 12 | this.WhenActivated(disposables => { }); 13 | } 14 | } -------------------------------------------------------------------------------- /src/ByteSync.Common/Business/Sessions/BaseSessionDto.cs: -------------------------------------------------------------------------------- 1 | namespace ByteSync.Common.Business.Sessions; 2 | 3 | public class BaseSessionDto 4 | { 5 | public BaseSessionDto() 6 | { 7 | 8 | } 9 | 10 | public BaseSessionDto(string sessionId, string clientInstanceId) 11 | { 12 | SessionId = sessionId; 13 | ClientInstanceId = clientInstanceId; 14 | } 15 | 16 | public string SessionId { get; set; } = null!; 17 | 18 | public string ClientInstanceId { get; set; } = null!; 19 | } -------------------------------------------------------------------------------- /src/ByteSync.Common/Business/Versions/ProtocolVersion.cs: -------------------------------------------------------------------------------- 1 | namespace ByteSync.Common.Business.Versions; 2 | 3 | public static class ProtocolVersion 4 | { 5 | public const int V1 = 1; 6 | 7 | public const int CURRENT = V1; 8 | 9 | public const int MIN_SUPPORTED = V1; 10 | 11 | public static bool IsCompatible(int otherVersion) 12 | { 13 | if (otherVersion == 0) 14 | { 15 | return false; 16 | } 17 | 18 | return otherVersion == CURRENT; 19 | } 20 | } -------------------------------------------------------------------------------- /src/ByteSync.ServerCommon/Commands/CloudSessions/ValidateJoinCloudSessionRequest.cs: -------------------------------------------------------------------------------- 1 | using ByteSync.Common.Business.Sessions.Cloud.Connections; 2 | using MediatR; 3 | 4 | namespace ByteSync.ServerCommon.Commands.CloudSessions; 5 | 6 | public class ValidateJoinCloudSessionRequest : IRequest 7 | { 8 | public ValidateJoinCloudSessionRequest(ValidateJoinCloudSessionParameters parameters) 9 | { 10 | Parameters = parameters; 11 | } 12 | 13 | public ValidateJoinCloudSessionParameters Parameters { get; } 14 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Business/Communications/Transfers/FileUploaderSlice.cs: -------------------------------------------------------------------------------- 1 | using System.IO; 2 | 3 | namespace ByteSync.Business.Communications.Transfers; 4 | 5 | public class FileUploaderSlice 6 | { 7 | public FileUploaderSlice(int partNumber, MemoryStream memoryStream) 8 | { 9 | PartNumber = partNumber; 10 | MemoryStream = memoryStream; 11 | 12 | MemoryStream.Position = 0; 13 | } 14 | 15 | public int PartNumber { get; } 16 | 17 | public MemoryStream MemoryStream { get; } 18 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Business/Filtering/Evaluators/FileSystemTypeExpressionEvaluator.cs: -------------------------------------------------------------------------------- 1 | using ByteSync.Business.Filtering.Expressions; 2 | using ByteSync.Models.Comparisons.Result; 3 | 4 | namespace ByteSync.Business.Filtering.Evaluators; 5 | 6 | public class FileSystemTypeExpressionEvaluator : ExpressionEvaluator 7 | { 8 | public override bool Evaluate(FileSystemTypeExpression expression, ComparisonItem item) 9 | { 10 | return item.FileSystemType == expression.FileSystemType; 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /src/ByteSync.Client/Interfaces/Controls/Synchronizations/ISynchronizationRuleMatcher.cs: -------------------------------------------------------------------------------- 1 | using ByteSync.Business.Actions.Local; 2 | using ByteSync.Models.Comparisons.Result; 3 | 4 | namespace ByteSync.Interfaces.Controls.Synchronizations; 5 | 6 | public interface ISynchronizationRuleMatcher 7 | { 8 | void MakeMatches(ComparisonItem comparisonItem, ICollection synchronizationRules); 9 | 10 | void MakeMatches(ICollection comparisonItems, ICollection synchronizationRules); 11 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Interfaces/Factories/ViewModels/ISynchronizationActionViewModelFactory.cs: -------------------------------------------------------------------------------- 1 | using ByteSync.Business.Actions.Local; 2 | using ByteSync.ViewModels.Sessions.Comparisons.Results; 3 | using ByteSync.ViewModels.Sessions.Comparisons.Results.Misc; 4 | 5 | namespace ByteSync.Interfaces.Factories.ViewModels; 6 | 7 | public interface ISynchronizationActionViewModelFactory 8 | { 9 | SynchronizationActionViewModel CreateSynchronizationActionViewModel(AtomicAction atomicAction, ComparisonItemViewModel comparisonItemViewModel); 10 | } -------------------------------------------------------------------------------- /src/ByteSync.Common/Business/Auth/AuthenticationTokens.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace ByteSync.Common.Business.Auth; 4 | 5 | public class AuthenticationTokens : ICloneable 6 | { 7 | public string JwtToken { get; set; } = null!; 8 | 9 | public int JwtTokenDurationInSeconds { get; set; } 10 | 11 | public string RefreshToken { get; set; } = null!; 12 | 13 | public DateTimeOffset RefreshTokenExpiration { get; set; } 14 | 15 | public object Clone() 16 | { 17 | return this.MemberwiseClone(); 18 | } 19 | } -------------------------------------------------------------------------------- /src/ByteSync.Common/Business/Versions/SoftwareVersionFile.cs: -------------------------------------------------------------------------------- 1 | namespace ByteSync.Common.Business.Versions; 2 | 3 | public class SoftwareVersionFile 4 | { 5 | public string FileName { get; set; } = null!; 6 | 7 | public string FileUri { get; set; } = null!; 8 | 9 | public Platform Platform { get; set; } 10 | 11 | public string PortableZipSha256 { get; set; } = null!; 12 | 13 | public long PortableZipSize { get; set; } 14 | 15 | public string ExecutableFileName { get; set; } = null!; 16 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Business/Communications/TrustedPublicKey.cs: -------------------------------------------------------------------------------- 1 | namespace ByteSync.Business.Communications; 2 | 3 | public class TrustedPublicKey 4 | { 5 | public TrustedPublicKey() 6 | { 7 | 8 | } 9 | 10 | public string ClientId { get; set; } = null!; 11 | 12 | public string SafetyKey { get; set; } = null!; 13 | 14 | public byte[] PublicKey { get; set; } = null!; 15 | 16 | public string PublicKeyHash { get; set; } = null!; 17 | 18 | public DateTimeOffset ValidationDate { get; set; } 19 | } -------------------------------------------------------------------------------- /src/ByteSync.Common/Business/Sessions/Cloud/Connections/StartTrustCheckResult.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace ByteSync.Common.Business.Sessions.Cloud.Connections; 4 | 5 | public class StartTrustCheckResult 6 | { 7 | public StartTrustCheckResult() 8 | { 9 | MembersInstanceIds = new List(); 10 | } 11 | 12 | public bool IsOK { get; set; } 13 | 14 | public bool IsProtocolVersionIncompatible { get; set; } 15 | 16 | public List MembersInstanceIds { get; set; } 17 | } -------------------------------------------------------------------------------- /tests/ByteSync.Client.UnitTests/TestUtilities/Helpers/ByteSyncEndPointHelper.cs: -------------------------------------------------------------------------------- 1 | using ByteSync.Common.Business.EndPoints; 2 | 3 | namespace ByteSync.Client.UnitTests.TestUtilities.Helpers; 4 | 5 | public static class ByteSyncEndPointHelper 6 | { 7 | public static ByteSyncEndpoint BuildEndPoint(string clientInstanceId = "CID0") 8 | { 9 | ByteSyncEndpoint byteSyncEndpoint = new ByteSyncEndpoint(); 10 | byteSyncEndpoint.ClientInstanceId = clientInstanceId; 11 | 12 | return byteSyncEndpoint; 13 | } 14 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Views/Sessions/Comparisons/Actions/SynchronizationRuleGlobalView.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.ReactiveUI; 2 | using ByteSync.ViewModels.Sessions.Comparisons.Actions; 3 | using ReactiveUI; 4 | 5 | namespace ByteSync.Views.Sessions.Comparisons.Actions; 6 | 7 | internal partial class SynchronizationRuleGlobalView : ReactiveUserControl 8 | { 9 | public SynchronizationRuleGlobalView() 10 | { 11 | InitializeComponent(); 12 | this.WhenActivated(disposables => { }); 13 | } 14 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Business/Updates/UpdateData.cs: -------------------------------------------------------------------------------- 1 | using ByteSync.Common.Business.Versions; 2 | 3 | namespace ByteSync.Business.Updates; 4 | 5 | public class UpdateData 6 | { 7 | public SoftwareVersionFile SoftwareVersionFile { get; init; } = null!; 8 | 9 | public string ApplicationBaseDirectory { get; set; } = null!; 10 | 11 | public string DownloadLocation { get; set; } = null!; 12 | 13 | public string UnzipLocation { get; set; } = null!; 14 | 15 | public string FileToDownload => SoftwareVersionFile.FileUri; 16 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Interfaces/Business/Actions/ISynchronizationRule.cs: -------------------------------------------------------------------------------- 1 | using ByteSync.Business.Comparisons; 2 | using ByteSync.Common.Business.Inventories; 3 | using ByteSync.Common.Interfaces.Business; 4 | 5 | namespace ByteSync.Interfaces.Business.Actions; 6 | 7 | public interface ISynchronizationRule 8 | { 9 | public FileSystemTypes FileSystemType { get; } 10 | 11 | public ConditionModes ConditionMode { get; } 12 | 13 | public List GetConditions(); 14 | 15 | public List GetActions(); 16 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Interfaces/Controls/Themes/IThemeService.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.Media; 2 | using ByteSync.Business.Themes; 3 | 4 | namespace ByteSync.Interfaces.Controls.Themes; 5 | 6 | public interface IThemeService 7 | { 8 | List AvailableThemes { get; } 9 | 10 | IObservable SelectedTheme { get; } 11 | 12 | public void OnThemesRegistered(); 13 | 14 | void RegisterTheme(Theme theme); 15 | 16 | IBrush? GetBrush(string resourceName); 17 | 18 | void SelectTheme(string? name, bool isDarkMode); 19 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Interfaces/Controls/Communications/IFileDownloader.cs: -------------------------------------------------------------------------------- 1 | using ByteSync.Business.Communications.Downloading; 2 | using ByteSync.Common.Business.SharedFiles; 3 | 4 | namespace ByteSync.Interfaces.Controls.Communications; 5 | 6 | public interface IFileDownloader 7 | { 8 | Task StartDownload(); 9 | 10 | Task WaitForFileFullyExtracted(); 11 | 12 | DownloadTarget DownloadTarget { get; } 13 | 14 | SharedFileDefinition SharedFileDefinition { get; } 15 | 16 | IDownloadPartsCoordinator PartsCoordinator { get; } 17 | } -------------------------------------------------------------------------------- /src/ByteSync.Common/Business/Sessions/Cloud/Connections/TrustCheckParameters.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using ByteSync.Common.Business.EndPoints; 3 | 4 | namespace ByteSync.Common.Business.Sessions.Cloud.Connections; 5 | 6 | public class TrustCheckParameters 7 | { 8 | public string SessionId { get; init; } = null!; 9 | 10 | public PublicKeyInfo PublicKeyInfo { get; init; } = null!; 11 | 12 | public List MembersInstanceIdsToCheck { get; init; } = null!; 13 | 14 | public int ProtocolVersion { get; init; } 15 | } -------------------------------------------------------------------------------- /src/ByteSync.ServerCommon/Commands/Authentication/AuthenticateRequest.cs: -------------------------------------------------------------------------------- 1 | using ByteSync.Common.Business.Auth; 2 | using MediatR; 3 | 4 | namespace ByteSync.ServerCommon.Commands.Authentication; 5 | 6 | public class AuthenticateRequest : IRequest 7 | { 8 | public AuthenticateRequest(LoginData loginData, string ipAddress) 9 | { 10 | LoginData = loginData; 11 | IpAddress = ipAddress; 12 | } 13 | 14 | public LoginData LoginData { get; set; } 15 | 16 | public string IpAddress { get; set; } 17 | } -------------------------------------------------------------------------------- /src/ByteSync.ServerCommon/Commands/Synchronizations/RequestSynchronizationAbortRequest.cs: -------------------------------------------------------------------------------- 1 | using ByteSync.ServerCommon.Business.Auth; 2 | using MediatR; 3 | 4 | namespace ByteSync.ServerCommon.Commands.Synchronizations; 5 | 6 | public class RequestSynchronizationAbortRequest : IRequest 7 | { 8 | public RequestSynchronizationAbortRequest(string sessionId, Client client) 9 | { 10 | SessionId = sessionId; 11 | Client = client; 12 | } 13 | 14 | public string SessionId { get; set; } 15 | public Client Client { get; set; } 16 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Business/Filtering/Evaluators/TextSearchExpressionEvaluator.cs: -------------------------------------------------------------------------------- 1 | using ByteSync.Business.Filtering.Expressions; 2 | using ByteSync.Models.Comparisons.Result; 3 | 4 | namespace ByteSync.Business.Filtering.Evaluators; 5 | 6 | public class TextSearchExpressionEvaluator : ExpressionEvaluator 7 | { 8 | public override bool Evaluate(TextSearchExpression expression, ComparisonItem item) 9 | { 10 | return item.PathIdentity.FileName.Contains(expression.SearchText, StringComparison.OrdinalIgnoreCase); 11 | } 12 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Business/Communications/LocalSharedFile.cs: -------------------------------------------------------------------------------- 1 | using ByteSync.Common.Business.SharedFiles; 2 | 3 | namespace ByteSync.Business.Communications; 4 | 5 | public class LocalSharedFile 6 | { 7 | public LocalSharedFile(SharedFileDefinition sharedFileDefinition, string localPath) 8 | { 9 | SharedFileDefinition = sharedFileDefinition; 10 | 11 | LocalPath = localPath; 12 | } 13 | 14 | public SharedFileDefinition SharedFileDefinition { get; set; } 15 | 16 | public string LocalPath { get; } 17 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Interfaces/Controls/Synchronizations/IDeltaManager.cs: -------------------------------------------------------------------------------- 1 | using System.IO; 2 | using System.Threading.Tasks; 3 | using ByteSync.Business.Actions.Shared; 4 | 5 | namespace ByteSync.Interfaces.Controls.Synchronizations; 6 | 7 | public interface IDeltaManager 8 | { 9 | Task BuildDelta(SharedActionsGroup sharedActionsGroup, SharedDataPart sharedDataPart, string sourceFullName); 10 | 11 | Task ApplyDelta(string destinationFullName, string deltaFullName); 12 | 13 | Task ApplyDelta(string destinationFullName, Stream deltaStream); 14 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Interfaces/Controls/Synchronizations/ISynchronizationRulesService.cs: -------------------------------------------------------------------------------- 1 | using ByteSync.Business.Actions.Local; 2 | using ByteSync.Business.Actions.Loose; 3 | 4 | namespace ByteSync.Interfaces.Controls.Synchronizations; 5 | 6 | public interface ISynchronizationRulesService 7 | { 8 | void AddOrUpdateSynchronizationRule(SynchronizationRule synchronizationRule); 9 | 10 | void Remove(SynchronizationRule synchronizationRule); 11 | 12 | void Clear(); 13 | 14 | List GetLooseSynchronizationRules(); 15 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Interfaces/IApplicationSettingsRepository.cs: -------------------------------------------------------------------------------- 1 | using ByteSync.Business.Configurations; 2 | using ByteSync.Common.Business.Serials; 3 | 4 | namespace ByteSync.Interfaces; 5 | 6 | public interface IApplicationSettingsRepository 7 | { 8 | ApplicationSettings GetCurrentApplicationSettings(); 9 | 10 | ApplicationSettings UpdateCurrentApplicationSettings(Action handler, bool saveAfter = true); 11 | 12 | ProductSerialDescription? ProductSerialDescription { get; } 13 | 14 | string EncryptionPassword { get; } 15 | } -------------------------------------------------------------------------------- /src/ByteSync.ServerCommon/Commands/Inventories/GetDataNodesRequest.cs: -------------------------------------------------------------------------------- 1 | using ByteSync.Common.Business.Sessions; 2 | using MediatR; 3 | 4 | namespace ByteSync.ServerCommon.Commands.Inventories; 5 | 6 | public class GetDataNodesRequest : IRequest> 7 | { 8 | public GetDataNodesRequest(string sessionId, string clientInstanceId) 9 | { 10 | SessionId = sessionId; 11 | ClientInstanceId = clientInstanceId; 12 | } 13 | 14 | public string SessionId { get; } 15 | 16 | public string ClientInstanceId { get; } 17 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Business/Updates/UpdateProgress.cs: -------------------------------------------------------------------------------- 1 | namespace ByteSync.Business.Updates; 2 | 3 | public class UpdateProgress 4 | { 5 | public UpdateProgress(UpdateProgressStatus status) 6 | { 7 | Status = status; 8 | Percentage = null; 9 | } 10 | 11 | public UpdateProgress(UpdateProgressStatus status, int percentage) 12 | { 13 | Status = status; 14 | Percentage = percentage; 15 | } 16 | 17 | public UpdateProgressStatus Status { get; } 18 | 19 | public int? Percentage { get; } 20 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Interfaces/Controls/TimeTracking/ITimeTrackingComputer.cs: -------------------------------------------------------------------------------- 1 | using ByteSync.Business.Misc; 2 | 3 | namespace ByteSync.Interfaces.Controls.TimeTracking; 4 | 5 | public interface ITimeTrackingComputer 6 | { 7 | // void Start(DateTime startDateTime, RemainingTimeData remainingTimeData); 8 | IObservable RemainingTime { get; } 9 | 10 | void Start(DateTimeOffset startDateTime); 11 | 12 | // void SetDataToHandle(long dataToHandle); 13 | // 14 | // void SetDataHandled(long dataHandled); 15 | 16 | void Stop(); 17 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Interfaces/Factories/IFileUploadProcessorFactory.cs: -------------------------------------------------------------------------------- 1 | using System.IO; 2 | using ByteSync.Common.Business.SharedFiles; 3 | using ByteSync.Interfaces.Controls.Communications; 4 | using ByteSync.Interfaces.Controls.Encryptions; 5 | 6 | namespace ByteSync.Interfaces.Factories; 7 | 8 | public interface IFileUploadProcessorFactory 9 | { 10 | IFileUploadProcessor Create( 11 | ISlicerEncrypter slicerEncrypter, 12 | string? localFileToUpload, 13 | MemoryStream? memoryStream, 14 | SharedFileDefinition sharedFileDefinition); 15 | } -------------------------------------------------------------------------------- /src/ByteSync.Common/Business/Synchronizations/SynchronizationEnd.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace ByteSync.Common.Business.Synchronizations; 4 | 5 | public enum SynchronizationEndStatuses { 6 | Regular = 1, 7 | Abortion = 2, 8 | Error = 3, 9 | Undefined4 = 4, 10 | Undefined5 = 5, 11 | Undefined6 = 6, 12 | } 13 | 14 | public class SynchronizationEnd 15 | { 16 | public string SessionId { get; set; } 17 | 18 | public DateTimeOffset FinishedOn { get; set; } 19 | 20 | public SynchronizationEndStatuses Status { get; set; } 21 | } -------------------------------------------------------------------------------- /src/ByteSync.ServerCommon/Entities/LobbyMemberCell.cs: -------------------------------------------------------------------------------- 1 | namespace ByteSync.ServerCommon.Entities; 2 | 3 | public class LobbyMemberCell 4 | { 5 | public LobbyMemberCell(string profileClientId) 6 | { 7 | ProfileClientId = profileClientId; 8 | 9 | LobbyMember = null; 10 | } 11 | 12 | public string ProfileClientId { get; } 13 | 14 | public LobbyMember? LobbyMember { get; set; } 15 | 16 | public bool IsMemberSet 17 | { 18 | get 19 | { 20 | return LobbyMember != null; 21 | } 22 | } 23 | } -------------------------------------------------------------------------------- /src/ByteSync.ServerCommon/Interfaces/Factories/IByteSyncEndpointFactory.cs: -------------------------------------------------------------------------------- 1 | using System.Security.Claims; 2 | using ByteSync.Common.Business.EndPoints; 3 | using ByteSync.Common.Business.Serials; 4 | using ByteSync.ServerCommon.Business.Auth; 5 | 6 | namespace ByteSync.ServerCommon.Interfaces.Factories; 7 | 8 | public interface IByteSyncEndpointFactory 9 | { 10 | public ByteSyncEndpoint BuildByteSyncEndpoint(Client client, ProductSerialDescription? productSerialDescription); 11 | 12 | public ByteSyncEndpoint? BuildByteSyncEndpoint(ICollection? claims); 13 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Business/Profiles/AbstractSessionProfile.cs: -------------------------------------------------------------------------------- 1 | namespace ByteSync.Business.Profiles; 2 | 3 | public abstract class AbstractSessionProfile 4 | { 5 | public string ProfileId { get; set; } 6 | 7 | public string Name { get; set; } 8 | 9 | public DateTime CreationDatetime { get; set; } 10 | 11 | public DateTime? LastRunDatetime { get; set; } 12 | 13 | public abstract int MembersCount { get; } 14 | 15 | public abstract ProfileTypes ProfileType { get; } 16 | 17 | public string CreatedWithVersion { get; set; } 18 | } -------------------------------------------------------------------------------- /src/ByteSync.ServerCommon/Interfaces/Repositories/ISharedFilesRepository.cs: -------------------------------------------------------------------------------- 1 | using ByteSync.Common.Business.SharedFiles; 2 | using ByteSync.ServerCommon.Business.Sessions; 3 | 4 | namespace ByteSync.ServerCommon.Interfaces.Repositories; 5 | 6 | public interface ISharedFilesRepository : IRepository 7 | { 8 | Task AddOrUpdate(SharedFileDefinition sharedFileDefinition, Func updateHandler); 9 | 10 | Task Forget(SharedFileDefinition sharedFileDefinition); 11 | 12 | Task> Clear(string sessionId); 13 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Business/Inventories/IndexedItem.cs: -------------------------------------------------------------------------------- 1 | using System.IO; 2 | using ByteSync.Models.FileSystems; 3 | 4 | namespace ByteSync.Business.Inventories; 5 | 6 | public class IndexedItem 7 | { 8 | public IndexedItem(FileSystemDescription fileSystemDescription, FileSystemInfo fileSystemInfo) 9 | { 10 | FileSystemDescription = fileSystemDescription; 11 | FileSystemInfo = fileSystemInfo; 12 | } 13 | 14 | public FileSystemDescription FileSystemDescription { get; set; } 15 | 16 | public FileSystemInfo FileSystemInfo { get; set; } 17 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Interfaces/Factories/ViewModels/IContentIdentityViewModelFactory.cs: -------------------------------------------------------------------------------- 1 | using ByteSync.Models.Comparisons.Result; 2 | using ByteSync.Models.Inventories; 3 | using ByteSync.ViewModels.Sessions.Comparisons.Results; 4 | using ByteSync.ViewModels.Sessions.Comparisons.Results.Misc; 5 | 6 | namespace ByteSync.Interfaces.Factories.ViewModels; 7 | 8 | public interface IContentIdentityViewModelFactory 9 | { 10 | ContentIdentityViewModel CreateContentIdentityViewModel(ComparisonItemViewModel comparisonItemViewModel, ContentIdentity contentIdentity, Inventory inventory); 11 | } -------------------------------------------------------------------------------- /src/ByteSync.Client/Services/Bootstrappers/PushReceiversStarter.cs: -------------------------------------------------------------------------------- 1 | using Autofac; 2 | using ByteSync.Interfaces.Communications; 3 | using ByteSync.Interfaces.Controls.Bootstrapping; 4 | 5 | namespace ByteSync.Services.Bootstrappers; 6 | 7 | public class PushReceiversStarter : IPushReceiversStarter 8 | { 9 | private readonly ILifetimeScope _scope; 10 | 11 | public PushReceiversStarter(ILifetimeScope scope) 12 | { 13 | _scope = scope; 14 | } 15 | 16 | public void Start() 17 | { 18 | _scope.Resolve>(); 19 | } 20 | } -------------------------------------------------------------------------------- /src/ByteSync.Common/Business/Sessions/Cloud/Connections/InformProtocolVersionIncompatibleParameters.cs: -------------------------------------------------------------------------------- 1 | namespace ByteSync.Common.Business.Sessions.Cloud.Connections; 2 | 3 | public class InformProtocolVersionIncompatibleParameters 4 | { 5 | public string SessionId { get; set; } = null!; 6 | 7 | public string MemberClientInstanceId { get; set; } = null!; 8 | 9 | public string JoinerClientInstanceId { get; set; } = null!; 10 | 11 | public int MemberProtocolVersion { get; set; } 12 | 13 | public int JoinerProtocolVersion { get; set; } 14 | } 15 | -------------------------------------------------------------------------------- /src/ByteSync.Common/Helpers/UrlUtils.cs: -------------------------------------------------------------------------------- 1 | namespace ByteSync.Common.Helpers; 2 | 3 | public static class UrlUtils 4 | { 5 | public static string AppendSegment(string url, string segment) 6 | { 7 | if (string.IsNullOrEmpty(url)) 8 | { 9 | return segment; 10 | } 11 | 12 | if (string.IsNullOrEmpty(segment)) 13 | { 14 | return url; 15 | } 16 | 17 | if (url.EndsWith("/")) 18 | { 19 | return url + segment; 20 | } 21 | 22 | return url + "/" + segment; 23 | } 24 | } -------------------------------------------------------------------------------- /src/ByteSync.ServerCommon/Commands/CloudSessions/QuitSessionRequest.cs: -------------------------------------------------------------------------------- 1 | using ByteSync.ServerCommon.Business.Auth; 2 | using MediatR; 3 | 4 | namespace ByteSync.ServerCommon.Commands.CloudSessions; 5 | 6 | public class QuitSessionRequest : IRequest 7 | { 8 | public QuitSessionRequest(string sessionId, Client client) 9 | { 10 | SessionId = sessionId; 11 | Client = client; 12 | } 13 | 14 | public string SessionId { get; } 15 | 16 | public Client Client { get; } 17 | 18 | public string ClientInstanceId => Client.ClientInstanceId; 19 | } -------------------------------------------------------------------------------- /src/ByteSync.ServerCommon/Commands/Inventories/StartInventoryRequest.cs: -------------------------------------------------------------------------------- 1 | using ByteSync.Common.Business.Inventories; 2 | using ByteSync.ServerCommon.Business.Auth; 3 | using MediatR; 4 | 5 | namespace ByteSync.ServerCommon.Commands.Inventories; 6 | 7 | public class StartInventoryRequest : IRequest 8 | { 9 | public StartInventoryRequest(string sessionId, Client client) 10 | { 11 | SessionId = sessionId; 12 | Client = client; 13 | } 14 | 15 | public string SessionId { get; } 16 | 17 | public Client Client { get; } 18 | } -------------------------------------------------------------------------------- /tests/ByteSync.Functions.IntegrationTests/functions-integration-tests.local.settings.template.json: -------------------------------------------------------------------------------- 1 | { 2 | "Redis": { 3 | "ConnectionString": "", 4 | "Prefix": "" 5 | }, 6 | "AzureBlobStorage": { 7 | "Endpoint": "", 8 | "Container": "", 9 | "AccountKey": "", 10 | "AccountName": "" 11 | }, 12 | "CloudflareR2": { 13 | "AccessKeyId": "", 14 | "BucketName": "", 15 | "Endpoint": "", 16 | "SecretAccessKey": "" 17 | }, 18 | "SignalR": { 19 | "ConnectionString": "" 20 | }, 21 | "AppSettings": { 22 | "Secret": "" 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /docs/synchronization-rules.md: -------------------------------------------------------------------------------- 1 | # Synchronization rules 2 | 3 | ByteSync supports creating synchronization rules to automatically trigger actions when comparison conditions are met. Rules can compare file or directory attributes using different elements and operators. 4 | 5 | ## Comparison properties 6 | 7 | - **Content** 8 | - **Date** 9 | - **Size** 10 | - **Presence** 11 | - **Name** (supports `Equals` and `NotEquals` operators, wildcard `*` is allowed) 12 | 13 | Use `Name` to match items based on their file name. When a pattern contains `*`, the rule interprets it as a wildcard. 14 | --------------------------------------------------------------------------------