uifw/AknGlobalUI/OldStyleNotif/Inc/AknNotifyPlugin.h
changeset 0 2f259fa3e83a
child 10 9f56a4e1b8ab
child 45 667edd0b8678
equal deleted inserted replaced
-1:000000000000 0:2f259fa3e83a
       
     1 /*
       
     2 * Copyright (c) 2002-2007 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 __AKNNOTIFYPLUGIN_H__
       
    19 #define __AKNNOTIFYPLUGIN_H__
       
    20 
       
    21 #include <e32std.h>
       
    22 #include <e32base.h>
       
    23 #include <eiknotapi.h>
       
    24 #include <AknSignal.h>
       
    25 #include <AknBattery.h>
       
    26 #include <AknIndicatorContainer.h>
       
    27 #include <AknNotifyStd.h>
       
    28 #include <AknPanic.h>
       
    29 #include <MediatorEventProvider.h>
       
    30 #include <MediatorDomainUIDs.h>
       
    31 #include <SecondaryDisplay/AknSecondaryDisplayDefs.h>
       
    32 
       
    33 class CAknIndicatorData;
       
    34 
       
    35 IMPORT_C CArrayPtr<MEikSrvNotifierBase2>* NotifierArray();
       
    36 GLDEF_C void Panic(TAknPanic aPanic);
       
    37 
       
    38 const TInt KAknBatteryNoCharging = -1;
       
    39 
       
    40 class MNotificationObserver
       
    41     {
       
    42 public:
       
    43     virtual void NotificationSelected(TInt aIndex) = 0;
       
    44     virtual void NotificationCancelled(void) = 0;
       
    45     };
       
    46 
       
    47 enum TNotificationSelection
       
    48     {
       
    49     EUngroupedNotifierSelected = 1,
       
    50     EGroupedSMSSelected,
       
    51     EGroupedCallSelected,
       
    52     EGroupedEmailSelected
       
    53     };
       
    54 
       
    55 NONSHARABLE_CLASS(CAknMediatorEvent) : public CBase
       
    56     {
       
    57 public:
       
    58     ~CAknMediatorEvent()
       
    59         {
       
    60         if (iImpl)
       
    61             {
       
    62             for (TInt i = iArray.Count()-1; i >= 0; i--)
       
    63                 {
       
    64                 iImpl->UnregisterEvent(
       
    65                     KMediatorSecondaryDisplayDomain,
       
    66                     KAknSecondaryDisplayCategory, 
       
    67                     iArray[i]
       
    68                     );
       
    69                 }
       
    70             }
       
    71         iArray.Close();
       
    72         delete iImpl;        
       
    73         }
       
    74         
       
    75     void RaiseEvent(TInt aId, const TDesC8& aBuf);
       
    76     CMediatorEventProvider* iImpl;
       
    77     RArray<TInt> iArray;
       
    78     };
       
    79 
       
    80 NONSHARABLE_CLASS(CAknPopupNotifierSubject) : public CBase, public MAknUINotifierBase
       
    81     {
       
    82 public:
       
    83     static CAknPopupNotifierSubject* NewL();
       
    84     void Release();
       
    85     TNotifierInfo RegisterL();
       
    86     TNotifierInfo Info() const;
       
    87     TPtrC8 StartL(const TDesC8& aBuffer);
       
    88     void StartL(const TDesC8& aBuffer, TInt aReplySlot, const RMessagePtr2& aMessage);
       
    89     void Cancel();
       
    90     TPtrC8 UpdateL(const TDesC8& aBuffer);
       
    91 
       
    92 private:
       
    93     CAknPopupNotifierSubject();
       
    94     void ConstructL();
       
    95     void PopupL(const TDesC8& aBuffer);
       
    96 
       
    97 private:
       
    98     TNotifierInfo iInfo;
       
    99     };
       
   100 
       
   101 
       
   102 NONSHARABLE_CLASS(CAknSignalNotifierSubject) : public CBase, public MAknUINotifierBase
       
   103     {
       
   104 public:
       
   105     static CAknSignalNotifierSubject* NewL(CAknMediatorEvent* aEvent);
       
   106     ~CAknSignalNotifierSubject();
       
   107     void Release();
       
   108     TNotifierInfo RegisterL();
       
   109     TNotifierInfo Info() const;
       
   110     TPtrC8 StartL(const TDesC8& aBuffer);
       
   111     void StartL(const TDesC8& aBuffer, TInt aReplySlot, const RMessagePtr2& aMessage);
       
   112     void Cancel();
       
   113     TPtrC8 UpdateL(const TDesC8& aBuffer);
       
   114 
       
   115 private:
       
   116     CAknSignalNotifierSubject();
       
   117     void ConstructL();
       
   118     void HandleSignalMessageL(const TDesC8& aBuffer);
       
   119 
       
   120 private:
       
   121     TNotifierInfo iInfo;
       
   122     
       
   123 public: 
       
   124     CAknMediatorEvent* iEvent; // not owned
       
   125     };
       
   126 
       
   127 
       
   128 NONSHARABLE_CLASS(CAknBatteryNotifierSubject) : public CBase, public MAknUINotifierBase
       
   129     {
       
   130 public:
       
   131     static CAknBatteryNotifierSubject* NewL(CAknMediatorEvent* aEvent);
       
   132     ~CAknBatteryNotifierSubject();
       
   133     void Release();
       
   134     TNotifierInfo RegisterL();
       
   135     TNotifierInfo Info() const;
       
   136     TPtrC8 StartL(const TDesC8& aBuffer);
       
   137     void StartL(const TDesC8& aBuffer, TInt aReplySlot, const RMessagePtr2& aMessage);
       
   138     void Cancel();
       
   139     TPtrC8 UpdateL(const TDesC8& aBuffer);
       
   140 
       
   141 private:
       
   142     CAknBatteryNotifierSubject();
       
   143     void ConstructL();
       
   144     void HandleBatteryMessageL(const TDesC8& aBuffer);
       
   145     static TInt TickerCallback(TAny* aThis);
       
   146     TInt DoTick();
       
   147 
       
   148 private:
       
   149     TNotifierInfo iInfo;
       
   150     
       
   151 public:
       
   152     CAknMediatorEvent* iEvent; // not owned
       
   153     };
       
   154 
       
   155 
       
   156 NONSHARABLE_CLASS(CAknSmallIndicatorSubject) : public CBase, public MAknUINotifierBase
       
   157     {
       
   158 public:
       
   159     static CAknSmallIndicatorSubject* NewL(CAknMediatorEvent* aEvent);
       
   160     ~CAknSmallIndicatorSubject();
       
   161     void Release();
       
   162     TNotifierInfo RegisterL();
       
   163     TNotifierInfo Info() const;
       
   164     TPtrC8 StartL(const TDesC8& aBuffer);
       
   165     void StartL(const TDesC8& aBuffer, TInt aReplySlot, const RMessagePtr2& aMessage);
       
   166     void Cancel();
       
   167     TPtrC8 UpdateL(const TDesC8& aBuffer);
       
   168 
       
   169 private:
       
   170     CAknSmallIndicatorSubject();
       
   171     void ConstructL();
       
   172     void HandleIndicatorMessageL(const TDesC8& aBuffer);
       
   173 
       
   174 private:
       
   175     TNotifierInfo iInfo;
       
   176     TBool iState;
       
   177     CAknIndicatorData* iIndicatorSDData;
       
   178 
       
   179 public: 
       
   180     CAknMediatorEvent* iEvent; // onws
       
   181     };
       
   182 
       
   183 
       
   184 NONSHARABLE_CLASS(CAknIncallBubbleSubject) : public CBase, public MAknUINotifierBase
       
   185     {
       
   186 public:
       
   187     static CAknIncallBubbleSubject* NewL();
       
   188     void Release();
       
   189     TNotifierInfo RegisterL();
       
   190     TNotifierInfo Info() const;
       
   191     TPtrC8 StartL(const TDesC8& aBuffer);
       
   192     void StartL(const TDesC8& aBuffer, TInt aReplySlot, const RMessagePtr2& aMessage);
       
   193     void Cancel();
       
   194     TPtrC8 UpdateL(const TDesC8& aBuffer);
       
   195 
       
   196 private:
       
   197     CAknIncallBubbleSubject();
       
   198     void ConstructL();
       
   199     void HandleIndicatorMessageL(const TDesC8& aBuffer , const TUint64& aClientId );
       
   200 
       
   201 private:
       
   202     TNotifierInfo iInfo;
       
   203     TBool iState;
       
   204     };
       
   205 
       
   206 #endif // __AKNNOTIFYPLUGIN_H__
       
   207 
       
   208 // End of File