filemanager/src/inc/fmserviceutils/fmserviceutils.cpp
author hgs
Mon, 18 Oct 2010 09:44:31 +0800
changeset 49 81668a704644
parent 47 12b82dc0e8db
permissions -rw-r--r--
201041
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
47
hgs
parents:
diff changeset
     1
/*
hgs
parents:
diff changeset
     2
* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
hgs
parents:
diff changeset
     3
* All rights reserved.
hgs
parents:
diff changeset
     4
* This component and the accompanying materials are made available
hgs
parents:
diff changeset
     5
* under the terms of "Eclipse Public License v1.0"
hgs
parents:
diff changeset
     6
* which accompanies this distribution, and is available
hgs
parents:
diff changeset
     7
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
hgs
parents:
diff changeset
     8
*
hgs
parents:
diff changeset
     9
* Initial Contributors:
hgs
parents:
diff changeset
    10
* Nokia Corporation - initial contribution.
hgs
parents:
diff changeset
    11
* 
hgs
parents:
diff changeset
    12
* Contributors:
hgs
parents:
diff changeset
    13
*
hgs
parents:
diff changeset
    14
* 
hgs
parents:
diff changeset
    15
* Description:
hgs
parents:
diff changeset
    16
*     The source file of service utils
hgs
parents:
diff changeset
    17
*/
hgs
parents:
diff changeset
    18
hgs
parents:
diff changeset
    19
#include "fmserviceutils.h"
hgs
parents:
diff changeset
    20
hgs
parents:
diff changeset
    21
#include "fmserviceutilsprivate.h"
hgs
parents:
diff changeset
    22
hgs
parents:
diff changeset
    23
FmServiceUtils::FmServiceUtils( QObject *parent ) : QObject( parent )
hgs
parents:
diff changeset
    24
{
hgs
parents:
diff changeset
    25
    d = new FmServiceUtilsPrivate;
hgs
parents:
diff changeset
    26
}
hgs
parents:
diff changeset
    27
hgs
parents:
diff changeset
    28
FmServiceUtils::~FmServiceUtils()
hgs
parents:
diff changeset
    29
{
hgs
parents:
diff changeset
    30
    delete d;
hgs
parents:
diff changeset
    31
}
hgs
parents:
diff changeset
    32
hgs
parents:
diff changeset
    33
/*!
hgs
parents:
diff changeset
    34
    send files that included in \a filePathList via ShareUi
hgs
parents:
diff changeset
    35
*/
hgs
parents:
diff changeset
    36
void FmServiceUtils::sendFile( const QStringList &filePathList )
hgs
parents:
diff changeset
    37
{
hgs
parents:
diff changeset
    38
    d->sendFile( filePathList );
hgs
parents:
diff changeset
    39
}
hgs
parents:
diff changeset
    40
hgs
parents:
diff changeset
    41
/*!
hgs
parents:
diff changeset
    42
    call CBaBackupSessionWrapper to close apps, for example, before formant, apps need be closed
hgs
parents:
diff changeset
    43
    this is synchronous which will take a while, please call this function in thread
hgs
parents:
diff changeset
    44
*/
hgs
parents:
diff changeset
    45
void FmServiceUtils::closeApps()
hgs
parents:
diff changeset
    46
{
hgs
parents:
diff changeset
    47
    d->closeApps();
hgs
parents:
diff changeset
    48
}
hgs
parents:
diff changeset
    49
hgs
parents:
diff changeset
    50
/*!
hgs
parents:
diff changeset
    51
    call CBaBackupSessionWrapper to restart apps
hgs
parents:
diff changeset
    52
    for example, after formant, closed apps need be restarted
hgs
parents:
diff changeset
    53
    this is synchronous which will return quickly.
hgs
parents:
diff changeset
    54
*/
hgs
parents:
diff changeset
    55
void FmServiceUtils::restartApps()
hgs
parents:
diff changeset
    56
{
hgs
parents:
diff changeset
    57
    d->restartApps();
hgs
parents:
diff changeset
    58
}
hgs
parents:
diff changeset
    59
hgs
parents:
diff changeset
    60
/*!
hgs
parents:
diff changeset
    61
    save acitivity for activity wrapper
hgs
parents:
diff changeset
    62
*/
hgs
parents:
diff changeset
    63
bool FmServiceUtils::saveActivity(const QString &activityId, const QVariant &activityData, const QVariantHash &metadata)
hgs
parents:
diff changeset
    64
{
hgs
parents:
diff changeset
    65
    return d->saveActivity( activityId, activityData, metadata );
hgs
parents:
diff changeset
    66
}
hgs
parents:
diff changeset
    67
hgs
parents:
diff changeset
    68
/*!
hgs
parents:
diff changeset
    69
    remove acitivity for activity wrapper
hgs
parents:
diff changeset
    70
*/
hgs
parents:
diff changeset
    71
bool FmServiceUtils::removeActivity(const QString &activityId)
hgs
parents:
diff changeset
    72
{
hgs
parents:
diff changeset
    73
    return d->removeActivity( activityId );
hgs
parents:
diff changeset
    74
}