bluetoothengine/headsetsimulator/remotecontroller/inc/remotecontrol/hsrccommand.h
branchheadsetsimulator
changeset 60 90dbfc0435e3
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/bluetoothengine/headsetsimulator/remotecontroller/inc/remotecontrol/hsrccommand.h	Wed Sep 15 15:59:44 2010 +0200
@@ -0,0 +1,76 @@
+/*
+ * Component Name: Headset Simulator
+ * Author: Comarch S.A.
+ * Version: 1.0
+ * Copyright (c) 2010 Comarch S.A.
+ *  
+ * This Software is submitted by Comarch S.A. to Symbian Foundation Limited on 
+ * the basis of the Member Contribution Agreement entered between Comarch S.A. 
+ * and Symbian Foundation Limited on 5th June 2009 (“Agreement”) and may be 
+ * used only in accordance with the terms and conditions of the Agreement. 
+ * Any other usage, duplication or redistribution of this Software is not 
+ * allowed without written permission of Comarch S.A.
+ * 
+ */
+
+#ifndef HSRCCOMMAND_H
+#define HSRCCOMMAND_H
+
+#include <e32base.h>
+#include <hsremoterequest.h>
+
+/** Length of package */
+const TInt KHsRemoteControlPackageLength = 128;
+
+/** Length of package's header */
+const TInt KHsRemoteControlPackageTypeMaxLength = 2;
+
+/** Headset Simulator's remote control command */
+typedef TBuf8 <KHsRemoteControlPackageLength> THsRCCommandData;
+
+/**
+ * @brief Represents command for remote control of Headset Simulator
+ */
+class THsRCCommand
+{
+public:
+        
+    /**
+     * Constructor
+     * 
+     * @param aData command's data
+     * @param aCommandType type of command
+     */
+    THsRCCommand( THsRCCommandData& aData, 
+            THsRemoteControlCommandType aCommandType );
+
+    /**
+     * Represents THsRCCommand as 8-bit descriptor
+     * 
+     * @param aCommandDesc parameter containing response
+     */
+    void ToDes8( TDes8& aCommandDesc );
+
+    /**
+     * Clones THsRCCommand object
+     * 
+     * @param aCmdFrom source
+     * @param aCmdTo destination 
+     */
+    static void Copy( const THsRCCommand& aCmdFrom, THsRCCommand& aCmdTo );
+
+    /**
+     * Getter for type of command
+     * 
+     * @return command type
+     */
+    THsRemoteControlCommandType Type() const;
+
+private:
+    /** Command data */
+    THsRCCommandData& iData;
+    
+    /** Command type */
+    THsRemoteControlCommandType iType;
+};
+#endif // HSRCOMMAND_H