2 * Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
4 * This component and the accompanying materials are made available
5 * under the terms of "Eclipse Public License v1.0"
6 * which accompanies this distribution, and is available
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
9 * Initial Contributors:
10 * Nokia Corporation - initial contribution.
14 * Description: A CenRep interface for last used sync solutions
19 /*! \file seconsdkcrkeys.h
20 \brief A CenRep interface for last used sync solutions
24 * Calendar/contact data easily gets corrupted if a user is using several remote synchronization solutions at the same time.
25 * The purpose of this API is to provide the synchronization solution vendors a way to
26 * - Indicate that they’re active synchronization solution for some content type
27 * - Detect that other synchronization solutions may be in use in the device.
29 * \b API \b Description:
31 * Synchronizing content over several mechanisms from the device causes easily difficult problems, as the different protocols
32 * and systems are not aware of each other.
34 * For example, a synchronization solution using standard OMA DS technology is not aware of the
35 * simultaneous existence of some proprietary synchronization (aka. mobile PIM) solution,
36 * and vice versa. This is likely to cause problems, as the users may not be aware of the side
37 * effects that may occur from using several such solutions at the same time. Currently the
38 * problem is recognized by the vendors, and device applications do their best to warn user
39 * from using any other synchronization solution than the one being installed.
41 * This API intends to enhance the warning mechanism in two ways:
42 * - Provide the way for different solutions to know about each other, and
43 * - Offer a standard procedure how different solutions should behave when several solutions are used by the user
45 * This is achieved with a simple setting API utilizing Symbian OS Central Repository.
49 * The use cases supported by this API are:
50 * -# Detect currently active synchronization solution
51 * - When a synchronization solution is about to take some supported content type into use,
52 * it should check whether there is some other Uid already present in the setting. If
53 * there isn’t, the solution should put it’s own Uid into the setting value. If there is
54 * some unknown Uid, the setting should be aware that it’s changelog for that particular
55 * content may be out-of-date, and a full re-sync should be issued. It’s up to the solution
56 * vendor to decide, whether the user should be notified about this. The user readable name
57 * of the active solution is readable using Symbian AppArc API method \code RApaLsSession::GetAppInfo() \endcode
59 * -# Activate a synchronization solution for certain content type
60 * - This use case allows the synchronization solution to register it’s Uid into the Central
61 * Repository. This information is used by other compliant solutions to find out the active
62 * solution for all supported content types
65 *\b Using \b the \b Synchronization \b Capability \b API:
66 * -# Detect currently active synchronization solution
67 * - Before activating itself as the active solution, the client of this API should check
68 * whether some other client has registered itself as the preferred solution for certain
69 * content type synchronization. An example of the check is:
71 * CRepository* repository = CRepository::NewL( KCRUidSecon );
72 * TInt someSolutionInt; //Active solution UID
73 * // Get last used calendar sync solution..
74 * TInt ret = repository->Get( KSeconCalendarUid, someSolutionInt );
75 * TUid someSolutionUid = TUid::Uid(someSolutionInt)
76 * TUid mySolutionUid={0xf1f2f3f4}; //Application’s UID
77 * if(someSolutionUid != mySolutionUid)
79 * ...//Solution specific actions
83 * - If some other synchronization solution is active for the intended content type, the
84 * solution can still rewrite the old value, but it should note that a full resync may be
85 * needed in order to maintain system wide data consistency. It is up to the solution UI
86 * to decide, what kind of notification, if any, is given to the user.
88 * -# Activate a solution for the content type
89 * - This use case is executed either during solution installation/commissioning, or at least
90 * before first synchronization. The activation is simple:
92 * CRepository* repository = CRepository::NewL( KCRUidSecon );
93 * TUid mySolutionUid={0xf1f2f3f4}; //Application’s UID
94 * // Set mySolutionUid to last used calendar sync solution..
95 * TInt ret = repository->Set( KSeconCalendarUid, (TInt) mySolutionUid.iUid );
98 * - Howto store also timestamp
100 * // Timeformat is YYYYMMDDTHHMMSSZ (universal time),
101 * // where MM=1..12, DD=1..number of days in month, HH=0..23, MM=0..59, SS=0..59
102 * _LIT( KFormatDate, "%04d%02d%02dT%02d%02d%02dZ" );
104 * timeNow.UniversalTime(); // Store always universal time
105 * TDateTime now = timeNow.DateTime();
107 * dateBuf.Format( KFormatDate, now.Year(), now.Month() + 1,
108 * now.Day() + 1, now.Hour(), now.Minute(), now.Second() );
109 * repository->Set( KSeconCalendarTime, dateBuf );
113 * - As defined in the Central Repository API.
117 #ifndef SECONSDKCRKEYS_H
118 #define SECONSDKCRKEYS_H
121 /*! Contains settings for the supported
122 * content types. Each setting is integer, which is to hold either the Application Uid or the
123 * package Uid of the active solution.
125 const TUid KCRUidSecon = {0x2000F83D};
127 //! Calendar Uid Setting Integer
128 const TUint32 KSeconCalendarUid = 0x00000001;
130 //! Calendar Time Setting Integer
131 const TUint32 KSeconCalendarTime = 0x00000002;
133 //! Contacts Uid Setting Integer
134 const TUint32 KSeconContactsUid = 0x00000003;
136 //! Contacts Time Setting Integer
137 const TUint32 KSeconContactsTime = 0x00000004;
139 //! Sms Uid Setting Integer
140 const TUint32 KSeconSmsUid = 0x00000005;
142 //! Sms Time Setting Integer
143 const TUint32 KSeconSmsTime = 0x00000006;
145 //! Bookmark Uid Setting Integer
146 const TUint32 KSeconBookmarkUid = 0x00000007;
148 //! Bookmark Time Setting Integer
149 const TUint32 KSeconBookmarkTime = 0x00000008;
151 #endif // SECONSDKCRKEYS_H