http://bugs.meego.com/show_bug.cgi?id=1351
Summary: SyncEvolution code cleanup
Classification: MeeGo Projects
Product: SyncEvolution
Version: unspecified
Platform: Netbook
OS/Version: IA
Status: ASSIGNED
Severity: trivial
Priority: Medium
Component: SyncEvolution
AssignedTo: [email protected]
ReportedBy: [email protected]
QAContact: [email protected]
CC: [email protected],
[email protected]
Estimated Hours: 0.0
This is from http://bugzilla.moblin.org/show_bug.cgi?id=3472
Description From pohly 2009-06-12 07:57:10 PST (-) [reply]
This issue is about several aspects of the SyncEvolution source code. It could
be cleaned up in several ways. All of these changes are not strictly necessary
(minor severity) but should be done at some point (priority 2).
SyncItem::setData() now exists in a variant which takes a std::string. Check
all calls of the form setData(str.c_str(), str.size()) and replace them with
setData(str).
ConfigNode has template methods for set/getProperty(). Some old code reads
strings and converts them instead of using the template methods. Change that
code.
Remove "using namespace std" and add "std::" wherever necessary.
All SyncEvolution symbols should be in their own namespace. I suggest SyncEvo.
I don't like that Emacs indents members of namespaces:
namespace SyncEvo {
int foo;
}
I suggest using some defines like G_BEGIN_DECLS and G_END_DECLS instead, in
particular in header files. Details to be discussed.
For macros we should use the SE_ prefix (not done consistently either!).
The word EvolutionSyncClient and EvolutionSyncSource come from the Funambol
SyncClient and SyncSource classes. Nowadays SyncEvolutionClient and
SyncEvolutionSource seem more natural. Rename the classes and the files?!
------- Comment #1 From pohly 2009-06-18 23:56:03 PST (-) [reply] -------
(In reply to comment #0)
> The word EvolutionSyncClient and EvolutionSyncSource come from the Funambol
> SyncClient and SyncSource classes. Nowadays SyncEvolutionClient and
> SyncEvolutionSource seem more natural. Rename the classes and the files?!
Perhaps abandon "SyncClient" entirely. At some point we will have a SyncML
server which is likely to be using the same class. "SyncEvolutionSession"?
------- Comment #2 From pohly 2009-07-20 06:41:40 PST (-) [reply] -------
Not all code compiles cleanly on all platforms: bug #4555
------- Comment #3 From pohly 2009-10-05 06:08:55 PST (-) [reply] -------
The externally visible part is done for 0.9.1. Rescheduling the rest for later.
(In reply to comment #0)
> SyncItem::setData() now exists in a variant which takes a std::string. Check
> all calls of the form setData(str.c_str(), str.size()) and replace them with
> setData(str).
TBD.
> ConfigNode has template methods for set/getProperty(). Some old code reads
> strings and converts them instead of using the template methods. Change that
> code.
TDB.
> Remove "using namespace std" and add "std::" wherever necessary.
TBD.
> All SyncEvolution symbols should be in their own namespace. I suggest SyncEvo.
> I don't like that Emacs indents members of namespaces:
> namespace SyncEvo {
> int foo;
> }
>
> I suggest using some defines like G_BEGIN_DECLS and G_END_DECLS instead, in
> particular in header files.
Done, using SE_BEGIN/END_CXX.
> For macros we should use the SE_ prefix (not done consistently either!).
TBD.
> The word EvolutionSyncClient and EvolutionSyncSource come from the Funambol
> SyncClient and SyncSource classes. Nowadays SyncEvolutionClient and
> SyncEvolutionSource seem more natural. Rename the classes and the files?!
Done:
commit 71fbf32c941ab17355483028a6f529354e58e18e
Author: Patrick Ohly <[email protected]>
Date: Mon Oct 5 14:49:32 2009 +0200
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.
--
Configure bugmail: http://bugs.meego.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching the assignee of the bug.
You are watching someone on the CC list of the bug.
_______________________________________________
Syncevolution-issues mailing list
[email protected]
http://lists.syncevolution.org/listinfo/syncevolution-issues