controlpanelplugins/themeplugin/src/cpthemeclientsymbian_p.cpp
author hgs
Fri, 14 May 2010 13:21:08 +0800
changeset 19 36aa4756ee82
parent 11 10d0dd0e43f1
child 21 2883a5458389
permissions -rw-r--r--
201019

/*
 * Copyright (c) 2009 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 "cpthemeclientsymbian_p.h"
#include "cpthemesymbiancommon_p.h"
#include <e32property.h>


/**
* constructor
*/
CpThemeClientPrivate::CpThemeClientPrivate()
{
}

/**
* CpThemeClientPrivate::connectToServer()
*
* Connects to the server
*/
bool CpThemeClientPrivate::connectToServer()
{
    return true;
}

/**
Indicates a connection to the server
*/
bool CpThemeClientPrivate::isConnected()
{
    return true;
}

/**
 * Destructor
 */
CpThemeClientPrivate::~CpThemeClientPrivate()
{
}

/**
 * changeTheme
 */
bool CpThemeClientPrivate::changeTheme(const QString& aString )
{
    TInt err = KErrGeneral;
    RProperty themeRequestProp;
    
    User::LeaveIfError( themeRequestProp.Attach( KServerUid3, KNewThemeForThemeChanger ) );
    
    TBuf<256> newThemenameChangeRequest;
    _LIT(KThemeRequestFormatter, "%d:%S");
    TBuf<256> newThemename(aString.utf16());
    newThemenameChangeRequest.Format( KThemeRequestFormatter, EThemeSelection, &newThemename);
    err = themeRequestProp.Set(newThemenameChangeRequest);
    themeRequestProp.Close();
    return (err == KErrNone);
}