diff -r 75a71fdb4c92 -r 7d11f9a6646f deviceupdatesui/devicemanagementnotifiersplugin/syncmlnotifierprivate.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/deviceupdatesui/devicemanagementnotifiersplugin/syncmlnotifierprivate.cpp Fri Apr 16 14:53:31 2010 +0300 @@ -0,0 +1,162 @@ +/* +* 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: +* +*/ + + +#include +#include +#include +#include +#include +#include +#include "nsmlconstantdefs.h" +#include "SyncMLNotifierParams.h" +#include "syncmlnotifierprivate.h" + + + +syncmlnotifierprivate::syncmlnotifierprivate() +{ +} + +void syncmlnotifierprivate::setstatus(TInt value) +{ + + qDebug("setstatus"); + + + + enum TSyncmlHbNotifierKeys + { + + EHbSOSNotifierKeyStatus = 11, // status set will complete the client subscribe + EHbSOSNotifierKeyStatusReturn = 12, // Return the content of actual status value accepted from UI + + EHbDMSyncNotifierKeyStatus = 13, + EHbDMSyncNotifierKeyStatusReturn = 14 + }; + + TInt err; + RProperty intProperty; + + if(iNotifierorigin== EHbSOSNotifierKeyStatus) + { + TUid uid = {0x101F99FB}; + err = intProperty.Attach(uid , EHbSOSNotifierKeyStatus, EOwnerThread); + if(err == KErrNone) + { + qDebug("EHbSOSNotifierKeyStatus entered no error"); + intProperty.Set(value); + RProperty::Set(uid, EHbSOSNotifierKeyStatusReturn, value); + qDebug("Set status of return value"); + qDebug()< serverdisplayname; + + RSyncMLSession syncSession; + + syncSession.OpenL(); + CleanupClosePushL( syncSession ); + + RSyncMLDevManProfile syncProfile; + syncProfile.OpenL( syncSession, profileid, ESmlOpenRead ); + CleanupClosePushL( syncProfile ); + + serverdisplayname= syncProfile.DisplayName(); + + + //convert TBuf serverName to QString + QString qString((QChar*)serverdisplayname.Ptr(),serverdisplayname.Length()); + servername = qString; + + + + syncProfile.Close(); + CleanupStack::Pop( &syncProfile ); + + syncSession.Close(); + CleanupStack::Pop( &syncSession ); +} + + +TInt syncmlnotifierprivate::serverinittype(TInt uimode) + { + + + TInt SanSupport = 0; + + CRepository* centrep = NULL; + TRAPD( err, centrep = CRepository::NewL( KCRUidDeviceManagementInternalKeys) ); + User::LeaveIfError( err ); + centrep->Get( KDevManSANUIBitVariation, SanSupport ); + delete centrep; + + //if SAN is specified then silent operation + + if(( SanSupport == 1 )) + { + if( uimode > ESANUserInteractive && uimode < ESANNotSpecified ) + { + uimode = ESANNotSpecified; + } + + if( uimode == ESANNotSpecified || uimode == ESANUserInteractive) + { + return ESANUserInteractive; + } + if( uimode == ESANUserInformative) + { + return ESANUserInformative; + } + } + + return ESANSilent; + + + } + +void syncmlnotifierprivate::setnotifierorigin(TInt notifierorig) + { + iNotifierorigin = notifierorig; + } +