TizenRefApp-8318 [Call UI] Prepare Model call manager part interface 16/122816/2
authorIgor Olshevskyi <i.olshevskyi@samsung.com>
Mon, 3 Apr 2017 11:51:58 +0000 (14:51 +0300)
committerIgor Olshevskyi <i.olshevskyi@samsung.com>
Wed, 5 Apr 2017 06:26:58 +0000 (09:26 +0300)
Change-Id: I0ef8561ea06c75ba1fd1ed6e8bb7ba9383bdf413

15 files changed:
inc/model/Call.h [new file with mode: 0644]
inc/model/IActiveCall.h [new file with mode: 0644]
inc/model/ICallDialer.h [new file with mode: 0644]
inc/model/ICallInfo.h [new file with mode: 0644]
inc/model/ICallManager.h [new file with mode: 0644]
inc/model/IConferenceCallInfo.h [new file with mode: 0644]
inc/model/IContactInfo.h [new file with mode: 0644]
inc/model/IEndCall.h [new file with mode: 0644]
inc/model/IHeldCall.h [new file with mode: 0644]
inc/model/IIncomingCall.h [new file with mode: 0644]
inc/model/ISoundManager.h [new file with mode: 0644]
inc/model/types.h [new file with mode: 0644]
inc/types.h
src/model/Call.cpp [new file with mode: 0644]
src/model/common.h [new file with mode: 0644]

