homescreenapp/serviceproviders/hsmenuserviceprovider/inc/hsmenuservice.h
changeset 35 f9ce957a272c
child 36 cdae8c6c3876
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: 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         HsSortAttribute sortAttribute = DescendingNameHsSortAttribute);
       
    43     static HsMenuItemModel *getAllCollectionsModel(
       
    44         HsSortAttribute sortAttribute = LatestOnTopHsSortAttribute);
       
    45     static HsMenuItemModel *getCollectionModel(int collectionId,
       
    46             HsSortAttribute sortAttribute = LatestOnTopHsSortAttribute,
       
    47             const QString &collectionType = collectionTypeName());
       
    48     static QStringList getCollectionNames();
       
    49     static QString getName(int entryId);
       
    50     static bool executeAction(int entryId, const QString &actionName =
       
    51                                   openActionIdentifier());
       
    52 
       
    53     static int createCollection(const QString &name);
       
    54     static bool renameCollection(int collectionId,
       
    55                                  const QString &newCollectionName);
       
    56     static bool removeCollection(int collectionId);
       
    57     static bool addApplicationsToCollection(
       
    58         const QList<int> &applicationList, int collectionId);
       
    59     static bool removeApplicationFromCollection(int applicationId,
       
    60             int collectionId);
       
    61 
       
    62     static bool organizeCollection(int groupId, QList<int> &entryIdList);
       
    63 
       
    64     static int allCollectionsId();
       
    65 
       
    66     static bool touch(int entryId);
       
    67 
       
    68 private:
       
    69     // data
       
    70 
       
    71     static int mAllCollectionsId;
       
    72 
       
    73 };
       
    74 
       
    75 #endif // HSMENUSERVICE_H