diff -r 0aa8cc770c8a -r 4a793f564d72 connectivitymodules/SeCon/servers/syncserver/inc/logdatastoreformat.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/connectivitymodules/SeCon/servers/syncserver/inc/logdatastoreformat.h Wed Sep 01 12:20:56 2010 +0100 @@ -0,0 +1,98 @@ +/* +* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Simple class for tracing datastore format +* +*/ + +#ifndef LOGDATASTOREFORMAT_H_ +#define LOGDATASTOREFORMAT_H_ + +// +#include "debug.h" + +NONSHARABLE_CLASS(TLogDataStoreFormat) + { + public: +#ifndef _DEBUG +// does nothing on release version +static void TLogDataStoreFormat::LogDataStoreFormatL( const TDesC& /*aLogInfo*/, const CSmlDataStoreFormat& /*aDataStoreFormat*/ ) + { + } +#else +static void TLogDataStoreFormat::LogDataStoreFormatL( const TDesC& aLogInfo, const CSmlDataStoreFormat& aDataStoreFormat ) + { + LOGGER_WRITE_1("LogDataStoreFormatL, aLogInfo: %S", &aLogInfo); + LOGGER_WRITE_1("DisplayName: %S", &aDataStoreFormat.DisplayName()); + TBool hasMaxSize = aDataStoreFormat.IsSupported( CSmlDataStoreFormat::EOptionHasMaxSize ); + TBool hasMaxItems = aDataStoreFormat.IsSupported( CSmlDataStoreFormat::EOptionHasMaxItems ); + TBool hierarcial = aDataStoreFormat.IsSupported( CSmlDataStoreFormat::EOptionHierarchial ); + LOGGER_WRITE_1("hasMaxSize: %d", (TInt)hasMaxSize); + LOGGER_WRITE_1("hasMaxItems: %d", (TInt)hasMaxItems); + LOGGER_WRITE_1("hierarcial: %d", (TInt)hierarcial); + LOGGER_WRITE_1("MimeFormatCount: %d", aDataStoreFormat.MimeFormatCount()); + for ( TInt i = 0; i < aDataStoreFormat.MimeFormatCount(); i++) + { + LOGGER_WRITE_1(" MimeFormat(%d)",i); + const CSmlMimeFormat& mimeformat = aDataStoreFormat.MimeFormat(i); + LOGGER_WRITE8_1(" MimeType: %S", &mimeformat.MimeType().DesC()); + LOGGER_WRITE8_1(" MimeVersion: %S", &mimeformat.MimeVersion().DesC()); + LOGGER_WRITE_1( " FieldLevel, bool: %d", (TInt) mimeformat.FieldLevel()); + LOGGER_WRITE_1( " PropertyCount: %d", mimeformat.PropertyCount()); + for ( TInt j=0; j