diff --git a/inc/model/Call.h b/inc/model/Call.h
new file mode 100644 (file)
index 0000000..b91a5f0
--- /dev/null
@@ -0,0 +1,42 @@
+/*
+ * Copyright 2017 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://floralicense.org/license/
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef __CALLUI_MODEL_CALL_H__
+#define __CALLUI_MODEL_CALL_H__
+
+#include "types.h"
+
+namespace callui {
+
+       class Call final : public ucl::NonCopyable {
+       public:
+               static CallSRef newInstance();
+               virtual ~Call();
+
+               ISoundManagerSRef getSoundManager();
+               ICallManagerSRef getCallManager();
+
+       private:
+               friend class ucl::RefCountObj<Call>;
+               Call();
+
+               ucl::Result prepare();
+
+       };
+
+}
+
+#endif // __CALLUI_MODEL_CALL_H__
diff --git a/inc/model/IActiveCall.h b/inc/model/IActiveCall.h
new file mode 100644 (file)
index 0000000..5d51eda
--- /dev/null
@@ -0,0 +1,35 @@
+/*
+ * Copyright 2017 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://floralicense.org/license/
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef __CALLUI_MODEL_I_ACTIVE_CALL_H__
+#define __CALLUI_MODEL_I_ACTIVE_CALL_H__
+
+#include "types.h"
+
+namespace callui {
+
+       class IActiveCall : public ucl::Polymorphic {
+       public:
+               virtual ICallInfoSCRef getInfo() const = 0;
+               virtual bool isDialingMode() const = 0;
+               virtual ucl::Result hold() = 0;
+               virtual ucl::Result end() = 0;
+               virtual ucl::Result split(const IConferenceCallInfoSRef &confCallInfo) = 0;
+       };
+
+}
+
+#endif // __CALLUI_MODEL_I_ACTIVE_CALL_H__
diff --git a/inc/model/ICallDialer.h b/inc/model/ICallDialer.h
new file mode 100644 (file)
index 0000000..1ca00b9
--- /dev/null
@@ -0,0 +1,35 @@
+/*
+ * Copyright 2017 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://floralicense.org/license/
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef __CALLUI_MODEL_I_CALL_DIALER_H__
+#define __CALLUI_MODEL_I_CALL_DIALER_H__
+
+#include "types.h"
+
+namespace callui {
+
+       class ICallDialer: public ucl::Polymorphic {
+       public:
+               using DialStatusHandler = ucl::Delegate<void(DialStatus)>;
+
+       public:
+               virtual ucl::Result dialVoiceCall(const std::string &number, SimSlot simSlot) = 0;
+               virtual ucl::Result addDialStatusHandler(DialStatusHandler handler) = 0;
+               virtual ucl::Result removeDialStatusHandler(DialStatusHandler handler) = 0;
+       };
+}
+
+#endif // __CALLUI_MODEL_I_CALL_DIALER_H__
diff --git a/inc/model/ICallInfo.h b/inc/model/ICallInfo.h
new file mode 100644 (file)
index 0000000..568bf9d
--- /dev/null
@@ -0,0 +1,36 @@
+/*
+ * Copyright 2017 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://floralicense.org/license/
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef __CALLUI_MODEL_I_CALL_INFO_H__
+#define __CALLUI_MODEL_I_CALL_INFO_H__
+
+#include "types.h"
+
+namespace callui {
+
+       class ICallInfo : public ucl::Polymorphic {
+       public:
+               virtual const std::string &getPhoneNumber() const = 0;
+               virtual IContactInfoSCRef getContactInfo() const = 0;
+               virtual long getStartTime() const = 0;
+               virtual bool isEmergency() const = 0;
+               virtual bool isDialing() const = 0;
+               virtual int getConferenceMemberCount() const = 0;
+               virtual const ConfMemberCallList &getConferenceMemberList() const = 0;
+       };
+}
+
+#endif // __CALLUI_MODEL_I_CALL_INFO_H__
diff --git a/inc/model/ICallManager.h b/inc/model/ICallManager.h
new file mode 100644 (file)
index 0000000..7ffe4f9
--- /dev/null
@@ -0,0 +1,37 @@
+/*
+ * Copyright 2017 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://floralicense.org/license/
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef __CALLUI_MODEL_I_STATE_PROVIDER_H__
+#define __CALLUI_MODEL_I_STATE_PROVIDER_H__
+
+#include "types.h"
+
+namespace callui {
+
+       class ICallManager : public ucl::Polymorphic {
+       public:
+               virtual ICallDialerWRef getDialer() = 0;
+               virtual IIncomingCallWRef getIncomingCall() = 0;
+               virtual IActiveCallWRef getActiveCall() = 0;
+               virtual IHeldCallWRef getHeldCall() = 0;
+               virtual IEndCallWRef getEndCall() = 0;
+               virtual CallMask getAvailableCallMask() const = 0;
+               virtual void addCallStateHandler(const CallStateHandler handler) = 0;
+               virtual void removeCallStateHandler(const CallStateHandler handler) = 0;
+       };
+}
+
+#endif // __CALLUI_MODEL_I_STATE_PROVIDER_H__
diff --git a/inc/model/IConferenceCallInfo.h b/inc/model/IConferenceCallInfo.h
new file mode 100644 (file)
index 0000000..0801b46
--- /dev/null
@@ -0,0 +1,31 @@
+/*
+ * Copyright 2017 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://floralicense.org/license/
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef __CALLUI_MODEL_I_CONFERENCE_CALL_INFO_H__
+#define __CALLUI_MODEL_I_CONFERENCE_CALL_INFO_H__
+
+#include "types.h"
+
+namespace callui {
+
+       class IConferenceCallInfo : public ucl::Polymorphic {
+       public:
+               virtual const std::string &getPhoneNumber() const = 0;
+               virtual IContactInfoSRef getContactInfo() const = 0;
+       };
+}
+
+#endif // __CALLUI_MODEL_I_CONFERENCE_CALL_INFO_H__
diff --git a/inc/model/IContactInfo.h b/inc/model/IContactInfo.h
new file mode 100644 (file)
index 0000000..a71fc9c
--- /dev/null
@@ -0,0 +1,32 @@
+/*
+ * Copyright 2017 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://floralicense.org/license/
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef __CALLUI_MODEL_I_CONTACT_INFO_H__
+#define __CALLUI_MODEL_I_CONTACT_INFO_H__
+
+#include "types.h"
+
+namespace callui {
+
+       class IContactInfo : public ucl::Polymorphic {
+       public:
+               virtual const std::string &getName() const = 0;
+               virtual const std::string &getImagePath() const = 0;
+               virtual ContactNameSourceType getNameSourceType() const = 0;
+       };
+}
+
+#endif // __CALLUI_MODEL_I_CONTACT_INFO_H__
diff --git a/inc/model/IEndCall.h b/inc/model/IEndCall.h
new file mode 100644 (file)
index 0000000..bb16cab
--- /dev/null
@@ -0,0 +1,32 @@
+/*
+ * Copyright 2017 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://floralicense.org/license/
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef __CALLUI_MODEL_I_END_CALL_H__
+#define __CALLUI_MODEL_I_END_CALL_H__
+
+#include "types.h"
+
+namespace callui {
+
+       class IEndCall : public ucl::Polymorphic {
+       public:
+               virtual ICallInfoSCRef getInfo() const = 0;
+               virtual ucl::Result callBack() = 0;
+               virtual ucl::Result writeMessage() = 0;
+       };
+}
+
+#endif // __CALLUI_MODEL_I_END_CALL_H__
diff --git a/inc/model/IHeldCall.h b/inc/model/IHeldCall.h
new file mode 100644 (file)
index 0000000..3b46357
--- /dev/null
@@ -0,0 +1,35 @@
+/*
+ * Copyright 2017 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://floralicense.org/license/
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef __CALLUI_MODEL_I_HELD_CALL_H__
+#define __CALLUI_MODEL_I_HELD_CALL_H__
+
+#include "types.h"
+
+namespace callui {
+
+       class IHeldCall : public ucl::Polymorphic {
+       public:
+               virtual ICallInfoSCRef getInfo() const = 0;
+               virtual ucl::Result unhold() = 0;
+               virtual ucl::Result joinWithActive() = 0;
+               virtual ucl::Result swapWithActive() = 0;
+               virtual ucl::Result end() = 0;
+               virtual ucl::Result split(const IConferenceCallInfoSRef &confCallInfo) = 0;
+       };
+}
+
+#endif // __CALLUI_MODEL_I_HELD_CALL_H__
diff --git a/inc/model/IIncomingCall.h b/inc/model/IIncomingCall.h
new file mode 100644 (file)
index 0000000..a1f70da
--- /dev/null
@@ -0,0 +1,34 @@
+/*
+ * Copyright 2017 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://floralicense.org/license/
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef __CALLUI_MODEL_I_INCOMING_CALL_H__
+#define __CALLUI_MODEL_I_INCOMING_CALL_H__
+
+#include "types.h"
+
+namespace callui {
+
+       class IIncomingCall : public ucl::Polymorphic {
+       public:
+               virtual ICallInfoSCRef getInfo() const = 0;
+               virtual ucl::Result answer(CallAnswerType type) = 0;
+               virtual ucl::Result reject() = 0;
+               virtual ucl::Result rejectWithMessage(const std::string &message) = 0;
+               virtual ucl::Result stopAlert() = 0;
+       };
+}
+
+#endif // __CALLUI_MODEL_I_INCOMING_CALL_H__
diff --git a/inc/model/ISoundManager.h b/inc/model/ISoundManager.h
new file mode 100644 (file)
index 0000000..23b52d8
--- /dev/null
@@ -0,0 +1,44 @@
+/*
+ * Copyright 2017 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://floralicense.org/license/
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef __CALLUI_MODEL_I_SOUND_MANAGER_H__
+#define __CALLUI_MODEL_I_SOUND_MANAGER_H__
+
+#include "types.h"
+
+namespace callui {
+
+       class ISoundManager: public ucl::Polymorphic {
+       public:
+               using AudioStateHandler = ucl::Delegate<void(AudioStateType)>;
+               using MuteStateHandler = ucl::Delegate<void(bool)>;
+
+       public:
+               virtual ucl::Result setSpeakerState(bool isEnable) = 0;
+               virtual ucl::Result setBluetoothState(bool isEnable) = 0;
+               virtual AudioStateType getAudioState() = 0;
+               virtual ucl::Result setMuteState(bool isEnable) = 0;
+               virtual bool getMuteState() const = 0;
+               virtual ucl::Result startDtmf(const unsigned char dtmfDigit) = 0;
+               virtual ucl::Result stopDtmf() = 0;
+               virtual ucl::Result addAudioStateChangeHandler(AudioStateHandler handler) = 0;
+               virtual ucl::Result removeAudioStateChangeHandler(AudioStateHandler handler) = 0;
+               virtual ucl::Result addMuteStateChangeHandler(MuteStateHandler handler) = 0;
+               virtual ucl::Result removeMuteStateChangeHandler(MuteStateHandler handler) = 0;
+       };
+}
+
+#endif // __CALLUI_MODEL_I_SOUND_MANAGER_H__
diff --git a/inc/model/types.h b/inc/model/types.h
new file mode 100644 (file)
index 0000000..00c292c
--- /dev/null
@@ -0,0 +1,115 @@
+/*
+ * Copyright 2017 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://floralicense.org/license/
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef __CALLUI_MODEL_TYPES_H__
+#define __CALLUI_MODEL_TYPES_H__
+
+#include "../types.h"
+#include <list>
+
+namespace callui {
+
+       enum class SimSlot {
+               FIRST,
+               SECOND,
+               DEFAULT
+       };
+
+       enum class CallReleaseType {
+               BY_CALL_HANDLE,
+               ALL,
+               ALL_HOLD,
+               ALL_ACTIVE
+       };
+
+       enum class CallAnswerType {
+               NORMAL,
+               HOLD_ACTIVE_AND_ACCEPT,
+               RELEASE_ACTIVE_AND_ACCEPT,
+               RELEASE_HOLD_AND_ACCEPT,
+               RELEASE_ALL_AND_ACCEPT
+       };
+
+       enum class DialStatus {
+               SUCCESS,
+               CANCEL,
+               FAIL,
+               FAIL_SS,
+               FDN,
+               FLIGHT_MODE
+       };
+
+       enum class AudioStateType {
+               NONE,
+               SPEAKER,
+               RECEIVER,
+               EARJACK,
+               BT
+       };
+
+       enum {
+               CALL_FLAG_INCOMING = 1,
+               CALL_FLAG_ACTIVE   = 2,
+               CALL_FLAG_HELD     = 4,
+               CALL_FLAG_END      = 8
+       };
+       using CallMask = int;
+
+       enum class CallEventType {
+               END,
+               DIALING,
+               ACTIVE,
+               HELD,
+               ALERT,
+               INCOMING,
+               WAITING,
+               JOIN,
+               SPLIT,
+               SWAPPED,
+               RETRIEVED,
+               SAT_CALL_CONTROL
+       };
+
+       enum class ContactNameSourceType {
+               INVALID,
+               EMAIL,
+               NUMBER,
+               NICKNAME,
+               COMPANY,
+               NAME
+       };
+
+       UCL_DECLARE_REF_ALIASES(Call);
+
+       UCL_DECLARE_REF_ALIASES(ICallManager);
+       UCL_DECLARE_REF_ALIASES(ISoundManager);
+       UCL_DECLARE_REF_ALIASES(ICallDialer);
+
+       UCL_DECLARE_REF_ALIASES(IIncomingCall);
+       UCL_DECLARE_REF_ALIASES(IActiveCall);
+       UCL_DECLARE_REF_ALIASES(IHeldCall);
+       UCL_DECLARE_REF_ALIASES(IEndCall);
+
+       UCL_DECLARE_REF_ALIASES(ICallInfo);
+       UCL_DECLARE_REF_ALIASES(IContactInfo);
+       UCL_DECLARE_REF_ALIASES(IConferenceCallInfo);
+
+       using CallStateHandler = ucl::Delegate<void(CallEventType)>;
+
+       using ConfMemberCallList = std::list<IConferenceCallInfoSCRef>;
+}
+
+#endif // __GALLERY_MODEL_TYPES_H__
index efb664bd5457e9d3906ebe302a8e2411a517e317..fa935caf381669898a88d2d9a1a9eea059966c61 100644 (file)
@@ -23,4 +23,4 @@
 #include "ucl/util/memory.h"
 #include "ucl/util/delegation.h"
 
-#endif // __CALLUI_TYPES_H_
+#endif // __CALLUI_TYPES_H__
diff --git a/src/model/Call.cpp b/src/model/Call.cpp
new file mode 100644 (file)
index 0000000..9a1e117
--- /dev/null
@@ -0,0 +1,55 @@
+/*
+ * Copyright 2017 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://floralicense.org/license/
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "model/Call.h"
+
+#include "common.h"
+
+namespace callui {
+
+       using namespace ucl;
+
+       Call::Call()
+       {
+       }
+
+       Call::~Call()
+       {
+       }
+
+       CallSRef Call::newInstance()
+       {
+               auto result = makeShared<Call>();
+               FAIL_RETURN_VALUE(result->prepare(), {}, "result->prepare() failed!");
+               return result;
+       }
+
+       ucl::Result Call::prepare()
+       {
+               return RES_OK;
+       }
+
+       ICallManagerSRef Call::getCallManager()
+       {
+               UCL_ASSERT(0, "!!! NOT IMPLEMENTED !!!");
+       }
+
+       ISoundManagerSRef Call::getSoundManager()
+       {
+               UCL_ASSERT(0, "!!! NOT IMPLEMENTED !!!");
+       }
+
+}
diff --git a/src/model/common.h b/src/model/common.h
new file mode 100644 (file)
index 0000000..47bf580
--- /dev/null
@@ -0,0 +1,22 @@
+/*
+ * Copyright 2017 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://floralicense.org/license/
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef __CALLUI_MODEL_COMMON_H__
+#define __CALLUI_MODEL_COMMON_H__
+
+#include "../common.h"
+
+#endif // __CALLUI_MODEL_COMMON_H__