Commit graph

6 commits

Author SHA1 Message Date
Patrick Ohly 9b35062bb9 ConfigNode: use map with case-insensitive keys for properties
The case of property names does not matter. A map where the key
is case-insensitive is thus a better data structure for storing
a set of property key/value pairs.

Such a type was already used by FilterConfigNode. This patch
cleans up the config nodes so that all of them use the new ConfigProps
type. The previous typedefs inside ConfigNode and FilterConfigNode are
preserved to keep old source code working without changing it.

The intention is to use the result of readProperties() directly as
parameter for setConfigFilter().
2009-11-25 16:57:51 +01:00
Patrick Ohly 13fa475f1d FilterConfigNode: existing properties not overwritten?!
According to the std::map::insert() documentation, it does not
overwrite existing values in the map. This is not what is intended
here, property values in the filter *should* supersede existing
values.

This was found when looking at the code and has not shown up
as a real failure yet?!
2009-11-25 16:57:51 +01:00
Patrick Ohly 5c3082debf ConfigNode API: added writeProperties() and clear()
writeProperties() complements readProperties(). It is
identical to calling setProperty() for each individual
entry, which is also the default implementation. Some
ConfigNode implementations can implement this more
efficiently.

clear() goes beyond repeated removeProperty() calls
because it can also wipe out everything else which
might have ended up in the node (for example, comments
in the .ini format).
2009-10-07 18:17:14 +02:00
Patrick Ohly 71fbf32c94 files and classes renamed, include statements cleaned up
The intention is to get rid of the historic and inconsistent
naming of some classes and their corresponding files:
* EvolutionSyncClient = class derived from Funambol's SyncClient,
* SyncEvolutionConfig = SyncEvolution's config

With the strict 'namespace SyncEvo' and the syncevo/ path prefix for
most header files it is no longer necessary to have "SyncEvolution" or
"Evolution" in the names. This patch thus renames as follows:
  EvolutionSyncClient => SyncContext
  EvolutionSmartPtr => SmartPtr
  SyncEvolutionCmdline => Cmdline
  SyncEvolutionConfig => SyncConfig
  SyncEvolutionUtil => util

The former EvolutionSyncClient always had a role that went beyond just
running a sync, for example it also provided config access. With the
upcoming server support it also won't be just a client. Thus the new
name "SyncContext".

The 'syncevo/' prefix is used throughout the code now.

removed whenever the prefix made it clear that the file belongs
to SyncEvolution. This helps finding incorrect include paths.

Quotes should be used exclusively for SyncEvolution files which don't
have a specific prefix yet (test.h, config.h) to help identifying
them.
2009-10-05 14:49:32 +02:00
Patrick Ohly f87ffd682d introduced "namespace SyncEvo" consistently
Added syncevo/declarations.h, which has

This is now used for all SyncEvolution source files, except
for the GTK UI, which is written in plain C. In the library
it helps to avoid name clashes.

The reason for using defines instead of spelling out "namespace SyncEvo"
is twofold:
1. if that should ever become necessary, it is easier to
   rename the namespace via configure options by changing
   the define
2. editors don't indent the whole file content
2009-10-02 17:27:45 +02:00
Chen Congwu 0579e1d0d2 SyncEvolution core: rename core to syncevo 2009-09-23 07:35:24 +02:00
Renamed from src/core/FilterConfigNode.cpp (Browse further)