Dirk-Jan C. Binnema
34fae2c072
mu-store: update whitespace
2021-07-31 01:45:22 +03:00
Derek Zhou
dc6f76d74d
seperate Mu::format and Mu::vformat
2021-04-22 18:32:38 +00:00
Dirk-Jan C. Binnema
98abcf8e84
store: support in-memory database
...
For testing, this is faster / and doesn't pollute the file system.
2021-02-16 19:32:15 +02:00
Dirk-Jan C. Binnema
a3c6e74869
lib: replace some #define with constexpr
...
minor cleanup.
2021-02-11 18:54:25 +02:00
Dirk-Jan C. Binnema
98744c66f7
remove some dead code
2021-01-22 23:24:53 +02:00
Dirk-Jan C. Binnema
e282d80bc0
lib: Update for new querying machinery
...
Port to c++ and use new APIs.
2021-01-22 22:51:33 +02:00
Dirk-Jan C. Binnema
ed4a640c39
lib/query: refactor & rework
...
- Move the lib/query/ stuff up a level into lib/
- Associate directly with the Query object
- Rework the Query object to be C++ rather than mixed with C
- Update all dependencies, tests
2020-11-04 23:35:30 +02:00
Dirk-Jan C. Binnema
2eb8fc82ad
lib: fix 'personal' handling in contacts
2020-10-18 11:58:32 +03:00
Dirk-Jan C. Binnema
dbff5671dd
lib: support 'personal' regexp, move to mu-contacts
...
Move the determination of "personal" to MuContacts; add support for
regexps (POSIX-basic, in //)
2020-10-17 10:36:25 +03:00
Dirk-Jan C. Binnema
4617935d80
store: Update for the new indexer
...
Update some APIs so we can use it with the new indexer.
Remove some now-obsolete C APIs.
2020-06-27 17:07:00 +03:00
Dirk-Jan C. Binnema
981c781425
store: add bit more debug-logging
2020-06-13 16:56:41 +03:00
Dirk-Jan C. Binnema
fe6582c6d6
lib: implement mu_store_update
2020-06-13 16:56:41 +03:00
Dirk-Jan C. Binnema
a9fab4abcc
mu: convert command-line tools to c++
2020-06-13 16:56:41 +03:00
Kristian Rietveld
c3032bd672
mu-store: enlarge buffer for strftime
...
On Debian 9 random memory was printed with the original buffer size
and valgrind complained about the use of uninitialized memory.
2020-05-01 20:47:45 +02:00
Dirk-Jan C. Binnema
49883806f6
store: remove unused code, use batchsize
2020-03-02 23:19:34 +02:00
damon-kwok
56b434347e
error fix for gcc 9.x
2020-02-29 20:40:22 +08:00
Dirk-Jan C. Binnema
650c4c052d
store: catch exceptions in dtor
2020-02-21 19:29:27 +02:00
Dirk-Jan C. Binnema
c4c56fa7f0
mu-store: auto-commit store in dtor
2020-02-17 22:29:44 +02:00
Dirk-Jan C. Binnema
f50360f94e
mu-store: implement Store::find_message
2020-02-10 01:00:42 +02:00
Dirk-Jan C. Binnema
aa10da0a63
store: rework to allow for 'init'
...
Rework the error handling / exception for read-only / writable and new
database.
2020-02-08 14:28:55 +02:00
Dirk-Jan C. Binnema
f51846eefc
mu: implement init, info commands
...
'init' is for the inital database setup
'info' is for gettting information about the mu database.
2020-02-08 14:28:55 +02:00
Dirk-Jan C. Binnema
2575b2d0e3
mu: better error handling for opening database read-only
...
Be a bit clearer for the user.
2020-02-04 21:14:30 +02:00
Dirk-Jan C. Binnema
38779cfade
mu: no need to pass 'maildir' when we can deduce it
...
Only needed when setting up the database.
2020-02-04 01:05:35 +02:00
Dirk-Jan C. Binnema
e51240f43f
mu: lib: update store API. update some dependents
...
Implement add_message / remove_message.
Rename path_tstamp -> dirstamp.
Rename maildir -> root_maildir
Update dependents.
2020-01-31 00:20:34 +02:00
Dirk-Jan C. Binnema
a3d71dab91
utils: Update error exception, utils.
2020-01-18 13:40:15 +02:00
Dirk-Jan C. Binnema
b2014fe93e
use g_snprintf instead of snprintf
...
Seems the latter cannot be found on some platforms; perhaps a
c++/namespace thing?
Use g_snprintf instead.
2020-01-07 23:17:15 +02:00
Dirk-Jan C. Binnema
ad63044915
mu: Fix some compiler warnings
2020-01-01 15:56:48 +02:00
Dirk-Jan C. Binnema
97afdd9e3c
lib: Use Mu:Error exception
...
Where applicable.
2020-01-01 13:25:07 +02:00
Dirk-Jan C. Binnema
9f93526884
move parser/utils to utils, Mux->Mu
...
Move the parser utils to utils/ and rename the Mux namespace into Mu.
2019-12-22 15:26:45 +02:00
Dirk-Jan C. Binnema
b55e191421
update for lib/utils split
...
Update sources with the new paths
2019-12-22 15:26:45 +02:00
Yuri D'Elia
b609080d77
Process personal flag when adding new contacts
2019-08-16 13:06:12 +02:00
Yuri D'Elia
230df78780
Avoid wrong type/warning in comparison
2019-08-16 11:50:40 +02:00
Yuri D'Elia
b71b60704b
Update internal cache in set_personal_addresses
2019-08-16 11:44:35 +02:00
Dirk-Jan C. Binnema
74f9f78ec0
lib: Don't use Xapian::DatabaseNotFoundError, it's too new
...
Xapian::DatabaseNotFoundError only arrived with Xapian 1.4.10.
2019-08-03 11:06:50 +03:00
Dirk-Jan C. Binnema
83d6484f86
lib/mu-store: rework implementation
...
* mu-store.h, mu-store-read.cc, mu-store-write.cc, mu-store-priv.hh have been reworked
in mu-store.{cc,hh}, it the mix of c/c++ improved
* update all the dependent modules
* make it easier to upgrade an database in place (without user intervention)
* remove the xbatch-size option
2019-07-30 08:51:04 +03:00
Dirk-Jan C. Binnema
125176d397
mu/lib: merge mu-contacts.h => mu-contacts.hh
2019-07-13 13:43:57 +03:00
djcb
688507f193
lib: fix a few compiler warnings
...
WARN_C(XX)FLAGS is really strict.
2017-01-03 00:37:19 +02:00
Ævar Arnfjörð Bjarmason
f7245d2372
mu-store: Silence confusing code that's throwing a clang warning
...
Doing:
!access(...) == 0
Is equivalent to:
(!access(...)) == 0
Not:
!(access(...) == 0)
And throws this warning under clang:
mu-store.cc:77:6: warning: logical not is only applied to the left hand
side of this comparison [-Wlogical-not-parentheses]
if (!access(xpath, F_OK) == 0) {
^ ~~
mu-store.cc:77:6: note: add parentheses after the '!' to evaluate the
comparison first
if (!access(xpath, F_OK) == 0) {
^
( )
mu-store.cc:77:6: note: add parentheses around left hand side expression
to silence this warning
if (!access(xpath, F_OK) == 0) {
^
( )
It ends up doing what the author intended anyway since access() returns
-1 on error, and !-1 == 0, but just do the more obvious check and check
that we don't get 0 here with !=.
2015-12-15 12:40:40 +01:00
djcb
7eb244b3b0
mu: don't use __FUNCTION__, use __func__
...
__FUNCTION__ is deprecated and gives compilation warnings. __func__ is
standardized in c99.
2015-04-22 21:06:31 +03:00
djcb
3c7061338d
Rework getting database version ( #469 )
...
It seems we don't get the correct database version in some case with
some compilers, optimization flags. Suspecting some stale ->c_str().
2014-09-23 07:32:39 +03:00
djcb
855e81db99
* update copyright years
2013-03-30 11:32:07 +02:00
djcb
11ecc65109
* update (C) years
2012-10-24 11:42:57 +03:00
djcb
39ff643e48
* store: allow setting my-addresses
2012-06-19 17:59:16 +03:00
djcb
46f10cfde9
* refactoring: split src/ into mu/ and lib/
2012-05-21 09:25:53 +03:00