bluetoothengine/bthid/mouse/PaintCursor/src/paintcursorappview.cpp
branchRCL_3
changeset 39 5a89845f78e2
parent 16 b23265fb36da
equal deleted inserted replaced
35:95674584745d 39:5a89845f78e2
    14 * Description:
    14 * Description:
    15 *
    15 *
    16 */
    16 */
    17 
    17 
    18 #include <coecntrl.h>
    18 #include <coecntrl.h>
       
    19 #include <e32property.h> 
       
    20 #include <bthidPsKey.h>
    19 #include "paintcursorappview.h"
    21 #include "paintcursorappview.h"
    20 #include "pointmsgqueue.h"
    22 #include "pointmsgqueue.h"
    21 #include "debug.h"
    23 #include "debug.h"
       
    24 
       
    25 
       
    26 /**  PubSub key read and write policies */
       
    27 _LIT_SECURITY_POLICY_C2( KBTHIDPSKeyReadPolicy, 
       
    28                           ECapabilityLocalServices, ECapabilityReadDeviceData );
       
    29 _LIT_SECURITY_POLICY_C2( KBTHIDPSKeyWritePolicy, 
       
    30                           ECapabilityLocalServices, ECapabilityWriteDeviceData );
    22 
    31 
    23 
    32 
    24 CPaintCursorAppView* CPaintCursorAppView::NewL(const TRect& aRect)
    33 CPaintCursorAppView* CPaintCursorAppView::NewL(const TRect& aRect)
    25     {
    34     {
    26     CPaintCursorAppView* self = CPaintCursorAppView::NewLC(aRect);
    35     CPaintCursorAppView* self = CPaintCursorAppView::NewLC(aRect);
    36     return self;
    45     return self;
    37     }
    46     }
    38 
    47 
    39 void CPaintCursorAppView::ConstructL(const TRect& aRect)
    48 void CPaintCursorAppView::ConstructL(const TRect& aRect)
    40     {
    49     {
       
    50     
       
    51     User::LeaveIfError( RProperty::Define( KPSUidBthidSrv,
       
    52                                             KBTMouseCursorState,
       
    53                                             RProperty::EInt,
       
    54                                             KBTHIDPSKeyReadPolicy,
       
    55                                             KBTHIDPSKeyWritePolicy) );
       
    56                                                 
    41     // Create a window for this application view
    57     // Create a window for this application view
    42     CreateWindowL();
    58     CreateWindowL();
    43 
    59 
    44     // Set the windows size
    60     // Set the windows size
    45     SetRect(aRect);
    61     SetRect(aRect);
   108     // Close the animation object
   124     // Close the animation object
   109     iClientCommander.Close ();
   125     iClientCommander.Close ();
   110 
   126 
   111     // Close the animation server
   127     // Close the animation server
   112     iMouseCursorDll.Close();
   128     iMouseCursorDll.Close();
       
   129     
       
   130     RProperty::Delete( KPSUidBthidSrv, KBTMouseCursorState );
   113     }
   131     }
   114 
   132 
   115 void CPaintCursorAppView::SizeChanged()
   133 void CPaintCursorAppView::SizeChanged()
   116     {
   134     {
   117     DrawNow();
   135     DrawNow();