localconnectivityservice/obexsendservices/obexhighway/src/btsendserviceinterface.cpp
changeset 18 6743bfee309e
equal deleted inserted replaced
16:c3bac82c6ce0 18:6743bfee309e
       
     1 /*
       
     2 * Copyright (c) 2010 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:  ?Description
       
    15 *
       
    16 */
       
    17 
       
    18  
       
    19 #include "btsendserviceinterface.h"
       
    20 #include "btsendserviceprovider.h"
       
    21 
       
    22 BTSendServiceInterface::BTSendServiceInterface(QObject* parent)
       
    23 : XQServiceProvider("com.nokia.services.btsendservice.imessage.send",parent)
       
    24     {
       
    25     publishAll();
       
    26     }
       
    27 
       
    28   
       
    29 void BTSendServiceInterface::send(QVariant data)
       
    30     {
       
    31     QList<QVariant> arguments;
       
    32     
       
    33     if(data.type()==QVariant::String)
       
    34         {
       
    35         arguments.append(data);
       
    36         }
       
    37     else
       
    38         {
       
    39         arguments.append(data.toList());
       
    40         }
       
    41     CBtSendServiceProvider *btSendServiceProvider = NULL;
       
    42     TRAPD(err,btSendServiceProvider = CBtSendServiceProvider::NewL());
       
    43     if(err)
       
    44         return;
       
    45     btSendServiceProvider->send(arguments);
       
    46     delete btSendServiceProvider;
       
    47     }