activityfw/activitydatabase/inc/hsactivitydbclientinterface.h
author hgs
Wed, 24 Mar 2010 13:06:03 +0200
changeset 90 0e41c72311af
parent 89 activitymanager/activitydatabase/inc/hsactivitydbclientinterface.h@1e87eb3b400f
child 92 782e3408c2ab
permissions -rw-r--r--
201011_02
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
89
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
* Description:
hgs
parents:
diff changeset
    15
*
hgs
parents:
diff changeset
    16
*/
hgs
parents:
diff changeset
    17
#ifndef HSACTIVITYDBCLIENTINTERFACE_H
hgs
parents:
diff changeset
    18
#define HSACTIVITYDBCLIENTINTERFACE_H
hgs
parents:
diff changeset
    19
#include <qvariant.h>
hgs
parents:
diff changeset
    20
hgs
parents:
diff changeset
    21
/**
hgs
parents:
diff changeset
    22
 * Enumerate supported functions
hgs
parents:
diff changeset
    23
 */
hgs
parents:
diff changeset
    24
enum ClientFunctions 
hgs
parents:
diff changeset
    25
{
hgs
parents:
diff changeset
    26
    AddActivity =0,
hgs
parents:
diff changeset
    27
    UpdateActivity,
hgs
parents:
diff changeset
    28
    RemoveActivity,
hgs
parents:
diff changeset
    29
    RemoveApplicationActivities,
hgs
parents:
diff changeset
    30
    RequestedActivityName,
hgs
parents:
diff changeset
    31
    Activities,
hgs
parents:
diff changeset
    32
    ApplicationActivities,
hgs
parents:
diff changeset
    33
    WaitActivity,
hgs
parents:
diff changeset
    34
    LaunchActivity,
hgs
parents:
diff changeset
    35
    GetData,
hgs
parents:
diff changeset
    36
    CancelWait
hgs
parents:
diff changeset
    37
};
hgs
parents:
diff changeset
    38
hgs
parents:
diff changeset
    39
const char ActivityApplicationKeyword [] = ":ApplicationId";
hgs
parents:
diff changeset
    40
const char ActivityActivityKeyword [] = ":ActivityName";
hgs
parents:
diff changeset
    41
hgs
parents:
diff changeset
    42
class HsActivityDbClientInterface
hgs
parents:
diff changeset
    43
{
hgs
parents:
diff changeset
    44
public:
hgs
parents:
diff changeset
    45
    
hgs
parents:
diff changeset
    46
    /**
hgs
parents:
diff changeset
    47
     * Function save provided avtivity in activity storage
hgs
parents:
diff changeset
    48
     * @param activity - activity to store
hgs
parents:
diff changeset
    49
     * @return 0 on succees, error code otherwise 
hgs
parents:
diff changeset
    50
     */
hgs
parents:
diff changeset
    51
    virtual int addActivity(const QVariantHash &activity) =0;
hgs
parents:
diff changeset
    52
    
hgs
parents:
diff changeset
    53
    /**
hgs
parents:
diff changeset
    54
     * Function update exiting activity
hgs
parents:
diff changeset
    55
     * @param activity - filtering rules
hgs
parents:
diff changeset
    56
     * @return 0 on succees, error code otherwise 
hgs
parents:
diff changeset
    57
     */
hgs
parents:
diff changeset
    58
    virtual int updateActivity(const QVariantHash &activity) =0;
hgs
parents:
diff changeset
    59
    
hgs
parents:
diff changeset
    60
    /**
hgs
parents:
diff changeset
    61
     * Function delete activity
hgs
parents:
diff changeset
    62
     * @param activity - filtering rules
hgs
parents:
diff changeset
    63
     * @return 0 on succees, error code otherwise 
hgs
parents:
diff changeset
    64
     */
hgs
parents:
diff changeset
    65
    virtual int removeActivity(const QVariantHash &activity) =0;
hgs
parents:
diff changeset
    66
    
hgs
parents:
diff changeset
    67
    /**
hgs
parents:
diff changeset
    68
     * Function delete activity for application
hgs
parents:
diff changeset
    69
     * @param activity - filtering rules
hgs
parents:
diff changeset
    70
     * @return 0 on succees, error code otherwise 
hgs
parents:
diff changeset
    71
     */
hgs
parents:
diff changeset
    72
    virtual int removeApplicationActivities(const QVariantHash &activity) =0;
hgs
parents:
diff changeset
    73
    
hgs
parents:
diff changeset
    74
    /**
hgs
parents:
diff changeset
    75
     * Function return list of all activity
hgs
parents:
diff changeset
    76
     * @param result - destination list
hgs
parents:
diff changeset
    77
     * @return 0 on succees, error code otherwise 
hgs
parents:
diff changeset
    78
     */
hgs
parents:
diff changeset
    79
    virtual int activities(QList<QVariantHash>& result) =0;
hgs
parents:
diff changeset
    80
    
hgs
parents:
diff changeset
    81
    /**
hgs
parents:
diff changeset
    82
     * Function return list of all activity
hgs
parents:
diff changeset
    83
     * @param result - destination list,
hgs
parents:
diff changeset
    84
     * @param activity - filtering rules
hgs
parents:
diff changeset
    85
     * @return 0 on succees, error code otherwise 
hgs
parents:
diff changeset
    86
     */
hgs
parents:
diff changeset
    87
    virtual int applicationActivities(QList<QVariantHash>& result, 
hgs
parents:
diff changeset
    88
                                      const QVariantHash &activity) =0;
hgs
parents:
diff changeset
    89
    
hgs
parents:
diff changeset
    90
    /**
hgs
parents:
diff changeset
    91
     * Function subscribe to activity
hgs
parents:
diff changeset
    92
     * @param  activity - filtering rules
hgs
parents:
diff changeset
    93
     * @return 0 on succees, error code otherwise 
hgs
parents:
diff changeset
    94
     */
hgs
parents:
diff changeset
    95
    virtual int waitActivity(const QVariantHash &activity)=0;
hgs
parents:
diff changeset
    96
    
hgs
parents:
diff changeset
    97
    /**
hgs
parents:
diff changeset
    98
     * Function launch application activity
hgs
parents:
diff changeset
    99
     * @param activity - filtering rules 
hgs
parents:
diff changeset
   100
     * @return 0 on succees, error code otherwise 
hgs
parents:
diff changeset
   101
     */
hgs
parents:
diff changeset
   102
    virtual int launchActivity(const QVariantHash &activity)=0;
hgs
parents:
diff changeset
   103
};
hgs
parents:
diff changeset
   104
#endif //HSACTIVITYDBCLIENTINTERFACE_H