├── supla-client ├── .gitignore ├── src │ ├── cfg.c │ ├── cfg.h │ ├── eh.c │ ├── eh.h │ ├── ini.c │ ├── ini.h │ ├── lck.c │ ├── lck.h │ ├── log.c │ ├── log.h │ ├── srpc.c │ ├── srpc.h │ ├── proto.c │ ├── proto.h │ ├── tools.c │ ├── tools.h │ ├── safearray.c │ ├── safearray.h │ ├── sthread.c │ ├── sthread.h │ ├── supla-socket.c │ └── supla-socket.h ├── makefile.init ├── Android │ ├── .gitignore │ ├── libs │ │ ├── x86 │ │ │ └── .gitignore │ │ ├── armeabi │ │ │ └── .gitignore │ │ └── armeabi-v7a │ │ │ └── .gitignore │ ├── jni │ │ └── Application.mk │ └── .project ├── Debug │ ├── objects.mk │ └── sources.mk ├── Release │ ├── objects.mk │ ├── sources.mk │ └── Android │ │ └── jni │ │ └── subdir.mk └── .project ├── supla-afl ├── src │ ├── eh.c │ ├── eh.h │ ├── lck.c │ ├── lck.h │ ├── log.c │ ├── log.h │ ├── proto.c │ ├── proto.h │ ├── srpc.c │ ├── srpc.h │ └── cfg.h ├── makefile.init ├── Debug │ ├── supla-afl │ ├── objects.mk │ └── sources.mk └── .project ├── supla-dev ├── src │ ├── cfg.c │ ├── cfg.h │ ├── eh.c │ ├── eh.h │ ├── ini.c │ ├── ini.h │ ├── lck.c │ ├── lck.h │ ├── log.c │ ├── log.h │ ├── proto.c │ ├── proto.h │ ├── srpc.c │ ├── srpc.h │ ├── tools.c │ ├── tools.h │ ├── sthread.c │ ├── sthread.h │ ├── ipcsocket.c │ ├── ipcsocket.h │ ├── safearray.c │ ├── safearray.h │ ├── supla-socket.c │ ├── supla-socket.h │ ├── accept_loop.h │ └── devconnection.h ├── Release │ ├── var │ │ └── .gitignore │ ├── objects.mk │ ├── sources.mk │ └── supla.cfg.sample ├── .gitignore ├── makefile.init ├── Debug │ ├── src │ │ ├── connection.o │ │ ├── connection.d │ │ └── dht │ │ │ └── subdir.mk │ ├── objects.mk │ └── sources.mk └── .project ├── supla-scheduler ├── Debug │ ├── src │ │ └── .gitignore │ ├── objects.mk │ └── sources.mk ├── Test │ ├── src │ │ ├── .gitignore │ │ └── test │ │ │ └── .gitignore │ ├── objects.mk │ └── sources.mk ├── src │ ├── eh.c │ ├── eh.h │ ├── json │ ├── cfg.c │ ├── cfg.h │ ├── ini.c │ ├── ini.h │ ├── lck.c │ ├── lck.h │ ├── log.c │ ├── log.h │ ├── proto.h │ ├── tools.c │ ├── tools.h │ ├── sthread.c │ ├── sthread.h │ ├── dbcommon.cpp │ ├── dbcommon.h │ ├── safearray.c │ ├── safearray.h │ └── test │ │ ├── WorkerTest.h │ │ ├── WorkerTest.cpp │ │ ├── doubles │ │ └── WorkerMock.cpp │ │ ├── AllTests.cpp │ │ └── ActionTest.h ├── Release │ ├── src │ │ └── .gitignore │ ├── objects.mk │ └── sources.mk ├── .gitignore ├── makefile.init └── .project ├── supla-server ├── src │ ├── cfg.c │ ├── cfg.h │ ├── eh.c │ ├── eh.h │ ├── ini.c │ ├── ini.h │ ├── json │ ├── lck.c │ ├── lck.h │ ├── log.c │ ├── log.h │ ├── proto.c │ ├── proto.h │ ├── tools.c │ ├── tools.h │ ├── safearray.c │ ├── safearray.h │ ├── srpc │ │ ├── srpc.c │ │ ├── srpc.h │ │ └── abstract_srpc_adapter.cpp │ ├── sthread.c │ ├── sthread.h │ ├── db │ │ ├── dbcommon.h │ │ └── dbcommon.cpp │ ├── ipc │ │ ├── ipcsocket.c │ │ └── ipcsocket.h │ ├── proto_check.cpp │ ├── supla-socket.c │ ├── supla-socket.h │ ├── test │ │ ├── ProtoTest.h │ │ ├── SrpcTest.cpp │ │ ├── SrpcTest.h │ │ ├── ToolsTest.h │ │ ├── ProtoTest.cpp │ │ ├── ToolsTest.cpp │ │ ├── SafeArrayTest.cpp │ │ ├── SafeArrayTest.h │ │ ├── integration │ │ │ ├── MySqlShell.h │ │ │ └── MySqlShell.cpp │ │ ├── doubles │ │ │ ├── asynctask │ │ │ │ ├── AsyncTaskQueueMock.cpp │ │ │ │ └── AsyncTaskThreadPoolMock.cpp │ │ │ ├── client │ │ │ │ └── ClientDaoMock.cpp │ │ │ ├── push │ │ │ │ └── PnThrottlingMock.cpp │ │ │ ├── ActivePeriodMock.cpp │ │ │ ├── distributedobjects │ │ │ │ └── DObjectMock.cpp │ │ │ ├── http │ │ │ │ ├── CurlAdapterMock.cpp │ │ │ │ └── HttphrottlingMock.cpp │ │ │ ├── mqtt │ │ │ │ ├── MqttStateMessageProviderMock.cpp │ │ │ │ └── MqttChannelMessageProviderMock.cpp │ │ │ ├── db │ │ │ │ └── DbAccessProviderMock.cpp │ │ │ ├── ipc │ │ │ │ ├── SendPushCommandMock.cpp │ │ │ │ ├── GetCharCommandMock.cpp │ │ │ │ ├── GetRGBWCommandMock.cpp │ │ │ │ ├── SetCharCommandMock.cpp │ │ │ │ ├── GetIcValueCommandMock.cpp │ │ │ │ ├── GetPnLimitCommandMock.cpp │ │ │ │ ├── GetDoubleCommandMock.cpp │ │ │ │ ├── GetStatusCommandMock.cpp │ │ │ │ ├── SetCgCharCommandMock.cpp │ │ │ │ ├── ActionCommandMock.cpp │ │ │ │ ├── FactoryResetCommandMock.cpp │ │ │ │ ├── GetEmValueCommandMock.cpp │ │ │ │ ├── OnVbtChangedCommandMock.cpp │ │ │ │ ├── GetGpmValueCommandMock.cpp │ │ │ │ ├── GetHumidityCommandMock.cpp │ │ │ │ ├── RecalibrateCommandMock.cpp │ │ │ │ ├── RestartDeviceCommandMock.cpp │ │ │ │ ├── ActionCgCommandMock.cpp │ │ │ │ ├── EnterCfgModeCommandMock.cpp │ │ │ │ ├── ExecuteSceneCommandMock.cpp │ │ │ │ ├── GetHvacValueCommandMock.cpp │ │ │ │ ├── IdentifyDeviceCommandMock.cpp │ │ │ │ ├── OnChannelAddedCommandMock.cpp │ │ │ │ ├── OnSceneAddedCommandMock.cpp │ │ │ │ ├── TakeOcrPhotoCommandMock.cpp │ │ │ │ ├── DeviceSetTimeCommandMock.cpp │ │ │ │ ├── GetRelayValueCommandMock.cpp │ │ │ │ ├── GetValveValueCommandMock.cpp │ │ │ │ ├── GhCredChangedCommandMock.cpp │ │ │ │ ├── PairSubdeviceCommandMock.cpp │ │ │ │ ├── ResetCountersCommandMock.cpp │ │ │ │ ├── UserReconnectCommandMock.cpp │ │ │ │ ├── GetTemperatureCommandMock.cpp │ │ │ │ ├── InterruptSceneCommandMock.cpp │ │ │ │ ├── MuteAlarmSoundCommandMock.cpp │ │ │ │ ├── OnChannelDeletedCommandMock.cpp │ │ │ │ ├── OnSceneChangedCommandMock.cpp │ │ │ │ └── OnSceneRemovedCommandMock.cpp │ │ │ └── conn │ │ │ │ ├── AuthkeyCacheStub.cpp │ │ │ │ └── AuthkeyCacheStub.h │ │ ├── DCPairTest.h │ │ ├── device │ │ │ ├── value │ │ │ │ ├── ChannelValueTest.h │ │ │ │ ├── ChannelEmValueTest.h │ │ │ │ ├── ChannelFbValueTest.h │ │ │ │ ├── ChannelIcValueTest.h │ │ │ │ ├── ChannelRsValueTest.h │ │ │ │ ├── ChannelDgfValueTest.h │ │ │ │ ├── ChannelGateValueTest.h │ │ │ │ ├── ChannelHvacValueTest.h │ │ │ │ ├── ChannelRgbwValueTest.h │ │ │ │ ├── ChannelOnOffValueTest.h │ │ │ │ └── ChannelValveValueTest.h │ │ │ ├── ChannelStateTest.h │ │ │ ├── ChannelFragmentTest.h │ │ │ └── ChannelRelationTest.h │ │ ├── scene │ │ │ └── SceneAccessTest.h │ │ └── conn │ │ │ ├── AuthkeyCacheTest.h │ │ │ ├── ConnectionObjectTest.h │ │ │ └── ConnectionObjectsTest.h │ ├── crypt_blowfish │ │ ├── crypt.h │ │ ├── LINKS │ │ └── crypt_blowfish.h │ ├── user │ │ └── abstract_user_dao.cpp │ ├── scene │ │ ├── abstract_scene_dao.cpp │ │ └── abstract_scene_operations_dao.cpp │ ├── client │ │ ├── abstract_client_dao.cpp │ │ └── abstract_client_scene_dao.cpp │ ├── device │ │ ├── abstract_device_dao.cpp │ │ └── channel_address.h │ ├── accept_loop.h │ ├── conn │ │ └── abstract_connection_dao.cpp │ ├── jsonconfig │ │ └── abstract_json_config_getter.cpp │ ├── asynctask │ │ ├── abstract_asynctask_observer.cpp │ │ ├── asynctask_thread_bucket.cpp │ │ └── abstract_asynctask_search_condition.cpp │ ├── actions │ │ ├── abstract_action_parameters.cpp │ │ └── abstract_action_config.cpp │ └── converter │ │ └── abstract_value_to_action_converter.cpp ├── Test │ ├── src │ │ ├── client │ │ │ └── .gitignore │ │ ├── device │ │ │ └── .gitignore │ │ ├── test │ │ │ └── .gitignore │ │ └── .gitignore │ └── objects.mk ├── Debug │ ├── src │ │ ├── client │ │ │ └── .gitignore │ │ ├── device │ │ │ └── .gitignore │ │ └── .gitignore │ └── objects.mk ├── .gitignore ├── Release │ ├── objects.mk │ └── src │ │ └── .gitignore ├── makefile.init └── .project ├── sql ├── DeleteOAuthClients.sql ├── DeleteOAuthAccessTokens.sql ├── DeleteVbt22.sql ├── DisableClient4.sql ├── DisableScenes3.sql ├── DisableAccessId2.sql ├── HideAllScenesExceptOne.sql ├── DisableAllScenesExceptOne.sql ├── DeleteVbt31and32.sql ├── DisableMqttForUser48.sql ├── EnableMqttForUser48.sql ├── ChangeLocationForSceneWithId2.sql ├── DisableMqttForUser2645.sql ├── EnableMqttForUser2645.sql ├── SetAltIconForEnabledScenes.sql ├── SetFunctionToNoneForChannel966.sql ├── SetPushNotificationToken.sql ├── SetStateWebhookDisabled.sql ├── ChangePnLimits.sql ├── ExpireOAuthTokens.sql ├── RemoveTestClient.sql ├── DeleteSceneOperaionsWithChannelId303.sql ├── SetAnInactiveTimeForAccessId2.sql ├── SetClientLimitToOne.sql ├── DisableTwoValueBasedTriggers.sql ├── DisableTestClient.sql ├── EnableTwoValueBasedTriggers.sql ├── SetLastAccessDate.sql ├── ModifyValueBasedTrigger.sql ├── SetPushUpdateTime.sql ├── DisableClientRegistrationForTestUser.sql ├── PushNotificationFillNulls.sql ├── AddSceneOperationWithPushNotification.sql ├── DeleteVbtFirst.sql ├── DeleteVbtLast.sql ├── EnableClientRegistrationForTestUser.sql ├── RecreateTestDatabase.sql ├── CreatePushForChannelId303.sql ├── SetVbtActivityConditions.sql ├── SetUserIconForSceneWithId2.sql ├── CreateSqlUsersForTestPurposes.sql ├── SetChannelProperties.sql ├── SetDeviceJsonConfig.sql ├── SetSceneEstimatedExecutionTimeAndPeriod.sql ├── InsertExtendedValue.sql ├── CreateVbtForChannelId303.sql ├── CreateVbtForChannelId303_Owner.sql ├── AddGoogleHomeCredentials.sql ├── CreateSceneForChannelId303.sql ├── AddDeviceManagedPushNotifications.sql ├── CreateChannelGroupWithChannelId303.sql ├── CreateScheduleForChannelId303.sql ├── AddAutoGateClosingConfig.sql ├── AddWebhookCredentials.sql ├── AddChannelState.sql ├── CreateActionTriggerForChannelId303.sql ├── AddPushNotificationWithNulls.sql ├── AddAlexaCredentials.sql └── AddValueBasedTriggers.sql ├── supla-console-client ├── src │ ├── supla-client-lib │ │ ├── eh.c │ │ ├── eh.h │ │ ├── cfg.c │ │ ├── cfg.h │ │ ├── ini.c │ │ ├── ini.h │ │ ├── lck.c │ │ ├── lck.h │ │ ├── log.c │ │ ├── log.h │ │ ├── proto.c │ │ ├── proto.h │ │ ├── srpc.c │ │ ├── srpc.h │ │ ├── tools.c │ │ ├── tools.h │ │ ├── sthread.c │ │ ├── sthread.h │ │ ├── safearray.c │ │ ├── safearray.h │ │ ├── supla-socket.c │ │ ├── supla-socket.h │ │ ├── supla-client.c │ │ ├── supla-client.h │ │ ├── suplasinglecall.h │ │ └── suplasinglecall.cpp │ ├── test │ │ ├── integration │ │ │ ├── MySqlShell.h │ │ │ └── MySqlShell.cpp │ │ └── AllTests.cpp │ └── client_loop.h ├── Debug │ ├── ssocket_read.raw │ ├── src │ │ └── supla-client-lib │ │ │ └── suplaclient.d │ ├── objects.mk │ └── sources.mk ├── .gitignore ├── makefile.init ├── Release │ ├── objects.mk │ └── sources.mk ├── Test │ ├── objects.mk │ ├── src │ │ └── subdir.mk │ └── sources.mk └── .project ├── extras ├── docker │ ├── build.sh │ ├── cpplint.sh │ ├── clang-format.sh │ ├── supla-test.cfg │ ├── supla.cfg │ ├── Dockerfile │ └── run.sh └── coredump_cleanup.sh ├── tools ├── cpu-profile2pdf.sh ├── valgrind-noundef.sh ├── valgrind-full.sh ├── cpu-profile.sh ├── cppcheck.sh └── lint.sh ├── CPPLINT.cfg ├── test ├── all-tests.sh ├── supla-dev-compilation-check.sh ├── supla-scheduler-test.sh ├── supla-server-compilation-check.sh ├── supla-console-client-compilation-check.sh ├── supla-scheduler-compilation-check.sh ├── supla-server-test.sh └── common ├── ._travis.yml └── supla-common └── test ├── SrpcTest.h ├── ProtoTest.h ├── ToolsTest.h └── SafeArrayTest.h /supla-client/.gitignore: -------------------------------------------------------------------------------- 1 | /.DS_Store 2 | -------------------------------------------------------------------------------- /supla-afl/src/eh.c: -------------------------------------------------------------------------------- 1 | ../../supla-common/eh.c -------------------------------------------------------------------------------- /supla-afl/src/eh.h: -------------------------------------------------------------------------------- 1 | ../../supla-common/eh.h -------------------------------------------------------------------------------- /supla-afl/src/lck.c: -------------------------------------------------------------------------------- 1 | ../../supla-common/lck.c -------------------------------------------------------------------------------- /supla-afl/src/lck.h: -------------------------------------------------------------------------------- 1 | ../../supla-common/lck.h -------------------------------------------------------------------------------- /supla-afl/src/log.c: -------------------------------------------------------------------------------- 1 | ../../supla-common/log.c -------------------------------------------------------------------------------- /supla-afl/src/log.h: -------------------------------------------------------------------------------- 1 | ../../supla-common/log.h -------------------------------------------------------------------------------- /supla-dev/src/cfg.c: -------------------------------------------------------------------------------- 1 | ../../supla-common/cfg.c -------------------------------------------------------------------------------- /supla-dev/src/cfg.h: -------------------------------------------------------------------------------- 1 | ../../supla-common/cfg.h -------------------------------------------------------------------------------- /supla-dev/src/eh.c: -------------------------------------------------------------------------------- 1 | ../../supla-common/eh.c -------------------------------------------------------------------------------- /supla-dev/src/eh.h: -------------------------------------------------------------------------------- 1 | ../../supla-common/eh.h -------------------------------------------------------------------------------- /supla-dev/src/ini.c: -------------------------------------------------------------------------------- 1 | ../../supla-common/ini.c -------------------------------------------------------------------------------- /supla-dev/src/ini.h: -------------------------------------------------------------------------------- 1 | ../../supla-common/ini.h -------------------------------------------------------------------------------- /supla-dev/src/lck.c: -------------------------------------------------------------------------------- 1 | ../../supla-common/lck.c -------------------------------------------------------------------------------- /supla-dev/src/lck.h: -------------------------------------------------------------------------------- 1 | ../../supla-common/lck.h -------------------------------------------------------------------------------- /supla-dev/src/log.c: -------------------------------------------------------------------------------- 1 | ../../supla-common/log.c -------------------------------------------------------------------------------- /supla-dev/src/log.h: -------------------------------------------------------------------------------- 1 | ../../supla-common/log.h -------------------------------------------------------------------------------- /supla-afl/src/proto.c: -------------------------------------------------------------------------------- 1 | ../../supla-common/proto.c -------------------------------------------------------------------------------- /supla-afl/src/proto.h: -------------------------------------------------------------------------------- 1 | ../../supla-common/proto.h -------------------------------------------------------------------------------- /supla-afl/src/srpc.c: -------------------------------------------------------------------------------- 1 | ../../supla-common/srpc.c -------------------------------------------------------------------------------- /supla-afl/src/srpc.h: -------------------------------------------------------------------------------- 1 | ../../supla-common/srpc.h -------------------------------------------------------------------------------- /supla-client/src/cfg.c: -------------------------------------------------------------------------------- 1 | ../../supla-common/cfg.c -------------------------------------------------------------------------------- /supla-client/src/cfg.h: -------------------------------------------------------------------------------- 1 | ../../supla-common/cfg.h -------------------------------------------------------------------------------- /supla-client/src/eh.c: -------------------------------------------------------------------------------- 1 | ../../supla-common/eh.c -------------------------------------------------------------------------------- /supla-client/src/eh.h: -------------------------------------------------------------------------------- 1 | ../../supla-common/eh.h -------------------------------------------------------------------------------- /supla-client/src/ini.c: -------------------------------------------------------------------------------- 1 | ../../supla-common/ini.c -------------------------------------------------------------------------------- /supla-client/src/ini.h: -------------------------------------------------------------------------------- 1 | ../../supla-common/ini.h -------------------------------------------------------------------------------- /supla-client/src/lck.c: -------------------------------------------------------------------------------- 1 | ../../supla-common/lck.c -------------------------------------------------------------------------------- /supla-client/src/lck.h: -------------------------------------------------------------------------------- 1 | ../../supla-common/lck.h -------------------------------------------------------------------------------- /supla-client/src/log.c: -------------------------------------------------------------------------------- 1 | ../../supla-common/log.c -------------------------------------------------------------------------------- /supla-client/src/log.h: -------------------------------------------------------------------------------- 1 | ../../supla-common/log.h -------------------------------------------------------------------------------- /supla-client/src/srpc.c: -------------------------------------------------------------------------------- 1 | ../../supla-common/srpc.c -------------------------------------------------------------------------------- /supla-client/src/srpc.h: -------------------------------------------------------------------------------- 1 | ../../supla-common/srpc.h -------------------------------------------------------------------------------- /supla-dev/src/proto.c: -------------------------------------------------------------------------------- 1 | ../../supla-common/proto.c -------------------------------------------------------------------------------- /supla-dev/src/proto.h: -------------------------------------------------------------------------------- 1 | ../../supla-common/proto.h -------------------------------------------------------------------------------- /supla-dev/src/srpc.c: -------------------------------------------------------------------------------- 1 | ../../supla-common/srpc.c -------------------------------------------------------------------------------- /supla-dev/src/srpc.h: -------------------------------------------------------------------------------- 1 | ../../supla-common/srpc.h -------------------------------------------------------------------------------- /supla-dev/src/tools.c: -------------------------------------------------------------------------------- 1 | ../../supla-common/tools.c -------------------------------------------------------------------------------- /supla-dev/src/tools.h: -------------------------------------------------------------------------------- 1 | ../../supla-common/tools.h -------------------------------------------------------------------------------- /supla-scheduler/Debug/src/.gitignore: -------------------------------------------------------------------------------- 1 | /json/ 2 | -------------------------------------------------------------------------------- /supla-scheduler/Test/src/.gitignore: -------------------------------------------------------------------------------- 1 | /json/ 2 | -------------------------------------------------------------------------------- /supla-scheduler/src/eh.c: -------------------------------------------------------------------------------- 1 | ../../supla-common/eh.c -------------------------------------------------------------------------------- /supla-scheduler/src/eh.h: -------------------------------------------------------------------------------- 1 | ../../supla-common/eh.h -------------------------------------------------------------------------------- /supla-scheduler/src/json: -------------------------------------------------------------------------------- 1 | ../../supla-common/json -------------------------------------------------------------------------------- /supla-server/src/cfg.c: -------------------------------------------------------------------------------- 1 | ../../supla-common/cfg.c -------------------------------------------------------------------------------- /supla-server/src/cfg.h: -------------------------------------------------------------------------------- 1 | ../../supla-common/cfg.h -------------------------------------------------------------------------------- /supla-server/src/eh.c: -------------------------------------------------------------------------------- 1 | ../../supla-common/eh.c -------------------------------------------------------------------------------- /supla-server/src/eh.h: -------------------------------------------------------------------------------- 1 | ../../supla-common/eh.h -------------------------------------------------------------------------------- /supla-server/src/ini.c: -------------------------------------------------------------------------------- 1 | ../../supla-common/ini.c -------------------------------------------------------------------------------- /supla-server/src/ini.h: -------------------------------------------------------------------------------- 1 | ../../supla-common/ini.h -------------------------------------------------------------------------------- /supla-server/src/json: -------------------------------------------------------------------------------- 1 | ../../supla-common/json -------------------------------------------------------------------------------- /supla-server/src/lck.c: -------------------------------------------------------------------------------- 1 | ../../supla-common/lck.c -------------------------------------------------------------------------------- /supla-server/src/lck.h: -------------------------------------------------------------------------------- 1 | ../../supla-common/lck.h -------------------------------------------------------------------------------- /supla-server/src/log.c: -------------------------------------------------------------------------------- 1 | ../../supla-common/log.c -------------------------------------------------------------------------------- /supla-server/src/log.h: -------------------------------------------------------------------------------- 1 | ../../supla-common/log.h -------------------------------------------------------------------------------- /supla-client/src/proto.c: -------------------------------------------------------------------------------- 1 | ../../supla-common/proto.c -------------------------------------------------------------------------------- /supla-client/src/proto.h: -------------------------------------------------------------------------------- 1 | ../../supla-common/proto.h -------------------------------------------------------------------------------- /supla-client/src/tools.c: -------------------------------------------------------------------------------- 1 | ../../supla-common/tools.c -------------------------------------------------------------------------------- /supla-client/src/tools.h: -------------------------------------------------------------------------------- 1 | ../../supla-common/tools.h -------------------------------------------------------------------------------- /supla-dev/Release/var/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore -------------------------------------------------------------------------------- /supla-dev/src/sthread.c: -------------------------------------------------------------------------------- 1 | ../../supla-common/sthread.c -------------------------------------------------------------------------------- /supla-dev/src/sthread.h: -------------------------------------------------------------------------------- 1 | ../../supla-common/sthread.h -------------------------------------------------------------------------------- /supla-scheduler/Release/src/.gitignore: -------------------------------------------------------------------------------- 1 | /json/ 2 | -------------------------------------------------------------------------------- /supla-scheduler/src/cfg.c: -------------------------------------------------------------------------------- 1 | ../../supla-common/cfg.c -------------------------------------------------------------------------------- /supla-scheduler/src/cfg.h: -------------------------------------------------------------------------------- 1 | ../../supla-common/cfg.h -------------------------------------------------------------------------------- /supla-scheduler/src/ini.c: -------------------------------------------------------------------------------- 1 | ../../supla-common/ini.c -------------------------------------------------------------------------------- /supla-scheduler/src/ini.h: -------------------------------------------------------------------------------- 1 | ../../supla-common/ini.h -------------------------------------------------------------------------------- /supla-scheduler/src/lck.c: -------------------------------------------------------------------------------- 1 | ../../supla-common/lck.c -------------------------------------------------------------------------------- /supla-scheduler/src/lck.h: -------------------------------------------------------------------------------- 1 | ../../supla-common/lck.h -------------------------------------------------------------------------------- /supla-scheduler/src/log.c: -------------------------------------------------------------------------------- 1 | ../../supla-common/log.c -------------------------------------------------------------------------------- /supla-scheduler/src/log.h: -------------------------------------------------------------------------------- 1 | ../../supla-common/log.h -------------------------------------------------------------------------------- /supla-scheduler/src/proto.h: -------------------------------------------------------------------------------- 1 | ../../supla-common/proto.h -------------------------------------------------------------------------------- /supla-scheduler/src/tools.c: -------------------------------------------------------------------------------- 1 | ../../supla-common/tools.c -------------------------------------------------------------------------------- /supla-scheduler/src/tools.h: -------------------------------------------------------------------------------- 1 | ../../supla-common/tools.h -------------------------------------------------------------------------------- /supla-server/src/proto.c: -------------------------------------------------------------------------------- 1 | ../../supla-common/proto.c -------------------------------------------------------------------------------- /supla-server/src/proto.h: -------------------------------------------------------------------------------- 1 | ../../supla-common/proto.h -------------------------------------------------------------------------------- /supla-server/src/tools.c: -------------------------------------------------------------------------------- 1 | ../../supla-common/tools.c -------------------------------------------------------------------------------- /supla-server/src/tools.h: -------------------------------------------------------------------------------- 1 | ../../supla-common/tools.h -------------------------------------------------------------------------------- /supla-client/src/safearray.c: -------------------------------------------------------------------------------- 1 | ../../supla-common/safearray.c -------------------------------------------------------------------------------- /supla-client/src/safearray.h: -------------------------------------------------------------------------------- 1 | ../../supla-common/safearray.h -------------------------------------------------------------------------------- /supla-client/src/sthread.c: -------------------------------------------------------------------------------- 1 | ../../supla-common/sthread.c -------------------------------------------------------------------------------- /supla-client/src/sthread.h: -------------------------------------------------------------------------------- 1 | ../../supla-common/sthread.h -------------------------------------------------------------------------------- /supla-dev/src/ipcsocket.c: -------------------------------------------------------------------------------- 1 | ../../supla-common/ipcsocket.c -------------------------------------------------------------------------------- /supla-dev/src/ipcsocket.h: -------------------------------------------------------------------------------- 1 | ../../supla-common/ipcsocket.h -------------------------------------------------------------------------------- /supla-dev/src/safearray.c: -------------------------------------------------------------------------------- 1 | ../../supla-common/safearray.c -------------------------------------------------------------------------------- /supla-dev/src/safearray.h: -------------------------------------------------------------------------------- 1 | ../../supla-common/safearray.h -------------------------------------------------------------------------------- /supla-scheduler/Test/src/test/.gitignore: -------------------------------------------------------------------------------- 1 | /doubles/ 2 | -------------------------------------------------------------------------------- /supla-scheduler/src/sthread.c: -------------------------------------------------------------------------------- 1 | ../../supla-common/sthread.c -------------------------------------------------------------------------------- /supla-scheduler/src/sthread.h: -------------------------------------------------------------------------------- 1 | ../../supla-common/sthread.h -------------------------------------------------------------------------------- /supla-server/Test/src/client/.gitignore: -------------------------------------------------------------------------------- 1 | /call_handler/ 2 | -------------------------------------------------------------------------------- /supla-server/src/safearray.c: -------------------------------------------------------------------------------- 1 | ../../supla-common/safearray.c -------------------------------------------------------------------------------- /supla-server/src/safearray.h: -------------------------------------------------------------------------------- 1 | ../../supla-common/safearray.h -------------------------------------------------------------------------------- /supla-server/src/srpc/srpc.c: -------------------------------------------------------------------------------- 1 | ../../../supla-common/srpc.c -------------------------------------------------------------------------------- /supla-server/src/srpc/srpc.h: -------------------------------------------------------------------------------- 1 | ../../../supla-common/srpc.h -------------------------------------------------------------------------------- /supla-server/src/sthread.c: -------------------------------------------------------------------------------- 1 | ../../supla-common/sthread.c -------------------------------------------------------------------------------- /supla-server/src/sthread.h: -------------------------------------------------------------------------------- 1 | ../../supla-common/sthread.h -------------------------------------------------------------------------------- /supla-client/makefile.init: -------------------------------------------------------------------------------- 1 | ifndef GCC 2 | GCC=gcc 3 | endif 4 | -------------------------------------------------------------------------------- /supla-dev/src/supla-socket.c: -------------------------------------------------------------------------------- 1 | ../../supla-common/supla-socket.c -------------------------------------------------------------------------------- /supla-dev/src/supla-socket.h: -------------------------------------------------------------------------------- 1 | ../../supla-common/supla-socket.h -------------------------------------------------------------------------------- /supla-scheduler/src/dbcommon.cpp: -------------------------------------------------------------------------------- 1 | ../../supla-common/dbcommon.cpp -------------------------------------------------------------------------------- /supla-scheduler/src/dbcommon.h: -------------------------------------------------------------------------------- 1 | ../../supla-common/dbcommon.h -------------------------------------------------------------------------------- /supla-scheduler/src/safearray.c: -------------------------------------------------------------------------------- 1 | ../../supla-common/safearray.c -------------------------------------------------------------------------------- /supla-scheduler/src/safearray.h: -------------------------------------------------------------------------------- 1 | ../../supla-common/safearray.h -------------------------------------------------------------------------------- /supla-server/Debug/src/client/.gitignore: -------------------------------------------------------------------------------- 1 | /call_handler/ 2 | -------------------------------------------------------------------------------- /supla-server/src/db/dbcommon.h: -------------------------------------------------------------------------------- 1 | ../../../supla-common/dbcommon.h -------------------------------------------------------------------------------- /sql/DeleteOAuthClients.sql: -------------------------------------------------------------------------------- 1 | DELETE FROM `supla_oauth_clients` 2 | -------------------------------------------------------------------------------- /supla-client/src/supla-socket.c: -------------------------------------------------------------------------------- 1 | ../../supla-common/supla-socket.c -------------------------------------------------------------------------------- /supla-client/src/supla-socket.h: -------------------------------------------------------------------------------- 1 | ../../supla-common/supla-socket.h -------------------------------------------------------------------------------- /supla-server/src/db/dbcommon.cpp: -------------------------------------------------------------------------------- 1 | ../../../supla-common/dbcommon.cpp -------------------------------------------------------------------------------- /supla-server/src/ipc/ipcsocket.c: -------------------------------------------------------------------------------- 1 | ../../../supla-common/ipcsocket.c -------------------------------------------------------------------------------- /supla-server/src/ipc/ipcsocket.h: -------------------------------------------------------------------------------- 1 | ../../../supla-common/ipcsocket.h -------------------------------------------------------------------------------- /supla-server/src/proto_check.cpp: -------------------------------------------------------------------------------- 1 | ../../supla-common/proto_check.cpp -------------------------------------------------------------------------------- /supla-server/src/supla-socket.c: -------------------------------------------------------------------------------- 1 | ../../supla-common/supla-socket.c -------------------------------------------------------------------------------- /supla-server/src/supla-socket.h: -------------------------------------------------------------------------------- 1 | ../../supla-common/supla-socket.h -------------------------------------------------------------------------------- /supla-console-client/src/supla-client-lib/eh.c: -------------------------------------------------------------------------------- 1 | ../../../supla-common/eh.c -------------------------------------------------------------------------------- /supla-console-client/src/supla-client-lib/eh.h: -------------------------------------------------------------------------------- 1 | ../../../supla-common/eh.h -------------------------------------------------------------------------------- /supla-server/src/test/ProtoTest.h: -------------------------------------------------------------------------------- 1 | ../../../supla-common/test/ProtoTest.h -------------------------------------------------------------------------------- /supla-server/src/test/SrpcTest.cpp: -------------------------------------------------------------------------------- 1 | ../../../supla-common/test/SrpcTest.cpp -------------------------------------------------------------------------------- /supla-server/src/test/SrpcTest.h: -------------------------------------------------------------------------------- 1 | ../../../supla-common/test/SrpcTest.h -------------------------------------------------------------------------------- /supla-server/src/test/ToolsTest.h: -------------------------------------------------------------------------------- 1 | ../../../supla-common/test/ToolsTest.h -------------------------------------------------------------------------------- /extras/docker/build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | docker build -t "devel/supla-core" . 3 | -------------------------------------------------------------------------------- /sql/DeleteOAuthAccessTokens.sql: -------------------------------------------------------------------------------- 1 | DELETE FROM supla_oauth_access_tokens; 2 | -------------------------------------------------------------------------------- /sql/DeleteVbt22.sql: -------------------------------------------------------------------------------- 1 | DELETE FROM supla_value_based_trigger WHERE id = 22; 2 | -------------------------------------------------------------------------------- /sql/DisableClient4.sql: -------------------------------------------------------------------------------- 1 | UPDATE `supla_client` SET enabled = 0 WHERE id = 4; 2 | -------------------------------------------------------------------------------- /sql/DisableScenes3.sql: -------------------------------------------------------------------------------- 1 | UPDATE supla_scene SET enabled = 0 WHERE id = 3; 2 | -------------------------------------------------------------------------------- /supla-console-client/src/supla-client-lib/cfg.c: -------------------------------------------------------------------------------- 1 | ../../../supla-common/cfg.c -------------------------------------------------------------------------------- /supla-console-client/src/supla-client-lib/cfg.h: -------------------------------------------------------------------------------- 1 | ../../../supla-common/cfg.h -------------------------------------------------------------------------------- /supla-console-client/src/supla-client-lib/ini.c: -------------------------------------------------------------------------------- 1 | ../../../supla-common/ini.c -------------------------------------------------------------------------------- /supla-console-client/src/supla-client-lib/ini.h: -------------------------------------------------------------------------------- 1 | ../../../supla-common/ini.h -------------------------------------------------------------------------------- /supla-console-client/src/supla-client-lib/lck.c: -------------------------------------------------------------------------------- 1 | ../../../supla-common/lck.c -------------------------------------------------------------------------------- /supla-console-client/src/supla-client-lib/lck.h: -------------------------------------------------------------------------------- 1 | ../../../supla-common/lck.h -------------------------------------------------------------------------------- /supla-console-client/src/supla-client-lib/log.c: -------------------------------------------------------------------------------- 1 | ../../../supla-common/log.c -------------------------------------------------------------------------------- /supla-console-client/src/supla-client-lib/log.h: -------------------------------------------------------------------------------- 1 | ../../../supla-common/log.h -------------------------------------------------------------------------------- /supla-console-client/src/supla-client-lib/proto.c: -------------------------------------------------------------------------------- 1 | ../../../supla-common/proto.c -------------------------------------------------------------------------------- /supla-console-client/src/supla-client-lib/proto.h: -------------------------------------------------------------------------------- 1 | ../../../supla-common/proto.h -------------------------------------------------------------------------------- /supla-console-client/src/supla-client-lib/srpc.c: -------------------------------------------------------------------------------- 1 | ../../../supla-common/srpc.c -------------------------------------------------------------------------------- /supla-console-client/src/supla-client-lib/srpc.h: -------------------------------------------------------------------------------- 1 | ../../../supla-common/srpc.h -------------------------------------------------------------------------------- /supla-console-client/src/supla-client-lib/tools.c: -------------------------------------------------------------------------------- 1 | ../../../supla-common/tools.c -------------------------------------------------------------------------------- /supla-console-client/src/supla-client-lib/tools.h: -------------------------------------------------------------------------------- 1 | ../../../supla-common/tools.h -------------------------------------------------------------------------------- /supla-dev/.gitignore: -------------------------------------------------------------------------------- 1 | Debug/supla-dev 2 | Release/supla-dev 3 | supla.cfg 4 | -------------------------------------------------------------------------------- /supla-server/src/test/ProtoTest.cpp: -------------------------------------------------------------------------------- 1 | ../../../supla-common/test/ProtoTest.cpp -------------------------------------------------------------------------------- /supla-server/src/test/ToolsTest.cpp: -------------------------------------------------------------------------------- 1 | ../../../supla-common/test/ToolsTest.cpp -------------------------------------------------------------------------------- /sql/DisableAccessId2.sql: -------------------------------------------------------------------------------- 1 | UPDATE supla_accessid SET enabled = 0 WHERE id = 2; 2 | -------------------------------------------------------------------------------- /sql/HideAllScenesExceptOne.sql: -------------------------------------------------------------------------------- 1 | UPDATE supla_scene SET hidden = 1 WHERE id != 2; 2 | -------------------------------------------------------------------------------- /supla-client/Android/.gitignore: -------------------------------------------------------------------------------- 1 | /.DS_Store 2 | libs 3 | obj 4 | symbols.zip 5 | -------------------------------------------------------------------------------- /supla-console-client/src/supla-client-lib/sthread.c: -------------------------------------------------------------------------------- 1 | ../../../supla-common/sthread.c -------------------------------------------------------------------------------- /supla-console-client/src/supla-client-lib/sthread.h: -------------------------------------------------------------------------------- 1 | ../../../supla-common/sthread.h -------------------------------------------------------------------------------- /supla-dev/makefile.init: -------------------------------------------------------------------------------- 1 | ifndef SSLDIR 2 | SSLDIR=/usr/src/openssl 3 | endif 4 | -------------------------------------------------------------------------------- /supla-server/Test/src/device/.gitignore: -------------------------------------------------------------------------------- 1 | /call_handler/ 2 | /extended_value/ 3 | -------------------------------------------------------------------------------- /supla-server/src/test/SafeArrayTest.cpp: -------------------------------------------------------------------------------- 1 | ../../../supla-common/test/SafeArrayTest.cpp -------------------------------------------------------------------------------- /supla-server/src/test/SafeArrayTest.h: -------------------------------------------------------------------------------- 1 | ../../../supla-common/test/SafeArrayTest.h -------------------------------------------------------------------------------- /sql/DisableAllScenesExceptOne.sql: -------------------------------------------------------------------------------- 1 | UPDATE supla_scene SET enabled = 0 WHERE id != 3; 2 | -------------------------------------------------------------------------------- /supla-afl/makefile.init: -------------------------------------------------------------------------------- 1 | ifndef AFL_PATH 2 | AFL_PATH=/usr/src/afl 3 | endif 4 | 5 | -------------------------------------------------------------------------------- /supla-console-client/src/supla-client-lib/safearray.c: -------------------------------------------------------------------------------- 1 | ../../../supla-common/safearray.c -------------------------------------------------------------------------------- /supla-console-client/src/supla-client-lib/safearray.h: -------------------------------------------------------------------------------- 1 | ../../../supla-common/safearray.h -------------------------------------------------------------------------------- /supla-server/src/test/integration/MySqlShell.h: -------------------------------------------------------------------------------- 1 | ../../../../supla-common/test/MySqlShell.h -------------------------------------------------------------------------------- /tools/cpu-profile2pdf.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | google-pprof --pdf $1 $1.prof > $1.pdf 4 | -------------------------------------------------------------------------------- /sql/DeleteVbt31and32.sql: -------------------------------------------------------------------------------- 1 | DELETE FROM supla_value_based_trigger WHERE id = 31 OR id = 32; 2 | -------------------------------------------------------------------------------- /sql/DisableMqttForUser48.sql: -------------------------------------------------------------------------------- 1 | UPDATE supla_user SET mqtt_broker_enabled = 0 WHERE id = 48; 2 | -------------------------------------------------------------------------------- /sql/EnableMqttForUser48.sql: -------------------------------------------------------------------------------- 1 | UPDATE supla_user SET mqtt_broker_enabled = 1 WHERE id = 48; 2 | -------------------------------------------------------------------------------- /supla-client/Android/libs/x86/.gitignore: -------------------------------------------------------------------------------- 1 | /gdb.setup 2 | /gdbserver 3 | /libsuplaclient.so 4 | -------------------------------------------------------------------------------- /supla-console-client/src/supla-client-lib/supla-socket.c: -------------------------------------------------------------------------------- 1 | ../../../supla-common/supla-socket.c -------------------------------------------------------------------------------- /supla-console-client/src/supla-client-lib/supla-socket.h: -------------------------------------------------------------------------------- 1 | ../../../supla-common/supla-socket.h -------------------------------------------------------------------------------- /supla-server/Debug/src/device/.gitignore: -------------------------------------------------------------------------------- 1 | /call_handler/ 2 | /value/ 3 | /extended_value/ 4 | -------------------------------------------------------------------------------- /supla-server/src/test/integration/MySqlShell.cpp: -------------------------------------------------------------------------------- 1 | ../../../../supla-common/test/MySqlShell.cpp -------------------------------------------------------------------------------- /sql/ChangeLocationForSceneWithId2.sql: -------------------------------------------------------------------------------- 1 | UPDATE `supla_scene` SET location_id = 3 WHERE id = 2; 2 | -------------------------------------------------------------------------------- /sql/DisableMqttForUser2645.sql: -------------------------------------------------------------------------------- 1 | UPDATE supla_user SET mqtt_broker_enabled = 0 WHERE id = 2645; 2 | -------------------------------------------------------------------------------- /sql/EnableMqttForUser2645.sql: -------------------------------------------------------------------------------- 1 | UPDATE supla_user SET mqtt_broker_enabled = 1 WHERE id = 2645; 2 | -------------------------------------------------------------------------------- /sql/SetAltIconForEnabledScenes.sql: -------------------------------------------------------------------------------- 1 | UPDATE supla_scene SET alt_icon = id + 1 WHERE enabled = 1; 2 | -------------------------------------------------------------------------------- /sql/SetFunctionToNoneForChannel966.sql: -------------------------------------------------------------------------------- 1 | UPDATE supla_dev_channel SET func = 0 WHERE id = 966; 2 | -------------------------------------------------------------------------------- /sql/SetPushNotificationToken.sql: -------------------------------------------------------------------------------- 1 | UPDATE supla_client SET push_token = 'abcd' WHERE id = 24 2 | -------------------------------------------------------------------------------- /sql/SetStateWebhookDisabled.sql: -------------------------------------------------------------------------------- 1 | UPDATE supla_state_webhooks SET enabled = 0 WHERE user_id = 2; 2 | -------------------------------------------------------------------------------- /supla-client/Android/libs/armeabi/.gitignore: -------------------------------------------------------------------------------- 1 | /gdb.setup 2 | /gdbserver 3 | /libsuplaclient.so 4 | -------------------------------------------------------------------------------- /supla-console-client/src/supla-client-lib/supla-client.c: -------------------------------------------------------------------------------- 1 | ../../../supla-client/src/supla-client.c -------------------------------------------------------------------------------- /supla-console-client/src/supla-client-lib/supla-client.h: -------------------------------------------------------------------------------- 1 | ../../../supla-client/src/supla-client.h -------------------------------------------------------------------------------- /supla-console-client/src/test/integration/MySqlShell.h: -------------------------------------------------------------------------------- 1 | ../../../../supla-common/test/MySqlShell.h -------------------------------------------------------------------------------- /sql/ChangePnLimits.sql: -------------------------------------------------------------------------------- 1 | UPDATE supla_user SET limit_push_notifications_per_hour = 5 WHERE id = 2; 2 | -------------------------------------------------------------------------------- /sql/ExpireOAuthTokens.sql: -------------------------------------------------------------------------------- 1 | UPDATE supla_oauth_access_tokens SET expires_at = UNIX_TIMESTAMP() - 1; 2 | -------------------------------------------------------------------------------- /sql/RemoveTestClient.sql: -------------------------------------------------------------------------------- 1 | DELETE FROM supla_client WHERE id = 1 AND name = 'Console Test Client'; 2 | -------------------------------------------------------------------------------- /supla-afl/Debug/supla-afl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SUPLA/supla-core/HEAD/supla-afl/Debug/supla-afl -------------------------------------------------------------------------------- /supla-client/Android/libs/armeabi-v7a/.gitignore: -------------------------------------------------------------------------------- 1 | /gdb.setup 2 | /gdbserver 3 | /libsuplaclient.so 4 | -------------------------------------------------------------------------------- /supla-console-client/src/supla-client-lib/suplasinglecall.h: -------------------------------------------------------------------------------- 1 | ../../../supla-client/src/suplasinglecall.h -------------------------------------------------------------------------------- /supla-console-client/src/test/integration/MySqlShell.cpp: -------------------------------------------------------------------------------- 1 | ../../../../supla-common/test/MySqlShell.cpp -------------------------------------------------------------------------------- /sql/DeleteSceneOperaionsWithChannelId303.sql: -------------------------------------------------------------------------------- 1 | DELETE FROM supla_scene_operation WHERE channel_id = 303; 2 | -------------------------------------------------------------------------------- /sql/SetAnInactiveTimeForAccessId2.sql: -------------------------------------------------------------------------------- 1 | UPDATE supla_accessid SET active_hours = ',800,' WHERE id = 2; 2 | -------------------------------------------------------------------------------- /sql/SetClientLimitToOne.sql: -------------------------------------------------------------------------------- 1 | UPDATE `supla_user` SET limit_client = 1 WHERE email = 'test@supla.org'; 2 | -------------------------------------------------------------------------------- /supla-console-client/src/supla-client-lib/suplasinglecall.cpp: -------------------------------------------------------------------------------- 1 | ../../../supla-client/src/suplasinglecall.cpp -------------------------------------------------------------------------------- /sql/DisableTwoValueBasedTriggers.sql: -------------------------------------------------------------------------------- 1 | UPDATE supla_value_based_trigger SET enabled = 0 WHERE id = 22 OR id = 31; -------------------------------------------------------------------------------- /sql/DisableTestClient.sql: -------------------------------------------------------------------------------- 1 | UPDATE `supla_client` SET enabled = 0 WHERE id = 1 AND name = 'Console Test Client'; 2 | -------------------------------------------------------------------------------- /sql/EnableTwoValueBasedTriggers.sql: -------------------------------------------------------------------------------- 1 | UPDATE supla_value_based_trigger SET enabled = 1 WHERE id = 22 OR id = 31; 2 | -------------------------------------------------------------------------------- /sql/SetLastAccessDate.sql: -------------------------------------------------------------------------------- 1 | UPDATE supla_client SET last_access_date = DATE_ADD(UTC_TIMESTAMP(), INTERVAL -2 MONTH); 2 | -------------------------------------------------------------------------------- /supla-dev/Debug/src/connection.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SUPLA/supla-core/HEAD/supla-dev/Debug/src/connection.o -------------------------------------------------------------------------------- /tools/valgrind-noundef.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | valgrind --tool=memcheck --leak-check=full --undef-value-errors=no $1 4 | -------------------------------------------------------------------------------- /sql/ModifyValueBasedTrigger.sql: -------------------------------------------------------------------------------- 1 | UPDATE supla_value_based_trigger SET action_param = '{"percentage":46}' WHERE id = 21; 2 | -------------------------------------------------------------------------------- /sql/SetPushUpdateTime.sql: -------------------------------------------------------------------------------- 1 | UPDATE supla_client SET push_token_update_time = DATE_ADD(UTC_TIMESTAMP(), INTERVAL -2 MONTH); 2 | -------------------------------------------------------------------------------- /supla-dev/Debug/src/connection.d: -------------------------------------------------------------------------------- 1 | src/connection.d: ../src/connection.c ../src/connection.h 2 | 3 | ../src/connection.h: 4 | -------------------------------------------------------------------------------- /sql/DisableClientRegistrationForTestUser.sql: -------------------------------------------------------------------------------- 1 | UPDATE `supla_user` SET client_reg_enabled = NULL WHERE email = 'test@supla.org'; 2 | -------------------------------------------------------------------------------- /sql/PushNotificationFillNulls.sql: -------------------------------------------------------------------------------- 1 | UPDATE supla_push_notification SET title = 'titleee', body = 'bbody', sound = 155 WHERE id = 5; 2 | -------------------------------------------------------------------------------- /supla-console-client/Debug/ssocket_read.raw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SUPLA/supla-core/HEAD/supla-console-client/Debug/ssocket_read.raw -------------------------------------------------------------------------------- /tools/valgrind-full.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | valgrind --tool=memcheck --leak-check=full --show-leak-kinds=all --track-origins=yes $1 4 | -------------------------------------------------------------------------------- /CPPLINT.cfg: -------------------------------------------------------------------------------- 1 | filter=-build/include_subdir,-build/header_guard,-readability/casting,-runtime/int,-build/include_order,-readability/fn_size 2 | -------------------------------------------------------------------------------- /sql/AddSceneOperationWithPushNotification.sql: -------------------------------------------------------------------------------- 1 | INSERT INTO `supla_scene_operation` VALUES (NULL,1,NULL,NULL,NULL,220,NULL,0,0,0,NULL,5); 2 | -------------------------------------------------------------------------------- /sql/DeleteVbtFirst.sql: -------------------------------------------------------------------------------- 1 | DELETE FROM supla_value_based_trigger WHERE id IN (select MIN(id) from supla_value_based_trigger WHERE user_id = 2); 2 | -------------------------------------------------------------------------------- /sql/DeleteVbtLast.sql: -------------------------------------------------------------------------------- 1 | DELETE FROM supla_value_based_trigger WHERE id IN (select MAX(id) from supla_value_based_trigger WHERE user_id = 2); 2 | -------------------------------------------------------------------------------- /supla-console-client/Debug/src/supla-client-lib/suplaclient.d: -------------------------------------------------------------------------------- 1 | src/supla-client-lib/suplaclient.d: ../src/supla-client-lib/suplaclient.c 2 | -------------------------------------------------------------------------------- /supla-server/.gitignore: -------------------------------------------------------------------------------- 1 | Test/supla-server 2 | Debug/supla-server 3 | Release/supla-server 4 | Release-MariaDB/supla-server 5 | /Debug-Asan/ 6 | -------------------------------------------------------------------------------- /sql/EnableClientRegistrationForTestUser.sql: -------------------------------------------------------------------------------- 1 | UPDATE `supla_user` SET client_reg_enabled = NOW() + INTERVAL 1 DAY WHERE email = 'test@supla.org'; 2 | -------------------------------------------------------------------------------- /supla-console-client/.gitignore: -------------------------------------------------------------------------------- 1 | Debug/supla-console-client 2 | Release/supla-console-client 3 | Test/supla-console-client 4 | vg-test.log 5 | /Test/ 6 | -------------------------------------------------------------------------------- /supla-client/Android/jni/Application.mk: -------------------------------------------------------------------------------- 1 | APP_PLATFORM := ${APP_PLATFORM} 2 | APP_ABI := ${APP_ABI} 3 | APP_CPPFLAGS := -Wall 4 | APP_STL := c++_shared 5 | -------------------------------------------------------------------------------- /supla-scheduler/.gitignore: -------------------------------------------------------------------------------- 1 | Debug/supla-scheduler 2 | Test/supla-scheduler 3 | Release/supla-scheduler 4 | Release-MariaDB/supla-scheduler 5 | /Debug-Asan/ 6 | -------------------------------------------------------------------------------- /extras/docker/cpplint.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | PROJ=~/CProjects 4 | /usr/local/bin/docker run -v "$PROJ":"$PROJ" devel/supla-core python /usr/local/bin/cpplint $@ 5 | -------------------------------------------------------------------------------- /supla-console-client/makefile.init: -------------------------------------------------------------------------------- 1 | ifndef SSLDIR 2 | SSLDIR=/usr/src/openssl 3 | endif 4 | 5 | ifndef SSOCKET_WRITE_TO_FILE 6 | SSOCKET_WRITE_TO_FILE=0 7 | endif 8 | -------------------------------------------------------------------------------- /sql/RecreateTestDatabase.sql: -------------------------------------------------------------------------------- 1 | DROP DATABASE IF EXISTS `supla_test`; 2 | CREATE DATABASE IF NOT EXISTS `supla_test` DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci; 3 | -------------------------------------------------------------------------------- /extras/docker/clang-format.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | PROJ=~/CProjects 4 | cat /dev/stdin | /usr/local/bin/docker run -i -v "$PROJ":"$PROJ" devel/supla-core /usr/bin/clang-format-4.0 $@ 5 | -------------------------------------------------------------------------------- /sql/CreatePushForChannelId303.sql: -------------------------------------------------------------------------------- 1 | INSERT INTO supla_push_notification(id, user_id, channel_id, iodevice_id, managed_by_device, title, body, sound) VALUES(50, 2, 303, 144, 0, 'Abcd', 'Efgh', 11); 2 | -------------------------------------------------------------------------------- /test/all-tests.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | 5 | [ -d ./test ] && cd ./test 6 | 7 | ./supla-server-test.sh 8 | ./supla-scheduler-test.sh 9 | ./supla-dev-test.sh 10 | ./supla-console-client-test.sh 11 | -------------------------------------------------------------------------------- /sql/SetVbtActivityConditions.sql: -------------------------------------------------------------------------------- 1 | UPDATE supla_value_based_trigger SET active_from = '2023-08-20 17:16:44', active_to = '2023-08-21 14:00:54', active_hours = ',14,', activity_conditions = '[[{"afterSunset": 15}]]' WHERE id = 20; 2 | -------------------------------------------------------------------------------- /tools/cpu-profile.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # CPUPROFILESIGNAL=12 4 | # https://gperftools.github.io/gperftools/cpuprofile.html 5 | LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libprofiler.so CPUPROFILE=$1.prof CPUPROFILE_FREQUENCY=100000 $1 6 | -------------------------------------------------------------------------------- /test/supla-dev-compilation-check.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -e 4 | 5 | [ -d ../test ] && cd ../ 6 | 7 | cd supla-dev/Release 8 | make clean && make -j8 9 | cd ../Debug 10 | make clean && make -j8 11 | 12 | echo OK 13 | exit 0 14 | -------------------------------------------------------------------------------- /test/supla-scheduler-test.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -e 4 | 5 | [ -d ../test ] && cd ../ 6 | . ./test/common 7 | 8 | cd supla-scheduler/Test 9 | make clean && make all 10 | 11 | vg_verify "./supla-scheduler" 12 | 13 | echo OK 14 | exit 0 15 | -------------------------------------------------------------------------------- /sql/SetUserIconForSceneWithId2.sql: -------------------------------------------------------------------------------- 1 | INSERT INTO `supla_user_icons` (`id`, `user_id`, `func`, `image1`, `image2`, `image3`, `image4`) VALUES 2 | (26, 2, 40, 0x89504e470d0a, NULL, NULL, NULL); 3 | 4 | UPDATE `supla_scene` SET user_icon_id = 26 WHERE id = 2; 5 | -------------------------------------------------------------------------------- /test/supla-server-compilation-check.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -e 4 | 5 | [ -d ../test ] && cd ../ 6 | 7 | cd supla-server/Release 8 | make clean && make -j8 all 9 | cd ../Debug 10 | make clean && make -j8 all 11 | 12 | echo OK 13 | exit 0 14 | -------------------------------------------------------------------------------- /sql/CreateSqlUsersForTestPurposes.sql: -------------------------------------------------------------------------------- 1 | CREATE USER IF NOT EXISTS 'supla'@'localhost'; 2 | CREATE USER IF NOT EXISTS 'supla'@'%'; 3 | 4 | GRANT ALL PRIVILEGES ON *.* TO 'supla'@'localhost'; 5 | GRANT ALL PRIVILEGES ON *.* TO 'supla'@'%'; 6 | 7 | FLUSH PRIVILEGES; 8 | -------------------------------------------------------------------------------- /sql/SetChannelProperties.sql: -------------------------------------------------------------------------------- 1 | UPDATE supla_dev_channel SET properties = '{"countersAvailable":["forwardActiveEnergy","reverseActiveEnergy","forwardReactiveEnergy","reverseReactiveEnergy","forwardActiveEnergyBalanced","reverseActiveEnergyBalanced"]}' WHERE id = 144; 2 | -------------------------------------------------------------------------------- /sql/SetDeviceJsonConfig.sql: -------------------------------------------------------------------------------- 1 | UPDATE supla_iodevice SET user_config = '{"a": 1, "b": "abcd", "c": true, "screenBrightness": 98, "buttonVolume": 15}', properties = '{"1":2,"homeScreenContentAvailable":["NONE","TEMPERATURE","MAIN_AND_AUX_TEMPERATURE"]}' WHERE id = 73; 2 | -------------------------------------------------------------------------------- /sql/SetSceneEstimatedExecutionTimeAndPeriod.sql: -------------------------------------------------------------------------------- 1 | UPDATE supla_scene SET estimated_execution_time = 123456, active_from = '2023-08-20 17:16:44', active_to = '2023-08-21 14:00:54', active_hours = ',14,', activity_conditions = '[[{"afterSunset": 15}]]' WHERE id = 3; 2 | -------------------------------------------------------------------------------- /test/supla-console-client-compilation-check.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -e 4 | 5 | [ -d ../test ] && cd ../ 6 | 7 | cd supla-console-client/Debug 8 | make clean && make -j8 9 | cd ../Release 10 | make clean && make -j8 11 | 12 | echo OK 13 | exit 0 14 | -------------------------------------------------------------------------------- /test/supla-scheduler-compilation-check.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -e 4 | 5 | [ -d ../test ] && cd ../ 6 | 7 | cd supla-scheduler/Release 8 | make clean && make -j8 all 9 | cd ../Debug 10 | make clean && make -j8 all 11 | 12 | echo OK 13 | exit 0 14 | 15 | -------------------------------------------------------------------------------- /supla-scheduler/makefile.init: -------------------------------------------------------------------------------- 1 | ifdef MYSQL 2 | LIBMYSQL=mysqlclient 3 | INCMYSQL=/usr/include/mysql 4 | else 5 | LIBMYSQL=mariadbclient 6 | INCMYSQL=/usr/include/mariadb 7 | ifeq (,$(wildcard $(INCMYSQL))) 8 | INCMYSQL=/usr/include/mysql 9 | endif 10 | endif 11 | -------------------------------------------------------------------------------- /sql/InsertExtendedValue.sql: -------------------------------------------------------------------------------- 1 | INSERT INTO `supla_dev_channel_extended_value` (`channel_id`, `update_time`, `type`, `value`, `user_id`) VALUES 2 | (140, '2023-11-19 11:54:40', 40, 0x0000000000000000bb01000008000000c0a8c0f4a020a605d8fb0001b93a0000ff1700006f00000000000000000000000000, 2); 3 | -------------------------------------------------------------------------------- /supla-afl/Debug/objects.mk: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # Automatically-generated file. Do not edit! 3 | ################################################################################ 4 | 5 | USER_OBJS := 6 | 7 | LIBS := 8 | 9 | -------------------------------------------------------------------------------- /supla-client/Debug/objects.mk: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # Automatically-generated file. Do not edit! 3 | ################################################################################ 4 | 5 | USER_OBJS := 6 | 7 | LIBS := 8 | 9 | -------------------------------------------------------------------------------- /supla-client/Release/objects.mk: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # Automatically-generated file. Do not edit! 3 | ################################################################################ 4 | 5 | USER_OBJS := 6 | 7 | LIBS := 8 | 9 | -------------------------------------------------------------------------------- /tools/cppcheck.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | cppcheck --version 4 | cppcheck --inline-suppr --error-exitcode=1 -q -i ./supla-server/src/test ./supla-server/src/* && \ 5 | cppcheck --inline-suppr --error-exitcode=1 -q -i ./supla-scheduler/src/test ./supla-scheduler/src/* && \ 6 | exit 0 7 | 8 | exit 1 9 | -------------------------------------------------------------------------------- /supla-dev/Debug/objects.mk: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # Automatically-generated file. Do not edit! 3 | ################################################################################ 4 | 5 | USER_OBJS := 6 | 7 | LIBS := -lssl -lcrypto 8 | 9 | -------------------------------------------------------------------------------- /supla-dev/Release/objects.mk: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # Automatically-generated file. Do not edit! 3 | ################################################################################ 4 | 5 | USER_OBJS := 6 | 7 | LIBS := -lssl -lcrypto 8 | 9 | -------------------------------------------------------------------------------- /supla-scheduler/Debug/objects.mk: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # Automatically-generated file. Do not edit! 3 | ################################################################################ 4 | 5 | USER_OBJS := 6 | 7 | LIBS := -l$(LIBMYSQL) 8 | 9 | -------------------------------------------------------------------------------- /supla-scheduler/Release/objects.mk: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # Automatically-generated file. Do not edit! 3 | ################################################################################ 4 | 5 | USER_OBJS := 6 | 7 | LIBS := -l$(LIBMYSQL) 8 | 9 | -------------------------------------------------------------------------------- /supla-console-client/Debug/objects.mk: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # Automatically-generated file. Do not edit! 3 | ################################################################################ 4 | 5 | USER_OBJS := 6 | 7 | LIBS := -lcrypto -lssl 8 | 9 | -------------------------------------------------------------------------------- /supla-console-client/Release/objects.mk: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # Automatically-generated file. Do not edit! 3 | ################################################################################ 4 | 5 | USER_OBJS := 6 | 7 | LIBS := -lssl -lcrypto 8 | 9 | -------------------------------------------------------------------------------- /supla-scheduler/Test/objects.mk: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # Automatically-generated file. Do not edit! 3 | ################################################################################ 4 | 5 | USER_OBJS := 6 | 7 | LIBS := -l$(LIBMYSQL) -lgtest 8 | 9 | -------------------------------------------------------------------------------- /sql/CreateVbtForChannelId303.sql: -------------------------------------------------------------------------------- 1 | INSERT INTO supla_value_based_trigger (id, user_id, owning_channel_id, channel_id, channel_group_id, scene_id, schedule_id, push_notification_id, `trigger`, action, action_param, enabled) 2 | VALUES(2000, 2, 140, 303, NULL, NULL, NULL, NULL, '{"on_change_to":{"eq":1}}', 60, NULL, 1) 3 | -------------------------------------------------------------------------------- /supla-console-client/Test/objects.mk: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # Automatically-generated file. Do not edit! 3 | ################################################################################ 4 | 5 | USER_OBJS := 6 | 7 | LIBS := -lcrypto -lgtest -lssl 8 | 9 | -------------------------------------------------------------------------------- /supla-server/Debug/objects.mk: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # Automatically-generated file. Do not edit! 3 | ################################################################################ 4 | 5 | USER_OBJS := 6 | 7 | LIBS := -lssl -l$(LIBMYSQL) -lcrypto 8 | 9 | -------------------------------------------------------------------------------- /supla-server/Release/objects.mk: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # Automatically-generated file. Do not edit! 3 | ################################################################################ 4 | 5 | USER_OBJS := 6 | 7 | LIBS := -lssl -lcrypto -l$(LIBMYSQL) 8 | 9 | -------------------------------------------------------------------------------- /sql/CreateVbtForChannelId303_Owner.sql: -------------------------------------------------------------------------------- 1 | INSERT INTO supla_value_based_trigger (id, user_id, owning_channel_id, channel_id, channel_group_id, scene_id, schedule_id, push_notification_id, `trigger`, action, action_param, enabled) 2 | VALUES(2000, 2, 303, 141, NULL, NULL, NULL, NULL, '{"on_change_to":{"eq":1}}', 60, NULL, 1) 3 | -------------------------------------------------------------------------------- /supla-server/Test/objects.mk: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # Automatically-generated file. Do not edit! 3 | ################################################################################ 4 | 5 | USER_OBJS := 6 | 7 | LIBS := -lssl -lgtest -lgmock -l$(LIBMYSQL) -lcrypto 8 | 9 | -------------------------------------------------------------------------------- /sql/AddGoogleHomeCredentials.sql: -------------------------------------------------------------------------------- 1 | INSERT INTO `supla_google_home` (`id`, `user_id`, `reg_date`, `access_token`) VALUES 2 | (1, 2, '2019-02-07 18:51:33', '11198ab7d5d5fa5db8f53bf03556a4018909b8b5d3ee9628014ef9e62206f7024eedebc279cd21af0dd34dc2766ebe2cdb34056340269a0e13b6a5415f2c18ad86df0c17b48ebd54f6e516011ad937c81c4220887d028a66d8b4316dcc5e57651775629f'); 3 | -------------------------------------------------------------------------------- /supla-server/Test/src/test/.gitignore: -------------------------------------------------------------------------------- 1 | /amazon/ 2 | /integration/ 3 | /webhook/ 4 | /mqtt/ 5 | /asynctask/ 6 | /channeljsonconfig/ 7 | /actions/ 8 | /doubles/ 9 | /http/ 10 | /scene/ 11 | /distributedobjects/ 12 | /client/ 13 | /ipc/ 14 | /conn/ 15 | /device/ 16 | /analyzer/ 17 | /cyclictasks/ 18 | /push/ 19 | /vbt/ 20 | /jsonconfig/ 21 | /srpc/ 22 | -------------------------------------------------------------------------------- /sql/CreateSceneForChannelId303.sql: -------------------------------------------------------------------------------- 1 | INSERT INTO `supla_scene`(`user_id`, `location_id`, `caption`, `enabled`, `user_icon_id`) VALUES (2,2,'',1,NULL); 2 | SET @id = LAST_INSERT_ID(); 3 | INSERT INTO `supla_scene_operation`(`owning_scene_id`, `channel_id`, `channel_group_id`, `scene_id`, `action`, `action_param`, `delay_ms`) VALUES (@id,303,NULL,NULL,0,NULL,0); 4 | -------------------------------------------------------------------------------- /supla-server/Test/src/.gitignore: -------------------------------------------------------------------------------- 1 | /webhook/ 2 | /mqtt/ 3 | /tasks/ 4 | /asynctask/ 5 | /actions/ 6 | /channeljsonconfig/ 7 | /converter/ 8 | /scene/ 9 | /distributedobjects/ 10 | /ipc/ 11 | /srpc/ 12 | /conn/ 13 | /db/ 14 | /datalogger/ 15 | /analyzer/ 16 | /cyclictasks/ 17 | /push/ 18 | /schedule/ 19 | /vbt/ 20 | /jsonconfig/ 21 | /astro/ 22 | /date/ 23 | -------------------------------------------------------------------------------- /sql/AddDeviceManagedPushNotifications.sql: -------------------------------------------------------------------------------- 1 | INSERT INTO supla_push_notification(id, user_id, channel_id, iodevice_id, managed_by_device, title, body, sound) VALUES(15, 2, 157, 83, 1, 'Abcd-1', 'Efgh', 11); 2 | INSERT INTO supla_push_notification(id, user_id, channel_id, iodevice_id, managed_by_device, title, body, sound) VALUES(16, 2, NULL, 83, 1, 'Abcd-2', 'Efgh', 11); 3 | -------------------------------------------------------------------------------- /extras/docker/supla-test.cfg: -------------------------------------------------------------------------------- 1 | [NET] 2 | cert=/etc/supla-server/cert.crt 3 | private_key=/etc/supla-server/private.key 4 | 5 | [MySQL] 6 | host=db 7 | port=3306 8 | database=supla_test 9 | user=supla 10 | 11 | [MQTT-BROKER] 12 | enabled=1 13 | host=192.168.111.30 14 | port=1883 15 | ssl=0 16 | username=supla-server 17 | password=alkdmalsdaskdn 18 | client_id=NunYnx 19 | -------------------------------------------------------------------------------- /sql/CreateChannelGroupWithChannelId303.sql: -------------------------------------------------------------------------------- 1 | INSERT INTO `supla_dev_channel_group`(`user_id`, `caption`, `func`, `hidden`, `location_id`, `alt_icon`, `user_icon_id`) VALUES (2,'',110,0,2,NULL,NULL); 2 | SET @id = LAST_INSERT_ID(); 3 | 4 | INSERT INTO `supla_rel_cg`(`channel_id`, `group_id`) VALUES (173,@id); 5 | INSERT INTO `supla_rel_cg`(`channel_id`, `group_id`) VALUES (303,@id); 6 | -------------------------------------------------------------------------------- /extras/docker/supla.cfg: -------------------------------------------------------------------------------- 1 | [NET] 2 | cert=/etc/supla-server/cert.crt 3 | private_key=/etc/supla-server/private.key 4 | 5 | [MySQL] 6 | host=db 7 | port=3306 8 | database=supla 9 | user=supla 10 | 11 | [MQTT-BROKER] 12 | enabled=1 13 | host=192.168.111.30 14 | port=1883 15 | ssl=0 16 | username=supla-server 17 | password=alkdmalsdaskdn 18 | prefix=%email% 19 | client_id=NunYnx 20 | -------------------------------------------------------------------------------- /supla-server/Debug/src/.gitignore: -------------------------------------------------------------------------------- 1 | /clientchannelgroup/ 2 | /webhook/ 3 | /mqtt/ 4 | /tasks/ 5 | /asynctask/ 6 | /actions/ 7 | /channeljsonconfig/ 8 | /converter/ 9 | /scene/ 10 | /distributedobjects/ 11 | /ipc/ 12 | /srpc/ 13 | /conn/ 14 | /db/ 15 | /datalogger/ 16 | /analyzer/ 17 | /cyclictasks/ 18 | /push/ 19 | /schedule/ 20 | /vbt/ 21 | /jsonconfig/ 22 | /astro/ 23 | /date/ 24 | -------------------------------------------------------------------------------- /sql/CreateScheduleForChannelId303.sql: -------------------------------------------------------------------------------- 1 | INSERT INTO `supla_schedule` (`user_id`, `channel_id`, `mode`, `date_start`, `date_end`, `enabled`, `next_calculation_date`, `caption`, `retry`, `channel_group_id`, `config`, `scene_id`) VALUES 2 | (2, 303, 'minutely', '2021-02-19 07:51:34', NULL, 0, '2021-03-05 02:20:01', NULL, 1, NULL, '[{\"crontab\":\"*/5 * * * *\",\"action\":{\"id\":60,\"param\":null}}]', NULL); 3 | -------------------------------------------------------------------------------- /supla-server/Release/src/.gitignore: -------------------------------------------------------------------------------- 1 | /clientchannelgroup/ 2 | /client/ 3 | /device/ 4 | /webhook/ 5 | /mqtt/ 6 | /tasks/ 7 | /asynctask/ 8 | /actions/ 9 | /channeljsonconfig/ 10 | /converter/ 11 | /scene/ 12 | /distributedobjects/ 13 | /ipc/ 14 | /srpc/ 15 | /conn/ 16 | /db/ 17 | /datalogger/ 18 | /analyzer/ 19 | /cyclictasks/ 20 | /push/ 21 | /schedule/ 22 | /vbt/ 23 | /jsonconfig/ 24 | /astro/ 25 | /date/ 26 | -------------------------------------------------------------------------------- /supla-console-client/Test/src/subdir.mk: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # Automatically-generated file. Do not edit! 3 | ################################################################################ 4 | 5 | # Add inputs and outputs from these tool invocations to the build variables 6 | 7 | # Each subdirectory must supply rules for building sources it contributes 8 | 9 | -------------------------------------------------------------------------------- /sql/AddAutoGateClosingConfig.sql: -------------------------------------------------------------------------------- 1 | INSERT INTO `supla_auto_gate_closing` (`channel_id`, `user_id`, `enabled`, `active_from`, `active_to`, `active_hours`, `max_time_open`, `seconds_open`, `closing_attempt`, `last_seen_open`) VALUES 2 | (167, 2, 1, NULL, NULL, NULL, 300, NULL, NULL, NULL), 3 | (174, 2, 1, NULL, NULL, NULL, 400, NULL, NULL, UTC_TIMESTAMP()), 4 | (308, 2, 1, NULL, NULL, NULL, 400, NULL, DATE_ADD(UTC_TIMESTAMP(), INTERVAL -2 SECOND), UTC_TIMESTAMP()); 5 | -------------------------------------------------------------------------------- /sql/AddWebhookCredentials.sql: -------------------------------------------------------------------------------- 1 | INSERT INTO `supla_state_webhooks` (`client_id`, `user_id`, `url`, `access_token`, `refresh_token`, `expires_at`, `functions_ids`, `enabled`) VALUES 2 | (1, 2, 'https://spacex.com/api/state-webhook', '30b30efeb30023767dc50c6a5454cdb24178e955', '1491d544edd6c71f46b11549903a2f9cd78932a4', DATE_ADD(UTC_TIMESTAMP(), INTERVAL 30 second), '140,130,300,40,100,50,42,45,60,70,230,125,240,310,320,330,315,80,250,270,280,220,210,260,120,700,110', 1) 3 | 4 | -------------------------------------------------------------------------------- /sql/AddChannelState.sql: -------------------------------------------------------------------------------- 1 | INSERT INTO `supla_dev_channel_state` (`channel_id`, `user_id`, `update_time`, `state`) VALUES 2 | (311, 34, '2024-11-22 20:29:39', '{\"defaultIconField\":0,\"ipv4\":\"192.168.10.15\",\"mac\":\"C0:49:EF:80:32:5C\",\"wifiRSSI\":-60,\"wifiSignalStrength\":80,\"uptime\":41847}'), 3 | (167, 34, '2024-11-22 20:29:39', '{\"defaultIconField\":0,\"ipv4\":\"192.168.10.20\",\"mac\":\"C0:49:EF:80:32:5D\",\"wifiRSSI\":-65,\"wifiSignalStrength\":85,\"uptime\":41850}'); 4 | -------------------------------------------------------------------------------- /supla-server/makefile.init: -------------------------------------------------------------------------------- 1 | ifndef SSLDIR 2 | SSLDIR=/usr/src/openssl 3 | endif 4 | 5 | ifndef CC 6 | CC=gcc 7 | endif 8 | 9 | ifndef CXX 10 | CXX=g++ 11 | endif 12 | 13 | ifeq ($(CC), cc) 14 | CC=gcc 15 | endif 16 | 17 | ifdef MYSQL 18 | LIBMYSQL=mysqlclient 19 | INCMYSQL=/usr/include/mysql 20 | else 21 | LIBMYSQL=mariadbclient 22 | INCMYSQL=/usr/include/mariadb 23 | ifeq (,$(wildcard $(INCMYSQL))) 24 | INCMYSQL=/usr/include/mysql 25 | endif 26 | endif 27 | 28 | ifndef SSOCKET_WRITE_TO_FILE 29 | SSOCKET_WRITE_TO_FILE=0 30 | endif 31 | -------------------------------------------------------------------------------- /._travis.yml: -------------------------------------------------------------------------------- 1 | notifications: 2 | slack: 3 | rooms: 4 | - supla:dauFpwhgEGeyy9ERzqOYeJyY#github 5 | 6 | matrix: 7 | include: 8 | - language: python 9 | python: 2.7 10 | install: 11 | - pip install cpplint 12 | 13 | script: 14 | - ./tools/lint.sh 15 | 16 | - language: cpp 17 | sudo: false 18 | os: linux 19 | dist: eoan 20 | compiler: gcc 21 | install: 22 | - sudo apt-get -y install valgrind libmariadbclient-dev-compat 23 | addons: 24 | mariadb: '10.3' 25 | hosts: 26 | - db 27 | script: 28 | - sudo ./test/all-tests.sh 29 | 30 | -------------------------------------------------------------------------------- /supla-afl/Debug/sources.mk: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # Automatically-generated file. Do not edit! 3 | ################################################################################ 4 | 5 | C_UPPER_SRCS := 6 | CXX_SRCS := 7 | C++_SRCS := 8 | OBJ_SRCS := 9 | CC_SRCS := 10 | ASM_SRCS := 11 | C_SRCS := 12 | CPP_SRCS := 13 | O_SRCS := 14 | S_UPPER_SRCS := 15 | CC_DEPS := 16 | C++_DEPS := 17 | EXECUTABLES := 18 | OBJS := 19 | C_UPPER_DEPS := 20 | CXX_DEPS := 21 | C_DEPS := 22 | CPP_DEPS := 23 | 24 | # Every subdirectory with source files must be described here 25 | SUBDIRS := \ 26 | src \ 27 | 28 | -------------------------------------------------------------------------------- /supla-client/Debug/sources.mk: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # Automatically-generated file. Do not edit! 3 | ################################################################################ 4 | 5 | ASM_SRCS := 6 | C++_SRCS := 7 | CC_SRCS := 8 | CPP_SRCS := 9 | CXX_SRCS := 10 | C_SRCS := 11 | C_UPPER_SRCS := 12 | OBJ_SRCS := 13 | O_SRCS := 14 | S_UPPER_SRCS := 15 | ARCHIVES := 16 | C++_DEPS := 17 | CC_DEPS := 18 | CPP_DEPS := 19 | CXX_DEPS := 20 | C_DEPS := 21 | C_UPPER_DEPS := 22 | OBJS := 23 | 24 | # Every subdirectory with source files must be described here 25 | SUBDIRS := \ 26 | src \ 27 | 28 | -------------------------------------------------------------------------------- /supla-client/Release/sources.mk: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # Automatically-generated file. Do not edit! 3 | ################################################################################ 4 | 5 | ASM_SRCS := 6 | C++_SRCS := 7 | CC_SRCS := 8 | CPP_SRCS := 9 | CXX_SRCS := 10 | C_SRCS := 11 | C_UPPER_SRCS := 12 | OBJ_SRCS := 13 | O_SRCS := 14 | S_UPPER_SRCS := 15 | ARCHIVES := 16 | C++_DEPS := 17 | CC_DEPS := 18 | CPP_DEPS := 19 | CXX_DEPS := 20 | C_DEPS := 21 | C_UPPER_DEPS := 22 | OBJS := 23 | 24 | # Every subdirectory with source files must be described here 25 | SUBDIRS := \ 26 | src \ 27 | 28 | -------------------------------------------------------------------------------- /supla-dev/Debug/sources.mk: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # Automatically-generated file. Do not edit! 3 | ################################################################################ 4 | 5 | ASM_SRCS := 6 | C++_SRCS := 7 | CC_SRCS := 8 | CPP_SRCS := 9 | CXX_SRCS := 10 | C_SRCS := 11 | C_UPPER_SRCS := 12 | OBJ_SRCS := 13 | O_SRCS := 14 | S_UPPER_SRCS := 15 | C++_DEPS := 16 | CC_DEPS := 17 | CPP_DEPS := 18 | CXX_DEPS := 19 | C_DEPS := 20 | C_UPPER_DEPS := 21 | EXECUTABLES := 22 | OBJS := 23 | 24 | # Every subdirectory with source files must be described here 25 | SUBDIRS := \ 26 | src \ 27 | 28 | -------------------------------------------------------------------------------- /supla-dev/Release/sources.mk: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # Automatically-generated file. Do not edit! 3 | ################################################################################ 4 | 5 | ASM_SRCS := 6 | C++_SRCS := 7 | CC_SRCS := 8 | CPP_SRCS := 9 | CXX_SRCS := 10 | C_SRCS := 11 | C_UPPER_SRCS := 12 | OBJ_SRCS := 13 | O_SRCS := 14 | S_UPPER_SRCS := 15 | C++_DEPS := 16 | CC_DEPS := 17 | CPP_DEPS := 18 | CXX_DEPS := 19 | C_DEPS := 20 | C_UPPER_DEPS := 21 | EXECUTABLES := 22 | OBJS := 23 | 24 | # Every subdirectory with source files must be described here 25 | SUBDIRS := \ 26 | src \ 27 | 28 | -------------------------------------------------------------------------------- /supla-console-client/Debug/sources.mk: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # Automatically-generated file. Do not edit! 3 | ################################################################################ 4 | 5 | ASM_SRCS := 6 | C++_SRCS := 7 | CC_SRCS := 8 | CPP_SRCS := 9 | CXX_SRCS := 10 | C_SRCS := 11 | C_UPPER_SRCS := 12 | OBJ_SRCS := 13 | O_SRCS := 14 | S_UPPER_SRCS := 15 | C++_DEPS := 16 | CC_DEPS := 17 | CPP_DEPS := 18 | CXX_DEPS := 19 | C_DEPS := 20 | C_UPPER_DEPS := 21 | EXECUTABLES := 22 | OBJS := 23 | 24 | # Every subdirectory with source files must be described here 25 | SUBDIRS := \ 26 | src \ 27 | src/supla-client-lib \ 28 | 29 | -------------------------------------------------------------------------------- /supla-console-client/Release/sources.mk: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # Automatically-generated file. Do not edit! 3 | ################################################################################ 4 | 5 | ASM_SRCS := 6 | C++_SRCS := 7 | CC_SRCS := 8 | CPP_SRCS := 9 | CXX_SRCS := 10 | C_SRCS := 11 | C_UPPER_SRCS := 12 | OBJ_SRCS := 13 | O_SRCS := 14 | S_UPPER_SRCS := 15 | C++_DEPS := 16 | CC_DEPS := 17 | CPP_DEPS := 18 | CXX_DEPS := 19 | C_DEPS := 20 | C_UPPER_DEPS := 21 | EXECUTABLES := 22 | OBJS := 23 | 24 | # Every subdirectory with source files must be described here 25 | SUBDIRS := \ 26 | src \ 27 | src/supla-client-lib \ 28 | 29 | -------------------------------------------------------------------------------- /sql/CreateActionTriggerForChannelId303.sql: -------------------------------------------------------------------------------- 1 | INSERT INTO `supla_dev_channel` (`id`, `type`, `func`, `param1`, `param2`, `caption`, `param3`, `text_param1`, `text_param2`, `text_param3`, `user_id`, `channel_number`, `iodevice_id`, `flist`, `alt_icon`, `hidden`, `location_id`, `flags`, `user_icon_id`, `param4`, `user_config`, `properties`) VALUES (NULL, 11000, 700, 0, 0, '', 0, NULL, NULL, NULL, 2, 1, 144, 0, 0, 1, NULL, 81920, NULL, 0, '{\"relatedChannelId\":null,\"hideInChannelsList\":false,\"actions\":{\"TURN_ON\":{\"subjectId\":303,\"subjectType\":\"channel\",\"action\":{\"id\":30,\"param\":[]}}}}', '{\"actionTriggerCapabilities\":[\"TURN_ON\",\"TURN_OFF\",\"TOGGLE_X1\",\"TOGGLE_X2\",\"TOGGLE_X3\",\"TOGGLE_X4\",\"TOGGLE_X5\"]}') 2 | -------------------------------------------------------------------------------- /supla-console-client/Test/sources.mk: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # Automatically-generated file. Do not edit! 3 | ################################################################################ 4 | 5 | ASM_SRCS := 6 | C++_SRCS := 7 | CC_SRCS := 8 | CPP_SRCS := 9 | CXX_SRCS := 10 | C_SRCS := 11 | C_UPPER_SRCS := 12 | OBJ_SRCS := 13 | O_SRCS := 14 | S_UPPER_SRCS := 15 | C++_DEPS := 16 | CC_DEPS := 17 | CPP_DEPS := 18 | CXX_DEPS := 19 | C_DEPS := 20 | C_UPPER_DEPS := 21 | EXECUTABLES := 22 | OBJS := 23 | 24 | # Every subdirectory with source files must be described here 25 | SUBDIRS := \ 26 | src/supla-client-lib \ 27 | src/test \ 28 | src/test/integration \ 29 | 30 | -------------------------------------------------------------------------------- /sql/AddPushNotificationWithNulls.sql: -------------------------------------------------------------------------------- 1 | INSERT INTO `supla_client` (`id`, `access_id`, `guid`, `name`, `reg_ipv4`, `reg_date`, `last_access_ipv4`, `last_access_date`, `software_version`, `protocol_version`, `enabled`, `user_id`, `auth_key`, `caption`, `disable_after_date`) VALUES 2 | (4, 2, 0xa944878fa9141f6241e7c98abaeec331, 'samsung SM-G955N', 3000535933, '2020-03-23 08:03:52', 3000535933, '2020-07-20 05:41:45', 'Android5.1.1/2.3.44', 12, 1, 2, NULL, NULL, NULL); 3 | 4 | INSERT INTO supla_push_notification(id, user_id, channel_id, iodevice_id, managed_by_device, title, body, sound) VALUES(5, 2, 140, 73, 0, NULL, NULL, NULL); 5 | INSERT INTO supla_rel_aid_pushnotification(push_notification_id, access_id) VALUES(5, 2); 6 | UPDATE supla_client SET push_token = 'Token 1', platform = 2, devel_env = 0 WHERE id = 4; 7 | -------------------------------------------------------------------------------- /sql/AddAlexaCredentials.sql: -------------------------------------------------------------------------------- 1 | INSERT INTO `supla_amazon_alexa` (`id`, `user_id`, `reg_date`, `access_token`, `expires_at`, `refresh_token`, `region`) VALUES 2 | (1, 2, UTC_TIMESTAMP(), 'Atza|IwEBIPSGcmz4Lhlw8ixBwOt5rR1PDg1lByehicWqVuEU_O_P2OfI2iSPhJD1QDwUZNAKmgyFoktUmbDC2xwYUVjHK47q5OsWMENo06l6H2GnSY7APyg5gYlthyVwz2VG1c-NlkGuBpu41yvifANlHDdGq0ssbYMXtowPm2CdrRb-bviWE2unYnhyzosyusZPadDXf5lG9FmcYOetyJrWOGXzF5iO0hNSpECPmJvsD0BQ3HKsKch7WAdn4746XVYiQgfPUtnDhIkVjZwMsJI6tE1ZRnRG', DATE_ADD(UTC_TIMESTAMP(), INTERVAL 30 second), 'Atzr1IwEBIN_rv71MXWPAJWMj0IPnoWpR6QZugZoYnFDSpQ5pBxOwsTfe1PAzwR3Mo_VzaaER8YYLIrg8qXruJ0eNU2p3oQ6ptjPIEm8DevCl3hBOdePpe_xqQDRifAzNYbgHlL6nqyyHHRYDtdrfiSDo-lYpkEXdhy7VdW3sNHJfB0POKg-wTDr6XFryrji_BvCM0_dxS8YOClUH6AOzu0mKBEO93nvdXrlVXEFGbIr2MZ61-dZOan1bDeX2xmK-qflLeLCusl0yR6oM0StyAdpQYp6IiWwk', 'eu'); 3 | 4 | -------------------------------------------------------------------------------- /supla-dev/Release/supla.cfg.sample: -------------------------------------------------------------------------------- 1 | [GLOBAL] 2 | device_name=RASBPBERRY PI B+ EXTENSION 01 3 | device_guid_file=./var/dev_guid 4 | state_file=./var/last_state.txt 5 | 6 | [SERVER] 7 | host=127.0.0.1 8 | tcp_port=2015 9 | ssl_port=2016 10 | ssl_enabled=Y 11 | 12 | [LOCATION] 13 | ID= 14 | PASSWORD= 15 | 16 | # Available types: https://github.com/SUPLA/supla-core/blob/master/supla-dev/src/devcfg.c#L34 17 | # Help: https://forum.supla.org 18 | 19 | [CHANNEL_0] 20 | type=RELAYHFD4 21 | gpio1=27 22 | 23 | [CHANNEL_1] 24 | type=RELAYHFD4 25 | gpio1=22 26 | 27 | [CHANNEL_2] 28 | type=RELAYHFD4 29 | gpio1=17 30 | 31 | [CHANNEL_3] 32 | type=SENSORNO 33 | gpio1=24 34 | 35 | [CHANNEL_4] 36 | type=SENSORNO 37 | gpio1=23 38 | 39 | [CHANNEL_5] 40 | type=SENSORNO 41 | gpio1=18 42 | 43 | [CHANNEL_6] 44 | type=DHT22 45 | w1=22 -------------------------------------------------------------------------------- /supla-scheduler/Debug/sources.mk: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # Automatically-generated file. Do not edit! 3 | ################################################################################ 4 | 5 | ASM_SRCS := 6 | C++M_SRCS := 7 | C++_SRCS := 8 | CCM_SRCS := 9 | CC_SRCS := 10 | CPP_SRCS := 11 | CXXM_SRCS := 12 | CXX_SRCS := 13 | C_SRCS := 14 | C_UPPER_SRCS := 15 | OBJ_SRCS := 16 | O_SRCS := 17 | SX_SRCS := 18 | S_UPPER_SRCS := 19 | C++M_DEPS := 20 | C++_DEPS := 21 | CCM_DEPS := 22 | CC_DEPS := 23 | CPP_DEPS := 24 | CXXM_DEPS := 25 | CXX_DEPS := 26 | C_DEPS := 27 | C_UPPER_DEPS := 28 | EXECUTABLES := 29 | OBJS := 30 | 31 | # Every subdirectory with source files must be described here 32 | SUBDIRS := \ 33 | src \ 34 | src/json \ 35 | 36 | -------------------------------------------------------------------------------- /supla-scheduler/Release/sources.mk: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # Automatically-generated file. Do not edit! 3 | ################################################################################ 4 | 5 | ASM_SRCS := 6 | C++M_SRCS := 7 | C++_SRCS := 8 | CCM_SRCS := 9 | CC_SRCS := 10 | CPP_SRCS := 11 | CXXM_SRCS := 12 | CXX_SRCS := 13 | C_SRCS := 14 | C_UPPER_SRCS := 15 | OBJ_SRCS := 16 | O_SRCS := 17 | SX_SRCS := 18 | S_UPPER_SRCS := 19 | C++M_DEPS := 20 | C++_DEPS := 21 | CCM_DEPS := 22 | CC_DEPS := 23 | CPP_DEPS := 24 | CXXM_DEPS := 25 | CXX_DEPS := 26 | C_DEPS := 27 | C_UPPER_DEPS := 28 | EXECUTABLES := 29 | OBJS := 30 | 31 | # Every subdirectory with source files must be described here 32 | SUBDIRS := \ 33 | src \ 34 | src/json \ 35 | 36 | -------------------------------------------------------------------------------- /test/supla-server-test.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -e 4 | 5 | [ -d ../test ] && cd ../ 6 | . ./test/common 7 | 8 | DBHOST=db 9 | 10 | 11 | mkdir -p /etc/supla-server 12 | 13 | cd supla-server/Test 14 | make clean && make -j8 all 15 | 16 | cd ../../ 17 | db_init 18 | cd supla-server/Test 19 | 20 | cat > /etc/supla-server/supla-test.cfg <<- ENDOFCFG 21 | [NET] 22 | cert=/etc/supla-server/cert.crt 23 | private_key=/etc/supla-server/private.key 24 | 25 | [MySQL] 26 | host=$DBHOST 27 | port=3306 28 | database=supla_test 29 | user=supla 30 | 31 | [MQTT-BROKER] 32 | enabled=1 33 | host=192.168.111.30 34 | port=1883 35 | ssl=0 36 | username=supla-server 37 | password=alkdmalsdaskdn 38 | client_id=NunYnx 39 | ENDOFCFG 40 | 41 | vg_verify "./supla-server --sqldir ../../sql --gtest_shuffle" 42 | 43 | echo OK 44 | exit 0 45 | -------------------------------------------------------------------------------- /supla-scheduler/Test/sources.mk: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # Automatically-generated file. Do not edit! 3 | ################################################################################ 4 | 5 | ASM_SRCS := 6 | C++M_SRCS := 7 | C++_SRCS := 8 | CCM_SRCS := 9 | CC_SRCS := 10 | CPP_SRCS := 11 | CXXM_SRCS := 12 | CXX_SRCS := 13 | C_SRCS := 14 | C_UPPER_SRCS := 15 | OBJ_SRCS := 16 | O_SRCS := 17 | SX_SRCS := 18 | S_UPPER_SRCS := 19 | C++M_DEPS := 20 | C++_DEPS := 21 | CCM_DEPS := 22 | CC_DEPS := 23 | CPP_DEPS := 24 | CXXM_DEPS := 25 | CXX_DEPS := 26 | C_DEPS := 27 | C_UPPER_DEPS := 28 | EXECUTABLES := 29 | OBJS := 30 | 31 | # Every subdirectory with source files must be described here 32 | SUBDIRS := \ 33 | src \ 34 | src/json \ 35 | src/test \ 36 | src/test/doubles \ 37 | 38 | -------------------------------------------------------------------------------- /supla-client/Release/Android/jni/subdir.mk: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # Automatically-generated file. Do not edit! 3 | ################################################################################ 4 | 5 | # Add inputs and outputs from these tool invocations to the build variables 6 | C_SRCS += \ 7 | ../Android/jni/supla-client_jni.c 8 | 9 | OBJS += \ 10 | ./Android/jni/supla-client_jni.o 11 | 12 | C_DEPS += \ 13 | ./Android/jni/supla-client_jni.d 14 | 15 | 16 | # Each subdirectory must supply rules for building sources it contributes 17 | Android/jni/%.o: ../Android/jni/%.c 18 | @echo 'Building file: $<' 19 | @echo 'Invoking: Cross GCC Compiler' 20 | $(GCC) $(PARAMS) -O3 -Wall -c -fmessage-length=0 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o "$@" "$<" 21 | @echo 'Finished building: $<' 22 | @echo ' ' 23 | 24 | 25 | -------------------------------------------------------------------------------- /supla-server/src/crypt_blowfish/crypt.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Written by Solar Designer in 2000-2002. 3 | * No copyright is claimed, and the software is hereby placed in the public 4 | * domain. In case this attempt to disclaim copyright and place the software 5 | * in the public domain is deemed null and void, then the software is 6 | * Copyright (c) 2000-2002 Solar Designer and it is hereby released to the 7 | * general public under the following terms: 8 | * 9 | * Redistribution and use in source and binary forms, with or without 10 | * modification, are permitted. 11 | * 12 | * There's ABSOLUTELY NO WARRANTY, express or implied. 13 | * 14 | * See crypt_blowfish.c for more information. 15 | */ 16 | 17 | #include 18 | 19 | #if defined(_OW_SOURCE) || defined(__USE_OW) 20 | #define __SKIP_GNU 21 | #undef __SKIP_OW 22 | #include 23 | #undef __SKIP_GNU 24 | #endif 25 | -------------------------------------------------------------------------------- /supla-afl/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | supla-afl 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.cdt.managedbuilder.core.genmakebuilder 10 | clean,full,incremental, 11 | 12 | 13 | 14 | 15 | org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder 16 | full,incremental, 17 | 18 | 19 | 20 | 21 | 22 | org.eclipse.cdt.core.cnature 23 | org.eclipse.cdt.core.ccnature 24 | org.eclipse.cdt.managedbuilder.core.managedBuildNature 25 | org.eclipse.cdt.managedbuilder.core.ScannerConfigNature 26 | 27 | 28 | -------------------------------------------------------------------------------- /supla-dev/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | supla-dev 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.cdt.managedbuilder.core.genmakebuilder 10 | clean,full,incremental, 11 | 12 | 13 | 14 | 15 | org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder 16 | full,incremental, 17 | 18 | 19 | 20 | 21 | 22 | org.eclipse.cdt.core.cnature 23 | org.eclipse.cdt.core.ccnature 24 | org.eclipse.cdt.managedbuilder.core.managedBuildNature 25 | org.eclipse.cdt.managedbuilder.core.ScannerConfigNature 26 | 27 | 28 | -------------------------------------------------------------------------------- /supla-client/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | supla-client 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.cdt.managedbuilder.core.genmakebuilder 10 | clean,full,incremental, 11 | 12 | 13 | 14 | 15 | org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder 16 | full,incremental, 17 | 18 | 19 | 20 | 21 | 22 | org.eclipse.cdt.core.cnature 23 | org.eclipse.cdt.managedbuilder.core.managedBuildNature 24 | org.eclipse.cdt.managedbuilder.core.ScannerConfigNature 25 | org.eclipse.cdt.core.ccnature 26 | 27 | 28 | -------------------------------------------------------------------------------- /supla-server/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | supla-server 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.cdt.managedbuilder.core.genmakebuilder 10 | clean,full,incremental, 11 | 12 | 13 | 14 | 15 | org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder 16 | full,incremental, 17 | 18 | 19 | 20 | 21 | 22 | org.eclipse.cdt.core.cnature 23 | org.eclipse.cdt.core.ccnature 24 | org.eclipse.cdt.managedbuilder.core.managedBuildNature 25 | org.eclipse.cdt.managedbuilder.core.ScannerConfigNature 26 | 27 | 28 | -------------------------------------------------------------------------------- /supla-client/Android/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | SuplaJNI 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.cdt.managedbuilder.core.genmakebuilder 10 | clean,full,incremental, 11 | 12 | 13 | 14 | 15 | org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder 16 | full,incremental, 17 | 18 | 19 | 20 | 21 | 22 | org.eclipse.cdt.core.cnature 23 | org.eclipse.cdt.core.ccnature 24 | org.eclipse.cdt.managedbuilder.core.managedBuildNature 25 | org.eclipse.cdt.managedbuilder.core.ScannerConfigNature 26 | 27 | 28 | -------------------------------------------------------------------------------- /supla-scheduler/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | supla-scheduler 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.cdt.managedbuilder.core.genmakebuilder 10 | clean,full,incremental, 11 | 12 | 13 | 14 | 15 | org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder 16 | full,incremental, 17 | 18 | 19 | 20 | 21 | 22 | org.eclipse.cdt.core.cnature 23 | org.eclipse.cdt.core.ccnature 24 | org.eclipse.cdt.managedbuilder.core.managedBuildNature 25 | org.eclipse.cdt.managedbuilder.core.ScannerConfigNature 26 | 27 | 28 | -------------------------------------------------------------------------------- /extras/docker/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM debian:11.9 2 | 3 | RUN apt-get update 4 | RUN apt-get upgrade -y 5 | RUN apt-get -y install git vim wget procps build-essential libssl-dev libmariadb-dev-compat mariadb-client net-tools valgrind cppcheck cmake clang-format python3-pip rsyslog libgtest-dev libgmock-dev screen libcurl4-openssl-dev 6 | RUN pip install cpplint 7 | RUN mkdir -p /etc/supla-server 8 | RUN cd /usr/src/ && \ 9 | wget https://ftp.openbsd.org/pub/OpenBSD/LibreSSL/libressl-3.5.4.tar.gz && \ 10 | tar zxvf libressl-3.5.4.tar.gz && \ 11 | cd libressl-3.5.4 && \ 12 | sed -ri 's/(\{ \global\:)/LIBRESSL \1/' configure && \ 13 | ./configure --prefix /usr/src/libressl && \ 14 | make all && \ 15 | make install 16 | 17 | WORKDIR /CProjects/supla-core/supla-server 18 | 19 | COPY supla.cfg /etc/supla-server/ 20 | COPY supla-test.cfg /etc/supla-server/ 21 | COPY private.key /etc/supla-server/ 22 | COPY cert.crt /etc/supla-server/ 23 | -------------------------------------------------------------------------------- /supla-afl/src/cfg.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) AC SOFTWARE SP. Z O.O. 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License 6 | as published by the Free Software Foundation; either version 2 7 | of the License, or (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program; if not, write to the Free Software 16 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | */ 18 | 19 | #ifndef CFG_H_ 20 | #define CFG_H_ 21 | 22 | extern char debug_mode; 23 | extern char run_as_daemon; 24 | 25 | #endif /* CFG_H_ */ 26 | -------------------------------------------------------------------------------- /supla-console-client/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | supla-console-client 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.cdt.managedbuilder.core.genmakebuilder 10 | clean,full,incremental, 11 | 12 | 13 | 14 | 15 | org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder 16 | full,incremental, 17 | 18 | 19 | 20 | 21 | 22 | org.eclipse.cdt.core.cnature 23 | org.eclipse.cdt.core.ccnature 24 | org.eclipse.cdt.managedbuilder.core.managedBuildNature 25 | org.eclipse.cdt.managedbuilder.core.ScannerConfigNature 26 | 27 | 28 | -------------------------------------------------------------------------------- /tools/lint.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | 5 | if ! [ -e ./tools/lint.sh ]; then 6 | echo Run this script from the supla-core directory. 7 | echo "./tools/lint.sh" 8 | exit 1 9 | fi 10 | 11 | find ./supla-server/src -type f \ 12 | ! -path ./supla-server/src/mqtt/mqtt.c \ 13 | ! -path ./supla-server/src/mqtt/mqtt.h \ 14 | ! -path "./supla-server/src/crypt_blowfish/*" \ 15 | ! -path "./supla-server/src/date/date.h" \ 16 | ! -path "./supla-server/src/date/tz.cpp" \ 17 | ! -path "./supla-server/src/date/tz.h" \ 18 | ! -path "./supla-server/src/date/tz_private.h" \ 19 | ! -path "./supla-server/src/astro/SolarCalculator.cpp" \ 20 | ! -path "./supla-server/src/astro/SolarCalculator.h" \ 21 | -exec cpplint {} + 22 | 23 | find ./supla-scheduler/src -type f -exec cpplint {} + 24 | find ./supla-dev/src -type f -exec cpplint {} + 25 | find ./supla-console-client/src -type f -exec cpplint {} + 26 | find ./supla-afl/src -type f -exec cpplint {} + 27 | 28 | echo OK 29 | -------------------------------------------------------------------------------- /supla-common/test/SrpcTest.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) AC SOFTWARE SP. Z O.O. 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License 6 | as published by the Free Software Foundation; either version 2 7 | of the License, or (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program; if not, write to the Free Software 16 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | */ 18 | 19 | #ifndef H_SRPC_TEST_H_ 20 | #define H_SRPC_TEST_H_ 21 | 22 | #include "srpc/srpc.h" 23 | 24 | class SrpcTest { 25 | public: 26 | }; 27 | 28 | #endif /*H_SRPC_TEST_H_*/ 29 | -------------------------------------------------------------------------------- /test/common: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | vg_verify() { 4 | valgrind --version 5 | ../../tools/valgrind-full.sh "$1" 2> vg-test.log 6 | cat ./vg-test.log 7 | if ! grep "All heap blocks were freed -- no leaks are possible" ./vg-test.log; then 8 | rm ./vg-test.log 9 | echo "Memory leak error!" 10 | exit 1 11 | fi 12 | 13 | rm -f ./vg-test.log 14 | } 15 | 16 | db_init() { 17 | if ! (echo "" | mysql -u supla -h $DBHOST) 2> /dev/null; then 18 | if ! mysql -u root -h $DBHOST < sql/CreateSqlUsersForTestPurposes.sql 2> /dev/null; then 19 | if ! mysql -u root -proot -h $DBHOST < sql/CreateSqlUsersForTestPurposes.sql 2> /dev/null; then 20 | echo "Enter mariadb root password."; 21 | mysql -u root -h $DBHOST -p < sql/CreateSqlUsersForTestPurposes.sql 22 | fi 23 | fi 24 | fi 25 | 26 | mysql -u supla -h $DBHOST < sql/RecreateTestDatabase.sql 27 | mysql -u supla -h $DBHOST supla_test < sql/TestDatabaseStructureAndData.sql 28 | } 29 | -------------------------------------------------------------------------------- /extras/coredump_cleanup.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | OMMIT=0 4 | THREAD=0 5 | PREVIOUS="" 6 | LASTPRINTED="" 7 | 8 | function print_line() { 9 | OMMIT=$1 10 | PREVIOUS=$2 11 | 12 | if [[ $PREVIOUS =~ ^\[New\ LWP ]]; then 13 | PREVIOUS="" 14 | fi 15 | 16 | if [ $OMMIT -eq 0 ]; then 17 | if ! [ "$PREVIOUS" = "$LASTPRINTED" ]; then 18 | echo $PREVIOUS 19 | fi 20 | LASTPRINTED=$PREVIOUS 21 | fi 22 | } 23 | 24 | while read -r line; do 25 | 26 | if [ $OMMIT -gt 0 ] && ! [[ "$line" =~ ^# ]]; then 27 | OMMIT=$((OMMIT-1)) 28 | fi 29 | 30 | if [ $THREAD -eq 1 ]; then 31 | THREAD=0 32 | if [[ "$line" =~ ^#0 ]] && [[ "$line" =~ in\ epoll_wait ]]; then 33 | OMMIT=2 34 | fi 35 | fi 36 | 37 | if [ $OMMIT -eq 0 ]; then 38 | if [[ "$line" =~ ^Thread\ [0-9]+ ]]; then 39 | THREAD=1 40 | fi 41 | fi 42 | 43 | print_line $OMMIT "$PREVIOUS" 44 | PREVIOUS=$line 45 | 46 | done < $1 47 | 48 | print_line $OMMIT "$PREVIOUS" "$line" 49 | -------------------------------------------------------------------------------- /extras/docker/run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | 5 | PROJ=~/CProjects 6 | DATADIR=~/Database/mariadb/supla-core-devel 7 | 8 | [ -e $PROJ ] || mkdir -p $PROJ 9 | [ -e $DATADIR ] || mkdir -p $DATADIR 10 | 11 | docker network ls |grep supla-core-devel-net > /dev/null ||\ 12 | docker network create --gateway 192.168.111.1 --subnet 192.168.111.0/24 supla-core-devel-net 13 | 14 | docker start supla-core-devel-mariadb 2> /dev/null > /dev/null || \ 15 | docker run -v "$DATADIR":/var/lib/mysql --rm --network supla-core-devel-net --ip 192.168.111.2\ 16 | --name supla-core-devel-mariadb\ 17 | -e MYSQL_ROOT_PASSWORD=root -d mariadb:10.5\ 18 | --character-set-server=utf8mb4\ 19 | --collation-server=utf8mb4_unicode_ci 20 | 21 | cd "$PROJ" 22 | [ ! -e ./supla-core ] && git clone https://github.com/SUPLA/supla-core 23 | docker run -p 2015:2015/tcp -p 2016:2016/tcp -v "$PROJ":/CProjects --network supla-core-devel-net\ 24 | --add-host=db:192.168.111.2 --ip 192.168.111.20 -it devel/supla-core:latest /bin/bash 25 | -------------------------------------------------------------------------------- /supla-server/src/user/abstract_user_dao.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) AC SOFTWARE SP. Z O.O. 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License 6 | as published by the Free Software Foundation; either version 2 7 | of the License, or (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program; if not, write to the Free Software 16 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | */ 18 | 19 | #include "abstract_user_dao.h" 20 | 21 | supla_abstract_user_dao::supla_abstract_user_dao(void) {} 22 | 23 | supla_abstract_user_dao::~supla_abstract_user_dao() {} 24 | -------------------------------------------------------------------------------- /supla-common/test/ProtoTest.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) AC SOFTWARE SP. Z O.O. 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License 6 | as published by the Free Software Foundation; either version 2 7 | of the License, or (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program; if not, write to the Free Software 16 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | */ 18 | 19 | #ifndef H_PROTO_TEST_H_ 20 | #define H_PROTO_TEST_H_ 21 | 22 | class ProtoTest { 23 | public: 24 | virtual ~ProtoTest(); 25 | ProtoTest(); 26 | }; 27 | 28 | #endif /*H_PROTO_TEST_H_*/ 29 | -------------------------------------------------------------------------------- /supla-common/test/ToolsTest.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) AC SOFTWARE SP. Z O.O. 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License 6 | as published by the Free Software Foundation; either version 2 7 | of the License, or (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program; if not, write to the Free Software 16 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | */ 18 | 19 | #ifndef H_TOOLS_TEST_H_ 20 | #define H_TOOLS_TEST_H_ 21 | 22 | class ToolsTest { 23 | public: 24 | virtual ~ToolsTest(); 25 | ToolsTest(); 26 | }; 27 | 28 | #endif /*H_TOOLS_TEST_H_*/ 29 | -------------------------------------------------------------------------------- /supla-server/src/scene/abstract_scene_dao.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) AC SOFTWARE SP. Z O.O. 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License 6 | as published by the Free Software Foundation; either version 2 7 | of the License, or (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program; if not, write to the Free Software 16 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | */ 18 | 19 | #include "scene/abstract_scene_dao.h" 20 | 21 | supla_abstract_scene_dao::supla_abstract_scene_dao() {} 22 | 23 | supla_abstract_scene_dao::~supla_abstract_scene_dao() {} 24 | -------------------------------------------------------------------------------- /sql/AddValueBasedTriggers.sql: -------------------------------------------------------------------------------- 1 | INSERT INTO supla_push_notification(id, user_id, channel_id, iodevice_id, managed_by_device, title, body, sound) 2 | VALUES(500, 2, 140, 73, 0, 'Abcd', 'Efgh', 11); 3 | 4 | INSERT INTO supla_value_based_trigger (id, user_id, owning_channel_id, channel_id, channel_group_id, scene_id, schedule_id, push_notification_id, `trigger`, action, action_param, enabled) 5 | VALUES(20, 2, 140, 141, NULL, NULL, NULL, NULL, '{"on_change_to":{"eq":1}}', 60, NULL, 1), 6 | (21, 2, 140, 173, NULL, NULL, NULL, NULL, '{"on_change_to":{"eq":1}}', 51, '{"percentage":45}', 1), 7 | (22, 2, 140, NULL, 1, NULL, NULL, NULL, '{"on_change_to":{"eq":1}}', 70, NULL, 1), 8 | (30, 2, 141, NULL, NULL, 6, NULL, NULL, '{"on_change_to":{"ne":0}}', 3000, NULL, 1), 9 | (31, 2, 141, NULL, NULL, NULL, 1, NULL, '{"on_change_to":{"eq":1}}', 210, NULL, 1), 10 | (32, 2, 141, NULL, NULL, NULL, NULL, 500, '{"on_change_to":{"eq":1}}', 220, NULL, 1), 11 | (33, 2, 158, NULL, NULL, NULL, NULL, 500, '{"on_change_to":{"ge":50,"name":"humidity"}}', 220, NULL, 1); -------------------------------------------------------------------------------- /supla-server/src/client/abstract_client_dao.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) AC SOFTWARE SP. Z O.O. 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License 6 | as published by the Free Software Foundation; either version 2 7 | of the License, or (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program; if not, write to the Free Software 16 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | */ 18 | 19 | #include "client/abstract_client_dao.h" 20 | 21 | supla_abstract_client_dao::supla_abstract_client_dao(void) {} 22 | 23 | supla_abstract_client_dao::~supla_abstract_client_dao() {} 24 | -------------------------------------------------------------------------------- /supla-server/src/device/abstract_device_dao.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) AC SOFTWARE SP. Z O.O. 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License 6 | as published by the Free Software Foundation; either version 2 7 | of the License, or (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program; if not, write to the Free Software 16 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | */ 18 | 19 | #include "device/abstract_device_dao.h" 20 | 21 | supla_abstract_device_dao::supla_abstract_device_dao(void) {} 22 | 23 | supla_abstract_device_dao::~supla_abstract_device_dao() {} 24 | -------------------------------------------------------------------------------- /supla-scheduler/src/test/WorkerTest.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) AC SOFTWARE SP. Z O.O. 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License 6 | as published by the Free Software Foundation; either version 2 7 | of the License, or (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program; if not, write to the Free Software 16 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | */ 18 | 19 | #ifndef H_WORKER_TEST_H_ 20 | #define H_WORKER_TEST_H_ 21 | 22 | class WorkerTest { 23 | public: 24 | virtual ~WorkerTest(); 25 | WorkerTest(); 26 | }; 27 | 28 | #endif /*H_WORKER_TEST_H_*/ 29 | -------------------------------------------------------------------------------- /supla-server/src/accept_loop.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) AC SOFTWARE SP. Z O.O. 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License 6 | as published by the Free Software Foundation; either version 2 7 | of the License, or (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program; if not, write to the Free Software 16 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | */ 18 | 19 | #ifndef ACCEPT_LOOP_H_ 20 | #define ACCEPT_LOOP_H_ 21 | 22 | void accept_loop(void *ssd, void *sthread); 23 | void ipc_accept_loop(void *ipc, void *ipc_al_sthread); 24 | 25 | #endif /* ACCEPT_LOOP_H_ */ 26 | -------------------------------------------------------------------------------- /supla-server/src/test/doubles/asynctask/AsyncTaskQueueMock.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) AC SOFTWARE SP. Z O.O. 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License 6 | as published by the Free Software Foundation; either version 2 7 | of the License, or (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program; if not, write to the Free Software 16 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | */ 18 | 19 | #include "AsyncTaskQueueMock.h" 20 | 21 | AsyncTaskQueueMock::AsyncTaskQueueMock(void) : supla_asynctask_queue() {} 22 | 23 | AsyncTaskQueueMock::~AsyncTaskQueueMock(void) {} 24 | -------------------------------------------------------------------------------- /supla-dev/src/accept_loop.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) AC SOFTWARE SP. Z O.O. 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License 6 | as published by the Free Software Foundation; either version 2 7 | of the License, or (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program; if not, write to the Free Software 16 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | */ 18 | 19 | #ifndef ACCEPT_LOOP_H_ 20 | #define ACCEPT_LOOP_H_ 21 | 22 | void accept_loop(void *ssd, void *sthread); 23 | void ipc_accept_loop(void *ipc, void *ipc_al_sthread); 24 | 25 | 26 | 27 | #endif /* ACCEPT_LOOP_H_ */ 28 | -------------------------------------------------------------------------------- /supla-common/test/SafeArrayTest.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) AC SOFTWARE SP. Z O.O. 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License 6 | as published by the Free Software Foundation; either version 2 7 | of the License, or (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program; if not, write to the Free Software 16 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | */ 18 | 19 | #ifndef H_SAFEARRAY_TEST_H_ 20 | #define H_SAFEARRAY_TEST_H_ 21 | 22 | class SafeArrayTest { 23 | public: 24 | virtual ~SafeArrayTest(); 25 | SafeArrayTest(); 26 | }; 27 | 28 | #endif /*H_SAFEARRAY_TEST_H_*/ 29 | -------------------------------------------------------------------------------- /supla-server/src/conn/abstract_connection_dao.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) AC SOFTWARE SP. Z O.O. 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License 6 | as published by the Free Software Foundation; either version 2 7 | of the License, or (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program; if not, write to the Free Software 16 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | */ 18 | 19 | #include "conn/abstract_connection_dao.h" 20 | 21 | supla_abstract_connection_dao::supla_abstract_connection_dao(void) {} 22 | 23 | supla_abstract_connection_dao::~supla_abstract_connection_dao() {} 24 | -------------------------------------------------------------------------------- /supla-server/src/crypt_blowfish/LINKS: -------------------------------------------------------------------------------- 1 | New versions of this package (crypt_blowfish): 2 | 3 | http://www.openwall.com/crypt/ 4 | 5 | A paper on the algorithm that explains its design decisions: 6 | 7 | http://www.usenix.org/events/usenix99/provos.html 8 | 9 | Unix Seventh Edition Manual, Volume 2: the password scheme (1978): 10 | 11 | http://plan9.bell-labs.com/7thEdMan/vol2/password 12 | 13 | The Openwall GNU/*/Linux (Owl) tcb suite implementing the alternative 14 | password shadowing scheme. This includes a PAM module which 15 | supersedes pam_unix and uses the password hashing framework provided 16 | with crypt_blowfish when setting new passwords. 17 | 18 | http://www.openwall.com/tcb/ 19 | 20 | pam_passwdqc, a password strength checking and policy enforcement 21 | module for PAM-aware password changing programs: 22 | 23 | http://www.openwall.com/passwdqc/ 24 | 25 | John the Ripper password cracker: 26 | 27 | http://www.openwall.com/john/ 28 | 29 | $Owl: Owl/packages/glibc/crypt_blowfish/LINKS,v 1.4 2005/11/16 13:09:47 solar Exp $ 30 | -------------------------------------------------------------------------------- /supla-scheduler/src/test/WorkerTest.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) AC SOFTWARE SP. Z O.O. 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License 6 | as published by the Free Software Foundation; either version 2 7 | of the License, or (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program; if not, write to the Free Software 16 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | */ 18 | #include "WorkerTest.h" 19 | #include "../worker.h" // NOLINT 20 | #include "gtest/gtest.h" 21 | 22 | namespace { 23 | 24 | class WorkerTest : public ::testing::Test { 25 | protected: 26 | }; 27 | 28 | } // namespace 29 | -------------------------------------------------------------------------------- /supla-server/src/client/abstract_client_scene_dao.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) AC SOFTWARE SP. Z O.O. 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License 6 | as published by the Free Software Foundation; either version 2 7 | of the License, or (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program; if not, write to the Free Software 16 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | */ 18 | 19 | #include "client/abstract_client_scene_dao.h" 20 | 21 | supla_abstract_client_scene_dao::supla_abstract_client_scene_dao() {} 22 | 23 | supla_abstract_client_scene_dao::~supla_abstract_client_scene_dao() {} 24 | -------------------------------------------------------------------------------- /supla-server/src/jsonconfig/abstract_json_config_getter.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) AC SOFTWARE SP. Z O.O. 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License 6 | as published by the Free Software Foundation; either version 2 7 | of the License, or (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program; if not, write to the Free Software 16 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | */ 18 | 19 | #include "jsonconfig/abstract_json_config_getter.h" 20 | 21 | abstract_json_config_getter::abstract_json_config_getter(void) {} 22 | 23 | abstract_json_config_getter::~abstract_json_config_getter(void) {} 24 | -------------------------------------------------------------------------------- /supla-scheduler/src/test/doubles/WorkerMock.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) AC SOFTWARE SP. Z O.O. 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License 6 | as published by the Free Software Foundation; either version 2 7 | of the License, or (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program; if not, write to the Free Software 16 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | */ 18 | 19 | #include "WorkerMock.h" 20 | 21 | #include 22 | #include 23 | 24 | #include 25 | 26 | WorkerMock::WorkerMock(queue *q) : s_abstract_worker(q) {} 27 | 28 | WorkerMock::~WorkerMock() {} 29 | -------------------------------------------------------------------------------- /supla-server/src/asynctask/abstract_asynctask_observer.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) AC SOFTWARE SP. Z O.O. 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License 6 | as published by the Free Software Foundation; either version 2 7 | of the License, or (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program; if not, write to the Free Software 16 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | */ 18 | 19 | #include "abstract_asynctask_observer.h" 20 | 21 | supla_abstract_asynctask_observer::supla_abstract_asynctask_observer() {} 22 | 23 | supla_abstract_asynctask_observer::~supla_abstract_asynctask_observer(void) {} 24 | -------------------------------------------------------------------------------- /supla-dev/Debug/src/dht/subdir.mk: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # Automatically-generated file. Do not edit! 3 | ################################################################################ 4 | 5 | # Add inputs and outputs from these tool invocations to the build variables 6 | C_SRCS += \ 7 | ../src/dht/common_dht_read.c \ 8 | ../src/dht/pi_2_dht_read.c \ 9 | ../src/dht/pi_2_mmio.c 10 | 11 | OBJS += \ 12 | ./src/dht/common_dht_read.o \ 13 | ./src/dht/pi_2_dht_read.o \ 14 | ./src/dht/pi_2_mmio.o 15 | 16 | C_DEPS += \ 17 | ./src/dht/common_dht_read.d \ 18 | ./src/dht/pi_2_dht_read.d \ 19 | ./src/dht/pi_2_mmio.d 20 | 21 | 22 | # Each subdirectory must supply rules for building sources it contributes 23 | src/dht/%.o: ../src/dht/%.c 24 | @echo 'Building file: $<' 25 | @echo 'Invoking: Cross GCC Compiler' 26 | gcc -D__DEBUG=1 -D__W1_SIMULATE=1 -D__GPIO_SIMULATE=1 -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o "$@" "$<" 27 | @echo 'Finished building: $<' 28 | @echo ' ' 29 | 30 | 31 | -------------------------------------------------------------------------------- /supla-server/src/actions/abstract_action_parameters.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) AC SOFTWARE SP. Z O.O. 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License 6 | as published by the Free Software Foundation; either version 2 7 | of the License, or (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program; if not, write to the Free Software 16 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | */ 18 | 19 | #include 20 | 21 | supla_abstract_action_parameters::supla_abstract_action_parameters(void) {} 22 | 23 | supla_abstract_action_parameters::~supla_abstract_action_parameters(void) {} 24 | -------------------------------------------------------------------------------- /supla-server/src/scene/abstract_scene_operations_dao.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) AC SOFTWARE SP. Z O.O. 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License 6 | as published by the Free Software Foundation; either version 2 7 | of the License, or (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program; if not, write to the Free Software 16 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | */ 18 | 19 | #include "scene/abstract_scene_operations_dao.h" 20 | 21 | supla_abstract_scene_operations_dao::supla_abstract_scene_operations_dao() {} 22 | 23 | supla_abstract_scene_operations_dao::~supla_abstract_scene_operations_dao() {} 24 | -------------------------------------------------------------------------------- /supla-server/src/test/doubles/client/ClientDaoMock.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) AC SOFTWARE SP. Z O.O. 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License 6 | as published by the Free Software Foundation; either version 2 7 | of the License, or (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program; if not, write to the Free Software 16 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | */ 18 | 19 | #include "doubles/client/ClientDaoMock.h" 20 | 21 | namespace testing { 22 | ClientDaoMock::ClientDaoMock(void) : supla_abstract_client_dao() {} 23 | 24 | ClientDaoMock::~ClientDaoMock(void) {} 25 | 26 | } // namespace testing 27 | -------------------------------------------------------------------------------- /supla-server/src/test/doubles/push/PnThrottlingMock.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) AC SOFTWARE SP. Z O.O. 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License 6 | as published by the Free Software Foundation; either version 2 7 | of the License, or (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program; if not, write to the Free Software 16 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | */ 18 | 19 | #include "PnThrottlingMock.h" 20 | 21 | namespace testing { 22 | 23 | PnThrottlingMock::PnThrottlingMock(void) : supla_pn_throttling() {} 24 | 25 | PnThrottlingMock::~PnThrottlingMock() {} 26 | 27 | } // namespace testing 28 | -------------------------------------------------------------------------------- /supla-server/src/actions/abstract_action_config.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) AC SOFTWARE SP. Z O.O. 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License 6 | as published by the Free Software Foundation; either version 2 7 | of the License, or (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program; if not, write to the Free Software 16 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | */ 18 | 19 | #include "abstract_action_config.h" 20 | 21 | abstract_action_config::abstract_action_config(void) {} 22 | 23 | abstract_action_config::~abstract_action_config(void) {} 24 | 25 | int abstract_action_config::get_cap(void) { return 0; } 26 | -------------------------------------------------------------------------------- /supla-server/src/test/doubles/ActivePeriodMock.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) AC SOFTWARE SP. Z O.O. 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License 6 | as published by the Free Software Foundation; either version 2 7 | of the License, or (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program; if not, write to the Free Software 16 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | */ 18 | 19 | #include "doubles/ActivePeriodMock.h" 20 | 21 | namespace testing { 22 | 23 | ActivePeriodMock::ActivePeriodMock(void) : supla_active_period() {} 24 | 25 | ActivePeriodMock::~ActivePeriodMock(void) {} 26 | 27 | } // namespace testing 28 | -------------------------------------------------------------------------------- /supla-server/src/test/doubles/distributedobjects/DObjectMock.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) AC SOFTWARE SP. Z O.O. 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License 6 | as published by the Free Software Foundation; either version 2 7 | of the License, or (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program; if not, write to the Free Software 16 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | */ 18 | 19 | #include "doubles/distributedobjects/DObjectMock.h" 20 | 21 | namespace testing { 22 | DObjectMock::DObjectMock(int id) : supla_dobject(id) {} 23 | 24 | DObjectMock::~DObjectMock(void) {} 25 | 26 | } // namespace testing 27 | -------------------------------------------------------------------------------- /supla-console-client/src/client_loop.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) AC SOFTWARE SP. Z O.O. 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License 6 | as published by the Free Software Foundation; either version 2 7 | of the License, or (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program; if not, write to the Free Software 16 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | */ 18 | 19 | #ifndef CLIENT_LOOP_H_ 20 | #define CLIENT_LOOP_H_ 21 | 22 | #ifdef __cplusplus 23 | extern "C" { 24 | #endif 25 | 26 | void client_loop(void *user_data, void *sthread); 27 | 28 | #ifdef __cplusplus 29 | } 30 | #endif 31 | 32 | #endif /* CLIENT_LOOP_H_ */ 33 | -------------------------------------------------------------------------------- /supla-server/src/converter/abstract_value_to_action_converter.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) AC SOFTWARE SP. Z O.O. 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License 6 | as published by the Free Software Foundation; either version 2 7 | of the License, or (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program; if not, write to the Free Software 16 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | */ 18 | 19 | #include 20 | 21 | abstract_value_to_action_converter::abstract_value_to_action_converter() {} 22 | 23 | abstract_value_to_action_converter::~abstract_value_to_action_converter() {} 24 | -------------------------------------------------------------------------------- /supla-server/src/test/doubles/http/CurlAdapterMock.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) AC SOFTWARE SP. Z O.O. 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License 6 | as published by the Free Software Foundation; either version 2 7 | of the License, or (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program; if not, write to the Free Software 16 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | */ 18 | 19 | #include "doubles/http/CurlAdapterMock.h" 20 | 21 | namespace testing { 22 | 23 | CurlAdapterMock::CurlAdapterMock(void) : supla_abstract_curl_adapter() {} 24 | 25 | CurlAdapterMock::~CurlAdapterMock(void) {} 26 | 27 | } // namespace testing 28 | -------------------------------------------------------------------------------- /supla-console-client/src/test/AllTests.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) AC SOFTWARE SP. Z O.O. 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License 6 | as published by the Free Software Foundation; either version 2 7 | of the License, or (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program; if not, write to the Free Software 16 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | */ 18 | 19 | #include "gtest/gtest.h" 20 | #include "integration/IntegrationTest.h" 21 | 22 | int main(int argc, char **argv) { 23 | ::testing::IntegrationTest::Init(argc, argv); 24 | ::testing::InitGoogleTest(&argc, argv); 25 | 26 | return RUN_ALL_TESTS(); 27 | } 28 | -------------------------------------------------------------------------------- /supla-server/src/test/doubles/http/HttphrottlingMock.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) AC SOFTWARE SP. Z O.O. 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License 6 | as published by the Free Software Foundation; either version 2 7 | of the License, or (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program; if not, write to the Free Software 16 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | */ 18 | 19 | #include "doubles/http/HttpThrottlingMock.h" 20 | 21 | namespace testing { 22 | 23 | HttpThrottlingMock::HttpThrottlingMock(void) : supla_http_throttling() {} 24 | 25 | HttpThrottlingMock::~HttpThrottlingMock(void) {} 26 | 27 | } // namespace testing 28 | -------------------------------------------------------------------------------- /supla-server/src/test/DCPairTest.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) AC SOFTWARE SP. Z O.O. 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License 6 | as published by the Free Software Foundation; either version 2 7 | of the License, or (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program; if not, write to the Free Software 16 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | */ 18 | 19 | #ifndef DCPAIRTEST_H_ 20 | #define DCPAIRTEST_H_ 21 | 22 | #include "gtest/gtest.h" 23 | #include "dcpair.h" 24 | 25 | namespace testing { 26 | 27 | class DCPairTest : public Test { 28 | protected: 29 | }; 30 | 31 | } /* namespace testing */ 32 | 33 | #endif /* DCPAIRTEST_H_ */ 34 | -------------------------------------------------------------------------------- /supla-server/src/test/doubles/asynctask/AsyncTaskThreadPoolMock.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) AC SOFTWARE SP. Z O.O. 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License 6 | as published by the Free Software Foundation; either version 2 7 | of the License, or (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program; if not, write to the Free Software 16 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | */ 18 | 19 | #include "AsyncTaskThreadPoolMock.h" 20 | 21 | AsyncTaskThreadPoolMock::AsyncTaskThreadPoolMock(supla_asynctask_queue *queue) 22 | : supla_abstract_asynctask_thread_pool(queue) {} 23 | 24 | AsyncTaskThreadPoolMock::~AsyncTaskThreadPoolMock(void) {} 25 | -------------------------------------------------------------------------------- /supla-server/src/test/doubles/mqtt/MqttStateMessageProviderMock.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) AC SOFTWARE SP. Z O.O. 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License 6 | as published by the Free Software Foundation; either version 2 7 | of the License, or (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program; if not, write to the Free Software 16 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | */ 18 | 19 | #include "MqttStateMessageProviderMock.h" 20 | 21 | MqttStateMessageProviderMock::MqttStateMessageProviderMock(void) 22 | : supla_mqtt_abstract_state_message_provider() {} 23 | 24 | MqttStateMessageProviderMock::~MqttStateMessageProviderMock(void) {} 25 | -------------------------------------------------------------------------------- /supla-dev/src/devconnection.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) AC SOFTWARE SP. Z O.O. 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License 6 | as published by the Free Software Foundation; either version 2 7 | of the License, or (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program; if not, write to the Free Software 16 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | */ 18 | 19 | #ifndef DEV_CONNECTION_H_ 20 | #define DEV_CONNECTION_H_ 21 | 22 | #ifdef __cplusplus 23 | extern "C" { 24 | #endif 25 | 26 | void* devconnection_start(void); 27 | void devconnection_stop(void* dconn_thread); 28 | 29 | #ifdef __cplusplus 30 | } 31 | #endif 32 | 33 | #endif /* DEV_CONNECTION_H_ */ 34 | -------------------------------------------------------------------------------- /supla-server/src/test/doubles/mqtt/MqttChannelMessageProviderMock.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) AC SOFTWARE SP. Z O.O. 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License 6 | as published by the Free Software Foundation; either version 2 7 | of the License, or (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program; if not, write to the Free Software 16 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | */ 18 | 19 | #include "MqttChannelMessageProviderMock.h" 20 | 21 | MqttChannelMessageProviderMock::MqttChannelMessageProviderMock(void) 22 | : supla_mqtt_channel_message_provider() {} 23 | 24 | MqttChannelMessageProviderMock::~MqttChannelMessageProviderMock(void) {} 25 | -------------------------------------------------------------------------------- /supla-scheduler/src/test/AllTests.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) AC SOFTWARE SP. Z O.O. 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License 6 | as published by the Free Software Foundation; either version 2 7 | of the License, or (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program; if not, write to the Free Software 16 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | */ 18 | 19 | #include "../schedulercfg.h" 20 | #include "gtest/gtest.h" 21 | 22 | int main(int argc, char **argv) { 23 | ::testing::InitGoogleTest(&argc, argv); 24 | 25 | schedulercfg_init(argc, argv); 26 | 27 | int result = RUN_ALL_TESTS(); 28 | 29 | scfg_free(); 30 | 31 | return result; 32 | } 33 | -------------------------------------------------------------------------------- /supla-server/src/asynctask/asynctask_thread_bucket.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) AC SOFTWARE SP. Z O.O. 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License 6 | as published by the Free Software Foundation; either version 2 7 | of the License, or (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program; if not, write to the Free Software 16 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | */ 18 | 19 | #include "asynctask_thread_bucket.h" 20 | 21 | supla_asynctask_thread_bucket::supla_asynctask_thread_bucket(void) {} 22 | 23 | supla_asynctask_thread_bucket::~supla_asynctask_thread_bucket(void) {} 24 | 25 | void supla_asynctask_thread_bucket::thread_will_terminate(void) {} 26 | -------------------------------------------------------------------------------- /supla-server/src/test/device/value/ChannelValueTest.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) AC SOFTWARE SP. Z O.O. 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License 6 | as published by the Free Software Foundation; either version 2 7 | of the License, or (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program; if not, write to the Free Software 16 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | */ 18 | 19 | #ifndef CHANNEL_VALUE_TEST_H_ 20 | #define CHANNEL_VALUE_TEST_H_ 21 | 22 | #include "gtest/gtest.h" 23 | 24 | namespace testing { 25 | 26 | class ChannelValueTest : public Test { 27 | public: 28 | }; 29 | 30 | } // namespace testing 31 | 32 | #endif /*CHANNEL_VALUE_TEST_H_*/ 33 | -------------------------------------------------------------------------------- /supla-server/src/test/doubles/db/DbAccessProviderMock.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) AC SOFTWARE SP. Z O.O. 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License 6 | as published by the Free Software Foundation; either version 2 7 | of the License, or (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program; if not, write to the Free Software 16 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | */ 18 | 19 | #include "doubles/db/DbAccessProviderMock.h" 20 | 21 | namespace testing { 22 | DbAccessProviderMock::DbAccessProviderMock(void) 23 | : supla_abstract_db_access_provider() {} 24 | 25 | DbAccessProviderMock::~DbAccessProviderMock(void) {} 26 | 27 | } // namespace testing 28 | -------------------------------------------------------------------------------- /supla-server/src/test/doubles/ipc/SendPushCommandMock.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) AC SOFTWARE SP. Z O.O. 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License 6 | as published by the Free Software Foundation; either version 2 7 | of the License, or (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program; if not, write to the Free Software 16 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | */ 18 | 19 | #include "SendPushCommandMock.h" 20 | 21 | namespace testing { 22 | 23 | SendPushCommandMock::SendPushCommandMock( 24 | supla_abstract_ipc_socket_adapter *socket_adapter) 25 | : supla_abstract_send_push_command(socket_adapter) {} 26 | 27 | } // namespace testing 28 | -------------------------------------------------------------------------------- /supla-server/src/test/scene/SceneAccessTest.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) AC SOFTWARE SP. Z O.O. 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License 6 | as published by the Free Software Foundation; either version 2 7 | of the License, or (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program; if not, write to the Free Software 16 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | */ 18 | 19 | #ifndef SCENEACCESSTEST_H_ 20 | #define SCENEACCESSTEST_H_ 21 | 22 | #include "SceneTest.h" 23 | #include "gtest/gtest.h" 24 | 25 | namespace testing { 26 | 27 | class SceneAccessTest : public SceneTest {}; 28 | 29 | } /* namespace testing */ 30 | 31 | #endif /* SCENEACCESSTEST_H_ */ 32 | -------------------------------------------------------------------------------- /supla-scheduler/src/test/ActionTest.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) AC SOFTWARE SP. Z O.O. 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License 6 | as published by the Free Software Foundation; either version 2 7 | of the License, or (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program; if not, write to the Free Software 16 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | */ 18 | 19 | #ifndef H_ACTION_TEST_H_ 20 | #define H_ACTION_TEST_H_ 21 | 22 | #include 23 | 24 | namespace testing { 25 | class ActionTest : public Test { 26 | public: 27 | virtual ~ActionTest(); 28 | ActionTest(); 29 | }; 30 | } // namespace testing 31 | 32 | #endif /*H_ACTION_TEST_H_*/ 33 | -------------------------------------------------------------------------------- /supla-server/src/test/conn/AuthkeyCacheTest.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) AC SOFTWARE SP. Z O.O. 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License 6 | as published by the Free Software Foundation; either version 2 7 | of the License, or (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program; if not, write to the Free Software 16 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | */ 18 | 19 | #ifndef AUTHKEY_CACHE_TEST_H_ 20 | #define AUTHKEY_CACHE_TEST_H_ 21 | 22 | #include "gtest/gtest.h" // NOLINT 23 | 24 | namespace testing { 25 | 26 | class AuthkeyCacheTest : public Test { 27 | public: 28 | }; 29 | 30 | } // namespace testing 31 | 32 | #endif /* AUTHKEY_CACHE_TEST_H_ */ 33 | -------------------------------------------------------------------------------- /supla-server/src/test/doubles/ipc/GetCharCommandMock.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) AC SOFTWARE SP. Z O.O. 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License 6 | as published by the Free Software Foundation; either version 2 7 | of the License, or (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program; if not, write to the Free Software 16 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | */ 18 | 19 | #include "doubles/ipc/GetCharCommandMock.h" 20 | 21 | namespace testing { 22 | 23 | GetCharCommandMock::GetCharCommandMock( 24 | supla_abstract_ipc_socket_adapter *socket_adapter) 25 | : supla_abstract_get_char_command(socket_adapter) {} 26 | 27 | } // namespace testing 28 | -------------------------------------------------------------------------------- /supla-server/src/test/doubles/ipc/GetRGBWCommandMock.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) AC SOFTWARE SP. Z O.O. 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License 6 | as published by the Free Software Foundation; either version 2 7 | of the License, or (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program; if not, write to the Free Software 16 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | */ 18 | 19 | #include "doubles/ipc/GetRGBWCommandMock.h" 20 | 21 | namespace testing { 22 | 23 | GetRGBWCommandMock::GetRGBWCommandMock( 24 | supla_abstract_ipc_socket_adapter *socket_adapter) 25 | : supla_abstract_get_rgbw_command(socket_adapter) {} 26 | 27 | } // namespace testing 28 | -------------------------------------------------------------------------------- /supla-server/src/test/doubles/ipc/SetCharCommandMock.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) AC SOFTWARE SP. Z O.O. 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License 6 | as published by the Free Software Foundation; either version 2 7 | of the License, or (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program; if not, write to the Free Software 16 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | */ 18 | 19 | #include "doubles/ipc/SetCharCommandMock.h" 20 | 21 | namespace testing { 22 | 23 | SetCharCommandMock::SetCharCommandMock( 24 | supla_abstract_ipc_socket_adapter *socket_adapter) 25 | : supla_abstract_set_char_command(socket_adapter) {} 26 | 27 | } // namespace testing 28 | -------------------------------------------------------------------------------- /supla-server/src/asynctask/abstract_asynctask_search_condition.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) AC SOFTWARE SP. Z O.O. 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License 6 | as published by the Free Software Foundation; either version 2 7 | of the License, or (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program; if not, write to the Free Software 16 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | */ 18 | 19 | #include "abstract_asynctask_search_condition.h" 20 | 21 | supla_abstract_asynctask_search_condition:: 22 | supla_abstract_asynctask_search_condition(void) {} 23 | 24 | supla_abstract_asynctask_search_condition:: 25 | ~supla_abstract_asynctask_search_condition(void) {} 26 | -------------------------------------------------------------------------------- /supla-server/src/test/device/ChannelStateTest.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) AC SOFTWARE SP. Z O.O. 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License 6 | as published by the Free Software Foundation; either version 2 7 | of the License, or (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program; if not, write to the Free Software 16 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | */ 18 | 19 | #ifndef CHANNEL_STATE_TEST_H_ 20 | #define CHANNEL_STATE_TEST_H_ 21 | 22 | #include "gtest/gtest.h" // NOLINT 23 | 24 | namespace testing { 25 | 26 | class ChannelStateTest : public Test { 27 | public: 28 | }; 29 | 30 | } /* namespace testing */ 31 | 32 | #endif /* CHANNEL_STATE_TEST_H_ */ 33 | -------------------------------------------------------------------------------- /supla-server/src/test/doubles/ipc/GetIcValueCommandMock.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) AC SOFTWARE SP. Z O.O. 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License 6 | as published by the Free Software Foundation; either version 2 7 | of the License, or (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program; if not, write to the Free Software 16 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | */ 18 | 19 | #include "GetIcValueCommandMock.h" 20 | 21 | namespace testing { 22 | 23 | GetIcValueCommandMock::GetIcValueCommandMock( 24 | supla_abstract_ipc_socket_adapter *socket_adapter) 25 | : supla_abstract_get_ic_value_command(socket_adapter) {} 26 | 27 | } // namespace testing 28 | -------------------------------------------------------------------------------- /supla-server/src/test/doubles/ipc/GetPnLimitCommandMock.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) AC SOFTWARE SP. Z O.O. 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License 6 | as published by the Free Software Foundation; either version 2 7 | of the License, or (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program; if not, write to the Free Software 16 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | */ 18 | 19 | #include "GetPnLimitCommandMock.h" 20 | 21 | namespace testing { 22 | 23 | GetPnLimitCommandMock::GetPnLimitCommandMock( 24 | supla_abstract_ipc_socket_adapter *socket_adapter) 25 | : supla_abstract_get_pn_limit_command(socket_adapter) {} 26 | 27 | } // namespace testing 28 | -------------------------------------------------------------------------------- /supla-server/src/srpc/abstract_srpc_adapter.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) AC SOFTWARE SP. Z O.O. 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License 6 | as published by the Free Software Foundation; either version 2 7 | of the License, or (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program; if not, write to the Free Software 16 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | */ 18 | 19 | #include "abstract_srpc_adapter.h" 20 | 21 | supla_abstract_srpc_adapter::supla_abstract_srpc_adapter(void *srpc) { 22 | this->srpc = srpc; 23 | } 24 | 25 | supla_abstract_srpc_adapter::~supla_abstract_srpc_adapter() {} 26 | 27 | void *supla_abstract_srpc_adapter::get_srpc(void) { return srpc; } 28 | -------------------------------------------------------------------------------- /supla-server/src/test/device/value/ChannelEmValueTest.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) AC SOFTWARE SP. Z O.O. 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License 6 | as published by the Free Software Foundation; either version 2 7 | of the License, or (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program; if not, write to the Free Software 16 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | */ 18 | 19 | #ifndef CHANNEL_EM_VALUE_TEST_H_ 20 | #define CHANNEL_EM_VALUE_TEST_H_ 21 | 22 | #include "gtest/gtest.h" 23 | 24 | namespace testing { 25 | 26 | class ChannelEmValueTest : public Test { 27 | public: 28 | }; 29 | 30 | } // namespace testing 31 | 32 | #endif /*CHANNEL_EM_VALUE_TEST_H_*/ 33 | -------------------------------------------------------------------------------- /supla-server/src/test/device/value/ChannelFbValueTest.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) AC SOFTWARE SP. Z O.O. 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License 6 | as published by the Free Software Foundation; either version 2 7 | of the License, or (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program; if not, write to the Free Software 16 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | */ 18 | 19 | #ifndef CHANNEL_FB_VALUE_TEST_H_ 20 | #define CHANNEL_FB_VALUE_TEST_H_ 21 | 22 | #include "gtest/gtest.h" 23 | 24 | namespace testing { 25 | 26 | class ChannelFbValueTest : public Test { 27 | public: 28 | }; 29 | 30 | } // namespace testing 31 | 32 | #endif /*CHANNEL_FB_VALUE_TEST_H_*/ 33 | -------------------------------------------------------------------------------- /supla-server/src/test/device/value/ChannelIcValueTest.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) AC SOFTWARE SP. Z O.O. 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License 6 | as published by the Free Software Foundation; either version 2 7 | of the License, or (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program; if not, write to the Free Software 16 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | */ 18 | 19 | #ifndef CHANNEL_IC_VALUE_TEST_H_ 20 | #define CHANNEL_IC_VALUE_TEST_H_ 21 | 22 | #include "gtest/gtest.h" 23 | 24 | namespace testing { 25 | 26 | class ChannelIcValueTest : public Test { 27 | public: 28 | }; 29 | 30 | } // namespace testing 31 | 32 | #endif /*CHANNEL_IC_VALUE_TEST_H_*/ 33 | -------------------------------------------------------------------------------- /supla-server/src/test/device/value/ChannelRsValueTest.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) AC SOFTWARE SP. Z O.O. 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License 6 | as published by the Free Software Foundation; either version 2 7 | of the License, or (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program; if not, write to the Free Software 16 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | */ 18 | 19 | #ifndef CHANNEL_RS_VALUE_TEST_H_ 20 | #define CHANNEL_RS_VALUE_TEST_H_ 21 | 22 | #include "gtest/gtest.h" 23 | 24 | namespace testing { 25 | 26 | class ChannelRsValueTest : public Test { 27 | public: 28 | }; 29 | 30 | } // namespace testing 31 | 32 | #endif /*CHANNEL_RS_VALUE_TEST_H_*/ 33 | -------------------------------------------------------------------------------- /supla-server/src/test/doubles/ipc/GetDoubleCommandMock.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) AC SOFTWARE SP. Z O.O. 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License 6 | as published by the Free Software Foundation; either version 2 7 | of the License, or (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program; if not, write to the Free Software 16 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | */ 18 | 19 | #include "doubles/ipc/GetDoubleCommandMock.h" 20 | 21 | namespace testing { 22 | 23 | GetDoubleCommandMock::GetDoubleCommandMock( 24 | supla_abstract_ipc_socket_adapter *socket_adapter) 25 | : supla_abstract_get_double_command(socket_adapter) {} 26 | 27 | } // namespace testing 28 | -------------------------------------------------------------------------------- /supla-server/src/test/doubles/ipc/GetStatusCommandMock.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) AC SOFTWARE SP. Z O.O. 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License 6 | as published by the Free Software Foundation; either version 2 7 | of the License, or (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program; if not, write to the Free Software 16 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | */ 18 | 19 | #include "doubles/ipc/GetStatusCommandMock.h" 20 | 21 | namespace testing { 22 | 23 | GetStatusCommandMock::GetStatusCommandMock( 24 | supla_abstract_ipc_socket_adapter *socket_adapter) 25 | : supla_abstract_get_status_command(socket_adapter) {} 26 | 27 | } // namespace testing 28 | -------------------------------------------------------------------------------- /supla-server/src/test/doubles/ipc/SetCgCharCommandMock.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) AC SOFTWARE SP. Z O.O. 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License 6 | as published by the Free Software Foundation; either version 2 7 | of the License, or (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program; if not, write to the Free Software 16 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | */ 18 | 19 | #include "doubles/ipc/SetCgCharCommandMock.h" 20 | 21 | namespace testing { 22 | 23 | SetCgCharCommandMock::SetCgCharCommandMock( 24 | supla_abstract_ipc_socket_adapter *socket_adapter) 25 | : supla_abstract_set_cg_char_command(socket_adapter) {} 26 | 27 | } // namespace testing 28 | -------------------------------------------------------------------------------- /supla-server/src/test/device/value/ChannelDgfValueTest.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) AC SOFTWARE SP. Z O.O. 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License 6 | as published by the Free Software Foundation; either version 2 7 | of the License, or (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program; if not, write to the Free Software 16 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | */ 18 | 19 | #ifndef CHANNEL_DGF_VALUE_TEST_H_ 20 | #define CHANNEL_DGF_VALUE_TEST_H_ 21 | 22 | #include "gtest/gtest.h" 23 | 24 | namespace testing { 25 | 26 | class ChannelDgfValueTest : public Test { 27 | public: 28 | }; 29 | 30 | } // namespace testing 31 | 32 | #endif /*CHANNEL_DGF_VALUE_TEST_H_*/ 33 | -------------------------------------------------------------------------------- /supla-server/src/test/doubles/ipc/ActionCommandMock.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) AC SOFTWARE SP. Z O.O. 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License 6 | as published by the Free Software Foundation; either version 2 7 | of the License, or (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program; if not, write to the Free Software 16 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | */ 18 | 19 | #include "doubles/ipc/ActionCommandMock.h" 20 | 21 | namespace testing { 22 | 23 | ActionCommandMock::ActionCommandMock( 24 | supla_abstract_ipc_socket_adapter *socket_adapter, int action) 25 | : supla_abstract_action_command(socket_adapter, action) {} 26 | 27 | } // namespace testing 28 | -------------------------------------------------------------------------------- /supla-server/src/test/doubles/ipc/FactoryResetCommandMock.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) AC SOFTWARE SP. Z O.O. 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License 6 | as published by the Free Software Foundation; either version 2 7 | of the License, or (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program; if not, write to the Free Software 16 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | */ 18 | 19 | #include "FactoryResetCommandMock.h" 20 | 21 | namespace testing { 22 | 23 | FactoryResetCommandMock::FactoryResetCommandMock( 24 | supla_abstract_ipc_socket_adapter *socket_adapter) 25 | : supla_abstract_factory_reset_command(socket_adapter) {} 26 | 27 | } // namespace testing 28 | -------------------------------------------------------------------------------- /supla-server/src/test/doubles/ipc/GetEmValueCommandMock.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) AC SOFTWARE SP. Z O.O. 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License 6 | as published by the Free Software Foundation; either version 2 7 | of the License, or (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program; if not, write to the Free Software 16 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | */ 18 | 19 | #include "doubles/ipc/GetEmValueCommandMock.h" 20 | 21 | namespace testing { 22 | 23 | GetEmValueCommandMock::GetEmValueCommandMock( 24 | supla_abstract_ipc_socket_adapter *socket_adapter) 25 | : supla_abstract_get_em_value_command(socket_adapter) {} 26 | 27 | } // namespace testing 28 | -------------------------------------------------------------------------------- /supla-server/src/test/doubles/ipc/OnVbtChangedCommandMock.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) AC SOFTWARE SP. Z O.O. 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License 6 | as published by the Free Software Foundation; either version 2 7 | of the License, or (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program; if not, write to the Free Software 16 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | */ 18 | 19 | #include "OnVbtChangedCommandMock.h" 20 | 21 | namespace testing { 22 | 23 | OnVbtChangedCommandMock::OnVbtChangedCommandMock( 24 | supla_abstract_ipc_socket_adapter *socket_adapter) 25 | : supla_abstract_on_vbt_changed_command(socket_adapter) {} 26 | 27 | } // namespace testing 28 | -------------------------------------------------------------------------------- /supla-server/src/crypt_blowfish/crypt_blowfish.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Written by Solar Designer in 2000-2011. 3 | * No copyright is claimed, and the software is hereby placed in the public 4 | * domain. In case this attempt to disclaim copyright and place the software 5 | * in the public domain is deemed null and void, then the software is 6 | * Copyright (c) 2000-2011 Solar Designer and it is hereby released to the 7 | * general public under the following terms: 8 | * 9 | * Redistribution and use in source and binary forms, with or without 10 | * modification, are permitted. 11 | * 12 | * There's ABSOLUTELY NO WARRANTY, express or implied. 13 | * 14 | * See crypt_blowfish.c for more information. 15 | */ 16 | 17 | #ifndef _CRYPT_BLOWFISH_H 18 | #define _CRYPT_BLOWFISH_H 19 | 20 | extern int _crypt_output_magic(const char *setting, char *output, int size); 21 | extern char *_crypt_blowfish_rn(const char *key, const char *setting, 22 | char *output, int size); 23 | extern char *_crypt_gensalt_blowfish_rn(const char *prefix, 24 | unsigned long count, 25 | const char *input, int size, char *output, int output_size); 26 | 27 | #endif 28 | -------------------------------------------------------------------------------- /supla-server/src/test/conn/ConnectionObjectTest.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) AC SOFTWARE SP. Z O.O. 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License 6 | as published by the Free Software Foundation; either version 2 7 | of the License, or (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program; if not, write to the Free Software 16 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | */ 18 | 19 | #ifndef CONNECTION_OBJECT_TEST_H_ 20 | #define CONNECTION_OBJECT_TEST_H 21 | 22 | #include "gtest/gtest.h" // NOLINT 23 | 24 | namespace testing { 25 | 26 | class ConnectionObjectTest : public Test { 27 | public: 28 | }; 29 | 30 | } // namespace testing 31 | 32 | #endif /* CONNECTION_OBJECT_TEST_H_ */ 33 | -------------------------------------------------------------------------------- /supla-server/src/test/device/ChannelFragmentTest.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) AC SOFTWARE SP. Z O.O. 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License 6 | as published by the Free Software Foundation; either version 2 7 | of the License, or (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program; if not, write to the Free Software 16 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | */ 18 | 19 | #ifndef CHANNEL_FRAGMENT_TEST_H_ 20 | #define CHANNEL_FRAGMENT_TEST_H_ 21 | 22 | #include "gtest/gtest.h" // NOLINT 23 | 24 | namespace testing { 25 | 26 | class ChannelFragmentTest : public Test { 27 | public: 28 | }; 29 | 30 | } /* namespace testing */ 31 | 32 | #endif /* CHANNEL_FRAGMENT_TEST_H_ */ 33 | -------------------------------------------------------------------------------- /supla-server/src/test/device/ChannelRelationTest.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) AC SOFTWARE SP. Z O.O. 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License 6 | as published by the Free Software Foundation; either version 2 7 | of the License, or (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program; if not, write to the Free Software 16 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | */ 18 | 19 | #ifndef CHANNEL_RELATION_TEST_H_ 20 | #define CHANNEL_RELATION_TEST_H_ 21 | 22 | #include "gtest/gtest.h" // NOLINT 23 | 24 | namespace testing { 25 | 26 | class ChannelRelationTest : public Test { 27 | public: 28 | }; 29 | 30 | } /* namespace testing */ 31 | 32 | #endif /* CHANNEL_RELATION_TEST_H_ */ 33 | -------------------------------------------------------------------------------- /supla-server/src/test/device/value/ChannelGateValueTest.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) AC SOFTWARE SP. Z O.O. 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License 6 | as published by the Free Software Foundation; either version 2 7 | of the License, or (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program; if not, write to the Free Software 16 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | */ 18 | 19 | #ifndef CHANNEL_GATE_VALUE_TEST_H_ 20 | #define CHANNEL_GATE_VALUE_TEST_H_ 21 | 22 | #include "gtest/gtest.h" 23 | 24 | namespace testing { 25 | 26 | class ChannelGateValueTest : public Test { 27 | public: 28 | }; 29 | 30 | } // namespace testing 31 | 32 | #endif /*CHANNEL_GATE_VALUE_TEST_H_*/ 33 | -------------------------------------------------------------------------------- /supla-server/src/test/device/value/ChannelHvacValueTest.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) AC SOFTWARE SP. Z O.O. 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License 6 | as published by the Free Software Foundation; either version 2 7 | of the License, or (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program; if not, write to the Free Software 16 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | */ 18 | 19 | #ifndef CHANNEL_HVAC_VALUE_TEST_H_ 20 | #define CHANNEL_HVAC_VALUE_TEST_H_ 21 | 22 | #include "gtest/gtest.h" 23 | 24 | namespace testing { 25 | 26 | class ChannelHvacValueTest : public Test { 27 | public: 28 | }; 29 | 30 | } // namespace testing 31 | 32 | #endif /*CHANNEL_HVAC_VALUE_TEST_H_*/ 33 | -------------------------------------------------------------------------------- /supla-server/src/test/device/value/ChannelRgbwValueTest.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) AC SOFTWARE SP. Z O.O. 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License 6 | as published by the Free Software Foundation; either version 2 7 | of the License, or (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program; if not, write to the Free Software 16 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | */ 18 | 19 | #ifndef CHANNEL_RGBW_VALUE_TEST_H_ 20 | #define CHANNEL_RGBW_VALUE_TEST_H_ 21 | 22 | #include "gtest/gtest.h" 23 | 24 | namespace testing { 25 | 26 | class ChannelRgbwValueTest : public Test { 27 | public: 28 | }; 29 | 30 | } // namespace testing 31 | 32 | #endif /*CHANNEL_RGBW_VALUE_TEST_H_*/ 33 | -------------------------------------------------------------------------------- /supla-server/src/test/doubles/ipc/GetGpmValueCommandMock.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) AC SOFTWARE SP. Z O.O. 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License 6 | as published by the Free Software Foundation; either version 2 7 | of the License, or (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program; if not, write to the Free Software 16 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | */ 18 | 19 | #include "doubles/ipc/GetGpmValueCommandMock.h" 20 | 21 | namespace testing { 22 | 23 | GetGpmValueCommandMock::GetGpmValueCommandMock( 24 | supla_abstract_ipc_socket_adapter *socket_adapter) 25 | : supla_abstract_get_gpm_value_command(socket_adapter) {} 26 | 27 | } // namespace testing 28 | -------------------------------------------------------------------------------- /supla-server/src/test/doubles/ipc/GetHumidityCommandMock.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) AC SOFTWARE SP. Z O.O. 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License 6 | as published by the Free Software Foundation; either version 2 7 | of the License, or (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program; if not, write to the Free Software 16 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | */ 18 | 19 | #include "doubles/ipc/GetHumidityCommandMock.h" 20 | 21 | namespace testing { 22 | 23 | GetHumidityCommandMock::GetHumidityCommandMock( 24 | supla_abstract_ipc_socket_adapter *socket_adapter) 25 | : supla_abstract_get_humidity_command(socket_adapter) {} 26 | 27 | } // namespace testing 28 | -------------------------------------------------------------------------------- /supla-server/src/test/doubles/ipc/RecalibrateCommandMock.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) AC SOFTWARE SP. Z O.O. 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License 6 | as published by the Free Software Foundation; either version 2 7 | of the License, or (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program; if not, write to the Free Software 16 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | */ 18 | 19 | #include "doubles/ipc/RecalibrateCommandMock.h" 20 | 21 | namespace testing { 22 | 23 | RecalibrateCommandMock::RecalibrateCommandMock( 24 | supla_abstract_ipc_socket_adapter *socket_adapter) 25 | : supla_abstract_recalibrate_command(socket_adapter) {} 26 | 27 | } // namespace testing 28 | -------------------------------------------------------------------------------- /supla-server/src/test/doubles/ipc/RestartDeviceCommandMock.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) AC SOFTWARE SP. Z O.O. 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License 6 | as published by the Free Software Foundation; either version 2 7 | of the License, or (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program; if not, write to the Free Software 16 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | */ 18 | 19 | #include "RestartDeviceCommandMock.h" 20 | 21 | namespace testing { 22 | 23 | RestartDeviceCommandMock::RestartDeviceCommandMock( 24 | supla_abstract_ipc_socket_adapter *socket_adapter) 25 | : supla_abstract_restart_device_command(socket_adapter) {} 26 | 27 | } // namespace testing 28 | -------------------------------------------------------------------------------- /supla-server/src/test/conn/ConnectionObjectsTest.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) AC SOFTWARE SP. Z O.O. 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License 6 | as published by the Free Software Foundation; either version 2 7 | of the License, or (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program; if not, write to the Free Software 16 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | */ 18 | 19 | #ifndef CONNECTION_OBJECTS_TEST_H_ 20 | #define CONNECTION_OBJECTS_TEST_H_ 21 | 22 | #include "gtest/gtest.h" // NOLINT 23 | 24 | namespace testing { 25 | 26 | class ConnectionObjectsTest : public Test { 27 | public: 28 | }; 29 | 30 | } // namespace testing 31 | 32 | #endif /*CONNECTION_OBJECTS_TEST_H_*/ 33 | -------------------------------------------------------------------------------- /supla-server/src/test/device/value/ChannelOnOffValueTest.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) AC SOFTWARE SP. Z O.O. 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License 6 | as published by the Free Software Foundation; either version 2 7 | of the License, or (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program; if not, write to the Free Software 16 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | */ 18 | 19 | #ifndef CHANNEL_ONOFF_VALUE_TEST_H_ 20 | #define CHANNEL_ONOFF_VALUE_TEST_H_ 21 | 22 | #include "gtest/gtest.h" 23 | 24 | namespace testing { 25 | 26 | class ChannelOnOffValueTest : public Test { 27 | public: 28 | }; 29 | 30 | } // namespace testing 31 | 32 | #endif /*CHANNEL_ONOFF_VALUE_TEST_H_*/ 33 | -------------------------------------------------------------------------------- /supla-server/src/test/device/value/ChannelValveValueTest.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) AC SOFTWARE SP. Z O.O. 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License 6 | as published by the Free Software Foundation; either version 2 7 | of the License, or (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program; if not, write to the Free Software 16 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | */ 18 | 19 | #ifndef CHANNEL_VALVE_VALUE_TEST_H_ 20 | #define CHANNEL_VALVE_VALUE_TEST_H_ 21 | 22 | #include "gtest/gtest.h" 23 | 24 | namespace testing { 25 | 26 | class ChannelValveValueTest : public Test { 27 | public: 28 | }; 29 | 30 | } // namespace testing 31 | 32 | #endif /*CHANNEL_VALVE_VALUE_TEST_H_*/ 33 | -------------------------------------------------------------------------------- /supla-server/src/test/doubles/conn/AuthkeyCacheStub.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) AC SOFTWARE SP. Z O.O. 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License 6 | as published by the Free Software Foundation; either version 2 7 | of the License, or (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program; if not, write to the Free Software 16 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | */ 18 | 19 | #include "doubles/conn/AuthkeyCacheStub.h" // NOLINT 20 | 21 | #include "gtest/gtest.h" // NOLINT 22 | 23 | AuthkeyCacheStub::AuthkeyCacheStub(void) : supla_authkey_cache() {} 24 | 25 | void AuthkeyCacheStub::set_cache_size_limit(int limit) { 26 | supla_authkey_cache::cache_size_limit = limit; 27 | } 28 | -------------------------------------------------------------------------------- /supla-server/src/test/doubles/ipc/ActionCgCommandMock.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) AC SOFTWARE SP. Z O.O. 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License 6 | as published by the Free Software Foundation; either version 2 7 | of the License, or (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program; if not, write to the Free Software 16 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | */ 18 | 19 | #include "doubles/ipc/ActionCgCommandMock.h" 20 | 21 | namespace testing { 22 | 23 | ActionCgCommandMock::ActionCgCommandMock( 24 | supla_abstract_ipc_socket_adapter *socket_adapter, int action) 25 | : supla_abstract_action_cg_command(socket_adapter, action) {} 26 | 27 | } // namespace testing 28 | -------------------------------------------------------------------------------- /supla-server/src/test/doubles/ipc/EnterCfgModeCommandMock.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) AC SOFTWARE SP. Z O.O. 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License 6 | as published by the Free Software Foundation; either version 2 7 | of the License, or (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program; if not, write to the Free Software 16 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | */ 18 | 19 | #include "doubles/ipc/EnterCfgModeCommandMock.h" 20 | 21 | namespace testing { 22 | 23 | EnterCfgModeCommandMock::EnterCfgModeCommandMock( 24 | supla_abstract_ipc_socket_adapter *socket_adapter) 25 | : supla_abstract_enter_cfg_mode_command(socket_adapter) {} 26 | 27 | } // namespace testing 28 | -------------------------------------------------------------------------------- /supla-server/src/test/doubles/ipc/ExecuteSceneCommandMock.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) AC SOFTWARE SP. Z O.O. 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License 6 | as published by the Free Software Foundation; either version 2 7 | of the License, or (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program; if not, write to the Free Software 16 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | */ 18 | 19 | #include 20 | 21 | namespace testing { 22 | 23 | ExecuteSceneCommandMock::ExecuteSceneCommandMock( 24 | supla_abstract_ipc_socket_adapter *socket_adapter) 25 | : supla_abstract_execute_scene_command(socket_adapter) {} 26 | 27 | } // namespace testing 28 | -------------------------------------------------------------------------------- /supla-server/src/test/doubles/ipc/GetHvacValueCommandMock.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) AC SOFTWARE SP. Z O.O. 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License 6 | as published by the Free Software Foundation; either version 2 7 | of the License, or (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program; if not, write to the Free Software 16 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | */ 18 | 19 | #include "doubles/ipc/GetHvacValueCommandMock.h" 20 | 21 | namespace testing { 22 | 23 | GetHvacValueCommandMock::GetHvacValueCommandMock( 24 | supla_abstract_ipc_socket_adapter *socket_adapter) 25 | : supla_abstract_get_hvac_value_command(socket_adapter) {} 26 | 27 | } // namespace testing 28 | -------------------------------------------------------------------------------- /supla-server/src/test/doubles/ipc/IdentifyDeviceCommandMock.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) AC SOFTWARE SP. Z O.O. 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License 6 | as published by the Free Software Foundation; either version 2 7 | of the License, or (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program; if not, write to the Free Software 16 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | */ 18 | 19 | #include "IdentifyDeviceCommandMock.h" 20 | 21 | namespace testing { 22 | 23 | IdentifyDeviceCommandMock::IdentifyDeviceCommandMock( 24 | supla_abstract_ipc_socket_adapter *socket_adapter) 25 | : supla_abstract_identify_device_command(socket_adapter) {} 26 | 27 | } // namespace testing 28 | -------------------------------------------------------------------------------- /supla-server/src/test/doubles/ipc/OnChannelAddedCommandMock.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) AC SOFTWARE SP. Z O.O. 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License 6 | as published by the Free Software Foundation; either version 2 7 | of the License, or (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program; if not, write to the Free Software 16 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | */ 18 | 19 | #include "OnChannelAddedCommandMock.h" 20 | 21 | namespace testing { 22 | 23 | OnChannelAddedCommandMock::OnChannelAddedCommandMock( 24 | supla_abstract_ipc_socket_adapter *socket_adapter) 25 | : supla_abstract_on_channel_added_command(socket_adapter) {} 26 | 27 | } // namespace testing 28 | -------------------------------------------------------------------------------- /supla-server/src/test/doubles/ipc/OnSceneAddedCommandMock.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) AC SOFTWARE SP. Z O.O. 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License 6 | as published by the Free Software Foundation; either version 2 7 | of the License, or (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program; if not, write to the Free Software 16 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | */ 18 | 19 | #include 20 | 21 | namespace testing { 22 | 23 | OnSceneAddedCommandMock::OnSceneAddedCommandMock( 24 | supla_abstract_ipc_socket_adapter *socket_adapter) 25 | : supla_abstract_on_scene_added_command(socket_adapter) {} 26 | 27 | } // namespace testing 28 | -------------------------------------------------------------------------------- /supla-server/src/test/doubles/ipc/TakeOcrPhotoCommandMock.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) AC SOFTWARE SP. Z O.O. 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License 6 | as published by the Free Software Foundation; either version 2 7 | of the License, or (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program; if not, write to the Free Software 16 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | */ 18 | 19 | #include "doubles/ipc/TakeOcrPhotoCommandMock.h" 20 | 21 | namespace testing { 22 | 23 | TakeOcrPhotoCommandMock::TakeOcrPhotoCommandMock( 24 | supla_abstract_ipc_socket_adapter *socket_adapter) 25 | : supla_abstract_take_ocr_photo_command(socket_adapter) {} 26 | 27 | } // namespace testing 28 | -------------------------------------------------------------------------------- /supla-server/src/test/doubles/conn/AuthkeyCacheStub.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) AC SOFTWARE SP. Z O.O. 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License 6 | as published by the Free Software Foundation; either version 2 7 | of the License, or (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program; if not, write to the Free Software 16 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | */ 18 | 19 | #ifndef AUTHKEY_CACHE_STUB_H_ 20 | #define AUTHKEY_CACHE_STUB_H_ 21 | 22 | #include "conn/authkey_cache.h" 23 | 24 | class AuthkeyCacheStub : public supla_authkey_cache { 25 | public: 26 | AuthkeyCacheStub(void); 27 | void set_cache_size_limit(int limit); 28 | }; 29 | 30 | #endif /* AUTHKEY_CACHE_STUB_H_ */ 31 | -------------------------------------------------------------------------------- /supla-server/src/test/doubles/ipc/DeviceSetTimeCommandMock.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) AC SOFTWARE SP. Z O.O. 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License 6 | as published by the Free Software Foundation; either version 2 7 | of the License, or (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program; if not, write to the Free Software 16 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | */ 18 | 19 | #include "doubles/ipc/DeviceSetTimeCommandMock.h" 20 | 21 | namespace testing { 22 | 23 | DeviceSetTimeCommandMock::DeviceSetTimeCommandMock( 24 | supla_abstract_ipc_socket_adapter *socket_adapter) 25 | : supla_abstract_device_set_time_command(socket_adapter) {} 26 | 27 | } // namespace testing 28 | -------------------------------------------------------------------------------- /supla-server/src/test/doubles/ipc/GetRelayValueCommandMock.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) AC SOFTWARE SP. Z O.O. 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License 6 | as published by the Free Software Foundation; either version 2 7 | of the License, or (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program; if not, write to the Free Software 16 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | */ 18 | 19 | #include "doubles/ipc/GetRelayValueCommandMock.h" 20 | 21 | namespace testing { 22 | 23 | GetRelayValueCommandMock::GetRelayValueCommandMock( 24 | supla_abstract_ipc_socket_adapter *socket_adapter) 25 | : supla_abstract_get_relay_value_command(socket_adapter) {} 26 | 27 | } // namespace testing 28 | -------------------------------------------------------------------------------- /supla-server/src/test/doubles/ipc/GetValveValueCommandMock.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) AC SOFTWARE SP. Z O.O. 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License 6 | as published by the Free Software Foundation; either version 2 7 | of the License, or (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program; if not, write to the Free Software 16 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | */ 18 | 19 | #include "doubles/ipc/GetValveValueCommandMock.h" 20 | 21 | namespace testing { 22 | 23 | GetValveValueCommandMock::GetValveValueCommandMock( 24 | supla_abstract_ipc_socket_adapter *socket_adapter) 25 | : supla_abstract_get_valve_value_command(socket_adapter) {} 26 | 27 | } // namespace testing 28 | -------------------------------------------------------------------------------- /supla-server/src/test/doubles/ipc/GhCredChangedCommandMock.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) AC SOFTWARE SP. Z O.O. 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License 6 | as published by the Free Software Foundation; either version 2 7 | of the License, or (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program; if not, write to the Free Software 16 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | */ 18 | 19 | #include "doubles/ipc/GhCredChangedCommandMock.h" 20 | 21 | namespace testing { 22 | 23 | GhCredChangedCommandMock::GhCredChangedCommandMock( 24 | supla_abstract_ipc_socket_adapter *socket_adapter) 25 | : supla_abstract_gh_cred_changed_command(socket_adapter) {} 26 | 27 | } // namespace testing 28 | -------------------------------------------------------------------------------- /supla-server/src/test/doubles/ipc/PairSubdeviceCommandMock.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) AC SOFTWARE SP. Z O.O. 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License 6 | as published by the Free Software Foundation; either version 2 7 | of the License, or (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program; if not, write to the Free Software 16 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | */ 18 | 19 | #include "doubles/ipc/PairSubdeviceCommandMock.h" 20 | 21 | namespace testing { 22 | 23 | PairSubdeviceCommandMock::PairSubdeviceCommandMock( 24 | supla_abstract_ipc_socket_adapter *socket_adapter) 25 | : supla_abstract_pair_subdevice_command(socket_adapter) {} 26 | 27 | } // namespace testing 28 | -------------------------------------------------------------------------------- /supla-server/src/test/doubles/ipc/ResetCountersCommandMock.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) AC SOFTWARE SP. Z O.O. 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License 6 | as published by the Free Software Foundation; either version 2 7 | of the License, or (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program; if not, write to the Free Software 16 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | */ 18 | 19 | #include "doubles/ipc/ResetCountersCommandMock.h" 20 | 21 | namespace testing { 22 | 23 | ResetCountersCommandMock::ResetCountersCommandMock( 24 | supla_abstract_ipc_socket_adapter *socket_adapter) 25 | : supla_abstract_reset_counters_command(socket_adapter) {} 26 | 27 | } // namespace testing 28 | -------------------------------------------------------------------------------- /supla-server/src/test/doubles/ipc/UserReconnectCommandMock.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) AC SOFTWARE SP. Z O.O. 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License 6 | as published by the Free Software Foundation; either version 2 7 | of the License, or (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program; if not, write to the Free Software 16 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | */ 18 | 19 | #include "doubles/ipc/UserReconnectCommandMock.h" 20 | 21 | namespace testing { 22 | 23 | UserReconnectCommandMock::UserReconnectCommandMock( 24 | supla_abstract_ipc_socket_adapter *socket_adapter) 25 | : supla_abstract_user_reconnect_command(socket_adapter) {} 26 | 27 | } // namespace testing 28 | -------------------------------------------------------------------------------- /supla-server/src/device/channel_address.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) AC SOFTWARE SP. Z O.O. 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License 6 | as published by the Free Software Foundation; either version 2 7 | of the License, or (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program; if not, write to the Free Software 16 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | */ 18 | 19 | #ifndef CHANNEL_ADDRESS_H_ 20 | #define CHANNEL_ADDRESS_H_ 21 | 22 | class channel_address { 23 | private: 24 | int DeviceId; 25 | int ChannelId; 26 | 27 | public: 28 | channel_address(int DeviceId, int ChannelId); 29 | int getDeviceId(void); 30 | int getChannelId(void); 31 | }; 32 | #endif /* CHANNEL_ADDRESS_H_ */ 33 | -------------------------------------------------------------------------------- /supla-server/src/test/doubles/ipc/GetTemperatureCommandMock.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) AC SOFTWARE SP. Z O.O. 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License 6 | as published by the Free Software Foundation; either version 2 7 | of the License, or (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program; if not, write to the Free Software 16 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | */ 18 | 19 | #include "doubles/ipc/GetTemperatureCommandMock.h" 20 | 21 | namespace testing { 22 | 23 | GetTemperatureCommandMock::GetTemperatureCommandMock( 24 | supla_abstract_ipc_socket_adapter *socket_adapter) 25 | : supla_abstract_get_temperature_command(socket_adapter) {} 26 | 27 | } // namespace testing 28 | -------------------------------------------------------------------------------- /supla-server/src/test/doubles/ipc/InterruptSceneCommandMock.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) AC SOFTWARE SP. Z O.O. 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License 6 | as published by the Free Software Foundation; either version 2 7 | of the License, or (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program; if not, write to the Free Software 16 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | */ 18 | 19 | #include 20 | 21 | namespace testing { 22 | 23 | InterruptSceneCommandMock::InterruptSceneCommandMock( 24 | supla_abstract_ipc_socket_adapter *socket_adapter) 25 | : supla_abstract_interrupt_scene_command(socket_adapter) {} 26 | 27 | } // namespace testing 28 | -------------------------------------------------------------------------------- /supla-server/src/test/doubles/ipc/MuteAlarmSoundCommandMock.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) AC SOFTWARE SP. Z O.O. 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License 6 | as published by the Free Software Foundation; either version 2 7 | of the License, or (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program; if not, write to the Free Software 16 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | */ 18 | 19 | #include "doubles/ipc/MuteAlarmSoundCommandMock.h" 20 | 21 | namespace testing { 22 | 23 | MuteAlarmSoundCommandMock::MuteAlarmSoundCommandMock( 24 | supla_abstract_ipc_socket_adapter *socket_adapter) 25 | : supla_abstract_mute_alarm_sound_command(socket_adapter) {} 26 | 27 | } // namespace testing 28 | -------------------------------------------------------------------------------- /supla-server/src/test/doubles/ipc/OnChannelDeletedCommandMock.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) AC SOFTWARE SP. Z O.O. 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License 6 | as published by the Free Software Foundation; either version 2 7 | of the License, or (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program; if not, write to the Free Software 16 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | */ 18 | 19 | #include "OnChannelDeletedCommandMock.h" 20 | 21 | namespace testing { 22 | 23 | OnChannelDeletedCommandMock::OnChannelDeletedCommandMock( 24 | supla_abstract_ipc_socket_adapter *socket_adapter) 25 | : supla_abstract_on_channel_deleted_command(socket_adapter) {} 26 | 27 | } // namespace testing 28 | -------------------------------------------------------------------------------- /supla-server/src/test/doubles/ipc/OnSceneChangedCommandMock.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) AC SOFTWARE SP. Z O.O. 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License 6 | as published by the Free Software Foundation; either version 2 7 | of the License, or (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program; if not, write to the Free Software 16 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | */ 18 | 19 | #include 20 | 21 | namespace testing { 22 | 23 | OnSceneChangedCommandMock::OnSceneChangedCommandMock( 24 | supla_abstract_ipc_socket_adapter *socket_adapter) 25 | : supla_abstract_on_scene_changed_command(socket_adapter) {} 26 | 27 | } // namespace testing 28 | -------------------------------------------------------------------------------- /supla-server/src/test/doubles/ipc/OnSceneRemovedCommandMock.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) AC SOFTWARE SP. Z O.O. 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License 6 | as published by the Free Software Foundation; either version 2 7 | of the License, or (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program; if not, write to the Free Software 16 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | */ 18 | 19 | #include 20 | 21 | namespace testing { 22 | 23 | OnSceneRemovedCommandMock::OnSceneRemovedCommandMock( 24 | supla_abstract_ipc_socket_adapter *socket_adapter) 25 | : supla_abstract_on_scene_removed_command(socket_adapter) {} 26 | 27 | } // namespace testing 28 | --------------------------------------------------------------------------------