On Wed, 2014-04-16 at 11:21 +0200, Patrick Ohly wrote:
> This means that I can't put properties that are never meant to be sent
> over SyncML into the profile used for syncing. I need to maintain a
> separate profile with UID enabled that gets used for 
> MAKETEXTWITHPROFILE/PARSETEXTWITHPROFILE.

Actual, I can also simply disable the property in CtCap with
showindev="no". That works fine for the UID in vCard case.

I also looked into the profile pre-processing and might end up
implementing that, too, because it is much nicer to figure out what the
actual profile is that gets used. Compare this:

        <!-- item for SyncML server: EVOLUTION rule not active,
             both X-EVOLUTION-MANAGER and X-MANAGER are sent.

             item from SyncML server: EVOLUTION rule not active,
             both X-EVOLUTION-MANAGER and X-MANAGER are checked,
             but X-EVOLUTION-MANAGER later so that it overwrites
             a value set earlier by X-MANAGER (if any). This is
             a more or less arbitrary priority, chosen because
             servers that know about SyncEvolution (ScheduleWorld,
             Memotoo) use the X-EVOLUTION variant.

             item to/from Evolution: EVOLUTION rule is active,
             only X-EVOLUTION-MANAGER is used.

             item to/from KDE: the X-EVOLUTION extensions are disabled,
             only exchanged via KDE-only extensions
        -->
        <property name="X-EVOLUTION-MANAGER" suppressempty="yes" 
delayedparsing="1" rule="KDE"/> <!-- disable X-EVOLUTION-MANAGER for KDE -->
        <property name="X-EVOLUTION-MANAGER" suppressempty="yes" 
delayedparsing="1" rule="other">
          <value field="MANAGER"/>
        </property>
        <property name="X-MANAGER" suppressempty="yes" rule="EVOLUTION"/> <!-- 
disables the X-MANAGER for EVOLUTION -->
        <property name="X-MANAGER" suppressempty="yes" rule="KDE"/> <!-- 
disables the X-MANAGER for KDE -->
        <property name="X-MANAGER" suppressempty="yes" rule="other">
          <value field="MANAGER"/>
        </property>
        <property name="X-KADDRESSBOOK-X-ManagersName" suppressempty="yes" 
show="no" rule="KDE">
          <value field="MANAGER"/>
        </property>


With this:

        <!-- item during SyncML exchange: both X-EVOLUTION-MANAGER and 
X-MANAGER are sent and understood

             item to/from Evolution: only X-EVOLUTION-MANAGER is used

             item to/from KDE: only exchanged via KDE-only extensions
        -->
        <if SYNCML="1">
          <property name="X-MANAGER" suppressempty="yes" rule="other">
            <value field="MANAGER" show="yes"/>
          </property>
        </if>
        <if EVOLUTION="1" SYNCML="1">
          <property name="X-EVOLUTION-MANAGER" suppressempty="yes" 
delayedparsing="1" rule="other">
            <value field="MANAGER" show="yes"/>
          </property>
        </if>
        <if KDE="1">
          <property name="X-KADDRESSBOOK-X-ManagersName" suppressempty="yes" 
show="no" rule="KDE">
            <value field="MANAGER" show="yes"/>
          </property>
        </if>

It's not necessarily shorter, but much easier to read and understand. I
made up the if/else here. The "if" attributes are meant to be combined
with "or".

-- 
Best Regards, Patrick Ohly

The content of this message is my personal opinion only and although
I am an employee of Intel, the statements I make here in no way
represent Intel's position on the issue, nor am I authorized to speak
on behalf of Intel on this matter.




_______________________________________________
os-libsynthesis mailing list
[email protected]
http://lists.synthesis.ch/mailman/listinfo/os-libsynthesis

Reply via email to