homescreenapp/serviceproviders/hsmenuserviceprovider/inc/hsmenuservice.h
branchRCL_3
changeset 82 5f0182e07bfb
equal deleted inserted replaced
79:f00a6757af32 82:5f0182e07bfb
       
     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: hsmenuservice.h
       
    15  *
       
    16  */
       
    17 
       
    18 #ifndef HSMENUSERVICE_H
       
    19 #define HSMENUSERVICE_H
       
    20 
       
    21 // System includes
       
    22 #include <QObject>
       
    23 #include <QStringList>
       
    24 
       
    25 // User includes
       
    26 #include "hsapp_defs.h"
       
    27 #include "hsmenuservice_global.h"
       
    28 #include "cadefs.h"
       
    29 #include "caservice.h"
       
    30 
       
    31 // Forward declarations
       
    32 class HsMenuItemModel;
       
    33 
       
    34 // Class declaration
       
    35 class MENUSERVICE_EXPORT HsMenuService
       
    36 {
       
    37 
       
    38 public:
       
    39 
       
    40     // Function declarations
       
    41     static HsMenuItemModel *getAllApplicationsModel(
       
    42         Hs::HsSortAttribute sortAttribute = Hs::DescendingNameHsSortAttribute);
       
    43     static HsMenuItemModel *getAllCollectionsModel();
       
    44     static HsMenuItemModel *getInstalledModel(
       
    45         Hs::HsSortAttribute sortAttribute = Hs::DescendingNameHsSortAttribute);
       
    46     static HsMenuItemModel *getCollectionModel(int collectionId,
       
    47             Hs::HsSortAttribute sortAttribute = Hs::LatestOnTopHsSortAttribute,
       
    48             const QString &collectionType = Hs::collectionTypeName);
       
    49     static QStringList getCollectionNames();
       
    50     static QString getName(int entryId);
       
    51     static int executeAction(int entryId, const QString &actionName =
       
    52                                   Hs::openActionIdentifier);
       
    53     static bool launchTaskSwitcher();
       
    54 
       
    55     static int createCollection(const QString &name);
       
    56     static bool renameCollection(int collectionId,
       
    57                                  const QString &newCollectionName);
       
    58     static bool removeCollection(int collectionId);
       
    59     static bool addApplicationsToCollection(
       
    60         const QList<int> &applicationList, int collectionId);
       
    61     static bool removeApplicationFromCollection(int applicationId,
       
    62             int collectionId);
       
    63 
       
    64     static bool organizeCollection(int groupId, QList<int> &entryIdList);
       
    65 
       
    66     static int allCollectionsId();
       
    67     
       
    68     static int collectionIdByType(const QString& collectionType);
       
    69 
       
    70     static void touch(int entryId);
       
    71     
       
    72     static void touch(const QList<int> &entryIdList);
       
    73     
       
    74     static int launchSoftwareUpdate();
       
    75 
       
    76 private:
       
    77     // data
       
    78 
       
    79     static int mAllCollectionsId;
       
    80 
       
    81 };
       
    82 
       
    83 #endif // HSMENUSERVICE_H