phoneplugins/phoneindicatorplugin/inc/phoneindicators.h
branchRCL_3
changeset 61 41a7f70b3818
equal deleted inserted replaced
58:40a3f856b14d 61:41a7f70b3818
       
     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:  
       
    15  *
       
    16  */
       
    17 
       
    18 #ifndef PHONEINDICATORS_H
       
    19 #define PHONEINDICATORS_H
       
    20 
       
    21 #include <hbindicatorinterface.h>
       
    22 #include <QObject>
       
    23 #include <QString>
       
    24 
       
    25 
       
    26 static const char *IndicatorNameTemplate = "com.nokia.symbian.phoneindicatorplugin_%1";
       
    27 
       
    28 enum Interaction
       
    29 {
       
    30     InteractionNone,
       
    31     OpenMissedCallView,
       
    32     OpenCallUi,
       
    33     OpenDiverSettingsView,
       
    34     Deactivate
       
    35 };
       
    36 
       
    37 enum PhoneIndicatorTypes
       
    38 {
       
    39     PhoneMissedCallIndicator = 0,
       
    40     PhoneActiveCallIndicator,
       
    41     PhoneDivertIndidicator
       
    42 };
       
    43 
       
    44 inline QString indicatorName(int indicatorType) {
       
    45     return QString(IndicatorNameTemplate).arg(indicatorType);
       
    46 }
       
    47 
       
    48 struct PhoneIndicatorInfo
       
    49 {
       
    50     const char *icon;
       
    51     const char *primaryText;
       
    52     const char *secondaryText;
       
    53     Interaction interaction;
       
    54 };
       
    55 
       
    56 Q_DECLARE_METATYPE(PhoneIndicatorInfo)
       
    57 
       
    58 static const int PhoneIndicatorCount = 3;
       
    59 static const PhoneIndicatorInfo IndicatorInfos[PhoneIndicatorCount] = {
       
    60     {"qtg_mono_info.svg",   "Missed call", "Name/Number", OpenMissedCallView },
       
    61     {"qtg_mono_info.svg",   "Active call", " ", OpenCallUi },
       
    62     {"qtg_mono_info.svg",   "Active diverts", " ", OpenDiverSettingsView }
       
    63 };
       
    64 
       
    65 #endif // PHONEINDICATORS_H