bluetoothengine/bthid/mouse/PaintCursor/src/paintcursorappview.cpp
branchRCL_3
changeset 39 5a89845f78e2
parent 16 b23265fb36da
--- a/bluetoothengine/bthid/mouse/PaintCursor/src/paintcursorappview.cpp	Wed Jun 09 09:52:54 2010 +0300
+++ b/bluetoothengine/bthid/mouse/PaintCursor/src/paintcursorappview.cpp	Mon Jun 21 15:51:46 2010 +0300
@@ -16,11 +16,20 @@
 */
 
 #include <coecntrl.h>
+#include <e32property.h> 
+#include <bthidPsKey.h>
 #include "paintcursorappview.h"
 #include "pointmsgqueue.h"
 #include "debug.h"
 
 
+/**  PubSub key read and write policies */
+_LIT_SECURITY_POLICY_C2( KBTHIDPSKeyReadPolicy, 
+                          ECapabilityLocalServices, ECapabilityReadDeviceData );
+_LIT_SECURITY_POLICY_C2( KBTHIDPSKeyWritePolicy, 
+                          ECapabilityLocalServices, ECapabilityWriteDeviceData );
+
+
 CPaintCursorAppView* CPaintCursorAppView::NewL(const TRect& aRect)
     {
     CPaintCursorAppView* self = CPaintCursorAppView::NewLC(aRect);
@@ -38,6 +47,13 @@
 
 void CPaintCursorAppView::ConstructL(const TRect& aRect)
     {
+    
+    User::LeaveIfError( RProperty::Define( KPSUidBthidSrv,
+                                            KBTMouseCursorState,
+                                            RProperty::EInt,
+                                            KBTHIDPSKeyReadPolicy,
+                                            KBTHIDPSKeyWritePolicy) );
+                                                
     // Create a window for this application view
     CreateWindowL();
 
@@ -110,6 +126,8 @@
 
     // Close the animation server
     iMouseCursorDll.Close();
+    
+    RProperty::Delete( KPSUidBthidSrv, KBTMouseCursorState );
     }
 
 void CPaintCursorAppView::SizeChanged()