homescreenapp/hscontentpublishplugin/src/hshomescreenclient_symbian.cpp
changeset 35 f9ce957a272c
equal deleted inserted replaced
5:c743ef5928ba 35:f9ce957a272c
       
     1 /*
       
     2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     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".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:  Content publishing implementation
       
    15 *
       
    16 */
       
    17 #include "hshomescreenclient.h"
       
    18 #include <xqservicerequest.h>
       
    19 
       
    20 
       
    21 
       
    22 HsContentPublish::HsContentPublish(QObject *parent)
       
    23     :QObject(parent)
       
    24 {
       
    25  
       
    26 }
       
    27 HsContentPublish::~HsContentPublish()
       
    28 {
       
    29 
       
    30 }
       
    31 
       
    32 bool HsContentPublish::open()
       
    33 {
       
    34   
       
    35     return true;
       
    36 }
       
    37 
       
    38 bool HsContentPublish::close()
       
    39 {
       
    40   
       
    41     return true;
       
    42 }
       
    43 
       
    44 bool HsContentPublish::addWidgetToHomescreen(
       
    45     const QString &uri, 
       
    46     const QVariantMap &preferences)
       
    47 {
       
    48     XQServiceRequest snd("com.nokia.services.hshomescreenclient",
       
    49                         "bool addWidget(QString, QVariantMap)");
       
    50     snd << uri;
       
    51     snd << preferences;
       
    52     QVariant retValue;
       
    53     bool res=snd.send(retValue);
       
    54     if (!res) {
       
    55         int returnvalue = snd.latestError();
       
    56     }
       
    57     return res;
       
    58 }
       
    59 
       
    60