phone_plat/telephony_mediator_api/inc/mediatoreventsfromtelephonyapi.h
changeset 0 5f000ab63145
child 21 92ab7f8d0eab
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/phone_plat/telephony_mediator_api/inc/mediatoreventsfromtelephonyapi.h	Mon Jan 18 20:18:27 2010 +0200
@@ -0,0 +1,105 @@
+/*
+* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  Mediator API for events sent from Telephony.
+*
+*/
+
+
+#ifndef MEDIATOREVENTSFROMTELEPHONYAPI_H
+#define MEDIATOREVENTSFROMTELEPHONYAPI_H
+
+// INCLUDES
+#include <e32base.h>
+#include <cntdef.h>
+
+/** Max Length of Remote Phone Number */
+const TInt KMaxPhoneNumberLength = 100;
+
+/**  The category UID for the messages in this header file. */
+const TUid KCatEventsFromTelephony = { 0x100058BA };
+
+/**  Version number of this API */
+const TInt KTelephonyEventsVersionMajor( 1 );
+const TInt KTelephonyEventsVersionMinor( 0 );
+const TInt KTelephonyEventsVersionBuild( 0 );
+
+namespace TelephonyMediator {
+/**
+* Call states
+*/
+enum TCallState
+    {
+    ECallStateUnknown = 0,
+    ECallStateIdle,
+    ECallStateDialling,
+    ECallStateEmergencyDialling,
+    ECallStateRinging,
+    ECallStateConnecting,
+    ECallStateConnected,
+    ECallStateHangingUp,
+    ECallStateHeld,
+    ECallStateAnswering,
+    ECallStateRejecting,
+    ECallStateDisconnecting
+    };
+
+enum TCallType
+    {
+    // Uninitialized or unknown call type
+    ECallTypeUninitialized = 0,
+
+    // Circuit switched voice call
+    ECallTypeCSVoice,
+
+    // Fax call
+    ECallTypeFax,
+
+    // Circuit switched data call with or without high speed HSCSD attribute
+    ECallTypeData,
+    
+    // Circuit switched multimedia call
+    ECallTypeVideo,
+    
+    // Packet switched voice call
+    ECallTypeVoIP
+    };
+
+
+// Call Data Parameter is sent with EPhoneEventCallData
+class TTelephonyCallDataParam
+	{
+	public:
+		TInt iCallId;
+		TBuf<KCntMaxTextFieldLength> iCLIText;
+		TCallState iCallState;
+		TCallType iCallType;
+		TBuf<KMaxPhoneNumberLength> iRemotePhoneNumber;
+	};
+	
+// Mediator package
+typedef TPckgBuf<TTelephonyCallDataParam> TTelephonyCallDataParamPackage;
+
+/**  Generic Events from Phone Application. */
+enum TEventsFromTelephony
+    {
+    /**
+     * This event is sent when Phone Application creates a new call bubble.
+     * TTelephonyCallDataParamPackage is sent in Package Buffer.
+     */
+    EPhoneEventCallData = 0
+    };
+
+} // namespace TelephonyMediator
+
+#endif // MEDIATOREVENTSFROMTELEPHONYAPI_H