src/hbcore/devicedialogbase/devicedialogserver/hbdevicedialogserverstatussym.cpp
changeset 28 b7da29130b0e
parent 21 4633027730f5
equal deleted inserted replaced
23:e6ad4ef83b23 28:b7da29130b0e
    34 
    34 
    35 // There is only one fade control setter, all other applications are getters.
    35 // There is only one fade control setter, all other applications are getters.
    36 // Device dialog is the setter.
    36 // Device dialog is the setter.
    37 const TUid PropertyCategoryUid = {0x20022FC5};
    37 const TUid PropertyCategoryUid = {0x20022FC5};
    38 const TUint StatusKey = 'Stat';
    38 const TUint StatusKey = 'Stat';
       
    39 const TUint EventKey = 'nEvt'; // For HbIndicatorButton, to be removed when HbIndicatorButton is removed
    39 
    40 
    40 class HbDeviceDialogServerStatusPrivate  : public CActive
    41 NONSHARABLE_CLASS(HbDeviceDialogServerStatusPrivate)  : public CActive
    41 {
    42 {
    42 public:
    43 public:
    43     HbDeviceDialogServerStatusPrivate(bool isServer, HbDeviceDialogServerStatus *parent);
    44     HbDeviceDialogServerStatusPrivate(bool isServer, HbDeviceDialogServerStatus *parent);
    44     ~HbDeviceDialogServerStatusPrivate();
    45     ~HbDeviceDialogServerStatusPrivate();
    45 
    46 
    71     // Device dialog server is a writer and creates the property.
    72     // Device dialog server is a writer and creates the property.
    72     if (mIsSetter) {
    73     if (mIsSetter) {
    73         _LIT_SECURITY_POLICY_PASS(KRdPolicy); // all pass
    74         _LIT_SECURITY_POLICY_PASS(KRdPolicy); // all pass
    74         _LIT_SECURITY_POLICY_S0(KWrPolicy, PropertyCategoryUid.iUid); // pass device dialog server
    75         _LIT_SECURITY_POLICY_S0(KWrPolicy, PropertyCategoryUid.iUid); // pass device dialog server
    75         mProperty.Define(PropertyCategoryUid, StatusKey, RProperty::EInt, KRdPolicy, KWrPolicy);
    76         mProperty.Define(PropertyCategoryUid, StatusKey, RProperty::EInt, KRdPolicy, KWrPolicy);
       
    77         
       
    78         // For HbIndicatorButton 
       
    79         RProperty::Define(PropertyCategoryUid, EventKey, RProperty::EInt, KRdPolicy, KRdPolicy);
    76     }
    80     }
    77     mProperty.Attach(PropertyCategoryUid, StatusKey);
    81     mProperty.Attach(PropertyCategoryUid, StatusKey);
    78     if (!mIsSetter) {
    82     if (!mIsSetter) {
    79         CActiveScheduler::Add(this);
    83         CActiveScheduler::Add(this);
    80     }
    84     }
    81     else {
    85     else {
    82         mProperty.Set(PropertyCategoryUid, StatusKey, mSetValue);
    86         mProperty.Set(PropertyCategoryUid, StatusKey, mSetValue);
       
    87         RProperty::Set(PropertyCategoryUid, EventKey, 0); // For HbIndicatorButton
    83     }
    88     }
    84 }
    89 }
    85 
    90 
    86 HbDeviceDialogServerStatusPrivate::~HbDeviceDialogServerStatusPrivate()
    91 HbDeviceDialogServerStatusPrivate::~HbDeviceDialogServerStatusPrivate()
    87 {
    92 {