mmserv/tms/tmscallserver/src/calladpt.cpp
changeset 0 71ca22bcf22a
child 3 4f62049db6ac
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mmserv/tms/tmscallserver/src/calladpt.cpp	Tue Feb 02 01:08:46 2010 +0200
@@ -0,0 +1,108 @@
+/*
+ * Copyright (c) 2009 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: Telephony Multimedia Service
+ *
+ */
+
+#include <tms.h>
+#include "callipadpt.h"
+#include "callcsadpt.h"
+#include "calladpt.h"
+#include "tmsutility.h"
+
+using namespace TMS;
+
+// -----------------------------------------------------------------------------
+// CallAdpt::CallAdpt
+//
+// -----------------------------------------------------------------------------
+//
+CallAdpt::CallAdpt()
+    {
+    TRACE_PRN_FN_ENT;
+    TRACE_PRN_FN_EXT;
+    }
+
+// -----------------------------------------------------------------------------
+// CallAdpt::~CallAdpt
+//
+// -----------------------------------------------------------------------------
+//
+CallAdpt::~CallAdpt()
+    {
+    TRACE_PRN_FN_ENT;
+    TRACE_PRN_FN_EXT;
+    }
+
+// -----------------------------------------------------------------------------
+// CallAdpt::CreateCallL
+//
+// -----------------------------------------------------------------------------
+//
+gint CallAdpt::CreateCallL(gint callType, CallAdpt*& callAdpt)
+    {
+    TRACE_PRN_FN_ENT;
+    CallAdpt* self(NULL);
+    gint retVal(TMS_RESULT_SUCCESS);
+    switch (callType)
+        {
+        case TMS_CALL_IP:
+            retVal = TMS_RESULT_INSUFFICIENT_MEMORY;
+            self = CallIPAdpt::NewL();
+            if (self)
+                {
+                retVal = self->PostConstruct();
+                if (retVal != TMS_RESULT_SUCCESS)
+                    {
+                    delete self;
+                    self = NULL;
+                    }
+                }
+            break;
+
+        case TMS_CALL_CS:
+            retVal = TMS_RESULT_INSUFFICIENT_MEMORY;
+            self = new CallCSAdpt();
+            if (self)
+                {
+                retVal = self->PostConstruct();
+                if (retVal != TMS_RESULT_SUCCESS)
+                    {
+                    delete self;
+                    self = NULL;
+                    }
+                }
+            break;
+        default:
+            retVal = TMS_RESULT_CALL_TYPE_NOT_SUPPORTED;
+            break;
+        }
+    callAdpt = self;
+    TRACE_PRN_FN_EXT;
+    return retVal;
+    }
+
+// -----------------------------------------------------------------------------
+// CallAdpt::PostConstruct
+//
+// -----------------------------------------------------------------------------
+//
+gint CallAdpt::PostConstruct()
+    {
+    TRACE_PRN_FN_ENT;
+    TRACE_PRN_FN_EXT;
+    return TMS_RESULT_SUCCESS;
+    }
+
+// End of file