--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/bluetoothengine/headsetsimulator/core/inc/hsclientobservers.h Wed Sep 15 15:59:44 2010 +0200
@@ -0,0 +1,183 @@
+/*
+ * 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 HSCLIENTOBSERVERS_H
+#define HSCLIENTOBSERVERS_H
+
+class CHsClient;
+class CBluetoothSocket;
+class TBTDevAddr;
+
+/**
+ * @brief Observer to notify about new AG client connection and disconnection.
+ */
+class MHsClientObserver
+{
+public:
+ /**
+ * Informs about disconnection from AG.
+ *
+ * @param aClient AG client
+ * @param aErr KErrNone if successful, otherwise one of the system-wide
+ * error codes
+ */
+ virtual void HandleClientDisconnect( CHsClient *aClient, TInt aErr ) = 0;
+
+ /**
+ * Informs about connection with AG.
+ *
+ * @param aClient AG client
+ * @param aErr KErrNone if successful, otherwise one of the system-wide
+ * error codes
+ */
+ virtual void HandleNewClientL( CHsClient *aClient, TInt aErr ) = 0;
+};
+
+/**
+ * @brief Observer to notify about AG client states.
+ */
+class MHsClientStateNotifier
+{
+public:
+
+ /**
+ * Informs about connection with AG.
+ *
+ * @param aErr KErrNone if successful, otherwise one of the system-wide
+ * error codes
+ */
+ virtual void HandleClientConnectL( TInt aErr ) = 0;
+
+ /**
+ * Informs about disconnection from AG.
+ *
+ * @param aErr KErrNone if successful, otherwise one of the system-wide
+ * error codes
+ */
+ virtual void HandleClientDisconnectL( TInt aErr ) = 0;
+
+ /**
+ * Informs about status of received data from AG.
+ *
+ * @param aData received data
+ * @param aErr KErrNone if successful, otherwise one of the system-wide
+ * error codes
+ */
+ virtual void HandleClientReceiveCompleteL( const TDesC8 &aData,
+ TInt aErr ) = 0;
+
+ /**
+ * Informs about status of sent data from AG.
+ *
+ * @param aErr KErrNone if successful, otherwise one of the system-wide
+ * error codes
+ */
+ virtual void HandleClientSendCompleteL( TInt aErr ) = 0;
+
+ /**
+ * Informs about problem with AG.
+ *
+ * @param aErr system-wide error codes
+ */
+ virtual void HandleClientOtherProblemL( TInt aErr ) = 0;
+};
+
+/**
+ * @brief Observer to notify about new AG client.
+ */
+class MHsAcceptNewClientObserver
+{
+public:
+ /**
+ * Informs about connection with AG.
+ *
+ * @param aClient socket which AG is connected, if NULL see aErr code
+ * @param aErr KErrNone if successful, otherwise one of the system-wide
+ * error codes
+ */
+ virtual void HandleNewClientL( CBluetoothSocket *aClient, TInt aErr ) = 0;
+};
+
+/**
+ * @brief Observes remote control clients
+ */
+class MRemoteControllerConnectionObserver
+{
+
+public:
+ /**
+ * Handles remote control client connection
+ *
+ * @param aErr error value
+ */
+ virtual void HandleRemoteControllerConnected( TInt aErr ) = 0;
+
+ /**
+ * Handles remote control client disconnection
+ *
+ * @param aErr error value
+ */
+ virtual void HandleRemoteControllerDisconnected( TInt aErr ) = 0;
+
+};
+
+/**
+ * @brief Observer to notify about status of searching service and port on
+ * device.
+ */
+class MHsBTManagerObserver
+{
+public:
+ /**
+ * Called when port on desired device found
+ *
+ * @param aDevName bluetooth name of found device
+ * @param aDevAddr bluetooth address of found device
+ * @param aPort found port number
+ */
+ virtual void HandleDesiredDeviceFound( const TDesC &aDevName,
+ const TBTDevAddr &aDevAddr, const TInt aPort ) = 0;
+
+ /**
+ * Called when desired device not found
+ *
+ * @param aErr error code
+ */
+ virtual void HandleDesiredDeviceNotFound( TInt aErr ) = 0;
+
+ /**
+ * Called when sdp query error happened
+ *
+ * @param aErr error code
+ */
+ virtual void HandleSdpQueryError( TInt aErr ) = 0;
+
+ /**
+ * Called when service on device not found
+ *
+ * @param aErr error code
+ */
+ virtual void HandleServiceNotFound( TInt aErr ) = 0;
+
+ /**
+ * Called when port number on device not found
+ *
+ * @param aErr error code
+ */
+ virtual void HandlePortNotFound( TInt aErr ) = 0;
+
+};
+
+#endif /* HSCLIENTOBSERVERS_H */