Commit Graph

46 Commits

Author SHA1 Message Date
Roman Kubiak
2a29e27996 [EGD-5757] Fix backup API
Fix backup endpoint to work with new paths and FS api
The flow is based on the design in confluence.
2021-02-25 16:04:04 +01:00
Wiktor S. Ovalle Correa
3b141041e9 [EGD-5737] Merge master into experimental
Keep experimental up to date with changes from master
2021-02-17 17:09:37 +01:00
Tomek Sobkowiak
be66c10888 [EGD-5347] Replace filelength with file_size
Replace use of filelenght with std::filesystem::file_size
sqlite3vfs is using file descriptors so filelength is just renamed
2021-02-17 17:07:41 +01:00
Lucjan Bryndza
f60b9c0013 [EGD-5392] Add switch vfat to RO mode
VFAT partition should be mounted in RO mode by default
because writing to FAT filesystem is unsafe.
Writing is allowed only in the LFS filesystem.
If upgrade is needed FAT partition can be temporary
switched to RW mode using mount() syscall with REMOUNT flag
but it should be switched to RO mode again after upgrade.
2021-02-17 17:07:41 +01:00
Piotr Tański
65119cb495 [EGD-5027] Services synchronization introduced
Dependencies between services are now supported.
2021-02-10 12:37:42 +01:00
Radoslaw Wicik
6d481b753b [EGD-4763] Fix Unit Tests - db unittest
Fix reqired by CI to work
2021-02-04 16:45:50 +01:00
jimmorrisson
14918dc4f9 [EGD-4925] Change new filesystem handling implementation in module-gui. (#1193)
Due to vfs deprecation there is need to remove all vfs calls from code. This PR covers module gui. There are some modifications in other modules included which are necessary because of build system issues.
2020-12-16 15:23:11 +01:00
Piotr Tanski
4e0f72e70a [EGD-4696] Several stabilization patches. (#1192) 2020-12-15 15:30:13 +01:00
jimmorrisson
6711e02bad [EGD-4446] Change: new filesystem handling implementation in module db. (#1052)
Due to vfs deprecation there is need to remove all vfs calls from code. This PR covers module database. It also contains minor fixes in module-db.
2020-12-05 10:40:27 +01:00
RobertPiet
6b66737b13 [EGD-4354] settings starting script moved to two separated scripts (#1067) 2020-11-27 11:38:40 +01:00
Tomek Sobkowiak
ee8a5e4ab9 [EDG-4346] Load script to init contacts database (#1013) 2020-11-22 17:31:56 +01:00
Tomek Sobkowiak
6e248eb3ca [EDG-4349] Load script to init alarms database (#1000) 2020-11-13 11:08:46 +01:00
Tomek Sobkowiak
c9d9ee622f [EDG-4506] Database initializer to load init scripts from file (#979)
* [EDG-4506] Database initializer to load init scripts from file
2020-11-09 11:12:08 +01:00
Lucjan Bryndza
501260be12 [EGD-4298] Disable WAL log in DB (#965)
Disable Write Ahead Log due to reduce number of fat updates

Co-authored-by: Lucjan Bryndza <lucjan.bryndza@mudita.com>
2020-11-04 17:18:48 +01:00
Lucjan Bryndza
445010d7f9 [EGD-4135] Database interface improvement (#881)
Fix for unexcepted power failure by adding new implemented
function ff_fflush.
Improve write interface to complies with Linux lseek syscall.
Linux lseek syscall allows to lseek outsite the file size.
When write if lseek is out of range, write syscall write data to new
offset and fill the gap with zeros.
Free RTOS-FAT behaviour doesn't support sparse files, so we need
to implement this functionality manually on the sqlite3 vfs inteface
layer.

Co-authored-by: Lucjan Bryndza <lucjan.bryndza@mudita.com>
2020-10-23 09:19:57 +02:00
Przemyslaw Brudny
e131dae68f [EGD-3743] Removed old doxygen copyright statements from project. 2020-10-20 12:55:10 +02:00
Radoslaw Wicik
2276ceed67 [EGD-3743] Update copyrights in fies 2020-10-20 12:55:10 +02:00
Radoslaw Wicik
680c8168e5 [EGD-3998] New db engine (3.33.0) and vfs passing PRAGMA support back to sqlite 2020-10-09 12:46:51 +02:00
Radoslaw Wicik
5e5bbe2eb9 [EGD-3428] Fix db interface functions names - Field class 2020-07-16 10:55:07 +02:00
Radoslaw Wicik
24128854e9 [EGD-3428] Fix db interface functions names - QueryResult class 2020-07-16 10:55:07 +02:00
Radoslaw Wicik
c2b8a33d4b [EGD-3428] Fix db interface functions names - Database class 2020-07-16 10:55:07 +02:00
Szymon Mroczek
24a8107168 [WIP] [EGD-3290] Add database backup feature with sqlite's VACUUM command. 2020-06-24 11:14:00 +02:00
pholat
e94e370b22 Master readme update and fixups (#394)
* Update readme - how to enable logging on UART & clean PR style check

* gcc 10.1 Rel & Rel with debug info fixups
2020-06-04 11:49:48 +02:00
rkubiak01
7cac882c7a [2306] VFS: support .boot.ini and "current" and "previous" os types (#315)
* VFS: support .boot.ini and "current" and "previous" os types

* fixes for first batch of comments
- moved crc32 functions to a seperate file
- changed naming of constant with _
- removed one magic number
- crc methods now cross platform

* using smart pointer for buffer management

* created a simple USER_FILE macro for database names

* removed commented-out code

* style fixes

* Updated crc32 version

* Update module-vfs/vfs-utils.cpp

Co-Authored-By: Alek Rudnik <54846206+alekrudnik@users.noreply.github.com>

* Update module-vfs/vfs-utils.cpp

Co-Authored-By: Alek Rudnik <54846206+alekrudnik@users.noreply.github.com>

* renamed USER_FILE to USER_PATH macro, this was also
bromen and was returning incorrect paths, std::filesystem::path
behavior is causing these issues.

* VFS: remove method changed

* fixed path for assets copy

* UNITTEST: vfs test fixed

* VFS: changed computeCRC32 return type to void

* Max supported partition to 2 (was 1)

* EOL in vfs.cpp

* nullptr check in computeCRC32
include for log.hpp fixed

* flash_eMMC merged properly

* CRC32 commit update

* testBuild

* fix newline at start of smsdb.cpp
removed test from cmake

* no user/ folder on the root of emmc causes sqlite3 to fault
this adds a create empty user call for rt1051

* flash script fixes
- do not use build-*/sys
- common.sh contains a static list of iles that land on the flash

Co-authored-by: Alek Rudnik <54846206+alekrudnik@users.noreply.github.com>
2020-05-08 10:27:17 +02:00
Alek Rudnik
699cb141e3 Egd 3168 fix for quote sign in db qeury (#335)
* [EDG-3168] fix for quote mark in DB queries

* [EGD-3168] replaced all %s with %q
2020-04-27 14:28:37 +02:00
Alek Rudnik
393f41a89a Egd 3157 prepare sms template db table (#330)
* [EGD-3157] added new DB templates table

* [EGD-3157] added SMS template record

* [EGD-3157] added sms template tabels UT and fixes

* [EGD-3157] added sms template record UT

* [EGD-3157] error log in Database.cpp

* [EGD-3157] fixed usage pf printf specifiers

* [EGD-3157] fixed description in database md file

* [EGD-3157] remove redundant comments
2020-04-24 09:04:46 +02:00
Adam Dobrowolski
4a61f400e7 EGD-3055 Fixed printf issues 2020-04-08 12:23:53 +02:00
Przemyslaw Brudny
c0822b6658 [EDG-3019] Moved log.hpp and debug.hpp into main PurePhone repo 2020-03-24 15:55:32 +01:00
Adam Dobrowolski
cbc13c4e74 EGD-3026 Added logging of sqlite error on start 2020-03-24 14:17:12 +01:00
Adam Dobrowolski
7674b44385 EGD-3026 PR applied, fixed buid for release 2020-03-24 14:17:12 +01:00
Adam Dobrowolski
abe6813ce6 EGD-3026 Wall Werror and Wextra added to project 2020-03-24 14:17:12 +01:00
Przemyslaw Brudny
8f92715951 [EDG-3019] Segger utils moved to git submodule 2020-03-23 18:37:37 +01:00
Radoslaw Wicik
a8573a404c Apply new style 2020-03-17 10:03:16 +01:00
Alek-Mudita
b853087b3b Egd 2513 callog phonebook integration (#173)
* [EGD-2513] new API to create temparary contact entry if cannot be found
Calllog should search for contact.

* [EGD-2513] #pragma once in all headers file in module-db

* [EGD-2513] new constructor for CalllogRecord

* [EGD-2513] contact recognition for calllog DB API

* [EGD-2513] clean up

* [EGD-2513] displaying name and surname call and calllog

* [EGD-2513] enum instead bool

* [EGD-2513] fix in remporary contact creation

* [fix][EGD-2513] missing c_str

* [fix][EGD-2513] minor fixes in documentation

* [EGD-2513] unified entry read state for both sms and calllog dbs

* [EGD-2513] calllog db documentation

* [EGD-2513] code reviex fixed in ContactRecord
2020-03-02 16:43:29 +01:00
Adam Dobrowolski
efccb4e1ce [FIX] Fixed crash on null string creation 2019-12-18 07:13:59 +01:00
Adam Dobrowolski
8c768bbd22 [FIX] fixed crash on bad interface access
not handled exceptions would crash system, added checks where std:: is
used
2019-12-18 07:13:59 +01:00
RomanKubiak
61e95c9fc6 DATABASE: clang formatting before phonebook changes 2019-11-28 12:28:25 +01:00
Kuba
4046f4e324 Unit tests for Alarms database. Fixes and code cleanup for alarms database. 2019-07-16 14:48:12 +02:00
Mati
31ad9f2c01 Settings record interface optimizations 2019-06-07 07:43:30 +02:00
Mati
37150d053c Launched DB on hardware 2019-06-06 14:53:35 +02:00
Mati
433af1a130 Fixed warnings 2019-06-06 13:05:15 +02:00
Mati
d446b0ac94 WiP: record interface 2019-06-04 08:27:30 +02:00
Mati
b5dab4db16 Minor changes 2019-05-28 15:19:03 +02:00
Mati
b9bd4372e7 Refactor,
Added ContactsTable
2019-05-28 13:27:54 +02:00
Mati
7046f980d8 Added SMSTable unittests. Small updates in implementation 2019-05-28 08:48:58 +02:00
Mati
cd529667de Added DB tables interface 2019-05-27 16:03:46 +02:00