# Process this file with autoconf to produce a configure script.
AC_PREREQ([2.68])
-AC_INIT([org.tizen.ico.homescreen], [0.9.06], [])
+AC_INIT([org.tizen.ico.homescreen], [0.9.10], [])
AM_INIT_AUTOMAKE([1.11 foreign no-dist-gzip dist-xz])
AC_CONFIG_SRCDIR([configure.ac])
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_FILES([Makefile
lib/Makefile
+ lib/common/Makefile
lib/apps-framework/Makefile
lib/misc/Makefile
lib/misc/state-machine/Makefile
src/Makefile
src/syscond/Makefile
src/homescreen/Makefile
+ src/statusbar/Makefile
tool/Makefile
tests/Makefile
tests/system-controller/Makefile
Environment=TIZEN_PLATFORMLOGGING_MODE=1
Environment=TIZEN_DLOG_LEVEL=1
Environment=DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%U/dbus/user_bus_socket
-ExecStart=/usr/apps/org.tizen.ico.system-controller/bin/IcoSysconDaemon
+ExecStart=/usr/apps/org.tizen.ico.system-controller/bin/IcoSysconDaemon --user app
<?xml version="1.0" encoding="utf-8"?>
-<manifest xmlns="http://tizen.org/ns/packages" package="org.tizen.ico.homescreen" version="0.7.0" install-location="internal-only">
+<manifest xmlns="http://tizen.org/ns/packages" package="org.tizen.ico.homescreen" version="0.9.10" install-location="internal-only">
<label>HomeScreen</label>
<description>IVI HomeScreen Application</description>
<ui-application appid="org.tizen.ico.homescreen" exec="/usr/apps/org.tizen.ico.homescreen/bin/HomeScreen" nodisplay="true" multiple="false" type="capp" taskmanage="true">
<?xml version="1.0" encoding="utf-8"?>
-<manifest xmlns="http://tizen.org/ns/packages" package="org.tizen.ico.statusbar" version="0.7.0" install-location="internal-only">
+<manifest xmlns="http://tizen.org/ns/packages" package="org.tizen.ico.statusbar" version="0.9.10" install-location="internal-only">
<label>StatusBar</label>
<description>IVI StatusBar Application</description>
<ui-application appid="org.tizen.ico.statusbar" exec="/usr/apps/org.tizen.ico.statusbar/bin/StatusBar" nodisplay="true" multiple="false" type="capp" taskmanage="true">
<?xml version="1.0" encoding="utf-8"?>
-<manifest xmlns="http://tizen.org/ns/packages" package="org.tizen.ico.system-controller" version="0.1.0-0" install-location="internal-only">
+<manifest xmlns="http://tizen.org/ns/packages" package="org.tizen.ico.system-controller" version="0.9.10" install-location="internal-only">
<label>system-controller</label>
<author email="" href=""> </author>
<description>ico system-controller</description>
--- /dev/null
+<manifest>
+ <request>
+ <domain name="_"/>
+ </request>
+ <assign>
+ <filesystem path="/home/app/ico" label="User"/>
+ </assign>
+</manifest>
/**
* @file ico_syc_msg_cmd_def.h
*
- * @brief
+ * @brief
*/
/*========================================================================*/
#ifndef __ICO_SYC_MSG_CMD_DEF_H__
/* notify state changed to homescreen */
#define MSG_CMD_NOTIFY_CHANGED_STATE 0x00060001
+
+/* application operation */
+#define MSG_CMD_APP_START 1000
+#define MSG_CMD_APP_STOP 1001
+
+/* window change */
+#define MSG_CMD_WIN_CHANGE 2000
+
#ifdef __cplusplus
}
#endif
*/
typedef struct _win_move {
char *zone; /* area of showing application window */
+ int layer; /* layer of showing application window */
int pos_x; /* window's display position (x) */
int pos_y; /* window's display position (y) */
int width; /* window width */
typedef void (*ico_syc_callback_t) (const ico_syc_ev_e event,
const void *detail,
void *user_data);
-
#ifdef __cplusplus
}
SUBDIRS=\
+ common \
apps-framework \
misc \
system-controller
/* set move info */
if (move->zone != NULL) {
json_object_set_string_member(argobj, MSG_PRMKEY_ZONE, move->zone);
+ json_object_set_int_member(argobj, MSG_PRMKEY_LAYER, move->layer);
}
else {
json_object_set_int_member(argobj, MSG_PRMKEY_POS_X, move->pos_x);
json_object_set_int_member(argobj, MSG_PRMKEY_POS_Y, move->pos_y);
+ json_object_set_int_member(argobj, MSG_PRMKEY_LAYER, -1);
}
json_object_set_int_member(argobj, MSG_PRMKEY_WIDTH, move->width);
json_object_set_int_member(argobj, MSG_PRMKEY_HEIGHT, move->height);
* http://www.apache.org/licenses/LICENSE-2.0
*
*/
+
#include <iostream>
#include <string>
#include <sstream>
#include <utility>
#include <cstdlib>
-#include "CicoSCAilItems.h"
-#include "CicoSCConf.h"
-#include "CicoSCSystemConfig.h"
-#include "CicoLog.h"
+#include <ico_log.h>
+#include "CicoAilItems.h"
+#include "CicoConf.h"
+#include "CicoSystemConfig.h"
+#include "CicoLibString.h"
using namespace std;
-void split(const string &s, char d, vector<string> &e)
-{
- stringstream ss(s);
- string it;
- while(getline(ss, it, d)) {
- e.push_back(it);
- }
- return;
-}
-
/**
* @brief constructor
*/
-CicoSCAilItems::CicoSCAilItems()
+CicoAilItems::CicoAilItems()
{
ICO_TRA("start");
init();
* @param exe exec path by ail information data
* @param cateforys environ file data
*/
-CicoSCAilItems::CicoSCAilItems(const char* pkg, const char* icon,
+CicoAilItems::CicoAilItems(const char* pkg, const char* icon,
const char* nam, const char* ctgry,
const char* typ, const char* exe,
const std::string categorys, bool ndisp)
ICO_TRA("end");
}
-CicoSCAilItems::CicoSCAilItems(const CicoSCAilItems &s)
+CicoAilItems::CicoAilItems(const CicoAilItems &s)
{
m_appid = s.m_appid; // PACKAGE NAME
m_icon = s.m_icon; // ICON
/**
* @brief
*/
-CicoSCAilItems::~CicoSCAilItems()
+CicoAilItems::~CicoAilItems()
{
ICO_TRA("start");
ICO_TRA("end");
/**
* @brief init member
*/
-void CicoSCAilItems::init()
+void CicoAilItems::init()
{
m_appid.clear(); // PACKAGE NAME
m_categories.clear(); // CATEGORIES
const CicoSCDefaultConf* oCSCDC;
- oCSCDC = CicoSCSystemConfig::getInstance()->getDefaultConf();
+ oCSCDC = CicoSystemConfig::getInstance()->getDefaultConf();
if (NULL != oCSCDC) {
- ICO_TRA("CicoSCAilItems::init base CicoSCDefaultConf");
+ ICO_DBG("CicoAilItems::init base CicoSCDefaultConf");
m_nodeID = oCSCDC->node;
m_kindID = oCSCDC->appkind;
m_categoryID = oCSCDC->category;
m_switch = oCSCDC->inputsw;
}
else {
- ICO_TRA("CicoSCAilItems::init base define");
+ ICO_DBG("CicoAilItems::init base define");
m_nodeID = DINITm_nodeID; // "run=xxx" xxx change to id
m_kindID = DINITm_kindID; // "kind=xxx" xxx change to id
m_categoryID = DINITm_categoryID; // "category=xxx" xxx change to id
* @param exe exec path by ail information data
* @param cateforys environ file data
*/
-void CicoSCAilItems::setup(const char* pkg, const char* icon,
+void CicoAilItems::setup(const char* pkg, const char* icon,
const char* nam, const char* ctgry,
const char* typ, const char* exe,
std::string categorys, bool ndisp)
* @brief category string parse
* @parm category string data split code ";"
*/
-void CicoSCAilItems::categoryParse(const std::string categorys)
+void CicoAilItems::categoryParse(const std::string categorys)
{
ICO_TRA("start");
if (categorys.empty()) {
inputDevName.clear();
switchName.clear();
- CicoSCSystemConfig* CSCSC = CicoSCSystemConfig::getInstance();
+ CicoSystemConfig* CSCSC = CicoSystemConfig::getInstance();
ICO_DBG("category def size = %d", x.size());
for (it = x.begin(); it != x.end(); it++) {
* @retval true parse success
* @retval false parse fail
*/
-bool CicoSCAilItems::categoryParseRun(const string& s)
+bool CicoAilItems::categoryParseRun(const string& s)
{
ICO_TRA("start");
const char* ps = s.c_str();
}
// "run=xxx"
// TODO mk_k START getHostID(..) request order
- CicoSCSystemConfig* CSCSC = CicoSCSystemConfig::getInstance();
+ CicoSystemConfig* CSCSC = CicoSystemConfig::getInstance();
int nodeID = CSCSC->getNodeIdbyName(&ps[c+1]);
// TODO mk_k int nodeID = -1;
// TODO mk_k int nodeID = CSCSC->getHostID(&ps[c+1]);
* @retval true parse success
* @retval false parse fail
*/
-bool CicoSCAilItems::categoryParseKind(const string& s)
+bool CicoAilItems::categoryParseKind(const string& s)
{
ICO_TRA("start");
const char* ps = s.c_str();
return false;
}
// "kind=xxx" xxx change to id
- CicoSCSystemConfig* CSCSC = CicoSCSystemConfig::getInstance();
+ CicoSystemConfig* CSCSC = CicoSystemConfig::getInstance();
int kindID = CSCSC->getAppKindIdbyName(&ps[c+1]);
if (kindID==-1) {
ICO_TRA("end");
* @retval true parse success
* @retval false parse fail
*/
-bool CicoSCAilItems::categoryParseCategory(const string& s)
+bool CicoAilItems::categoryParseCategory(const string& s)
{
ICO_TRA("start");
const char* ps = s.c_str();
return false; // not "category=xxx"
}
// "category=xxx" xxx change to id
- CicoSCSystemConfig* CSCSC = CicoSCSystemConfig::getInstance();
+ CicoSystemConfig* CSCSC = CicoSystemConfig::getInstance();
int categoryID = CSCSC->getCategoryIdbyName(&ps[c+1]);
if (categoryID==-1) {
ICO_TRA("end");
* @retval true get value success
* @retval false get not good
*/
-bool CicoSCAilItems::categoryParseGetValue(const std::string& s,
+bool CicoAilItems::categoryParseGetValue(const std::string& s,
const std::string& k,
std::string & val)
{
* @retval true parse success
* @retval false parse fail
*/
-bool CicoSCAilItems::categoryGetDisplay(const string& disp,
+bool CicoAilItems::categoryGetDisplay(const string& disp,
const string& layer,
const string& zone)
{
return false;
}
- CicoSCSystemConfig* CSCSC = CicoSCSystemConfig::getInstance();
+ CicoSystemConfig* CSCSC = CicoSystemConfig::getInstance();
m_display = CSCSC->getDisplayIdbyName(disp);
ICO_DBG("display %s->%d", disp.c_str(), m_display);
if (false == layer.empty()) {
* @retval true get data
* @retval false param fail
*/
-bool CicoSCAilItems::categoryGetSound(const string& sound, const string& zone)
+bool CicoAilItems::categoryGetSound(const string& sound, const string& zone)
{
ICO_TRA("start");
if (true == sound.empty()) {
return false;
}
- CicoSCSystemConfig* CSCSC = CicoSCSystemConfig::getInstance();
+ CicoSystemConfig* CSCSC = CicoSystemConfig::getInstance();
m_sound = CSCSC->getSoundIdbyName(sound);
ICO_DBG("sound %s->%d", sound.c_str(), m_sound);
if (false == zone.empty()) {
return true;
}
-bool CicoSCAilItems::categoryGetInput(const string& inputDev,
+bool CicoAilItems::categoryGetInput(const string& inputDev,
const string& sw)
{
ICO_TRA("start");
return false;
}
- CicoSCSystemConfig* CSCSC = CicoSCSystemConfig::getInstance();
+ CicoSystemConfig* CSCSC = CicoSystemConfig::getInstance();
m_sound = CSCSC->getInputDevIdbyName(inputDev);
ICO_DBG("sound %s->%d", inputDev.c_str(), m_sound);
if (false == sw.empty()) {
* @retval true parse success
* @retval false parse fail
*/
-bool CicoSCAilItems::categoryParseNodisplay(const string& s)
+bool CicoAilItems::categoryParseNodisplay(const string& s)
{
ICO_TRA("start");
const char* ps = s.c_str();
* @retval true parse success
* @retval false parse fail
*/
-bool CicoSCAilItems::categoryParseAnimation(const string& s)
+bool CicoAilItems::categoryParseAnimation(const string& s)
{
ICO_TRA("start");
const char* ps = s.c_str();
* @retval true parse success
* @retval false parse fail
*/
-bool CicoSCAilItems::categoryParseInvisiblecpu(const string& s)
+bool CicoAilItems::categoryParseInvisiblecpu(const string& s)
{
ICO_TRA("start");
const char* ps = s.c_str();
* @retval true parse success
* @retval false parse fail
*/
-bool CicoSCAilItems::categoryParseNoconfigure(const string&)
+bool CicoAilItems::categoryParseNoconfigure(const string&)
{
// TODO mk_k
ICO_TRA("start");
* @retval true parse success
* @retval false parse fail
*/
-bool CicoSCAilItems::categoryParseMenuoverlap(const string&)
+bool CicoAilItems::categoryParseMenuoverlap(const string&)
{
ICO_TRA("start");
m_memnuOverlap = true;
* @retval true parse success
* @retval false parse fail
*/
-bool CicoSCAilItems::categoryParseAuto(const string&)
+bool CicoAilItems::categoryParseAuto(const string&)
{
ICO_TRA("start");
m_autoStart = true;
* @retval true parse success
* @retval false parse fail
*/
-bool CicoSCAilItems::categoryParseNoauto(const string&)
+bool CicoAilItems::categoryParseNoauto(const string&)
{
ICO_TRA("start");
m_autoStart = false;
ICO_TRA("end");
return true;
}
-
+// vim:set expandtab ts=4 sw=4:
* http://www.apache.org/licenses/LICENSE-2.0
*
*/
-#ifndef CICOSCAILITEMS_H
-#define CICOSCAILITEMS_H
+#ifndef CICOAILITEMS_H
+#define CICOAILITEMS_H
#include <glib.h>
#include <string>
#include <vector>
*
*/
-class CicoSCAilItems {
+class CicoAilItems {
public: // member method
- CicoSCAilItems();
- CicoSCAilItems(const char* pkg, const char* icon, const char* nam,
+ CicoAilItems();
+ CicoAilItems(const char* pkg, const char* icon, const char* nam,
const char* ctgry, const char* typ, const char* exe,
std::string categorys, bool ndisp);
- CicoSCAilItems(const CicoSCAilItems& rAilItems);
- ~CicoSCAilItems();
+ CicoAilItems(const CicoAilItems& rAilItems);
+ ~CicoAilItems();
void init();
void setup(const char* pkg, const char* icon, const char* nam,
const char* ctgry, const char* typ, const char* exe,
std::string categorys, bool ndisp);
- const CicoSCAilItems* p() const;
+ const CicoAilItems* p() const;
protected: // member method
void categoryParse(const std::string categorys);
bool m_resumeShow;
};
-inline const CicoSCAilItems* CicoSCAilItems::p() const
+inline const CicoAilItems* CicoAilItems::p() const
{
return this;
}
#endif // CICOAILITEMS_H
+// vim:set expandtab ts=4 sw=4:
#include <string.h>
#include <aul/aul.h>
-#include "CicoLog.h"
-#include "CicoSCAulItems.h"
-#include "CicoSCAilItems.h"
-#include "CicoSCConf.h"
-#include "CicoSCSystemConfig.h"
+#include <ico_log.h>
+#include "CicoAulItems.h"
+#include "CicoAilItems.h"
+#include "CicoConf.h"
+#include "CicoSystemConfig.h"
using namespace std;
/**
* @brief AUL Items class constructor
*/
-CicoSCAulItems::CicoSCAulItems()
+CicoAulItems::CicoAulItems()
{
- ICO_TRA("CicoSCAulItems::CicoSCAulItems");
+ ICO_TRA("start");
m_appid.clear(); // appid
m_pid = 0; // pid
m_category = DINITm_categoryID;
m_defCgrpCpu.clear();
m_defCgrpMem.clear();
m_aulstt = AUL_R_OK;
+ ICO_TRA("end");
}
/**
* @brief AUL Items class constructor
*/
-CicoSCAulItems::CicoSCAulItems(const char* appid, int pid, int ctgry,
- int aulstt, const CicoSCWindow* obj)
+CicoAulItems::CicoAulItems(const char* appid, int pid, int ctgry,
+ int aulstt, const void* obj)
:m_appid(appid), m_pid(pid), m_category(ctgry), m_aulstt(aulstt)
{
- ICO_TRA("constructor %s, %d, %x", appid? appid: "(NIL)", pid, obj);
+ ICO_TRA("start %s, %d, %x", appid? appid: "(NIL)", pid, obj);
enterWindow(obj);
getPidCgroupInfo(pid, m_defCgrpMem, m_defCgrpCpu);
m_cpucgroup = -1;
m_memcgroup = -1;
if (DINITm_categoryID != m_category) {
- CicoSCSystemConfig* conf = CicoSCSystemConfig::getInstance();
+ CicoSystemConfig* conf = CicoSystemConfig::getInstance();
const CicoSCCategoryConf* objX =
conf->getCategoryObjbyCaategoryID(m_category);
if (NULL != objX) {
ICO_DBG("categ:%d -> cgroup: %d", m_category, m_cpucgroup);
}
}
+ ICO_TRA("end");
}
/**
* @brief AUL Items class constructor
*/
-CicoSCAulItems::CicoSCAulItems(const CicoSCAulItems& s)
+CicoAulItems::CicoAulItems(const CicoAulItems& s)
{
m_appid = s.m_appid;
m_pid = s.m_pid;
/**
* @brief AUL Items class destructor
*/
-CicoSCAulItems::~CicoSCAulItems()
+CicoAulItems::~CicoAulItems()
{
- ICO_TRA("CicoSCAulItems::~CicoSCAulItems");
+ ICO_TRA("CicoAulItems::~CicoAulItems");
m_CSCWptrs.clear();
}
/**
- * @brief CicoSCWindow pointer entry
+ * @brief window information pointer entry
* @param obj entry pointer
*/
-void CicoSCAulItems::enterWindow(const CicoSCWindow* obj)
+void CicoAulItems::enterWindow(const void* obj)
{
- ICO_TRA("CicoSCAulItems::enterWindow %x", obj);
+ ICO_TRA("CicoAulItems::enterWindow %x", obj);
if ((NULL == obj) || (0 == obj)) {
- ICO_TRA("CicoSCAulItems::enterWindow");
+ ICO_TRA("CicoAulItems::enterWindow");
return;
}
bool bingo = false; // Registered flag off
#if 1 // TODO mk_k
- vector<const CicoSCWindow*>::iterator it = m_CSCWptrs.begin();
- vector<const CicoSCWindow*>::iterator theEnd = m_CSCWptrs.end();
+ vector<const void*>::iterator it = m_CSCWptrs.begin();
+ vector<const void*>::iterator theEnd = m_CSCWptrs.end();
for(; it != theEnd; ++it) {
if (obj == *it) { // if Registered ?
bingo = true; // Registered flag on
ICO_TRA("add window pointer");
m_CSCWptrs.push_back(obj);
}
- ICO_TRA("CicoSCAulItems::enterWindow");
+ ICO_TRA("CicoAulItems::enterWindow");
return;
}
/**
- * @brief removw CicoSCWindow pointer
+ * @brief remove window information pointer
* @param obj remove target
*/
-void CicoSCAulItems::rmWindow(const CicoSCWindow* obj)
+void CicoAulItems::rmWindow(const void* obj)
{
- ICO_TRA("CicoSCAulItems::rmWindow %x", obj);
- vector<const CicoSCWindow*>::iterator it = m_CSCWptrs.begin();
- vector<const CicoSCWindow*>::iterator theEnd = m_CSCWptrs.end();
+ ICO_TRA("CicoAulItems::rmWindow %x", obj);
+ vector<const void*>::iterator it = m_CSCWptrs.begin();
+ vector<const void*>::iterator theEnd = m_CSCWptrs.end();
for(; it != theEnd; ++it) {
if (obj == *it) {
- ICO_TRA("CicoSCAulItems::rmWindow");
+ ICO_TRA("CicoAulItems::rmWindow");
m_CSCWptrs.erase(it);
break; // break of for
}
}
- ICO_TRA("CicoSCAulItems::rmWindow");
+ ICO_TRA("CicoAulItems::rmWindow");
return;
}
static const char* g_procPidCgroupFileFmt="/proc/%d/cgroup";
static const char* g_cpuWord = "cpuacct,cpu:";
static const char* g_memWord = "memory:";
-bool CicoSCAulItems::getPidCgroupInfo(int pid, string& m, string& c)
+bool CicoAulItems::getPidCgroupInfo(int pid, string& m, string& c)
{
- ICO_TRA("CicoSCAulItems::getPidCgroupInfo");
+ ICO_TRA("start");
char fn[64];
sprintf(fn, g_procPidCgroupFileFmt, pid);
const size_t cpuWdSz = strlen(g_cpuWord);
}
}
if ((0 != pC) && (0 != pM)) {
- ICO_DBG("CicoSCAulItems::getPidCgroupInfo m=%s, c=%s", pM, pC);
+ ICO_DBG("CicoAulItems::getPidCgroupInfo m=%s, c=%s", pM, pC);
m = pM;
c = pC;
bR = true;
}
}
ifs.close();
- ICO_TRA("CicoSCAulItems::getPidCgroupInfo %s", bR? "true": "false");
+ ICO_TRA("end %s", bR? "true": "false");
return bR;
}
/**
* @brief appid update
*/
-void CicoSCAulItems::update_appid()
+void CicoAulItems::update_appid()
{
if (AUL_R_OK == m_aulstt) {
return;
ICO_TRA("update end %d, %s", m_aulstt, m_appid.c_str());
return ;
}
+// vim:set expandtab ts=4 sw=4:
* http://www.apache.org/licenses/LICENSE-2.0
*
*/
-#ifndef CICOSCAULITEMS_H
-#define CICOSCAULITEMS_H
+#ifndef CICOAULITEMS_H
+#define CICOAULITEMS_H
#include <string>
#include <vector>
-#ifndef __CICO_SC_WINDOW_H__
-class CicoSCWindow;
-#endif
-
/**
* @brief System controller unit
* application life cycle information data
*
*/
-class CicoSCAulItems {
+class CicoAulItems {
public: // member method
- CicoSCAulItems();
- CicoSCAulItems(const char* appid, int pid, int ctgry, int aulstt,
- const CicoSCWindow* obj=NULL);
- CicoSCAulItems(const CicoSCAulItems& raul);
- ~CicoSCAulItems();
-
- const CicoSCAulItems* p() const;
- void enterWindow(const CicoSCWindow* obj);
- void rmWindow(const CicoSCWindow* obj);
+ CicoAulItems();
+ CicoAulItems(const char* appid, int pid, int ctgry, int aulstt,
+ const void* obj=NULL);
+ CicoAulItems(const CicoAulItems& raul);
+ ~CicoAulItems();
+
+ const CicoAulItems* p() const;
+ void enterWindow(const void* obj);
+ void rmWindow(const void* obj);
void update_appid();
protected: // member method
bool getPidCgroupInfo(int pid, std::string& m, std::string& c);
int m_category; //
int m_cpucgroup;
int m_memcgroup;
- std::vector<const CicoSCWindow*> m_CSCWptrs;
+ std::vector<const void*> m_CSCWptrs;
protected: // member aria
std::string m_defCgrpCpu;
};
-inline const CicoSCAulItems* CicoSCAulItems::p() const
+inline const CicoAulItems* CicoAulItems::p() const
{
return this;
}
#endif // CICOSCAULITEMS_H
+// vim:set expandtab ts=4 sw=4:
//==========================================================================
/**
- * @file CicoSCCommonDef.h
+ * @file CicoCommonDef.h
*
* @brief This file is definition of common value
*/
//==========================================================================
-#ifndef __CICO_SC_COMMON_DEF_H__
-#define __CICO_SC_COMMON_DEF_H__
+#ifndef __CICO_COMMON_DEF_H__
+#define __CICO_COMMON_DEF_H__
//--------------------------------------------------------------------------
// definition of layer type
#define ICO_DISPLAY1_ZONEID_MIN (21) ///! display1 zone id min
#define ICO_DISPLAY1_ZONEID_MAX (40) ///! display1 zone id max
-#endif // __CICO_SC_COMMON_DEF_H__
+//--------------------------------------------------------------------------
+// type
+//--------------------------------------------------------------------------
+typedef enum _ico_type
+{
+ ICO_TYPE_UNKNOW = 0,
+ ICO_TYPE_BOOLEAN,
+ ICO_TYPE_INT8,
+ ICO_TYPE_UINT8,
+ ICO_TYPE_INT16,
+ ICO_TYPE_UINT16,
+ ICO_TYPE_INT32,
+ ICO_TYPE_UINT32,
+ ICO_TYPE_INT64,
+ ICO_TYPE_UINT64,
+ ICO_TYPE_DOUBLE,
+ ICO_TYPE_STRING,
+
+ ICO_TYPE_MAX,
+} ico_type_t;
+
+#endif // __CICO_COMMON_DEF_H__
// vim:set expandtab ts=4 sw=4:
//==========================================================================
/**
- * @file CicoSCConf.h
+ * @file CicoConf.h
*
* @brief This file is definition of SystemConfigs
*/
//==========================================================================
-#ifndef __CICO_SC_CONF_H__
-#define __CICO_SC_CONF_H__
+#ifndef __CICO_CONF_H__
+#define __CICO_CONF_H__
#include <string>
#include <vector>
+#include <map>
#include <sstream>
#include <ico_log.h>
-#include "CicoSCCommonDef.h"
+#include "CicoCommonDef.h"
//==========================================================================
/**
public:
/// default constructor
CicoSCResourceConf()
- :m_bDoIt(false), m_bLog(false), m_cpuCGRPPath(""), m_sampling(-1),
- m_retryCnt(5), m_lowLimitVal(25), m_highLimitVal(90) {}
+ :m_bDoIt(false), m_bDoItApp(false), m_bLog(false), m_cpuCGRPPath(""),
+ m_sampling(-1), m_retryCnt(5), m_lowLimitVal(25),
+ m_highLimitVal(90) {}
/// destructor
virtual ~CicoSCResourceConf() {}
/// dump log this class member variables
void dumpConf(void)
{
- ICO_DBG("do:%s, log:%s, dir:%s, smpl:%d r:%d l:%d h:%d sz:%d",
- m_bDoIt? "true": "false", m_bLog? "true": "false",
- m_cpuCGRPPath.c_str(), m_sampling, m_retryCnt, m_lowLimitVal,
- m_highLimitVal, m_cpuCtrl.size());
+ ICO_DBG("do:%s,%s log:%s, dir:%s, smpl:%d r:%d l:%d h:%d sz:%d",
+ m_bDoIt? "true": "false", m_bDoItApp? "true": "false",
+ m_bLog? "true": "false", m_cpuCGRPPath.c_str(), m_sampling,
+ m_retryCnt, m_lowLimitVal, m_highLimitVal, m_cpuCtrl.size());
}
public:
bool m_bDoIt; ///< resource control enable flag
+ bool m_bDoItApp;
bool m_bLog; ///< resource control log enable flag
std::string m_cpuCGRPPath; ///< cpu cgroup path
int m_sampling; ///< sampling period
std::string m_parent_dir; ///< parent dir
};
-#endif // __CICO_SC_CONF_H__
+//==========================================================================
+/**
+ * @brief This class holds vehicle information property of system config
+ */
+//==========================================================================
+class CicoSCVIPropertyConf
+{
+public:
+ /// default constructor
+ CicoSCVIPropertyConf()
+ : name(""), objname(""), property(""), typestr(""),
+ type(ICO_TYPE_UNKNOW) {}
+
+ /// destructor
+ virtual ~CicoSCVIPropertyConf() {}
+
+ /// dump log this class member variables
+ void dumpConf(void)
+ {
+ ICO_DBG("vehicle_info: id=%02d name=%s objname=%s property=%s "
+ "zone=%d typestr=%s type=%d",
+ id, name.c_str(), objname.c_str(), property.c_str(),
+ zone, typestr.c_str(), type);
+ }
+
+ int typeStrToInt(const std::string & str)
+ {
+ int ret = ICO_TYPE_UNKNOW;
+ if (0 == typestr.compare("BOOLEAN")) {
+ ret = ICO_TYPE_BOOLEAN;
+ }
+ else if (0 == typestr.compare("INT8")) {
+ ret = ICO_TYPE_INT8;
+ }
+ else if ((0 == typestr.compare("UINT8")) ||
+ (0 == typestr.compare("BYTE"))) {
+ ret = ICO_TYPE_UINT8;
+ }
+ else if (0 == typestr.compare("INT16")) {
+ ret = ICO_TYPE_INT16;
+ }
+ else if (0 == typestr.compare("UINT16")) {
+ ret = ICO_TYPE_UINT16;
+ }
+ else if (0 == typestr.compare("INT32")) {
+ ret = ICO_TYPE_INT32;
+ }
+ else if (0 == typestr.compare("UINT32")) {
+ ret = ICO_TYPE_UINT32;
+ }
+ else if (0 == typestr.compare("INT64")) {
+ ret = ICO_TYPE_INT64;
+ }
+ else if (0 == typestr.compare("UINT64")) {
+ ret = ICO_TYPE_UINT64;
+ }
+ else if (0 == typestr.compare("DOUBLE")) {
+ ret = ICO_TYPE_DOUBLE;
+ }
+ else if (0 == typestr.compare("STRING")) {
+ ret = ICO_TYPE_STRING;
+ }
+ else {
+ ret = ICO_TYPE_UNKNOW;
+ }
+ return ret;
+ }
+
+public:
+ int id;
+ std::string name;
+ std::string objname;
+ std::string property;
+ int zone;
+ std::string typestr;
+ int type;
+};
+
+//==========================================================================
+/**
+ * @brief This class holds vehicle information of system config
+ */
+//==========================================================================
+class CicoSCVehicleInfoConf
+{
+public:
+ /// default constructor
+ CicoSCVehicleInfoConf() : retryCnt(0), waitTime(0) {}
+
+ /// destructor
+ virtual ~CicoSCVehicleInfoConf() {}
+
+ /// dump log this class member variables
+ void dumpConf(void)
+ {
+ ICO_DBG("vehicle info: retry=%d waitTime=%d", retryCnt, waitTime);
+ std::map<int, CicoSCVIPropertyConf*>::iterator itr;
+ itr = properties.begin();
+ for(; itr != properties.end(); ++itr) {
+ itr->second->dumpConf();
+ }
+ }
+
+public:
+ ///< retry count
+ int retryCnt;
+
+ ///< retry wait time[ms]
+ int waitTime;
+
+ ///< parent dir
+ std::map<int, CicoSCVIPropertyConf*> properties;
+};
+
+#endif // __CICO_CONF_H__
// vim:set expandtab ts=4 sw=4:
--- /dev/null
+/*
+ * Copyright (c) 2013, TOYOTA MOTOR CORPORATION.
+ *
+ * This program is licensed under the terms and conditions of the
+ * Apache License, version 2.0. The full text of the Apache License is at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ */
+
+//==========================================================================
+/**
+ * @file CicoEFLApp.cpp
+ *
+ * @brief This file is implemetation of CicoEFLApp class
+ */
+//==========================================================================
+
+#include <exception>
+#include <string>
+#include <Ecore.h>
+
+#include <ico_log.h>
+
+#include "CicoEFLApp.h"
+
+//--------------------------------------------------------------------------
+/**
+ * @brief constructor
+ */
+//--------------------------------------------------------------------------
+CicoEFLApp::CicoEFLApp()
+ : m_pkgName(""), m_appid(""), m_version("")
+{
+// ICO_DBG("CicoEFLApp::CicoEFLApp Enter");
+ m_appEventCB.create = appfwCreateCB;
+ m_appEventCB.terminate = appfwTerminateCB;
+ m_appEventCB.pause = appfwPauseCB;
+ m_appEventCB.resume = appfwResumeCB;
+ m_appEventCB.service = appfwServiceCB;
+ m_appEventCB.low_memory = appfwLowMemoryCB;
+ m_appEventCB.low_battery = appfwLowBatteryCB;
+ m_appEventCB.device_orientation = appfwDeviceOrientationCB;
+ m_appEventCB.language_changed = appfwLanguageChangedCB;
+ m_appEventCB.region_format_changed = appfwRegionFormatChangedCB;
+
+ char *value;
+ int ret = app_get_package(&value);
+ if (APP_ERROR_NONE == ret) {
+ m_pkgName = value;
+ free(value);
+ }
+
+ ret = app_get_id(&value);
+ if (APP_ERROR_NONE == ret) {
+ m_appid = value;
+ free(value);
+ }
+
+ ret = app_get_version(&value);
+ if (APP_ERROR_NONE == ret) {
+ m_version = value;
+ free(value);
+ }
+
+// ICO_DBG("CicoEFLApp::CicoEFLApp Leave");
+}
+
+//--------------------------------------------------------------------------
+/**
+ * @brief destructor
+ */
+//--------------------------------------------------------------------------
+CicoEFLApp::~CicoEFLApp()
+{
+// ICO_DBG("CicoEFLApp::~CicoEFLApp Enter");
+// ICO_DBG("CicoEFLApp::~CicoEFLApp Leave");
+}
+
+//--------------------------------------------------------------------------
+/**
+ * @brief start EFL main loop
+ *
+ * @param [in] argc count of argument
+ * @param [in] argv variables of argument
+ */
+//--------------------------------------------------------------------------
+int
+CicoEFLApp::start(int argc, char **argv)
+{
+ ICO_DBG("CicoEFLApp::start Enter");
+ int ret = app_efl_main(&argc, &argv, &m_appEventCB, this);
+ ICO_DBG("CicoEFLApp::start Leave(ret=%d)", ret);
+ return ret;
+}
+
+//--------------------------------------------------------------------------
+/**
+ * @brief stop EFL main loop
+ */
+//--------------------------------------------------------------------------
+void
+CicoEFLApp::stop(void)
+{
+ app_efl_exit();
+}
+
+//--------------------------------------------------------------------------
+/**
+ * @brief get application package name
+ *
+ * @return application package name
+ */
+//--------------------------------------------------------------------------
+std::string &
+CicoEFLApp::getPackageName(void)
+{
+ return m_pkgName;
+}
+
+//--------------------------------------------------------------------------
+/**
+ * @brief get application id
+ *
+ * @return application id
+ */
+//--------------------------------------------------------------------------
+std::string &
+CicoEFLApp::getAppId(void)
+{
+ return m_appid;
+}
+
+//--------------------------------------------------------------------------
+/**
+ * @brief get application version
+ *
+ * @return application version
+ */
+//--------------------------------------------------------------------------
+std::string &
+CicoEFLApp::getVersion(void)
+{
+ return m_version;
+}
+
+//--------------------------------------------------------------------------
+/**
+ * @brief convart appfw error code to string
+ *
+ * @param [in] error code of error
+ *
+ * @return string of error
+ */
+//--------------------------------------------------------------------------
+const char*
+CicoEFLApp::appfwErrorToString(int error)
+{
+ switch(error) {
+ case APP_ERROR_NONE:
+ return (const char*)"APP_ERROR_NONE";
+ break;
+ case APP_ERROR_INVALID_PARAMETER:
+ return (const char*)"APP_ERROR_INVALID_PARAMETER";
+ break;
+ case APP_ERROR_OUT_OF_MEMORY:
+ return (const char*)"APP_ERROR_OUT_OF_MEMORY";
+ break;
+ case APP_ERROR_INVALID_CONTEXT:
+ return (const char*)"APP_ERROR_INVALID_CONTEXT";
+ break;
+ case APP_ERROR_NO_SUCH_FILE:
+ return (const char*)"APP_ERROR_NO_SUCH_FILE";
+ break;
+ case APP_ERROR_ALREADY_RUNNING:
+ return (const char*)"APP_ERROR_ALREADY_RUNNING";
+ break;
+ default:
+ break;
+ }
+
+ return (const char*)"TIZEN_ERROR_UNKNOWN";
+}
+
+//--------------------------------------------------------------------------
+/**
+ * @brief callback function on create
+ *
+ * @param [in] user_data The user data passed from the callback
+ * registration function
+ *
+ * @return true on success, false on error
+ */
+//--------------------------------------------------------------------------
+bool
+CicoEFLApp::onCreate(void *user_data)
+{
+ ICO_WRN("CicoEFLApp::onCreate called.");
+ return false;
+}
+
+//--------------------------------------------------------------------------
+/**
+ * @brief callback function on terminate
+ *
+ * @param [in] user_data The user data passed from the callback
+ * registration function
+ */
+//--------------------------------------------------------------------------
+void
+CicoEFLApp::onTerminate(void *user_data)
+{
+ ICO_WRN("CicoEFLApp::onTerminate called.");
+}
+
+//--------------------------------------------------------------------------
+/**
+ * @brief callback function on pause
+ *
+ * @param [in] user_data The user data passed from the callback
+ * registration function
+ */
+//--------------------------------------------------------------------------
+void
+CicoEFLApp::onPause(void *user_data)
+{
+ ICO_WRN("CicoEFLApp::onPause called.");
+}
+
+//--------------------------------------------------------------------------
+/**
+ * @brief callback function on resume
+ *
+ * @param [in] user_data The user data passed from the callback
+ * registration function
+ */
+//--------------------------------------------------------------------------
+void
+CicoEFLApp::onResume(void *user_data)
+{
+ ICO_WRN("CicoEFLApp::onResume called.");
+}
+
+//--------------------------------------------------------------------------
+/**
+ * @brief callback function on service
+ *
+ * @param [in] service The handle to the service
+ * @param [in] user_data The user data passed from the callback
+ * registration function
+ */
+//--------------------------------------------------------------------------
+void
+CicoEFLApp::onService(service_h service, void *user_data)
+{
+ ICO_WRN("CicoEFLApp::onService called.");
+}
+
+//--------------------------------------------------------------------------
+/**
+ * @brief callback function on low memory
+ *
+ * @param [in] user_data The user data passed from the callback
+ * registration function
+ */
+//--------------------------------------------------------------------------
+void
+CicoEFLApp::onLowMemory(void *user_data)
+{
+ ICO_WRN("CicoEFLApp::onLowMemory called.");
+}
+
+//--------------------------------------------------------------------------
+/**
+ * @brief callback function on low battery
+ *
+ * @param [in] user_data The user data passed from the callback
+ * registration function
+ */
+//--------------------------------------------------------------------------
+void
+CicoEFLApp::onLowBattery(void *user_data)
+{
+ ICO_WRN("CicoEFLApp::onLowBattery called.");
+}
+
+//--------------------------------------------------------------------------
+/**
+ * @brief callback function on device orientation
+ *
+ * @param [in] orientation The orientation of device
+ * @param [in] user_data The user data passed from the callback
+ * registration function
+ */
+//--------------------------------------------------------------------------
+void
+CicoEFLApp::onDeviceOrientation(app_device_orientation_e orientation,
+ void *user_data)
+{
+ ICO_WRN("CicoEFLApp::onDeviceOrientation called.");
+}
+
+//--------------------------------------------------------------------------
+/**
+ * @brief callback function on language changed
+ *
+ * @param [in] user_data The user data passed from the callback
+ * registration function
+ */
+//--------------------------------------------------------------------------
+void
+CicoEFLApp::onLanguageChanged(void *user_data)
+{
+ ICO_WRN("CicoEFLApp::onLanguageChanged called.");
+}
+
+//--------------------------------------------------------------------------
+/**
+ * @brief callback function on region format changed
+ *
+ * @param [in] user_data The user data passed from the callback
+ * registration function
+ */
+//--------------------------------------------------------------------------
+void
+CicoEFLApp::onRegionFormatChanged(void *user_data)
+{
+ ICO_WRN("CicoEFLApp::onRegionFormatChanged called.");
+}
+
+//==========================================================================
+// pravate functions
+//==========================================================================
+//--------------------------------------------------------------------------
+/**
+ * @brief Called at the start of the application.
+ *
+ * @param [in] user_data The user data passed from the callback
+ * registration function
+ *
+ * @return true on success, false on error
+ */
+//--------------------------------------------------------------------------
+bool
+CicoEFLApp::appfwCreateCB(void *user_data)
+{
+ ICO_DBG("CicoEFLApp::appfwCreateCB Enter");
+
+ if (NULL == user_data) {
+ ICO_DBG("CicoEFLApp::appfwCreateCB Leave");
+ return false;
+ }
+
+ bool ret = static_cast<CicoEFLApp*>(user_data)->onCreate(user_data);
+
+ ICO_DBG("CicoEFLApp::appfwCreateCB Leave(%sd)", ret ? "true" : "false");
+
+ return ret;
+}
+
+//--------------------------------------------------------------------------
+/**
+ * @brief Called once after the main loop of application exits.
+ *
+ * @param [in] user_data The user data passed from the callback
+ * registration function
+ */
+//--------------------------------------------------------------------------
+void
+CicoEFLApp::appfwTerminateCB(void *user_data)
+{
+ ICO_DBG("CicoEFLApp::appfwTerminateCB Enter");
+
+ if (NULL == user_data) {
+ ICO_DBG("CicoEFLApp::appfwTerminateCB Leave");
+ return;
+ }
+
+ static_cast<CicoEFLApp*>(user_data)->onTerminate(user_data);
+
+ ICO_DBG("CicoEFLApp::appfwTerminateCB Leave");
+}
+
+//--------------------------------------------------------------------------
+/**
+ * @brief Called when the application is completely obscured by another
+ * application and becomes invisible.
+ *
+ * @param [in] user_data The user data passed from the callback
+ * registration function
+ */
+//--------------------------------------------------------------------------
+void
+CicoEFLApp::appfwPauseCB(void *user_data)
+{
+ ICO_DBG("CicoEFLApp::appfwPauseCB Enter");
+
+ if (NULL == user_data) {
+ ICO_DBG("CicoEFLApp::appfwPauseCB Leave");
+ return;
+ }
+
+ static_cast<CicoEFLApp*>(user_data)->onPause(user_data);
+
+ ICO_DBG("CicoEFLApp::appfwPauseCB Leave");
+}
+
+//--------------------------------------------------------------------------
+/**
+ * @brief Called when the application becomes visible.
+ *
+ * @param [in] user_data The user data passed from the callback
+ * registration function
+ */
+//--------------------------------------------------------------------------
+void
+CicoEFLApp::appfwResumeCB(void *user_data)
+{
+ ICO_DBG("CicoEFLApp::appfwResumeCB Enter");
+
+ if (NULL == user_data) {
+ ICO_DBG("CicoEFLApp::appfwResumeCB Leave");
+ return;
+ }
+
+ static_cast<CicoEFLApp*>(user_data)->onResume(user_data);
+
+ ICO_DBG("CicoEFLApp::appfwResumeCB Leave");
+}
+
+//--------------------------------------------------------------------------
+/**
+ * @brief Called when other application send the launch request to
+ * the application.
+ *
+ * @param [in] user_data The user data passed from the callback
+ * registration function
+ */
+//--------------------------------------------------------------------------
+void
+CicoEFLApp::appfwServiceCB(service_h service, void *user_data)
+{
+ ICO_DBG("CicoEFLApp::appfwServiceCB Enter");
+
+ if (NULL == user_data) {
+ ICO_DBG("CicoEFLApp::appfwServiceCB Leave");
+ return;
+ }
+
+ static_cast<CicoEFLApp*>(user_data)->onService(service, user_data);
+
+ ICO_DBG("CicoEFLApp::appfwServiceCB Leave");
+}
+
+//--------------------------------------------------------------------------
+/**
+ * @brief Called when the system memory is running low.
+ *
+ * @param [in] user_data The user data passed from the callback
+ * registration function
+ */
+//--------------------------------------------------------------------------
+void
+CicoEFLApp::appfwLowMemoryCB(void *user_data)
+{
+ ICO_DBG("CicoEFLApp::appfwLowMemoryCB Enter");
+
+ if (NULL == user_data) {
+ ICO_DBG("CicoEFLApp::appfwLowMemoryCB Leave");
+ return;
+ }
+
+ static_cast<CicoEFLApp*>(user_data)->onLowMemory(user_data);
+
+ ICO_DBG("CicoEFLApp::appfwLowMemoryCB Leave");
+}
+
+//--------------------------------------------------------------------------
+/**
+ * @brief Called when the battery power is running low.
+ *
+ * @param [in] user_data The user data passed from the callback
+ * registration function
+ */
+//--------------------------------------------------------------------------
+void
+CicoEFLApp::appfwLowBatteryCB(void *user_data)
+{
+ ICO_DBG("CicoEFLApp::appfwLowBatteryCB Enter");
+
+ if (NULL == user_data) {
+ ICO_DBG("CicoEFLApp::appfwLowBatteryCB Leave");
+ return;
+ }
+
+ static_cast<CicoEFLApp*>(user_data)->onLowBattery(user_data);
+
+ ICO_DBG("CicoEFLApp::appfwLowBatteryCB Leave");
+}
+
+//--------------------------------------------------------------------------
+/**
+ * @brief Called when the orientation of device changes.
+ *
+ * @param [in] orientation The orientation of device
+ * @param [in] user_data The user data passed from the callback
+ * registration function
+ */
+//--------------------------------------------------------------------------
+void
+CicoEFLApp::appfwDeviceOrientationCB(app_device_orientation_e orientation,
+ void *user_data)
+{
+ ICO_DBG("CicoEFLApp::appfwDeviceOrientationCB Enter");
+
+ if (NULL == user_data) {
+ ICO_DBG("CicoEFLApp::appfwDeviceOrientationCB Leave");
+ return;
+ }
+
+ static_cast<CicoEFLApp*>(user_data)->onDeviceOrientation(orientation,
+ user_data);
+
+ ICO_DBG("CicoEFLApp::appfwDeviceOrientationCB Leave");
+}
+
+//--------------------------------------------------------------------------
+/**
+ * @brief Called when language setting changes.
+ *
+ * @param [in] user_data The user data passed from the callback
+ * registration function
+ */
+//--------------------------------------------------------------------------
+void
+CicoEFLApp::appfwLanguageChangedCB(void *user_data)
+{
+ ICO_DBG("CicoEFLApp::appfwLanguageChangedCB Enter");
+
+ if (NULL == user_data) {
+ ICO_DBG("CicoEFLApp::appfwDeviceOrientationCB Leave");
+ return;
+ }
+
+ static_cast<CicoEFLApp*>(user_data)->onLanguageChanged(user_data);
+
+ ICO_DBG("CicoEFLApp::appfwLanguageChangedCB Leave");
+}
+
+//--------------------------------------------------------------------------
+/**
+ * @brief Called when region format setting changes.
+ *
+ * @param [in] user_data The user data passed from the callback
+ * registration function
+ */
+//--------------------------------------------------------------------------
+void
+CicoEFLApp::appfwRegionFormatChangedCB(void *user_data)
+{
+ ICO_DBG("CicoEFLApp::appfwRegionFormatChangedCB Enter");
+
+ if (NULL == user_data) {
+ ICO_DBG("CicoEFLApp::appfwDeviceOrientationCB Leave");
+ return;
+ }
+
+ static_cast<CicoEFLApp*>(user_data)->onRegionFormatChanged(user_data);
+
+ ICO_DBG("CicoEFLApp::appfwRegionFormatChangedCB Leave");
+}
+// vim: set expandtab ts=4 sw=4;
--- /dev/null
+/*
+ * Copyright (c) 2013, TOYOTA MOTOR CORPORATION.
+ *
+ * This program is licensed under the terms and conditions of the
+ * Apache License, version 2.0. The full text of the Apache License is at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ */
+
+//==========================================================================
+/**
+ * @file CicoEFLApp.h
+ *
+ * @brief This file is definition of CicoEFLApp class
+ */
+//==========================================================================
+#ifndef __CICO_EFL_APP_H__
+#define __CICO_EFL_APP_H__
+
+#include <app.h>
+
+#include <string>
+
+//--------------------------------------------------------------------------
+/**
+ * @class CicoGeometry
+ *
+ * @brief This class provide tizen appfw funciton
+ */
+//--------------------------------------------------------------------------
+class CicoEFLApp {
+public:
+ // default constructor
+ CicoEFLApp();
+
+ // destructor
+ virtual ~CicoEFLApp();
+
+ // start main loop
+ int start(int argc, char **argv);
+
+ // stop main loop
+ void stop(void);
+
+ // get application package name
+ std::string & getPackageName(void);
+
+ // get application id
+ std::string & getAppId(void);
+
+ // get application version
+ std::string & getVersion(void);
+
+ // convert application error to string
+ const char* appfwErrorToString(int error);
+
+ // callback function on create
+ virtual bool onCreate(void *user_data);
+
+ // callback function on terminate
+ virtual void onTerminate(void *user_data);
+
+ // callback function on pause
+ virtual void onPause(void *user_data);
+
+ // callback function on resume
+ virtual void onResume(void *user_data);
+
+ // callback function on service
+ virtual void onService(service_h service, void *user_data);
+
+ // callback function on low memory
+ virtual void onLowMemory(void *user_data);
+
+ // callback function on low battery
+ virtual void onLowBattery(void *user_data);
+
+ // callback function on device orientation
+ virtual void onDeviceOrientation(app_device_orientation_e orientation,
+ void *user_data);
+
+ // callback function on language changed
+ virtual void onLanguageChanged(void *user_data);
+
+ // callback function on region format changed
+ virtual void onRegionFormatChanged(void *user_data);
+
+protected:
+ // assignment operator
+ CicoEFLApp& operator=(const CicoEFLApp &object);
+
+ // copy constructor
+ CicoEFLApp(const CicoEFLApp &object);
+
+private:
+ // callback function on create for tizen appfw
+ static bool appfwCreateCB(void *user_data);
+
+ // callback function on terminate for tizen appfw
+ static void appfwTerminateCB(void *user_data);
+
+ // callback function on pause for tizen appfw
+ static void appfwPauseCB(void *user_data);
+
+ // callback function on resume for tizen appfw
+ static void appfwResumeCB(void *user_data);
+
+ // callback function on service for tizen appfw
+ static void appfwServiceCB(service_h service, void *user_data);
+
+ // callback function on low memory for tizen appfw
+ static void appfwLowMemoryCB(void *user_data);
+
+ // callback function on low battery for tizen appfw
+ static void appfwLowBatteryCB(void *user_data);
+
+ // callback function on device orientation for tizen appfw
+ static void appfwDeviceOrientationCB(app_device_orientation_e orientation,
+ void *user_data);
+
+ // callback function on language changed for tizen appfw
+ static void appfwLanguageChangedCB(void *user_data);
+
+ // callback function on region format changed for tizen appfw
+ static void appfwRegionFormatChangedCB(void *user_data);
+
+private:
+ // application package name
+ std::string m_pkgName;
+
+ // application id
+ std::string m_appid;
+
+ // application version
+ std::string m_version;
+
+ // application callbacks
+ app_event_callback_s m_appEventCB;
+};
+#endif //__CICO_EFL_APP_H__
+// vim:set expandtab ts=4 sw=4:
//==========================================================================
/**
- * @file CicoHomeScreenConfig
+ * @file CicoGKeyFileConfig
*
- * @brief This file is implementation of CicoHomeScreenConfig class
+ * @brief This file is implementation of CicoGKeyFileConfig class
*/
//==========================================================================
-#include "CicoHomeScreenConfig.h"
-#include "CicoHomeScreenResourceConfig.h"
+#include <ico_log.h>
+#include "CicoGKeyFileConfig.h"
+#include "CicoResourceConfig.h"
//==========================================================================
// public functions
//==========================================================================
//--------------------------------------------------------------------------
/**
- * @brief CicoHomeScreenConfig::CicoHomeScreenConfig
+ * @brief CicoGKeyFileConfig::CicoGKeyFileConfig
* Constractor
*/
//--------------------------------------------------------------------------
-CicoHomeScreenConfig::CicoHomeScreenConfig()
+CicoGKeyFileConfig::CicoGKeyFileConfig()
: m_gKeyFile(NULL)
{
}
//--------------------------------------------------------------------------
/**
- * @brief CicoHomeScreenConfig::CicoHomeScreenConfig
+ * @brief CicoGKeyFileConfig::CicoGKeyFileConfig
* destructor
*/
//--------------------------------------------------------------------------
-CicoHomeScreenConfig::~CicoHomeScreenConfig()
+CicoGKeyFileConfig::~CicoGKeyFileConfig()
{
if (NULL != m_gKeyFile) {
g_key_file_free(m_gKeyFile);
//--------------------------------------------------------------------------
/**
- * @brief CicoHomeScreenConfig::Initialize
+ * @brief CicoGKeyFileConfig::Initialize
* read and initialize for homescreen configuration
*
- * @param[in] conf configuration file name
+ * @param[in] conf configuration file name
* @return result
- * @retval ICO_HS_OK success
- * @retval ICO_HS_ERR error
+ * @retval true success
+ * @retval false error
*/
//--------------------------------------------------------------------------
-int
-CicoHomeScreenConfig::Initialize(const char *conf)
+bool
+CicoGKeyFileConfig::Initialize(const char *conf)
{
GError *error = NULL;
- char path[ICO_HS_TEMP_BUF_SIZE];
+ char path[ICO_TEMP_BUF_SIZE];
GString *filepath;
if (NULL != m_gKeyFile) {
/*if initialize was done*/
- return ICO_HS_OK;
+ return true;
}
m_gKeyFile = g_key_file_new();
filepath = g_string_new("test");
- CicoHomeScreenResourceConfig::GetConfPath(path, sizeof(path));
+ CicoResourceConfig::GetConfPath(path, sizeof(path));
g_string_printf(filepath, "%s/%s", path, conf);
if (!g_file_test(filepath->str, G_FILE_TEST_IS_REGULAR)) {
- return ICO_HS_ERR;
+ return false;
}
// load config file
if (error != NULL) {
ICO_WRN("%s: %s", filepath->str, error->message);
g_error_free(error);
- return ICO_HS_ERR;
+ return false;
}
g_string_free(filepath, TRUE);
- return ICO_HS_OK;
+ return true;
}
/*--------------------------------------------------------------------------*/
/**
- * @brief CicoHomeScreenConfig::ConfigGetInteger
+ * @brief CicoGKeyFileConfig::ConfigGetInteger
* Return integer value in homescreen configuration file.
* If not exist,return defaultvlaue in params.
*
*/
/*--------------------------------------------------------------------------*/
int
-CicoHomeScreenConfig::ConfigGetInteger(const char *group_name, const char *key, int default_value)
+CicoGKeyFileConfig::ConfigGetInteger(const char *group_name, const char *key, int default_value)
{
GError *error = NULL;
if (m_gKeyFile == NULL) {
- /* if initialize is didn't yet */
- if (Initialize(ICO_HOMESCREEN_CONFIG_FILE) != ICO_HS_OK) {
- return default_value;
- }
+ return default_value;
}
int value = g_key_file_get_integer(m_gKeyFile, group_name, key, &error);
/*--------------------------------------------------------------------------*/
/**
- * @brief CicoHomeScreenConfig::ConfigGetString
+ * @brief CicoGKeyFileConfig::ConfigGetString
* Return string value in homescreen configuration file.
* If not exist,return defaultvlaue in params.
*
*/
/*--------------------------------------------------------------------------*/
const char *
-CicoHomeScreenConfig::ConfigGetString(const char *group_name, const char *key,
- const char *default_value)
+CicoGKeyFileConfig::ConfigGetString(const char *group_name, const char *key,
+ const char *default_value)
{
GError *error = NULL;
- if (m_gKeyFile == NULL) {
- /* if initialize is didn't yet */
- if (Initialize(ICO_HOMESCREEN_CONFIG_FILE) != ICO_HS_OK) {
- return default_value;
- }
+ if (m_gKeyFile == NULL) {
+ return default_value;
}
const char *value = g_key_file_get_string(m_gKeyFile, group_name, key,
//==========================================================================
/**
- * @file CicoHomeScreenConfig
+ * @file CicoGKeyFileConfig
*
- * @brief This file is definition of CicoHomeScreenConfig class
+ * @brief This file is definition of CicoGKeyFileConfig class
*/
//==========================================================================
-#ifndef __CICO_HOMESCREEN_CONFIG_H__
-#define __CICO_HOMESCREEN_CONFIG_H__
+#ifndef __CICO_G_KEY_FILE_CONFIG_H__
+#define __CICO_G_KEY_FILE_CONFIG_H__
#include <glib.h>
#define ICO_ONSCREEN_CONFIG_FILE "onscreen.conf"
#define ICO_STATUSBAR_CONFIG_FILE "statusbar.conf"
+#define ICO_TEMP_BUF_SIZE (256)
+
//--------------------------------------------------------------------------
/**
* @brief
*/
//--------------------------------------------------------------------------
-class CicoHomeScreenConfig
+class CicoGKeyFileConfig
{
public:
// constructor
- CicoHomeScreenConfig();
+ CicoGKeyFileConfig();
// destructor
- ~CicoHomeScreenConfig();
+ ~CicoGKeyFileConfig();
// intialize
- int Initialize(const char *conf);
+ bool Initialize(const char *conf);
// get integer value
int ConfigGetInteger(const char *group_name,
private:
// assignment operator
- CicoHomeScreenConfig operator=(const CicoHomeScreenConfig&);
+ CicoGKeyFileConfig operator=(const CicoGKeyFileConfig&);
// copy constructor
- CicoHomeScreenConfig(const CicoHomeScreenConfig&);
+ CicoGKeyFileConfig(const CicoGKeyFileConfig&);
private:
GKeyFile *m_gKeyFile;
};
-#endif // __CICO_HOMESCREEN_CONFIG_H__
+#endif // __CICO_G_KEY_FILE_CONFIG_H__
// vim: set expandtab ts=4 sw=4:
--- /dev/null
+/*
+ * Copyright (c) 2013, TOYOTA MOTOR CORPORATION.
+ *
+ * This program is licensed under the terms and conditions of the
+ * Apache License, version 2.0. The full text of the Apache License is at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ */
+#include <string>
+#include <vector>
+#include <sstream>
+#include <utility>
+#include <cstdlib>
+
+using namespace std;
+
+/**
+ * @brief split string
+ * @param s split target
+ * @param d
+ * @param e store split word
+ */
+void split(const std::string &s, char d, std::vector<std::string> &e)
+{
+ std::stringstream ss(s);
+ std::string it;
+ while(getline(ss, it, d)) {
+ e.push_back(it);
+ }
+ return;
+}
+
+/**
+ * @brief trim
+ * @param s target string
+ * @param trim charactor
+ * @ret trim string
+ */
+std::string trim(const std::string& s, const char* t)
+{
+ std::string r;
+ std::string::size_type left = s.find_first_not_of(t);
+ if (left != std::string::npos) {
+ std::string::size_type right = s.find_last_not_of(t);
+ r = s.substr(left, right - left + 1);
+ }
+ return r;
+}
+
+/**
+ * @brief directory last slash add
+ * @param s directory path string
+ */
+void chkAndAddSlash(std::string& s)
+{
+ int sz = s.size();
+ const char* p = s.c_str();
+ if ('/' != p[sz-1]) {
+ s += "/";
+ }
+}
+
--- /dev/null
+/*
+ * Copyright (c) 2013, TOYOTA MOTOR CORPORATION.
+ *
+ * This program is licensed under the terms and conditions of the
+ * Apache License, version 2.0. The full text of the Apache License is at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ */
+
+#ifndef _CICOLIBSTRING_H_
+#define _CICOLIBSTRING_H_
+#include <string>
+#include <vector>
+
+/**
+ * @brief split string
+ * @param s split target
+ * @param d
+ * @param e store split word
+ */
+void split(const std::string &s, char d, std::vector<std::string> &e);
+
+/**
+ * @brief trim
+ * @param s target string
+ * @param trim charactor
+ * @ret trim string
+ */
+std::string trim(const std::string& s, const char* t = " \t\v\r\n");
+
+/**
+ * @brief directory last slash add
+ * @param s directory path string
+ */
+void chkAndAddSlash(string& s);
+
+#endif
* @date Feb-15-2013
*/
-#include "CicoHomeScreenResourceConfig.h"
+#include <cstdio>
+#include <cstdlib>
+#include <cstring>
+
+#include <ico_log.h>
+#include "CicoResourceConfig.h"
/*============================================================================*/
/* functions */
/*============================================================================*/
/*--------------------------------------------------------------------------*/
/**
- * @brief CicoHomeScreenResourceConfig::GetImagePath
+ * @brief CicoResourceConfig::GetImagePath
* set the directory path of the image files.
*
* @param[out] buff buffer that the pass set
*/
/*--------------------------------------------------------------------------*/
void
-CicoHomeScreenResourceConfig::GetImagePath(char *buff, int len)
+CicoResourceConfig::GetImagePath(char *buff, int len)
{
char *pkg;
memset(buff, 0, len);
pkg = getenv("PKG_NAME");
if (pkg) {
- snprintf(buff, len, image_path, pkg);
+ snprintf(buff, len, ICO_IMAGE_PATH, pkg);
}
else {
pkg = getenv(ICO_HS_CONFIG_TOP_ENV);
- snprintf(buff, len, local_image_path, pkg ? pkg : local_top_path);
+ snprintf(buff, len, ICO_LOCAL_IMAGE_PATH,
+ pkg ? pkg : ICO_LOCAL_TOP_PATH);
}
+ ICO_DBG("buff=\"%s\"", buff);
}
/*--------------------------------------------------------------------------*/
/**
- * @brief CicoHomeScreenResourceConfig::GetSoundPath
+ * @brief CicoResourceConfig::GetSoundPath
* set the directory path of the sounds files.
*
* @param[out] buff buffer that the pass set
*/
/*--------------------------------------------------------------------------*/
void
-CicoHomeScreenResourceConfig::GetSoundPath(char *buff, int len)
+CicoResourceConfig::GetSoundPath(char *buff, int len)
{
char *pkg;
memset(buff, 0, len);
pkg = getenv("PKG_NAME");
if (pkg) {
- snprintf(buff, len, sound_path, pkg);
+ snprintf(buff, len, ICO_SOUND_PATH, pkg);
}
else {
pkg = getenv(ICO_HS_CONFIG_TOP_ENV);
- snprintf(buff, len, local_sound_path, pkg ? pkg : local_top_path);
+ snprintf(buff, len, ICO_LOCAL_SOUND_PATH,
+ pkg ? pkg : ICO_LOCAL_TOP_PATH);
}
}
/*--------------------------------------------------------------------------*/
/**
- * @brief CicoHomeScreenResourceConfig::GetEdjPath
+ * @brief CicoResourceConfig::GetEdjPath
* set the directory path of efj files.
*
* @param[out] buff buffer that the pass set
*/
/*--------------------------------------------------------------------------*/
void
-CicoHomeScreenResourceConfig::GetEdjPath(char *buff, int len)
-{
- char *pkg;
-
- memset(buff, 0, len);
- pkg = getenv("PKG_NAME");
- if (pkg) {
- snprintf(buff, len, edj_path, pkg);
- }
- else {
- pkg = getenv(ICO_HS_CONFIG_TOP_ENV);
- snprintf(buff, len, local_edj_path, pkg ? pkg : local_top_path);
- }
-}
-
-/*--------------------------------------------------------------------------*/
-/**
- * @brief CicoHomeScreenResourceConfig::GetOnscreenEdjPath
- * set the directory path of edj files for onscreen.
- *void
-hs_get_image_path(char *buff, int len)
- * @param[out] buff buffer that the pass set
- * @param[in] len buffer length
- * @return none
- */
-/*--------------------------------------------------------------------------*/
-void
-CicoHomeScreenResourceConfig::GetOnscreenEdjPath(char *buff, int len)
+CicoResourceConfig::GetEdjPath(char *buff, int len)
{
char *pkg;
memset(buff, 0, len);
pkg = getenv("PKG_NAME");
if (pkg) {
- snprintf(buff, len, edj_path, ICO_HS_APPID_DEFAULT_ONS);
+ snprintf(buff, len, ICO_EDJ_PATH, pkg);
}
else {
pkg = getenv(ICO_HS_CONFIG_TOP_ENV);
- snprintf(buff, len, local_edj_path, pkg ? pkg : local_top_path);
+ snprintf(buff, len, ICO_LOCAL_EDJ_PATH,
+ pkg ? pkg : ICO_LOCAL_TOP_PATH);
}
}
/*--------------------------------------------------------------------------*/
/**
- * @brief CicoHomeScreenResourceConfig::GetConfPath
+ * @brief CicoResourceConfig::GetConfPath
* set the directory path of edj files for onscreen.
*
* @param[out] buff buffer that the pass set
*/
/*--------------------------------------------------------------------------*/
void
-CicoHomeScreenResourceConfig::GetConfPath(char *buff, int len)
+CicoResourceConfig::GetConfPath(char *buff, int len)
{
char *pkg;
memset(buff, 0, len);
pkg = getenv("PKG_NAME");
if (pkg) {
- snprintf(buff, len, manifest_path, pkg);
+ snprintf(buff, len, ICO_MANIFEST_PATH, pkg);
}
else {
pkg = getenv(ICO_HS_CONFIG_TOP_ENV);
- snprintf(buff, len, local_manifest_path, pkg ? pkg : local_top_path);
+ snprintf(buff, len, ICO_LOCAL_MANIFEST_PATH,
+ pkg ? pkg : ICO_LOCAL_TOP_PATH);
}
}
+// vim: set expandtab ts=4 sw=4:
-#ifndef __CICOHOMESCREENRESOURCECONFIG_H__
-#define __CICOHOMESCREENRESOURCECONFIG_H__
+#ifndef __CICO_RESOURCECONFIG_H__
+#define __CICO_RESOURCECONFIG_H__
/*
* Copyright (c) 2013, TOYOTA MOTOR CORPORATION.
*
* @date Feb-15-2013
*/
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
+//#include <stdio.h>
+//#include <stdlib.h>
+//#include <string.h>
-#include "CicoHomeScreenCommon.h"
-#include "home_screen_res.h"
+//#include "CicoHomeScreenCommon.h"
+//#include "home_screen_res.h"
+
+#define ICO_EDJ_PATH "/usr/apps/%s/res/edj/"
+#define ICO_IMAGE_PATH "/usr/apps/%s/res/images/"
+#define ICO_SOUND_PATH "/usr/apps/%s/res/sounds/"
+#define ICO_MANIFEST_PATH "/usr/apps/%s/res/config/"
+#define ICO_LOCAL_TOP_PATH "/home/tizen/HomeScreen"
+#define ICO_LOCAL_EDJ_PATH "%s/src/"
+#define ICO_LOCAL_IMAGE_PATH "%s/res/images/"
+#define ICO_LOCAL_SOUND_PATH "%s/res/sounds/"
+#define ICO_LOCAL_MANIFEST_PATH "%s/res/apps/org.tizen.ico.homescreen/"
/* Environment variable for UI-FW top directory */
#define ICO_HS_CONFIG_TOP_ENV "UIFW_TOPDIR"
+#if 0
/* Default top directory of UI-FW */
#define ICO_HS_CONFIG_TOP_TOPDIR "/usr/apps/org.tizen.ico.homescreen"
/* Environment variable for top directory of cconfiguration files */
#define ICO_HS_CONFIG_CONF_DIR_MAX 63
/* Maximum length of Wayland connection name */
#define ICO_UXF_CONF_WAYLAND_NAME 39
+#endif
/*============================================================================*/
-/* Class Declaration (CicoHomeScreenResourceConfig) */
+/* Class Declaration (CicoResourceConfig) */
/*============================================================================*/
-class CicoHomeScreenResourceConfig
+class CicoResourceConfig
{
public:
static void GetImagePath(char *buff, int len);
static void GetSoundPath(char *buff, int len);
static void GetEdjPath(char *buff, int len);
- static void GetOnscreenEdjPath(char *buff, int len);
static void GetConfPath(char *buff, int len);
protected:
- CicoHomeScreenResourceConfig operator =
- (const CicoHomeScreenResourceConfig&);
- CicoHomeScreenResourceConfig(const CicoHomeScreenResourceConfig&);
+ CicoResourceConfig operator =
+ (const CicoResourceConfig&);
+ CicoResourceConfig(const CicoResourceConfig&);
};
-
-#endif
-
+#endif // __CICO_RESOURCECONFIG_H__
+// vim: set expandtab ts=4 sw=4:
#include <string.h>
#include <unistd.h>
-#include "CicoHomeScreenCommon.h"
-#include "CicoHomeScreenResourceConfig.h"
-#include "CicoHomeScreenConfig.h"
+#include <ico_log.h>
+#include "CicoResourceConfig.h"
+#include "CicoGKeyFileConfig.h"
#include "CicoSound.h"
*
* @param[in] homescreen_config configuration instance
* @return result
- * @retval ICO_HS_OK success
- * @retval ICO_HS_ERR err
+ * @retval true success
+ * @retval false error
*/
//--------------------------------------------------------------------------
-int
-CicoSound::Initialize(CicoHomeScreenConfig *hsConfig)
+bool
+CicoSound::Initialize(CicoGKeyFileConfig *hsConfig)
{
if (true == m_initialized) {
- return ICO_HS_OK;
+ return true;
}
m_command = hsConfig->ConfigGetString(ICO_CONFIG_SOUND,
m_initialized = true;
- return ICO_HS_OK;
+ return true;
}
/*--------------------------------------------------------------------------*/
* play the given sound file(.wav).
*
* @return result
- * @retval ICO_HS_OK success
- * @retval ICO_HS_ERR err
+ * @retval true success
+ * @retval false error
*/
/*--------------------------------------------------------------------------*/
-int
+bool
CicoSound::PlayOperationSound(void)
{
return PlaySound(m_operationSFile);
-
}
/*--------------------------------------------------------------------------*/
* @brief CicoSound::PlaySuccessSound
*
* @return result
- * @retval ICO_HS_OK success
- * @retval ICO_HS_ERR err
+ * @retval true success
+ * @retval false error
*/
/*--------------------------------------------------------------------------*/
-int
+bool
CicoSound::PlaySuccessSound(void)
{
return PlaySound(m_successSFile);
-
}
/*--------------------------------------------------------------------------*/
* @brief CicoSound::PlaySuccessSound
*
* @return result
- * @retval ICO_HS_OK success
- * @retval ICO_HS_ERR err
+ * @retval true success
+ * @retval false error
*/
/*--------------------------------------------------------------------------*/
-int
+bool
CicoSound::PlayFailureSound(void)
{
return PlaySound(m_failureSFile);
-
}
/*--------------------------------------------------------------------------*/
* play the given sound file(.wav).
*
* @return result
- * @retval ICO_HS_OK success
- * @retval ICO_HS_ERR err
+ * @retval true success
+ * @retval false error
*/
/*--------------------------------------------------------------------------*/
-int
+bool
CicoSound::PlaySound(std::string & soundFile)
{
int pid;
- char command[ICO_HS_TEMP_BUF_SIZE];
+ char command[256];
if (false == m_initialized) {
- return ICO_HS_ERR;
+ return false;
}
if (true == m_operationSFile.empty()) {
ICO_WRN("CicoSound::PlaySound: Leave(error file name is empty)");
- return ICO_HS_ERR;
+ return false;
}
if (m_operationSFile.at(0) != '/') {
ICO_WRN("CicoSound::PlaySound: Leave(file name not absolute path");
- return ICO_HS_ERR;
+ return false;
}
/* given by full file path */
exit(0);
}
- return ICO_HS_OK;
+ return true;
}
// vim: set expandtab ts=4 sw=4:
static CicoSound* GetInstance(void);
// initialized
- int Initialize(CicoHomeScreenConfig *hs_config);
+ bool Initialize(CicoGKeyFileConfig *hs_config);
// play sound
- int PlaySound(std::string & soundFile);
+ bool PlaySound(std::string & soundFile);
// play opreration sound
- int PlayOperationSound(void);
+ bool PlayOperationSound(void);
// play success sound
- int PlaySuccessSound(void);
+ bool PlaySuccessSound(void);
// play failure sound
- int PlayFailureSound(void);
+ bool PlayFailureSound(void);
protected:
// default constructor
/*========================================================================*/
/**
- * @file CicoSCSystemConfig.cpp
+ * @file CicoSystemConfig.cpp
*
- * @brief This file implementation of CicoSCSystemConfig class
+ * @brief This file implementation of CicoSystemConfig class
*/
/*========================================================================*/
-#include "CicoSCSystemConfig.h"
-#include "CicoSCConf.h"
+#include <ico_log.h>
+#include <boost/property_tree/ptree.hpp>
+#include <boost/property_tree/json_parser.hpp>
+#include <boost/foreach.hpp>
+#include <boost/optional.hpp>
+#include "CicoSystemConfig.h"
+#include "CicoConf.h"
+
+using namespace boost::property_tree;
//==========================================================================
// private static variable
//==========================================================================
-CicoSCSystemConfig* CicoSCSystemConfig::ms_myInstance = NULL;
+CicoSystemConfig* CicoSystemConfig::ms_myInstance = NULL;
//--------------------------------------------------------------------------
/**
* @brief default constructor
*/
//--------------------------------------------------------------------------
-CicoSCSystemConfig::CicoSCSystemConfig()
+CicoSystemConfig::CicoSystemConfig()
{
m_typeTable[""] = ICO_NODETYPE_CENTER;
m_typeTable["center"] = ICO_NODETYPE_CENTER;
* @brief destructor
*/
//--------------------------------------------------------------------------
-CicoSCSystemConfig::~CicoSCSystemConfig()
+CicoSystemConfig::~CicoSystemConfig()
{
// TODO
}
//--------------------------------------------------------------------------
/**
- * @brief Get instance of CicoSCSystemConfig
+ * @brief Get instance of CicoSystemConfig
*
- * @return pointer of CicoSCSystemConfig object
+ * @return pointer of CicoSystemConfig object
*/
//--------------------------------------------------------------------------
-CicoSCSystemConfig*
-CicoSCSystemConfig::getInstance(void)
+CicoSystemConfig*
+CicoSystemConfig::getInstance(void)
{
if (NULL == ms_myInstance) {
- ms_myInstance = new CicoSCSystemConfig();
+ ms_myInstance = new CicoSystemConfig();
}
return ms_myInstance;
}
//--------------------------------------------------------------------------
/**
- * @brief Get instance of CicoSCSystemConfig
+ * @brief Get instance of CicoSystemConfig
*
* @param [in] confFile config file name
- * @return 0 on success, other on error
+ * @return true on success, false on error
*/
//--------------------------------------------------------------------------
-int
-CicoSCSystemConfig::load(const string & confFile)
+bool
+CicoSystemConfig::load(const string & confFile)
{
- ptree root;
- read_xml(confFile, root);
-
- createNodeConfList(root);
- createDisplayConfList(root);
- createSoundConfList(root);
- createPortConf(root);
- createCategoryConf(root);
- createAppKindConf(root);
- createInputDevList(root);
- createDefaultConf(root);
- createLogConf(root);
- createResourceConf(root);
- createUserConf(root);
-
- return 0; //TODO
+ try {
+ ptree root;
+ read_xml(confFile, root);
+
+ createNodeConfList(root);
+ createDisplayConfList(root);
+ createSoundConfList(root);
+ createPortConf(root);
+ createCategoryConf(root);
+ createAppKindConf(root);
+ createInputDevList(root);
+ createDefaultConf(root);
+ createResourceConf(root);
+ createUserConf(root);
+ createVehicleInfoConf(root);
+ }
+ catch (...) {
+ ICO_ERR("catch exception!");
+ return false;
+ }
+ return true;
}
//--------------------------------------------------------------------------
*/
//--------------------------------------------------------------------------
const vector<CicoSCNodeConf*>&
-CicoSCSystemConfig::getNodeConfList(void) const
+CicoSystemConfig::getNodeConfList(void) const
{
return m_nodeConfList;
}
*/
//--------------------------------------------------------------------------
const vector<CicoSCDisplayConf*>&
-CicoSCSystemConfig::getDisplayConfList(void) const
+CicoSystemConfig::getDisplayConfList(void) const
{
return m_displayConfList;
}
*/
//--------------------------------------------------------------------------
const vector<CicoSCSoundConf*>&
-CicoSCSystemConfig::getSoundConfList(void) const
+CicoSystemConfig::getSoundConfList(void) const
{
return m_soundConfList;
}
*/
//--------------------------------------------------------------------------
const vector<CicoSCInputDevConf*> &
-CicoSCSystemConfig::getInputDevConfList(void) const
+CicoSystemConfig::getInputDevConfList(void) const
{
return m_inputDevConfList;
}
*/
//--------------------------------------------------------------------------
const vector<CicoSCCategoryConf*> &
-CicoSCSystemConfig::getCategoryConfList(void) const
+CicoSystemConfig::getCategoryConfList(void) const
{
return m_categoryConfList;
}
*/
//--------------------------------------------------------------------------
const vector<CicoSCAppKindConf*> &
-CicoSCSystemConfig::getAppKindConfList(void) const
+CicoSystemConfig::getAppKindConfList(void) const
{
return m_appKindConfList;
}
*/
//--------------------------------------------------------------------------
void
-CicoSCSystemConfig::createNodeConfList(const ptree & root)
+CicoSystemConfig::createNodeConfList(const ptree & root)
{
//<nodes>
// if (root.not_found() == root.find("systemconfig")) {
*/
//--------------------------------------------------------------------------
void
-CicoSCSystemConfig::createDisplayConfList(const ptree & root)
+CicoSystemConfig::createDisplayConfList(const ptree & root)
{
//<displays>
// if (root.not_found() != root.find("systemconfi.displays")) {
*/
//--------------------------------------------------------------------------
void
-CicoSCSystemConfig::createLayerConf(const ptree::value_type & child,
+CicoSystemConfig::createLayerConf(const ptree::value_type & child,
CicoSCDisplayConf* displayConf)
{
ptree layers = child.second.get_child("layers");
*/
//--------------------------------------------------------------------------
void
-CicoSCSystemConfig::createDisplayZoneConf(const ptree::value_type & child,
+CicoSystemConfig::createDisplayZoneConf(const ptree::value_type & child,
CicoSCDisplayConf* displayConf)
{
ptree zones = child.second.get_child("zones");
*/
//--------------------------------------------------------------------------
void
-CicoSCSystemConfig::createSoundConfList(const ptree & root)
+CicoSystemConfig::createSoundConfList(const ptree & root)
{
//<sound>
ptree sounds = root.get_child("systemconfig.sounds");
*/
//--------------------------------------------------------------------------
void
-CicoSCSystemConfig::createSoundZoneConf(const ptree::value_type & child,
+CicoSystemConfig::createSoundZoneConf(const ptree::value_type & child,
CicoSCSoundConf* soundConf)
{
//<sound>
*/
//--------------------------------------------------------------------------
void
-CicoSCSystemConfig::createPortConf(const ptree & root)
+CicoSystemConfig::createPortConf(const ptree & root)
{
// <ports>
ptree ports = root.get_child("systemconfig.ports");
*/
//--------------------------------------------------------------------------
void
-CicoSCSystemConfig::createCategoryConf(const ptree & root)
+CicoSystemConfig::createCategoryConf(const ptree & root)
{
//<category>
ptree categorys = root.get_child("systemconfig.categorys");
*/
//--------------------------------------------------------------------------
void
-CicoSCSystemConfig::createAppKindConf(const ptree & root)
+CicoSystemConfig::createAppKindConf(const ptree & root)
{
// <appkinds>
ptree appkinds = root.get_child("systemconfig.appkinds");
*/
//--------------------------------------------------------------------------
void
-CicoSCSystemConfig::createInputDevList(const ptree & root)
+CicoSystemConfig::createInputDevList(const ptree & root)
{
//<inputs>
ptree inputs = root.get_child("systemconfig.inputs");
*/
//--------------------------------------------------------------------------
void
-CicoSCSystemConfig::createSwitchList(const ptree::value_type & child,
+CicoSystemConfig::createSwitchList(const ptree::value_type & child,
CicoSCInputDevConf* inputDevConf)
{
ptree switchs = child.second.get_child("switchs");
*/
//--------------------------------------------------------------------------
void
-CicoSCSystemConfig::createDefaultConf(const ptree & root)
+CicoSystemConfig::createDefaultConf(const ptree & root)
{
// <default>
ptree defaults = root.get_child("systemconfig.default");
//--------------------------------------------------------------------------
/**
- * @brief
- *
- * @param [in]
- */
-//--------------------------------------------------------------------------
-void
-CicoSCSystemConfig::createLogConf(const ptree & root)
-{
- // <log>
- // </log>
- ptree logNode = root.get_child("systemconfig.log");
- int loglevel = logNode.get<int>("loglevel");
- bool logflush = logNode.get<bool>("logflush");
-
- m_loglevel = loglevel;
- m_logflush = logflush;
-}
-
-//--------------------------------------------------------------------------
-/**
* @brief resource config class object create
*
* @param [in]
void getArray(ptree& t, vector<int>& vec);
static const char* g_resource_cpu = "systemconfig.resource_cpu_control";
void
-CicoSCSystemConfig::createResourceConf(const ptree & root)
+CicoSystemConfig::createResourceConf(const ptree & root)
{
m_resourceConf = new CicoSCResourceConf;
ptree rc = root.get_child(g_resource_cpu);
bool b = false;
- optional<string> opts = rc.get_optional<string>("do_it");
- if (true == opts.is_initialized()) {
- string v = opts.get();
- if (0 == v.compare("yes")) {
- b = true;
+ bool bApp = false;
+
+ ptree lcl_pt;
+ string fPath;
+ bool bF = false;
+ if ((CicoSCDefaultConf*)0 != m_defaultConf) {
+ fPath = m_defaultConf->confdir;
+ fPath += string("/");
+ fPath += string("system_sysres.json");
+ struct stat buff;
+ /* file check */
+ memset(&buff, 0, sizeof(buff));
+ if (0 == stat(fPath.c_str(), &buff)) {
+ read_json(fPath.c_str(), lcl_pt);
+ bF = true;
+ }
+ }
+ if (true==bF) {
+ try{
+ if (boost::optional<std::string> function =
+ lcl_pt.get_optional<std::string>("function")) {
+ string v = function.get();
+ if (0 == v.compare("yes")) {
+ b = true;
+ }
+ else if (0 == v.compare("app")) {
+ bApp = true;
+ }
+ }
+ }
+ catch (...) {
+ ICO_WRN("NG json file(%s)", fPath.c_str());
+ b = false;
+ bApp = false;
}
}
- m_resourceConf->m_bDoIt = b;
- if (false == b) {
- return;
+ else {
+ optional<string> opts = rc.get_optional<string>("do_it");
+ if (true == opts.is_initialized()) {
+ string v = opts.get();
+ if (0 == v.compare("yes")) {
+ b = true;
+ }
+ else if (0 == v.compare("app")) {
+ bApp = true;
+ }
+ }
}
+ m_resourceConf->m_bDoIt = b;
+ m_resourceConf->m_bDoItApp = bApp;
string dirnm;
- optional<string> opts2 = rc.get_optional<string>("ctrl_dir_path");
- if (true == opts2.is_initialized()) {
- dirnm = opts2.get();
+ if (true == bF) {
+ try {
+ if (boost::optional<std::string> ctrl_dir_path =
+ lcl_pt.get_optional<std::string>("ctrl_dir_path")) {
+ dirnm = ctrl_dir_path.get();
+ }
+ }
+ catch (...) {
+ ICO_WRN("NG json file(%s)", fPath.c_str());
+ }
}
else {
+ optional<string> opts2 = rc.get_optional<string>("ctrl_dir_path");
+ if (true == opts2.is_initialized()) {
+ dirnm = opts2.get();
+ }
+ }
+ if (true == dirnm.empty()) {
dirnm = "/sys/fs/cgroup/cpu,cpuacct/SCprivate";
}
m_resourceConf->m_cpuCGRPPath = dirnm;
+ if (false == b) {
+ return;
+ }
+ optional<string> opts;
opts = rc.get_optional<string>("sampling_wait");
if (true == opts.is_initialized()) {
//--------------------------------------------------------------------------
/**
+ * @brief vechicle information config class object create
+ *
+ * @param [in]
+ */
+//--------------------------------------------------------------------------
+void
+CicoSystemConfig::createVehicleInfoConf(const ptree & root)
+{
+ m_vehicleInfoConf = new CicoSCVehicleInfoConf();
+
+ ptree child = root.get_child("systemconfig.vehicle_info");
+
+ optional<int> retryCnt;
+ optional<int> waitTime;
+
+ retryCnt = child.get_optional<int>("retryCnt");
+ if (false == retryCnt.is_initialized()) {
+ ICO_WRN("vehicle_info.retryCnt element not found");
+ retryCnt = optional<int>(0);
+ }
+
+ waitTime = child.get_optional<int>("waitTime");
+ if (false == waitTime.is_initialized()) {
+ ICO_WRN("vehicle_info.waitTime element not found");
+ waitTime = optional<int>(0);
+ }
+
+ m_vehicleInfoConf->retryCnt = retryCnt.get();
+ m_vehicleInfoConf->waitTime = waitTime.get();
+
+ BOOST_FOREACH (const ptree::value_type& vinfo, child) {
+ optional<int> id;
+ optional<string> name;
+ optional<string> objname;
+ optional<string> property;
+ optional<int> zone;
+ optional<string> type;
+
+ id = vinfo.second.get_optional<int>("<xmlattr>.id");
+ if (false == id.is_initialized()) {
+ continue;
+ }
+
+ name = vinfo.second.get_optional<string>("<xmlattr>.name");
+ if (false == name.is_initialized()) {
+ continue;
+ }
+
+ property = vinfo.second.get_optional<string>("property");
+ if (false == property.is_initialized()) {
+ continue;
+ }
+
+ objname = vinfo.second.get_optional<string>("objname");
+ if (false == objname.is_initialized()) {
+ continue;
+ }
+
+ zone = vinfo.second.get_optional<int>("zone");
+ if (false == zone.is_initialized()) {
+ continue;
+ }
+
+ type = vinfo.second.get_optional<string>("type");
+ if (false == type.is_initialized()) {
+ continue;
+ }
+
+ CicoSCVIPropertyConf* viprop = new CicoSCVIPropertyConf();
+ viprop->id = id.get();
+ viprop->name = name.get();
+ viprop->objname = objname.get();
+ viprop->property = property.get();
+ viprop->zone = zone.get();
+ viprop->typestr = type.get();
+ viprop->type = viprop->typeStrToInt(viprop->typestr);
+ m_vehicleInfoConf->properties[id.get()] = viprop;
+ }
+
+ m_vehicleInfoConf->dumpConf();
+}
+
+//--------------------------------------------------------------------------
+/**
* @brief user config class object create
*
* @param [in]
//--------------------------------------------------------------------------
static const char* g_login_user_conf = "systemconfig.login_user";
void
-CicoSCSystemConfig::createUserConf(const ptree & root)
+CicoSystemConfig::createUserConf(const ptree & root)
{
m_userConf = new CicoSCUserConf;
ptree rc = root.get_child(g_login_user_conf);
*/
//--------------------------------------------------------------------------
int
-CicoSCSystemConfig::calcGeometryExpr(const string & expr,
+CicoSystemConfig::calcGeometryExpr(const string & expr,
CicoSCDisplayConf* conf)
{
int val = 0;
*/
//--------------------------------------------------------------------------
const CicoSCNodeConf*
-CicoSCSystemConfig::findNodeConfbyName(const string & name)
+CicoSystemConfig::findNodeConfbyName(const string & name)
{
vector<CicoSCNodeConf*>::iterator itr;
itr = m_nodeConfList.begin();
*/
//--------------------------------------------------------------------------
const CicoSCDisplayConf*
-CicoSCSystemConfig::findDisplayConfbyName(const string & name)
+CicoSystemConfig::findDisplayConfbyName(const string & name)
{
vector<CicoSCDisplayConf*>::iterator itr;
itr = m_displayConfList.begin();
*/
//--------------------------------------------------------------------------
const CicoSCLayerConf*
-CicoSCSystemConfig::findLayerConfbyName(const string & displayName,
+CicoSystemConfig::findLayerConfbyName(const string & displayName,
const string & layerName)
{
const CicoSCDisplayConf* displayConf = NULL;
*/
//--------------------------------------------------------------------------
const CicoSCDisplayZoneConf*
-CicoSCSystemConfig::findDisplayZoneConfbyName(const string & displayName,
+CicoSystemConfig::findDisplayZoneConfbyName(const string & displayName,
const string & zoneName)
{
-// ICO_DBG("CicoSCSystemConfig::findDisplayZoneConfbyName Enter"
+// ICO_TRA("CicoSystemConfig::findDisplayZoneConfbyName Enter"
// "(displayName=%s zoneNmae=%s)",
// displayName.c_str(), zoneName.c_str());
const CicoSCDisplayConf* displayConf = NULL;
displayConf = findDisplayConfbyName(displayName);
if (NULL == displayConf) {
-// ICO_DBG("CicoSCSystemConfig::findDisplayZoneConfbyName Leave(NULL)");
+// ICO_TRA("CicoSystemConfig::findDisplayZoneConfbyName Leave(NULL)");
return NULL;
}
const CicoSCDisplayZoneConf* conf = NULL;
conf = const_cast<CicoSCDisplayZoneConf*>(*itr);
if (zoneName == conf->name) {
-// ICO_DBG("CicoSCSystemConfig::findDisplayZoneConfbyName Leave"
+// ICO_TRA("CicoSystemConfig::findDisplayZoneConfbyName Leave"
// "(0x%08x)", conf);
return conf;
}
}
-// ICO_DBG("CicoSCSystemConfig::findDisplayZoneConfbyName Leave(NULL)");
+// ICO_TRA("CicoSystemConfig::findDisplayZoneConfbyName Leave(NULL)");
return NULL;
}
*/
//--------------------------------------------------------------------------
const CicoSCSoundConf*
-CicoSCSystemConfig::findSoundConfbyName(const string & name)
+CicoSystemConfig::findSoundConfbyName(const string & name)
{
vector<CicoSCSoundConf*>::iterator itr;
itr = m_soundConfList.begin();
*/
//--------------------------------------------------------------------------
const CicoSCSoundZoneConf*
-CicoSCSystemConfig::findSoundZoneConfbyName(const string & soundName,
+CicoSystemConfig::findSoundZoneConfbyName(const string & soundName,
const string & zoneName)
{
-// ICO_DBG("CicoSCSystemConfig::findSoundZoneConfbyName Enter"
+// ICO_TRA("CicoSystemConfig::findSoundZoneConfbyName Enter"
// "(soundName=%s zoneNmae=%s)",
// soundName.c_str(), zoneName.c_str());
*/
//--------------------------------------------------------------------------
const CicoSCInputDevConf*
-CicoSCSystemConfig::findInputDevConfbyName(const string & name)
+CicoSystemConfig::findInputDevConfbyName(const string & name)
{
vector<CicoSCInputDevConf*>::iterator itr;
itr = m_inputDevConfList.begin();
*/
//--------------------------------------------------------------------------
const CicoSCSwitchConf*
-CicoSCSystemConfig::findSwitchConfbyName(const string & inputDevName,
+CicoSystemConfig::findSwitchConfbyName(const string & inputDevName,
const string & switchName)
{
const CicoSCInputDevConf* inputDevConf = NULL;
*/
//--------------------------------------------------------------------------
const CicoSCAppKindConf*
-CicoSCSystemConfig::findAppKindConfbyName(const string & name)
+CicoSystemConfig::findAppKindConfbyName(const string & name)
{
vector<CicoSCAppKindConf*>::iterator itr;
itr = m_appKindConfList.begin();
*/
//--------------------------------------------------------------------------
const CicoSCDisplayZoneConf*
-CicoSCSystemConfig::findDisplayZoneConfbyId(int id)
+CicoSystemConfig::findDisplayZoneConfbyId(int id)
{
vector<CicoSCDisplayConf*>::iterator itr;
itr = m_displayConfList.begin();
*/
//--------------------------------------------------------------------------
const CicoSCSoundZoneConf*
-CicoSCSystemConfig::findSoundZoneConfbyId(int id)
+CicoSystemConfig::findSoundZoneConfbyId(int id)
{
vector<CicoSCSoundConf*>::iterator itr;
itr = m_soundConfList.begin();
*/
//--------------------------------------------------------------------------
const CicoSCCategoryConf*
-CicoSCSystemConfig::findCategoryConfbyName(const string & name)
+CicoSystemConfig::findCategoryConfbyName(const string & name)
{
vector<CicoSCCategoryConf*>::iterator itr;
itr = m_categoryConfList.begin();
*/
//--------------------------------------------------------------------------
const CicoSCCategoryConf*
-CicoSCSystemConfig::findCategoryConfbyId(int id)
+CicoSystemConfig::findCategoryConfbyId(int id)
{
vector<CicoSCCategoryConf*>::iterator itr;
itr = m_categoryConfList.begin();
*/
//--------------------------------------------------------------------------
const CicoSCAppKindConf *
-CicoSCSystemConfig::findAppKindConfbyId(int id)
+CicoSystemConfig::findAppKindConfbyId(int id)
{
vector<CicoSCAppKindConf*>::iterator itr;
itr = m_appKindConfList.begin();
*/
//--------------------------------------------------------------------------
const CicoSCDefaultConf*
-CicoSCSystemConfig::getDefaultConf(void)
+CicoSystemConfig::getDefaultConf(void)
{
return m_defaultConf;
}
*/
//--------------------------------------------------------------------------
int
-CicoSCSystemConfig::getNodeIdbyName(const string & name)
+CicoSystemConfig::getNodeIdbyName(const string & name)
{
const CicoSCNodeConf* conf = NULL;
conf = findNodeConfbyName(name);
*/
//--------------------------------------------------------------------------
int
-CicoSCSystemConfig::getDisplayIdbyName(const string & name)
+CicoSystemConfig::getDisplayIdbyName(const string & name)
{
const CicoSCDisplayConf* conf = NULL;
conf = findDisplayConfbyName(name);
*/
//--------------------------------------------------------------------------
int
-CicoSCSystemConfig::getLayerIdfbyName(const string & displayName,
+CicoSystemConfig::getLayerIdfbyName(const string & displayName,
const string & layerName)
{
const CicoSCLayerConf* conf = NULL;
*/
//--------------------------------------------------------------------------
int
-CicoSCSystemConfig::getDizplayZoneIdbyName(const string & displayName,
+CicoSystemConfig::getDizplayZoneIdbyName(const string & displayName,
const string & zoneName)
{
const CicoSCDisplayZoneConf* conf = NULL;
*/
//--------------------------------------------------------------------------
int
-CicoSCSystemConfig::getDizplayZoneIdbyFullName(const string & zoneFullName)
+CicoSystemConfig::getDizplayZoneIdbyFullName(const string & zoneFullName)
{
string::size_type index = zoneFullName.find(".", 0);
if (string::npos == index) {
*/
//--------------------------------------------------------------------------
int
-CicoSCSystemConfig::getSoundIdbyName(const string & name)
+CicoSystemConfig::getSoundIdbyName(const string & name)
{
const CicoSCSoundConf* conf = NULL;
conf = findSoundConfbyName(name);
*/
//--------------------------------------------------------------------------
int
-CicoSCSystemConfig::getSoundZoneIdbyName(const string & soundName,
+CicoSystemConfig::getSoundZoneIdbyName(const string & soundName,
const string & zoneName)
{
const CicoSCSoundZoneConf* conf = NULL;
*/
//--------------------------------------------------------------------------
int
-CicoSCSystemConfig::getSoundZoneIdbyFullName(const string & zoneFullName)
+CicoSystemConfig::getSoundZoneIdbyFullName(const string & zoneFullName)
{
string::size_type index = zoneFullName.find(".", 0);
if (string::npos == index) {
*/
//--------------------------------------------------------------------------
int
-CicoSCSystemConfig::getInputDevIdbyName(const string & name)
+CicoSystemConfig::getInputDevIdbyName(const string & name)
{
const CicoSCInputDevConf* conf = NULL;
conf = findInputDevConfbyName(name);
*/
//--------------------------------------------------------------------------
int
-CicoSCSystemConfig::getSwitchIdbyName(const string & inputDevName,
+CicoSystemConfig::getSwitchIdbyName(const string & inputDevName,
const string & switchName)
{
const CicoSCSwitchConf* conf = NULL;
*/
//--------------------------------------------------------------------------
int
-CicoSCSystemConfig::getAppKindIdbyName(const string & name)
+CicoSystemConfig::getAppKindIdbyName(const string & name)
{
const CicoSCAppKindConf* conf = NULL;
conf = findAppKindConfbyName(name);
*/
//--------------------------------------------------------------------------
int
-CicoSCSystemConfig::getCategoryIdbyName(const string & name)
+CicoSystemConfig::getCategoryIdbyName(const string & name)
{
const CicoSCCategoryConf* conf = NULL;
conf = findCategoryConfbyName(name);
*/
//--------------------------------------------------------------------------
const CicoSCCategoryConf*
-CicoSCSystemConfig::getCategoryObjbyCaategoryID(int id)
+CicoSystemConfig::getCategoryObjbyCaategoryID(int id)
{
if (-1 == id) {
return NULL;
* @param [in]
*/
//--------------------------------------------------------------------------
+CicoSCVehicleInfoConf*
+CicoSystemConfig::getVehicleInfoConf(void)
+{
+ return m_vehicleInfoConf;
+}
+
+//--------------------------------------------------------------------------
+/**
+ * @brief array xml tree to vector<int>
+ *
+ * @param [in]
+ */
+//--------------------------------------------------------------------------
void getArray(ptree& t, vector<int>& vec)
{
vec.clear();
//==========================================================================
/**
- * @file CicoSCSystemConfig.h
+ * @file CicoSystemConfig.h
*
- * @brief This file is definition of CicoSCSystemConfig class
+ * @brief This file is definition of CicoSystemConfig class
*/
//==========================================================================
-#ifndef __CICO_SC_SYSTEM_CONFIG_H__
-#define __CICO_SC_SYSTEM_CONFIG_H__
+#ifndef __CICO_SYSTEM_CONFIG_H__
+#define __CICO_SYSTEM_CONFIG_H__
#include <boost/property_tree/ptree.hpp>
#include <boost/property_tree/xml_parser.hpp>
class CicoSCDefaultConf;
class CicoSCResourceConf;
class CicoSCUserConf;
+class CicoSCVehicleInfoConf;
#endif
//==========================================================================
* @brief This class has function of access to system config information
*/
//==========================================================================
-class CicoSCSystemConfig
+class CicoSystemConfig
{
public:
- static CicoSCSystemConfig* getInstance(void);
+ static CicoSystemConfig* getInstance(void);
- int load(const string & confFile);
+ bool load(const string & confFile);
const vector<CicoSCNodeConf*> & getNodeConfList(void) const;
const vector<CicoSCDisplayConf*> & getDisplayConfList(void) const;
return m_userConf;
};
+ CicoSCVehicleInfoConf* getVehicleInfoConf(void);
+
private:
// default constructor
- CicoSCSystemConfig();
+ CicoSystemConfig();
// destructor
- ~CicoSCSystemConfig();
+ ~CicoSystemConfig();
// assignment operator
- CicoSCSystemConfig& operator=(const CicoSCSystemConfig &object);
+ CicoSystemConfig& operator=(const CicoSystemConfig &object);
// copy constructor
- CicoSCSystemConfig(const CicoSCSystemConfig &object);
+ CicoSystemConfig(const CicoSystemConfig &object);
void createNodeConfList(const ptree & root);
void createDisplayConfList(const ptree & root);
void createSwitchList(const ptree::value_type & child,
CicoSCInputDevConf* inputDevConf);
void createDefaultConf(const ptree & root);
- void createLogConf(const ptree & root);
void createResourceConf(const ptree & root);
void createUserConf(const ptree & root);
+ void createVehicleInfoConf(const ptree & root);
int calcGeometryExpr(const string & expr, CicoSCDisplayConf* conf);
private:
- static CicoSCSystemConfig* ms_myInstance;
+ static CicoSystemConfig* ms_myInstance;
string m_confFile;
map<string,int> m_typeTable;
map<string,int> m_displayTypeTable;
vector<CicoSCAppKindConf*> m_appKindConfList;
int m_sysconPort;
int m_soundPluginPort;
- int m_loglevel;
- bool m_logflush;
CicoSCDefaultConf *m_defaultConf;
CicoSCResourceConf *m_resourceConf;
CicoSCUserConf *m_userConf;
+ CicoSCVehicleInfoConf *m_vehicleInfoConf;
};
-#endif // __CICO_SC_SYSTEM_CONFIG_H__
+#endif // __CICO_SYSTEM_CONFIG_H__
// vim:set expandtab ts=4 sw=4:
dead_p.push_back(data);
return true;
}
+// vim:set expandtab ts=4 sw=4:
void initAulListenXSignal();
#endif
+// vim:set expandtab ts=4 sw=4:
--- /dev/null
+AM_CPPFLAGS = $(GCC_CXXFLAGS)
+
+noinst_LTLIBRARIES =\
+ libico-common.la
+
+#lib_LTLIBRARIES =\
+# libico-system-controller.la
+
+libico_common_la_LDFLAGS = -version-info 0:9:0
+libico_common_la_SOURCES = \
+ CicoEFLApp.cpp \
+ CicoSystemConfig.cpp \
+ CicoAilItems.cpp \
+ CicoAulItems.cpp \
+ Cico_aul_listen_app.cpp \
+ CicoGKeyFileConfig.cpp \
+ CicoResourceConfig.cpp \
+ CicoSound.cpp \
+ CicoLibString.cpp
+
+libico_common_la_CPPFLAGS = \
+ $(GCC_CXXFLAGS) \
+ @ECORE_CFLAGS@ \
+ @EINA_CFLAGS@ \
+ @GLIB_CFLAGS@ \
+ @AIL_CFLAGS@ \
+ @BUNDLE_CFLAGS@ \
+ @AUL_CFLAGS@ \
+ @PKGMGR_CFLAGS@ \
+ @CAPIAPPFWAPPLICATION_CFLAGS@ \
+ $(UWS_CFLAGS) \
+ -I../../include
+
+libico_common_la_LIBADD = \
+ @ECORE_LIBS@ \
+ @EINA_LIBS@ \
+ @GLIB_LIBS@ \
+ @AIL_LIBS@ \
+ @BUNDLE_LIBS@ \
+ @AUL_LIBS@ \
+ @PKGMGR_LIBS@ \
+ @CAPIAPPFWAPPLICATION_LIBS@ \
+ $(UWS_LIBS)
+
+AM_LDFLAGS = -module -avoid-version -rpath $(libdir)
+
+.FORCE :
+
+# vim:set ts=4 sw=4:
--- /dev/null
+/*
+ * Copyright (c) 2013, TOYOTA MOTOR CORPORATION.
+ *
+ * This program is licensed under the terms and conditions of the
+ * Apache License, version 2.0. The full text of the Apache License is at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ */
+#include <memory>
+#include <iostream>
+#include <fstream>
+#include <cstdlib>
+#include <cstdio>
+#include <string>
+#include <vector>
+#include <sstream>
+#include <utility>
+
+#include <dirent.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <boost/property_tree/ptree.hpp>
+#include <boost/property_tree/json_parser.hpp>
+#include <boost/foreach.hpp>
+#include <boost/optional.hpp>
+
+#include "CicoLog.h"
+#include "CicoSCCommand.h"
+#include "CicoSCSysResourceController.h"
+#include "CicoSCAppResourceController.h"
+#include "CicoSCLifeCycleController.h"
+#include "CicoSCUserManager.h"
+#include "CicoConf.h"
+#include "CicoSystemConfig.h"
+#include "CicoLibString.h"
+#include <Ecore.h>
+//#include <Ecore_Evas.h>
+
+/**
+ * @brief constructor
+ */
+CicoSCAppResourceController::CicoSCAppResourceController()
+{
+ ICO_TRA("start");
+ m_bDoItApp = false;
+ m_filepath.clear();
+ ICO_TRA("end");
+}
+
+/**
+ * @brief destructor
+ */
+CicoSCAppResourceController::~CicoSCAppResourceController()
+{
+ ICO_TRA("start");
+ ICO_TRA("end");
+}
+
+/**
+ * @brief startAppResource
+ */
+bool CicoSCAppResourceController::initAppResource()
+{
+ ICO_TRA("start");
+ if (true == m_bDoIt) {
+ ICO_TRA("end");
+ return false;
+ }
+ if (0 == m_rConf) {
+ ICO_TRA("end");
+ return false;
+ }
+ m_bDoItApp = m_rConf->m_bDoItApp;
+ if (false == m_bDoItApp) {
+ ICO_TRA("end");
+ return false;
+ }
+ m_filepath.clear();
+ ICO_TRA("end");
+ return true;
+}
+
+/**
+ * @brief startAppResource
+ */
+bool CicoSCAppResourceController::startAppResource(const string& un)
+{
+ ICO_TRA("start %s", un.c_str());
+ if (false == m_bDoItApp) {
+ ICO_TRA("end");
+ return false;
+ }
+
+ string fn;
+ getAppResourceFilePath(un, fn);
+ if (false == orderApps(fn)) {
+ ICO_TRA("end");
+ return false;
+ }
+ m_filepath = fn;
+ ICO_TRA("end");
+ return true;
+}
+
+/**
+ * @brief get application resouce file path
+ * @param un user name
+ * @param fi file path application resource file
+ */
+void CicoSCAppResourceController::getAppResourceFilePath(const string& un,
+ string& fp) const
+{
+ CicoSCUserManager *cscum = CicoSCUserManager::getInstance();
+ cscum->getWorkingDir(un, fp);
+ fp += D_STRappResource;
+}
+
+/**
+ * @brief oder application resource
+ */
+bool CicoSCAppResourceController::orderApps(const string& filepath)
+{
+ ICO_TRA("start");
+ if (false == m_bDoItApp) {
+ ICO_TRA("end");
+ return false;
+ }
+ clearApps();
+
+ if (false == readApps(filepath)) {
+ ICO_TRA("end fail:read");
+ return false;
+ }
+
+ // read finish
+ if (0 == m_vAppid.size()) {
+ ICO_TRA("end fail read2");
+ return false;
+ }
+ init_cgroup_app_dir();
+ init_cgroup_app_cpushare();
+ return false;
+}
+
+/**
+ * @brief read app
+ * @param filepath file name (full path)
+ */
+bool CicoSCAppResourceController::readApps(const string& filepath)
+{
+ ICO_TRA("start file:%s", filepath.c_str());
+ if (false == m_bDoItApp) {
+ ICO_TRA("end");
+ return false;
+ }
+ bool bR = false;
+ double d1 = 1024.0;
+ double d2 = 100.0;
+#if 0 // TODO
+ // text file read
+ ifstream ifs(filepath.c_str());
+ char sBuff[256];
+ while(ifs.getline(sBuff,sizeof(sBuff))) {
+ string tagApp(sBuff);
+ if (true == tagApp.empty()) {
+ continue;
+ }
+ vector<string> vTmp;
+ split(tagApp, ',', vTmp);
+ if (2 == vTmp.size()) {
+ string appid = trim(vTmp[0]);
+ string share = trim(vTmp[1]);
+ int iShare = atoi(share.c_str());
+ if (0 != iShare) {
+ if (100 < iShare) {
+ ICO_DBG("change %d -> 100", iShare);
+ iShare = 100;
+ }
+ iShare = (int)(d1 * ((double)iShare) / d2);
+ ICO_DBG("TARGET_OK %s, %d", appid.c_str(), iShare);
+ m_vAppid.push_back(appid);
+ m_vShares.push_back(iShare);
+ bR = true;
+ }
+ else {
+ ICO_DBG("TARGET_NG %s, >> %s <<", appid.c_str(), share.c_str());
+ }
+
+ }
+ else {
+ ICO_DBG("TARGET_NG >> %s <<", sBuff);
+ }
+ vTmp.clear();
+ }
+ ifs.close();
+#else
+ struct stat buff;
+ /* file check */
+ memset(&buff, 0, sizeof(buff));
+ if (0 != stat(filepath.c_str(), &buff)) {
+ ICO_TRA("end");
+ return false;
+ }
+ bool bStt=true;
+ // json read
+ try {
+ ptree pt;
+ read_json(filepath.c_str(), pt);
+ // cpu_shares
+ BOOST_FOREACH (const ptree::value_type& child,
+ pt.get_child(DSTRcpu_shares)) {
+ const ptree& info = child.second;
+
+ string appid;
+ int iShareO;
+ // cpu_shares.share
+ if (boost::optional<int> iVal = info.get_optional<int>(DSTRshare)) {
+ iShareO = iVal.get();
+ }
+ else {
+ ICO_DBG("NG get share");
+ bStt=false;
+ break; // break of BOOST_FOREACH
+ }
+
+ // cpu_shares.appid
+ if (boost::optional<std::string> sVal =
+ info.get_optional<std::string>(DSTRappid)) {
+ appid = sVal.get();
+ }
+ else {
+ ICO_DBG("NG get appid");
+ bStt=false;
+ break; // break of BOOST_FOREACH
+ }
+ // DATA get!
+ int iShare = iShareO;
+ if (100 < iShare) {
+ iShare = 100;
+ }
+ iShare = (int)(d1 * ((double)iShare) / d2);
+ ICO_DBG("TARGET_GET %d(%d), %s", iShare, iShareO, appid.c_str());
+ m_vAppid.push_back(appid);
+ m_vShares.push_back(iShare);
+ bR = true;
+ }
+ }
+ catch (...) {
+ ICO_WRN("NG read(%s)", filepath.c_str());
+ bStt = false;
+ }
+ if (false == bStt) {
+ m_vAppid.clear();
+ m_vShares.clear();
+ ICO_TRA("end %d", (int)bR);
+ return false;
+ }
+#endif
+ ICO_DBG("read %d, %d, %d, %d", m_vAppid.size(), m_vShares.size(),
+ m_RCCpuTasks.size(), m_RCCpuShares.size());
+ ICO_TRA("end %d", (int)bR);
+ return bR;
+}
+
+/**
+ * @brief initialize cgroup application
+ */
+void CicoSCAppResourceController::init_cgroup_app_dir()
+{
+ ICO_TRA("start");
+ if (false == m_bDoItApp) {
+ ICO_TRA("end");
+ return;
+ }
+ string sTasks(D_STRtasks);
+ string sShares(D_STRcpushares);
+ string t1(m_rConf->m_cpuCGRPPath);
+ chkAndAddSlash(t1);
+
+ string tDir1(m_rConf->m_cpuCGRPPath);
+ vector<string> d;
+ d.push_back(tDir1);
+ chkAndAddSlash(tDir1);
+
+ vector<string>::iterator it = m_vAppid.begin();
+ for (; it != m_vAppid.end(); it++) {
+ // make cgroup apps directroy full path
+ string tDir2(tDir1);
+ tDir2 += *it;
+ d.push_back(tDir2);
+ chkAndAddSlash(tDir2);
+ // make cgroup tasks file full path
+ string tDir3tasks(tDir2);
+ tDir3tasks += sTasks;
+ m_RCCpuTasks.push_back(tDir3tasks);
+ // make cgroup cpu.shares file full path
+ string tDir4cpushare(tDir2);
+ tDir4cpushare += sShares;
+ m_RCCpuShares.push_back(tDir4cpushare);
+ }
+ make_directorys(d);
+ ICO_TRA("end");
+ return;
+}
+
+/**
+ * @brief initialize cgroup application
+ */
+void CicoSCAppResourceController::init_cgroup_app_cpushare()
+{
+ ICO_TRA("start");
+ if (false == m_bDoItApp) {
+ ICO_TRA("end");
+ return;
+ }
+
+ vector<string>::iterator itDir = m_RCCpuShares.begin();
+ vector<int>::iterator itShare = m_vShares.begin();
+ while (itDir != m_RCCpuShares.end()) {
+ replaceCgroupFile(*itDir, *itShare);
+ ++itDir;
+ ++itShare;
+ }
+ ICO_TRA("end");
+ return;
+}
+
+/**
+ * @brief clear Apps
+ */
+bool CicoSCAppResourceController::clearApps()
+{
+ ICO_TRA("start");
+ if (false == m_bDoItApp) {
+ ICO_TRA("end");
+ return false;
+ }
+ m_vAppid.clear();
+ m_vShares.clear();
+ m_RCCpuTasks.clear();
+ m_RCCpuShares.clear();
+ ICO_TRA("end fail:read");
+ return true;
+}
+
+/**
+ * @brief entry
+ * @param appid
+ * @param pid
+ */
+bool CicoSCAppResourceController::entryApp(const string& appid, int pid)
+{
+ ICO_TRA("start appid(%s), pid(%d)", appid.c_str(), pid);
+ if (false == m_bDoItApp) {
+ ICO_TRA("end");
+ return false;
+ }
+ vector<string>::iterator itTasks = m_RCCpuTasks.begin();
+ vector<string>::iterator itAppid = m_vAppid.begin();
+ string tasks;
+ tasks.clear();
+ while (itTasks != m_RCCpuTasks.end()) {
+ if (0 == (*itAppid).compare(appid.c_str())) {
+ tasks = *itTasks;
+ break;
+ }
+ ++itTasks;
+ ++itAppid;
+ }
+ if (true == tasks.empty()) {
+ ICO_TRA("end no match appid");
+ return false;
+ }
+ replaceCgroupFile(tasks, pid);
+ ICO_TRA("end write cgroup %s, %d", tasks.c_str(), pid);
+ return true;
+}
+
+/**
+ * @brief entry application's
+ * @param vAulItem
+ */
+bool CicoSCAppResourceController::entryApps(vector<CicoAulItems>& vAulItem)
+{
+ ICO_TRA("start size(%d)", vAulItem.size());
+ if (false == m_bDoItApp) {
+ ICO_TRA("end");
+ return false;
+ }
+ bool bR = false;
+ vector<CicoAulItems>::iterator it = vAulItem.begin();
+ while (it != vAulItem.end()) {
+ entryApp(it->m_appid, it->m_pid);
+ bR = true;
+ ++it;
+ }
+ ICO_TRA("end %s", bR? "true": "false");
+ return bR;
+}
+
+/**
+ * @brief create applications Resource file
+ * @param file path create target
+ */
+void CicoSCAppResourceController::createAppResourceFile(const string& filepath)
+{
+ ICO_TRA("start %s", filepath.c_str());
+#if 0
+ ofstream ofs;
+ ofs.open(filepath.c_str(), ios::trunc);
+ const vector<CicoAilItems>& vAil =
+ CicoSCLifeCycleController::getInstance()->getAilList();
+ vector<CicoAilItems>::const_iterator it = vAil.begin();
+ for (; it != vAil.end(); ++it) {
+ ofs << (*it).m_appid << ",100" << endl;
+ }
+ ofs.close();
+#else
+ try{
+ ptree pt;
+ ptree child;
+
+ const vector<CicoAilItems>& vAil =
+ CicoSCLifeCycleController::getInstance()->getAilList();
+ vector<CicoAilItems>::const_iterator it = vAil.begin();
+ for (; it != vAil.end(); ++it) {
+ {
+ ptree info;
+ info.put(DSTRshare, 100);
+ info.put(DSTRappid, (*it).m_appid.c_str());
+ child.push_back(std::make_pair("", info));
+ }
+ }
+ pt.add_child(DSTRcpu_shares, child);
+ write_json(filepath.c_str(), pt);
+ }
+ catch (std::exception const& e) {
+ ICO_WRN("catch exception %s", e.what());
+ }
+ catch (...) {
+ ICO_WRN("NG write(%s)", filepath.c_str());
+ }
+
+#endif
+ ICO_TRA("end");
+}
--- /dev/null
+/*
+ * Copyright (c) 2013, TOYOTA MOTOR CORPORATION.
+ *
+ * This program is licensed under the terms and conditions of the
+ * Apache License, version 2.0. The full text of the Apache License is at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ */
+/**
+ * @brief CicoSCAppResourceController
+ * SystemController resource
+ * Application Resouce Controller
+ *
+ * @date Aug-05-2013 create start
+ */
+
+#ifndef CICOSCAPPRESOURCECONTROLLER_H
+#define CICOSCAPPRESOURCECONTROLLER_H
+#include <cstddef>
+#include <string>
+#include <vector>
+
+#include "CicoAilItems.h"
+#include "CicoAulItems.h"
+#include "CicoSCSysResourceController.h"
+
+#define D_STRappResource "appResource.json"
+#define DSTRcpu_shares "cpu_shares"
+#define DSTRshare "share"
+#define DSTRappid "appid"
+/**
+ * @brief System Controller Application Resource Controller class
+ */
+class CicoSCAppResourceController : public CicoSCSysResourceController
+{
+public:
+ CicoSCAppResourceController();
+ ~CicoSCAppResourceController();
+
+ bool initAppResource();
+ bool startAppResource(const std::string& un);
+ bool clearApps();
+
+ bool isAppResource();
+
+ bool entryApp(const std::string& appid, int pid);
+ bool entryApps(std::vector<CicoAulItems>& vAulItem);
+
+ void getAppResourceFilePath(const std::string& un, std::string& fp) const;
+ void createAppResourceFile(const std::string& filepath);
+protected:
+ bool orderApps(const std::string& filepath);
+ bool readApps(const std::string& filepath);
+ void init_cgroup_app_dir();
+ void init_cgroup_app_cpushare();
+
+protected:
+ bool m_bDoItApp;
+private:
+
+ std::vector<std::string> m_vAppid;
+ std::vector<int> m_vShares;
+ std::string m_filepath;
+};
+
+inline bool CicoSCAppResourceController::isAppResource()
+{
+ return m_bDoItApp;
+}
+
+#endif // CICOSCAPPRESOURCECONTROLLER_H
int
CicoSCCommand::parseMessage(const char *message)
{
-// ICO_DBG("CicoSCCommand::parseMessage Enter(%s)", message);
+// ICO_TRA("CicoSCCommand::parseMessage Enter(%s)", message);
try {
stringstream jsonString(message);
ptree root;
catch (std::exception const& e)
{
ICO_WRN("catch exception %s", e.what());
-// ICO_ERR("CicoSCCommand::parseMessage Leave(EINVAL)");
+// ICO_TRA("CicoSCCommand::parseMessage Leave(EINVAL)");
return ICO_SYC_EINVAL;
}
-// ICO_DBG("CicoSCCommand::parseMessage Leave(EOK)");
+// ICO_TRA("CicoSCCommand::parseMessage Leave(EOK)");
return ICO_SYC_EOK;
}
void
CicoSCCommand::dump(void)
{
- ICO_DBG("Command: cmdid=0x%08X appid=%s pid=%d", cmdid, appid.c_str(), pid);
+ ICO_INF("Command: cmdid=0x%08X appid=%s pid=%d", cmdid, appid.c_str(), pid);
if (NULL != this->opt) {
this->opt->dump();
}
animation.c_str(), animationTime,
x, y, width, height, raise,
visible, active, framerate, stride, format);
-
}
int nodeid; //!< id of node
public:
/// default constructor
CicoSCCmdResCtrlOpt()
- : dispres(false), dispzone(""), winname(""), surfaceid(-1),
+ : dispres(false), dispzone(""), layerid(-1), winname(""), surfaceid(-1),
animation(""), animationTime(0),
soundres(false), soundzone(""), soundname(""), adjust(0),
inputres(false), device(""), input(0), type(0) {}
void dump(void)
{
ICO_DBG("ResCtrlOpt: "
- "diapres=%s dispzone=%s winname=%s srufaceid=0x%08X "
+ "diapres=%s dispzone=%s layerid=%d winname=%s srufaceid=0x%08X "
"animation=%s animatime=%d soundres=%s soundzone=%s"
"soundname=%s soundid=%d adjust=%d inputres=%s "
"device=%s input=%d type=%d",
- dispres ? "true" : "false", dispzone.c_str(),
+ dispres ? "true" : "false", dispzone.c_str(), layerid,
winname.c_str(), surfaceid, animation.c_str(),
animationTime, soundres ? "true" : "false",
soundzone.c_str(), soundname.c_str(),
bool dispres; //!< flag of display resource
std::string dispzone; //!< name of display zone
+ int layerid; //!< id of window layer
std::string winname; //!< name of window
int surfaceid; //!< id of surface
std::string animation; //!< name of animation
CicoSCDisplayZone*
CicoSCDisplay::findDisplayZonebyFullName(const string & fullname)
{
-// ICO_DBG("CicoSCDisplay:findDisplayZonebyFullName Enter"
+// ICO_TRA("CicoSCDisplay:findDisplayZonebyFullName Enter"
// "(fullname=%s)", fullname.c_str());
std::map<unsigned int, CicoSCDisplayZone*>::iterator itr;
itr = zoneList.begin();
for (; itr != zoneList.end(); ++itr) {
if (itr->second->fullname == fullname) {
-// ICO_DBG("CicoSCDisplay:findDisplayZonebyFullName Leave(found)");
+// ICO_TRA("CicoSCDisplay:findDisplayZonebyFullName Leave(found)");
return itr->second;
}
}
-// ICO_DBG("CicoSCDisplay:findDisplayZonebyFullName Leave(not found)");
+// ICO_TRA("CicoSCDisplay:findDisplayZonebyFullName Leave(not found)");
return NULL;
}
// vim:set expandtab ts=4 sw=4:
#include "ico_syc_error.h"
#include "ico_syc_msg_cmd_def.h"
#include "ico_syc_private.h"
-#include "CicoSCSystemConfig.h"
-#include "CicoSCConf.h"
+#include "CicoSystemConfig.h"
+#include "CicoConf.h"
#include "CicoSCCommand.h"
#include "CicoSCServer.h"
#include "CicoSCMessage.h"
initDB(void)
{
const vector<CicoSCInputDevConf*>& inputDevConfList =
- CicoSCSystemConfig::getInstance()->getInputDevConfList();
+ CicoSystemConfig::getInstance()->getInputDevConfList();
vector<CicoSCInputDevConf*>::const_iterator itr;
itr = inputDevConfList.begin();
for (; itr != inputDevConfList.end(); ++itr) {
void
CicoSCInputController::handleCommand(const CicoSCCommand *cmd)
{
- ICO_DBG("CicoSCInputController::handleCommand Enter"
+ ICO_TRA("CicoSCInputController::handleCommand Enter"
"(cmdid=0x%08X)", cmd->cmdid);
CicoSCCmdInputDevCtrlOpt *opt;
break;
}
- ICO_DBG("CicoSCInputController::handleCommand Leave");
+ ICO_TRA("CicoSCInputController::handleCommand Leave");
}
//--------------------------------------------------------------------------
int fix,
int keycode)
{
- ICO_DBG("CicoSCInputController::addInputApp Enter"
+ ICO_TRA("CicoSCInputController::addInputApp Enter"
"(appid=%s device=%s input=%d fix=%d keycode=%d)",
appid.c_str(), device.c_str(), input, fix, keycode);
CicoSCWlInputMgrIF::addInputApp(appid.c_str(), device.c_str(),
input, fix, keycode);
- ICO_DBG("CicoSCInputController::addInputApp Leave(EOK)");
+ ICO_TRA("CicoSCInputController::addInputApp Leave(EOK)");
return ICO_SYC_EOK;
}
const string &device,
int input)
{
- ICO_DBG("CicoSCInputController::delInputApp Enter"
+ ICO_TRA("CicoSCInputController::delInputApp Enter"
"(appid=%s device=%s input=%d)",
appid.c_str(), device.c_str(), input);
CicoSCWlInputMgrIF::delInputApp(appid.c_str(), device.c_str(), input);
- ICO_DBG("CicoSCInputController::delInputApp Leave(EOK)");
+ ICO_TRA("CicoSCInputController::delInputApp Leave(EOK)");
return ICO_SYC_EOK;
}
int code,
int value)
{
- ICO_DBG("CicoSCInputController::sendInputEvent Enter"
+ ICO_TRA("CicoSCInputController::sendInputEvent Enter"
"(appid=%s surfaceid=0x%08X type=%d dev_no=%d time=%d code=%d value=%d)",
appid.c_str(), surfaceid, type, deviceno, time, code, value);
CicoSCWlInputMgrIF::sendInputEvent(appid.c_str(), surfaceid,
type, deviceno, time, code, value);
- ICO_DBG("CicoSCInputController::sendInputEvent Leave(EOK)");
+ ICO_TRA("CicoSCInputController::sendInputEvent Leave(EOK)");
return ICO_SYC_EOK;
}
snprintf(target, ICO_SYC_MAX_LEN-1, "%s@%s", winname.c_str(), appid.c_str());
- ICO_DBG("CicoSCInputController::setInputRegion Enter"
+ ICO_TRA("CicoSCInputController::setInputRegion Enter"
"(target=%s x=%d y=%d width=%d height=%d "
"hotspot=%d/%d cursor=%d/%d-%d/%d attr=%d)",
target, x, y, width, height, hotspot_x, hotspot_y,
hotspot_x, hotspot_y, cursor_x, cursor_y,
cursor_width, cursor_height, attr);
- ICO_DBG("CicoSCInputController::setInputRegion Leave(EOK)");
+ ICO_TRA("CicoSCInputController::setInputRegion Leave(EOK)");
return ICO_SYC_EOK;
}
snprintf(target, ICO_SYC_MAX_LEN-1, "%s@%s", winname.c_str(), appid.c_str());
- ICO_DBG("CicoSCInputController::unsetInputRegion Enter"
+ ICO_TRA("CicoSCInputController::unsetInputRegion Enter"
"(target=%s x=%d y=%d width=%d height=%d", target, x, y, width, height);
CicoSCWlInputMgrIF::unsetInputRegion(target, x, y, width, height);
- ICO_DBG("CicoSCInputController::unsetInputRegion Leave(EOK)");
+ ICO_TRA("CicoSCInputController::unsetInputRegion Leave(EOK)");
return ICO_SYC_EOK;
}
const char *codename,
int32_t code)
{
- ICO_DBG("CicoSCInputController::capabilitiesCB Enter",
+ ICO_TRA("CicoSCInputController::capabilitiesCB Enter",
"device=%s type=%s swname=%s input=%s codename=%s code=%d",
device, type, swname, input, codename, code);
sw->input = input;
}
- CicoSCSystemConfig *sysConf = CicoSCSystemConfig::getInstance();
+ CicoSystemConfig *sysConf = CicoSystemConfig::getInstance();
const CicoSCSwitchConf *swconf = NULL;
swconf = sysConf->findSwitchConfbyName(device, swname);
if (NULL != swconf) {
}
}
- ICO_DBG("CicoSCInputController::capabilitiesCB Leave");
+ ICO_TRA("CicoSCInputController::capabilitiesCB Leave");
}
//--------------------------------------------------------------------------
const char *codename,
int32_t code)
{
- ICO_DBG("CicoSCInputController::codeCB Enter"
+ ICO_TRA("CicoSCInputController::codeCB Enter"
"(device=%s input=%d codename=%s code=%d)",
device, input, codename, code);
sw->code.push_back(code);
sw->codename.push_back(codename);
- ICO_DBG("CicoSCInputController::codeCB Leave");
+ ICO_TRA("CicoSCInputController::codeCB Leave");
}
//--------------------------------------------------------------------------
int32_t code,
int32_t state)
{
- ICO_DBG("CicoSCInputController::inputCB Enter"
+ ICO_TRA("CicoSCInputController::inputCB Enter"
"time=%d device=%s input=%d code=%d state=%d",
time, device, input, code, state);
message->addArgObject("state", state);
CicoSCServer::getInstance()->sendMessageToHomeScreen(message);
- ICO_DBG("CicoSCInputController::inputCB Leave");
+ ICO_TRA("CicoSCInputController::inputCB Leave");
}
//--------------------------------------------------------------------------
struct ico_input_mgr_device *ico_input_mgr_dev,
struct wl_array *region)
{
- ICO_DBG("CicoSCInputController::regionCB Enter");
- ICO_DBG("CicoSCInputController::regionCB Leave");
+ ICO_TRA("CicoSCInputController::regionCB Enter");
+ ICO_TRA("CicoSCInputController::regionCB Leave");
}
//--------------------------------------------------------------------------
#ifndef __CICO_SC_LAYER_H__
#define __CICO_SC_LAYER_H__
-#include "CicoSCCommonDef.h"
+#include "CicoCommonDef.h"
//--------------------------------------------------------------------------
/**
#include "ico_syc_error.h"
#include "CicoLog.h"
-#include "CicoSCAulItems.h"
-#include "CicoSCAilItems.h"
+#include "CicoAulItems.h"
+#include "CicoAilItems.h"
#include "CicoSCLifeCycleController.h"
-#include "CicoSCConf.h"
-#include "CicoSCSystemConfig.h"
+#include "CicoConf.h"
+#include "CicoSystemConfig.h"
#include "CicoSCSysResourceController.h"
+#include "CicoSCAppResourceController.h"
#include "Cico_aul_listen_app.h"
using namespace std;
{
m_gconf = (GKeyFile*)NULL;
m_pc = (pkgmgr_client*)NULL;
+#if 0
m_RC = new CicoSCSysResourceController;
+ m_RC->startSysResource();
+#else
+ m_RC = new CicoSCAppResourceController;
+ if (false == m_RC->startSysResource()) {
+ m_RC->initAppResource();
+ }
+#endif
ailRenewFlagOff();
initAIL();
initAUL();
ICO_TRA("start %s", appid);
// appid check AIL table exist
if (NULL == findAIL(appid)) {
- ICO_TRA("not find");
+ ICO_TRA("end fail(not find)");
return ICO_SYC_ENOSYS;
}
+ ICO_PRF("CHG_APP_STA request app=%s", appid);
int r = aul_launch_app(appid, b);
if (0 > r) {
- ICO_TRA("aul_launch_app NG %d", r);
+ ICO_TRA("end fail(%d)", r);
return ICO_SYC_ENOSYS;
}
- ICO_TRA("launch success");
+ ICO_TRA("end success(%d)", r);
return ICO_SYC_EOK;
}
int CicoSCLifeCycleController::terminate(int pid)
{
ICO_TRA("CicoSCLifeCycleController::terminate %d", pid);
- const CicoSCAulItems* t = findAUL(pid);
+ const CicoAulItems* t = findAUL(pid);
if ((NULL == t) || (0 == t)) {
ICO_TRA("not find");
return ICO_SYC_EPERM;
ICO_TRA("start %s", appid);
bool r = false;
#if 0 // TODO mk_k
- vector<CicoSCAulItems>::iterator it;
+ vector<CicoAulItems>::iterator it;
for (it = m_aul.begin(); it != m_aul.end(); ++it) {
it->update_appid();
if (0 == strcasecmp(it->m_appid.c_str(), appid)) {
/**
* @brief find ail data
* @param appid find key
- * @return CicoSCAilItems class pointer
+ * @return CicoAilItems class pointer
* @retval NULL is not find
*/
-const CicoSCAilItems* CicoSCLifeCycleController::findAIL(const char* appid) const
+const CicoAilItems* CicoSCLifeCycleController::findAIL(const char* appid) const
{
ICO_TRA("start");
- const CicoSCAilItems* r = NULL;
+ const CicoAilItems* r = NULL;
int sz = m_ail.size();
for (int i = 0; i < sz; i++) {
if (0 == strcasecmp(m_ail[i].m_appid.c_str(), appid)) {
/**
* @brief find ail data
* @param appid find key
- * @return CicoSCAilItems class pointer
+ * @return CicoAilItems class pointer
* @retval NULL is not find
*/
-const CicoSCAilItems* CicoSCLifeCycleController::findAIL(const std::string& appid) const
+const CicoAilItems* CicoSCLifeCycleController::findAIL(const std::string& appid) const
{
// ICO_TRA("call findAIL(const char*)");
return findAIL((const char*)appid.c_str());
ICO_TRA("start %s", appid);
bool r = false;
#if 0 // TODO mk_k
- vector<CicoSCAulItems>::iterator it;
+ vector<CicoAulItems>::iterator it;
for (it = m_aul.begin(); it != m_aul.end(); ++it) {
it->update_appid();
if (0 == strcasecmp(it->m_appid.c_str(), appid)) {
#else
int sz = m_aul.size();
for (int i = 0; i < sz; i++) {
- CicoSCAulItems* t = (CicoSCAulItems*)m_aul[i].p();
+ CicoAulItems* t = (CicoAulItems*)m_aul[i].p();
t->update_appid();
if (0 == strcasecmp(t->m_appid.c_str(), appid)) {
pids.push_back(t->m_pid);
* @param appid target application appid
* @return pid
*/
-const CicoSCAulItems* CicoSCLifeCycleController::findAUL(int pid)
+const CicoAulItems* CicoSCLifeCycleController::findAUL(int pid)
{
ICO_TRA("start %d", pid);
- const CicoSCAulItems* r = NULL;
+ const CicoAulItems* r = NULL;
int sz = m_aul.size();
for (int i = 0; i < sz; i++) {
- CicoSCAulItems* t = (CicoSCAulItems*)m_aul[i].p();
+ CicoAulItems* t = (CicoAulItems*)m_aul[i].p();
t->update_appid();
if (t->m_pid == pid) {
r = t;
void CicoSCLifeCycleController::renewAIL()
{
ICO_TRA("start");
- vector<CicoSCAilItems> old = m_ail;
+ vector<CicoAilItems> old = m_ail;
m_ail.clear();
int cnt =0;
while (false == createAilItems()) {
vector<string> add_appid;
vector<string> remove_appid;
- vector<CicoSCAulItems>::iterator it_n;
- vector<CicoSCAulItems>::iterator it_o;
+ vector<CicoAulItems>::iterator it_n;
+ vector<CicoAulItems>::iterator it_o;
for(it_n = m_aul.begin(); it_n != m_aul.end(); ++it_n) {
bool bingo = false;
for(it_o = old.begin(); it_o != old.end(); ++it_o) {
if (NULL == m_gconf) {
m_gconf = g_key_file_new();
GString* gsfp = g_string_new("xx");
- CicoSCSystemConfig* CSCSC = CicoSCSystemConfig::getInstance();
+ CicoSystemConfig* CSCSC = CicoSystemConfig::getInstance();
g_string_printf(gsfp, "%s/%s", CSCSC->getDefaultConf()->confdir.c_str(),
ICO_SYC_CONFIG_APPATTR);
GError *gerr = NULL;
ICO_TRA("start pkg(%s)", sPkg? sPkg: "(NULL)");
string category;
getCategory(sPkg, sNm, sCtg, category);
- CicoSCAilItems CSCAI(sPkg, sIco, sNm, sCtg, sTyp, sExe, category, bndsp);
+ CicoAilItems CSCAI(sPkg, sIco, sNm, sCtg, sTyp, sExe, category, bndsp);
m_ail.push_back(CSCAI);
ICO_TRA("end");
return true;
snprintf(work, sizeof(work)-1, "%s.%d",
appCtgryType == 0 ? sPkg : sNm, i);
gerr = NULL;
+
+ if (NULL != appCtgry) {
+ g_free(appCtgry);
+ appCtgry = NULL;
+ }
+
appCtgry = g_key_file_get_string(m_gconf, sectAppAttr, work, &gerr);
if (gerr != NULL) {
g_clear_error(&gerr);
}
}
}
+ if (NULL != appCtgry) {
+ g_free(appCtgry);
+ appCtgry = NULL;
+ }
g_clear_error(&gerr);
/* get category */
bool bPushBack = true;
int sz = m_aul.size();
for (int i = 0; i < sz; i++) {
- CicoSCAulItems* t = (CicoSCAulItems*) m_aul[i].p();
+ CicoAulItems* t = (CicoAulItems*) m_aul[i].p();
t->update_appid();
if (t->m_pid == pid) {
bPushBack = false; // push_back flag off
// AUL list Unregistered
ICO_DBG("push_back(AUL(%s, %d, %x))", appid, pid, obj);
int ctgry = DINITm_categoryID;
- const CicoSCAilItems* ailObj = findAIL(appid);
+ const CicoAilItems* ailObj = findAIL(appid);
if ((NULL != ailObj) && (0 != ailObj)) {
ctgry = ailObj->m_categoryID;
}
- CicoSCAulItems entryAUL(appid, pid, ctgry, aulstt, obj);
+ CicoAulItems entryAUL(appid, pid, ctgry, aulstt, obj);
m_aul.push_back(entryAUL);
if (-1 != entryAUL.m_cpucgroup) {
m_RC->entryCgroupCPU(pid, entryAUL.m_cpucgroup);
}
+ m_RC->entryApp(appid, pid);
+ }
+ ICO_TRA("end");
+}
+
+/**
+ * @brief application resource function is runnning
+ * @ret bool runnning state
+ * @retval true application resource runnning
+ * @retval true application resource stopping
+ */
+bool CicoSCLifeCycleController::isAppResource() const
+{
+ if (NULL == m_RC) {
+ return false;
+ }
+ return m_RC->isAppResource();
+}
+
+/**
+ * @brief
+ * @param anem user login name
+ */
+bool CicoSCLifeCycleController::startAppResource(const string& name)
+{
+ ICO_TRA("start");
+ if (NULL == m_RC) {
+ ICO_TRA("end");
+ return false;
+ }
+ bool bR = m_RC->startAppResource(name);
+ ICO_TRA("end %s", bR? "true": "false");
+ return bR;
+}
+
+/**
+ * @brief
+ * @param anem user login name
+ */
+void CicoSCLifeCycleController::createAppResourceFile(const string& user)
+{
+ ICO_TRA("start");
+ if (NULL == m_RC) {
+ ICO_TRA("end");
+ return;
+ }
+ if (false == m_RC->isAppResource()) {
+ ICO_TRA("end");
+ return;
+ }
+ string file;
+ m_RC->getAppResourceFilePath(user, file);
+ struct stat buff;
+ /* file check */
+ memset(&buff, 0, sizeof(buff));
+ if (0 != stat(file.c_str(), &buff)) {
+ m_RC->createAppResourceFile(file);
}
ICO_TRA("end");
}
{
ICO_TRA("start %d", pid);
bool r = false;
- vector<CicoSCAulItems>::iterator it;
+ vector<CicoAulItems>::iterator it;
for(it = m_aul.begin(); it != m_aul.end(); ++it) {
if (pid == it->m_pid) {
ICO_DBG("erase appid=%s", it->m_appid.c_str());
char appid[255];
memset(appid, 0, sizeof(appid));
int iR = Xaul_app_get_appid_bypid(pid, appid, sizeof(appid)); // pid to appid
- ICO_DBG("%d=aul_app_get_appid_bypid %d , %s", iR, pid, appid);
+ ICO_PRF("CHG_APP_STA notice app=%s, pid=%d, rval=%d", appid, pid, iR);
x->enterAUL(appid, pid, NULL, iR);
ICO_TRA("end %s %d", appid, pid);
return 0;
* @brief AUL infomaton list
* @return AUL information item list Container
*/
-const std::vector<CicoSCAulItems>& CicoSCLifeCycleController::getAulList()
+const std::vector<CicoAulItems>& CicoSCLifeCycleController::getAulList()
{
int sz = m_aul.size();
for (int i = 0; i < sz; i++) {
- CicoSCAulItems* t = (CicoSCAulItems*)m_aul[i].p();
+ CicoAulItems* t = (CicoAulItems*)m_aul[i].p();
t->update_appid();
}
return m_aul;
#include <aul/aul.h>
#include <package-manager.h>
-#include "CicoSCAilItems.h"
-#include "CicoSCAulItems.h"
+#include "CicoAilItems.h"
+#include "CicoAulItems.h"
#ifndef __CICO_SC_WINDOW_H__
class CicoSCWindow;
#endif
+#if 0
#ifndef CICOSCSYSRESOURCECONTROLLER_H
class CicoSCSysResourceController;
#endif
+#else
+#ifndef CICOSCAPPRESOURCECONTROLLER_H
+class CicoSCAppResourceController;
+#endif
+#endif
class CicoSCLifeCycleController {
public:
bool isRunning(const char* appid);
bool isRunning(const std::string& appid);
- const std::vector<CicoSCAilItems>& getAilList() const;
- const CicoSCAilItems* findAIL(const char* appid) const;
- const CicoSCAilItems* findAIL(const std::string& appid) const;
+ const std::vector<CicoAilItems>& getAilList() const;
+ const CicoAilItems* findAIL(const char* appid) const;
+ const CicoAilItems* findAIL(const std::string& appid) const;
bool isAilRenew() const;
void ailRenewFlagOff();
- const std::vector<CicoSCAulItems>& getAulList();
+ const std::vector<CicoAulItems>& getAulList();
// TODO mk_k Should I think about the multiple return values start
/*
- const CicoSCAulItems* findAUL(const char* appid) const;
- const CicoSCAulItems* findAUL(const std::string& appid) const;
+ const CicoAulItems* findAUL(const char* appid) const;
+ const CicoAulItems* findAUL(const std::string& appid) const;
*/
- const CicoSCAulItems* findAUL(int pid);
+ const CicoAulItems* findAUL(int pid);
bool getPIDs(const char* appid, std::vector<int>& pids) const;
bool getPIDs(std::string& appid, std::vector<int>& pids) const;
void enterAUL(const char* appid, int pid, const CicoSCWindow* obj = NULL,
int aulstt = AUL_R_OK);
+ bool isAppResource() const;
+ bool startAppResource(const std::string& name);
+ void createAppResourceFile(const std::string& user);
protected:
void initAIL();
friend ail_cb_ret_e CSCLCCail_list_appinfo_cbX(const ail_appinfo_h appinfo,
static CicoSCLifeCycleController* ms_myInstance;
protected:
- std::vector<CicoSCAilItems> m_ail;
- std::vector<CicoSCAulItems> m_aul;
+ std::vector<CicoAilItems> m_ail;
+ std::vector<CicoAulItems> m_aul;
GKeyFile* m_gconf;
pkgmgr_client* m_pc;
+#if 0
CicoSCSysResourceController* m_RC;
+#else
+ CicoSCAppResourceController* m_RC;
+#endif
bool m_ailRenew;
};
* @return AIL information item list Container
*/
inline
-const std::vector<CicoSCAilItems>& CicoSCLifeCycleController::getAilList() const
+const std::vector<CicoAilItems>& CicoSCLifeCycleController::getAilList() const
{
return m_ail;
}
m_rootObj = json_object_new();
m_argObj = json_object_new();
m_array = json_array_new();
+ m_data.clear();
}
//--------------------------------------------------------------------------
//--------------------------------------------------------------------------
CicoSCMessage::~CicoSCMessage()
{
- //ICO_DBG("CicoSCMessage::~CicoSCMessage Enter");
+ //ICO_TRA("CicoSCMessage::~CicoSCMessage Enter");
json_array_unref(m_array);
json_object_unref(m_rootObj);
json_object_unref(m_argObj);
json_node_free(m_root);
g_object_unref(m_generator);
- //ICO_DBG("CicoSCMessage::~CicoSCMessage Leave");
+ //ICO_TRA("CicoSCMessage::~CicoSCMessage Leave");
}
//--------------------------------------------------------------------------
json_node_take_object(m_root, m_rootObj);
json_generator_set_root(m_generator, m_root);
gsize len = 0;
- return json_generator_to_data(m_generator, &len);
+ gchar* data = json_generator_to_data(m_generator, &len);
+ m_data = data;
+ g_free(data);
+ return m_data.c_str();
}
//--------------------------------------------------------------------------
JsonObject *m_argObj; //!< json arg objects
JsonArray *m_array; //!< json array
std::string m_toAppid; //!< send to appid
+ std::string m_data; //!< json format data
};
#endif // __CICO_SC_MESSAGE_H__
// vim:set expandtab ts=4 sw=4:
#define STID_DISPLAY0_CATEGORY9 12009
#define STID_DISPLAY0_CATEGORY10 12010
#define STID_DISPLAY0_CATEGORY11 12011
+#if 1 // MK21031223 _MK_MK_
+#define STID_DISP0_ZONE2_CATEGORY 12100
+#define STID_DISP0_ZONE2_CATEGORY1 12101
+#define STID_DISP0_ZONE2_CATEGORY2 12102
+#define STID_DISP0_ZONE2_CATEGORY3 12103
+#define STID_DISP0_ZONE2_CATEGORY4 12104
+#define STID_DISP0_ZONE2_CATEGORY5 12105
+#define STID_DISP0_ZONE2_CATEGORY6 12106
+#define STID_DISP0_ZONE2_CATEGORY7 12107
+#define STID_DISP0_ZONE2_CATEGORY8 12108
+#define STID_DISP0_ZONE2_CATEGORY9 12109
+#define STID_DISP0_ZONE2_CATEGORY10 12110
+#define STID_DISP0_ZONE2_CATEGORY11 12111
+#define STID_DISP0_ZONE3_CATEGORY 12200
+#define STID_DISP0_ZONE3_CATEGORY1 12201
+#define STID_DISP0_ZONE3_CATEGORY2 12202
+#define STID_DISP0_ZONE3_CATEGORY3 12203
+#define STID_DISP0_ZONE3_CATEGORY4 12204
+#define STID_DISP0_ZONE3_CATEGORY5 12205
+#define STID_DISP0_ZONE3_CATEGORY6 12206
+#define STID_DISP0_ZONE3_CATEGORY7 12207
+#define STID_DISP0_ZONE3_CATEGORY8 12208
+#define STID_DISP0_ZONE3_CATEGORY9 12209
+#define STID_DISP0_ZONE3_CATEGORY10 12210
+#define STID_DISP0_ZONE3_CATEGORY11 12211
+#endif // MK20131223 _MK_MK_
// display1 category state id
#define STID_DISPLAY1_CATEGORY 13000
#define EVID_DISPLAY_ZONE_ACQUIRE 10000
#define EVID_DISPLAY_ZONE_RELEASE 10999
+#if 1 // MK20131223 _MK_MK_
+#define ZONEID_CENTER_FULL 1
+#define ZONEID_CENTER_UPPER 2
+#define ZONEID_CENTER_LOWER 3
+#endif // MK20131223 _MK_MK_
+
+
#define EVID_DISPLAY0_CATEGORY 12000
+#if 1 // MK20131223 _MK_MK_
+#define EVID_DISP0_ZONE2_CATEGORY 12100
+#define EVID_DISP0_ZONE3_CATEGORY 12200
+#endif // MK20131223 _MK_MK_
#define EVID_DISPLAY1_CATEGORY 13000
#define EVID_ONSCREEN 14000
//==========================================================================
#include <string>
-using namespace std;
+
+#include <Ecore.h>
#include "CicoSCPolicyManager.h"
#include "CicoStateMachine.h"
#include "CicoSCMessage.h"
#include "ico_syc_msg_cmd_def.h"
#include "ico_syc_type.h"
-#include "CicoSCCommonDef.h"
-
-//==========================================================================
-// define
-//==========================================================================
-
-// Defines of D-Bus target.
-#define DBUS_SERVICE "org.automotive.message.broker"
-#define DBUS_INTERFACE "org.freedesktop.DBus.Properties"
-#define DBUS_METHOD "Get"
-
-// Defines of maximum number.
-#define AMB_MAX_VHCLINFO 10 /**< maximum number of vehicle info */
-
-// Enumerations of Vehicle information key.
-typedef enum {
- AMB_VHCL_SPEED = 1, /**< Vehicle speed */
- AMB_SHIFT_POSITION, /**< Shift position */
- AMB_LIGHT_LEFT, /**< Light left(Turn left) */
- AMB_LIGHT_RIGHT, /**< Light right(Turn right) */
- AMB_NIGHT_MODE, /**< Night mode */
- AMB_MAX_INFO /**< Maximum number of type */
-} _amb_vhcl_key_e;
-
-//
-typedef struct _vehicle_info_property_t {
- int key; /* Vehicle Information key */
- const char *property; /* D-Bus property name */
- const char *path; /* D-Bus path name */
- const char *interface; /* D-Bus interface name */
-} vhcl_info_prop_t;
-
-// structure of Vehicle information data.
-typedef struct _vehicle_info_data {
- int key; /* Vehicle Information key */
- DBusPendingCall *pending;
- E_DBus_Signal_Handler *handler;
- int request;
- double val;
-} _vhcldata_t;
-
-_vhcldata_t vhcl_data[AMB_MAX_INFO];
-
-//*========================================================================
-// global variable
-//========================================================================
-
-static const vhcl_info_prop_t apf_vhcl_info[] = {
- {
- AMB_VHCL_SPEED,
- "VehicleSpeed",
- "/org/automotive/runningstatus/VehicleSpeed",
- "org.automotive.VehicleSpeed"
- },
- {
- AMB_SHIFT_POSITION,
- "ShiftPosition",
- "/org/automotive/runningstatus/Transmission",
- "org.automotive.Transmission"
- },
-#if 0 // use LightStatus
-/* use LightStatus, because AMB not support access of TurnSignal by D-Bus */
- {
- ICO_SYC_VEHICLEINFO_TURN_SIGNAL,
- "TurnSignal",
- "/org/automotive/runningstatus/TurnSignal",
- "org.automotive.TurnSignal"
- },
-#else // use LightStatus
- {
- AMB_LIGHT_LEFT,
- "LeftTurn",
- "/org/automotive/runningstatus/LightStatus",
- "org.automotive.LightStatus"
- },
- {
- AMB_LIGHT_RIGHT,
- "RightTurn",
- "/org/automotive/runningstatus/LightStatus",
- "org.automotive.LightStatus"
- },
-#endif // use LightStatus
- {
- AMB_NIGHT_MODE,
- "NightMode",
- "/org/automotive/custom/NightMode",
- "org.automotive.NightMode"
- },
- { 0, "\0", "\0", "\0" }
-};
+#include "CicoCommonDef.h"
+#include "CicoSCVInfoManager.h"
+#include "CicoSCVInfo.h"
//--------------------------------------------------------------------------
/**
//--------------------------------------------------------------------------
CicoSCPolicyManager::CicoSCPolicyManager(CicoSCResourceManager* resourceMgr)
: m_initialized(false),
- m_dbusConnection(NULL),
- m_ecoreTimer(NULL),
+ m_ecoreEvHandler(NULL),
m_stateMachine(NULL),
m_resourceMgr(resourceMgr)
{
int
CicoSCPolicyManager::initialize(void)
{
- ICO_DBG("CicoSCPolicyManager::initialize Enter");
+ ICO_TRA("CicoSCPolicyManager::initialize Enter");
- int ret = ICO_SYC_EOK;
- ret = initAMB();
+ int ret = initStateMachine();
if (ICO_SYC_EOK != ret) {
return ret;
}
- ret = initStateMachine();
- if (ICO_SYC_EOK != ret) {
- return ret;
- }
+ CicoSCVInfoManager* vinfomgr = CicoSCVInfoManager::getInstance();
+ m_ecoreEvHandler = ecore_event_handler_add(
+ vinfomgr->getEcoreEvType(),
+ CicoSCPolicyManager::changedVehicleInfoCB,
+ this);
+
+ vinfomgr->getVehicleInfo(ICO_VINFO_NIGHT_MODE);
+ vinfomgr->getVehicleInfo(ICO_VINFO_DRIVING_MODE);
- ICO_DBG("CicoSCPolicyManager::initialize Leave");
+ ICO_TRA("CicoSCPolicyManager::initialize Leave");
return ret;
}
void
CicoSCPolicyManager::terminate(void)
{
- int idx = 0;
-
- ICO_DBG("CicoSCPolicyManager::terminate Enter");
-
- for (idx = 0; vhcl_data[idx].key; idx++) {
- if (vhcl_data[idx].handler != NULL) {
- e_dbus_signal_handler_del(m_dbusConnection,
- vhcl_data[idx].handler);
- }
- }
-
- ICO_DBG("CicoSCPolicyManager::terminate Leave");
+ ICO_TRA("CicoSCPolicyManager::terminate Enter");
+ ICO_TRA("CicoSCPolicyManager::terminate Leave");
}
//--------------------------------------------------------------------------
/**
- * @brief initialize amb connection
+ * @brief
*/
//--------------------------------------------------------------------------
-int
-CicoSCPolicyManager::initAMB(void)
+void
+CicoSCPolicyManager::onChangedVehicleInfo(int type, void *event)
{
- ICO_DBG("CicoSCPolicyManager::initAMB Enter");
-
- int ret = 0;
- int idx;
- char signalname[64];
-
- if (true == m_initialized) {
- ICO_DBG("CicoSCPolicyManager::initAMB Leave(EOK)");
- return ICO_SYC_EOK;
- }
-
- /* Zero clear vhcl_data */
- memset(vhcl_data, 0, sizeof(vhcl_data));
-
- e_dbus_init();
-
- /* Get D-Bus connection */
- m_dbusConnection = e_dbus_bus_get(DBUS_BUS_SYSTEM);
- if (! m_dbusConnection) {
- ICO_ERR("dbus_bus_get failed.");
- ICO_ERR("CicoSCPolicyManager::initAMB Leave(EIO)");
- return ICO_SYC_EIO;
- }
-
- /* receive propertychanged request to AMB */
- for (idx = 0; apf_vhcl_info[idx].key; idx++) {
- memset(signalname, 0, sizeof(signalname));
- /* set vehicleinfo set key */
- vhcl_data[idx].key = apf_vhcl_info[idx].key;
+ ICO_TRA("CicoSCPolicyManager::onChangedVehicleInfo Enter");
- if (apf_vhcl_info[idx].path[0] == 0) {
- /* currently not support this vehicle information */
- continue;
- }
-
- strcpy(signalname, apf_vhcl_info[idx].property);
- strcat(signalname, "Changed");
- vhcl_data[idx].handler = e_dbus_signal_handler_add(m_dbusConnection,
- DBUS_SERVICE, NULL,
- apf_vhcl_info[idx].interface,
- signalname,
- AMBpropertyChanged,
- (void*)&vhcl_data[idx].key);
-
- }
-
- /* recv response from AMB timer start */
- ret = ecore_init();
- if (ret == 0) {
- ICO_ERR("ecore_init");
- ICO_ERR("CicoSCPolicyManager::initAMB Leave(ENOSYS)");
- return ICO_SYC_ENOSYS;
+ if (NULL == event) {
+ ICO_WRN("data is null");
+ return;
}
- m_ecoreTimer = ecore_timer_add(0.2, //TODO
- CicoSCPolicyManager::ecoreTimerCB, this);
- if (! m_ecoreTimer) {
- ICO_ERR("ecore_timer_add failed.");
- ICO_ERR("CicoSCPolicyManager::initAMB Leave(ENOSYS)");
- return ICO_SYC_ENOSYS;
+ if (CicoSCVInfoManager::getInstance()->getEcoreEvType() != type) {
+ ICO_WRN("unknown ecore event type(%d)", type);
+ return;
}
- m_initialized = true;
-
- ICO_DBG("CicoSCPolicyManager::initAMB Leave(EOK)");
- return ICO_SYC_EOK;
-}
-
-//--------------------------------------------------------------------------
-/**
- * @brief send AMB request
- */
-//--------------------------------------------------------------------------
-int
-CicoSCPolicyManager::sendAMBRequest(void)
-{
-#if 0
-// ICO_DBG("CicoSCPolicyManager::sendAMBRequest Enter");
-
- DBusMessage *dbus_message = NULL;
- int idx;
- int ret = ICO_SYC_EOK;
-
- for (idx = 0; apf_vhcl_info[idx].key; idx++) {
- /* set vehicle info key */
- vhcl_data[idx].key = apf_vhcl_info[idx].key;
-
- /* status is pending ? */
- if (vhcl_data[idx].pending) {
- ICO_WRN("(%s) not complete", apf_vhcl_info[idx].property);
- continue;
- }
-
- if (apf_vhcl_info[idx].path[0] == 0) {
- /* currently not support this vehicle information */
- continue;
- }
+ bool chgCamera = false;
+ bool chgRegulation = false;
+ bool chgNightMode = false;
- /* Create send message */
- dbus_message = dbus_message_new_method_call(DBUS_SERVICE,
- apf_vhcl_info[idx].path,
- DBUS_INTERFACE,
- DBUS_METHOD);
- if (! dbus_message) {
- ICO_ERR("dbus_message_new_method_call");
- ret = ICO_SYC_EIO;
- }
- /* Set parameters into message */
- else if (! dbus_message_append_args(dbus_message,
- DBUS_TYPE_STRING,
- &apf_vhcl_info[idx].interface,
- DBUS_TYPE_STRING,
- &apf_vhcl_info[idx].property,
- DBUS_TYPE_INVALID)) {
- ICO_ERR("dbus_message_append_args");
- ret = ICO_SYC_EIO;
- }
- /* Set destination */
- else if (! dbus_message_set_destination(dbus_message,
- DBUS_SERVICE)) {
- ICO_ERR("dbus_message_set_destination");
- ret = ICO_SYC_EIO;
+ CicoSCVInfo* vinfo = static_cast<CicoSCVInfo*>(event);
+ switch (vinfo->getProperty()) {
+ case ICO_VINFO_VEHICLE_SPEED:
+ ICO_DBG("ICO_VINFO_VEHICLE_SPEED : %d", vinfo->getInt32Value());
+// (void)sendSMEvent(EVID_VELOCTY, (int)vinfo->getInt32Value());
+// if (true == sendSMEvent(EVID_DRVREGULATION)) {
+// chgRegulation = true;
+// }
+ break;
+ case ICO_VINFO_SHIFT_POSITION:
+ ICO_DBG("ICO_VINFO_SHIFT_POSITION : %d", vinfo->getUint8Value());
+ (void)sendSMEvent(EVID_SHIFTPOS, (int)vinfo->getUint8Value());
+ if (true == sendSMEvent(EVID_CAMERA)) {
+ chgCamera = true;
}
- /* Send message */
- else if (! dbus_connection_send_with_reply(m_dbusConnection,
- dbus_message,
- &vhcl_data[idx].pending,
- 200)) {
- ICO_ERR("dbus_connection_send");
- vhcl_data[idx].pending = NULL;
- ret = ICO_SYC_EIO;
+ break;
+ case ICO_VINFO_LIGHT_LEFT:
+ ICO_DBG("ICO_VINFO_LIGHT_LEFT : %s",
+ vinfo->getBooleanValue() ? "true" : "false");
+ if (false == vinfo->getBooleanValue()) {
+ (void)sendSMEvent(EVID_TURN_OFF);
}
else {
- //ICO_DBG("REQUEST req (%s)", apf_vhcl_info[idx].property);
- }
-
- if (dbus_message) {
- /* Release message */
- dbus_message_unref(dbus_message);
- }
- }
-
- /* dispatch if data queue exist */
- do {
- dbus_connection_read_write_dispatch(m_dbusConnection, 0);
- } while (dbus_connection_get_dispatch_status(m_dbusConnection)
- == DBUS_DISPATCH_DATA_REMAINS);
-
- //ICO_DBG("CicoSCPolicyManager::sendAMBRequest Leave");
- return ret;
-#endif
- return 0;
-}
-
-//--------------------------------------------------------------------------
-/**
- * @brief get vehicle information
- */
-//--------------------------------------------------------------------------
-int
-CicoSCPolicyManager::getVehicleInfo(void)
-{
- #if 0
- DBusMessage *dbus_message = NULL;
- DBusMessageIter iter_head;
- DBusMessageIter iter;
- int idx;
- char type;
- int32_t i32;
- int16_t i16;
- uint32_t u32;
- uint16_t u16;
- dbus_bool_t b;
- uint8_t u8;
- double d64;
-
- /* dispatch if data queue exist */
- do {
- dbus_connection_read_write_dispatch(m_dbusConnection, 0);
- } while (dbus_connection_get_dispatch_status(m_dbusConnection)
- == DBUS_DISPATCH_DATA_REMAINS);
-
- /* analyze reply data */
- for (idx = 0; apf_vhcl_info[idx].key; idx++) {
- if (! vhcl_data[idx].pending) {
- continue;
- }
- if (! dbus_pending_call_get_completed(vhcl_data[idx].pending)) {
- //ICO_WRN("(%s) NOT complete", apf_vhcl_info[idx].property);
- continue;
+ (void)sendSMEvent(EVID_TURN_LEFT);
}
-
- dbus_message = dbus_pending_call_steal_reply(vhcl_data[idx].pending);
- if (! dbus_message) {
- //ICO_WRN("(%s) NO reply", apf_vhcl_info[idx].property);
- continue;
+ if (true == sendSMEvent(EVID_CAMERA)) {
+ chgCamera = true;
}
-
- if (dbus_message_get_type(dbus_message) == DBUS_MESSAGE_TYPE_ERROR) {
- dbus_message_unref(dbus_message);
- dbus_pending_call_cancel(vhcl_data[idx].pending);
- vhcl_data[idx].pending = NULL;
- //ICO_ERR("(%s) reply error", apf_vhcl_info[idx].property);
- continue;
+ break;
+ case ICO_VINFO_LIGHT_RIGHT:
+ ICO_DBG("ICO_VINFO_LIGHT_RIGHT: %s",
+ vinfo->getBooleanValue() ? "true" : "false");
+ if (false == vinfo->getBooleanValue()) {
+ (void)sendSMEvent(EVID_TURN_OFF);
}
-
- dbus_message_iter_init(dbus_message, &iter_head);
- dbus_message_iter_recurse(&iter_head, &iter);
-
- type = dbus_message_iter_get_arg_type(&iter);
- switch (type) {
- case DBUS_TYPE_INT32:
- dbus_message_iter_get_basic(&iter, &i32);
- vhcl_data[idx].val = (double)i32;
- break;
- case DBUS_TYPE_INT16:
- dbus_message_iter_get_basic(&iter, &i16);
- vhcl_data[idx].val = (double)i16;
- break;
- case DBUS_TYPE_UINT32:
- dbus_message_iter_get_basic(&iter, &u32);
- break;
- case DBUS_TYPE_UINT16:
- dbus_message_iter_get_basic(&iter, &u16);
- vhcl_data[idx].val = (double)u16;
- break;
- case DBUS_TYPE_BOOLEAN:
- dbus_message_iter_get_basic(&iter, &b);
- if (b) vhcl_data[idx].val = (double)1.0;
- else vhcl_data[idx].val = (double)0.0;
- break;
- case DBUS_TYPE_BYTE:
- dbus_message_iter_get_basic(&iter, &u8);
- vhcl_data[idx].val = (double)u8;
- break;
- case DBUS_TYPE_DOUBLE:
- dbus_message_iter_get_basic(&iter, &d64);
- vhcl_data[idx].val = (double)d64;
- break;
- default:
- ICO_ERR("(%s) illegal data type(0x%02x)",
- apf_vhcl_info[idx].property, ((int)type) & 0x0ff);
- break;
+ else {
+ (void)sendSMEvent(EVID_TURN_RIGHT);
}
- //ICO_DBG("REQUEST ans (%s) = %.2f",
- // apf_vhcl_info[idx].property, vhcl_data[idx].val);
-
- /* free message and pending */
- dbus_message_unref(dbus_message);
- dbus_pending_call_cancel(vhcl_data[idx].pending);
- vhcl_data[idx].pending = NULL;
- };
-
- return ICO_SYC_EOK;
-#endif
- return ICO_SYC_EOK;
-}
-
-//--------------------------------------------------------------------------
-/**
- * @brief ecore timer callback
- */
-//--------------------------------------------------------------------------
-Eina_Bool
-CicoSCPolicyManager::ecoreTimerCB(void *user_data)
-{
- CicoSCPolicyManager *policyMgr =
- static_cast<CicoSCPolicyManager*>(user_data);
- policyMgr->recvAMBVehicleInfo();
-
- return ECORE_CALLBACK_RENEW;
-}
-//--------------------------------------------------------------------------
-/**
- * @brief receive AMB vehicle information
- */
-//--------------------------------------------------------------------------
-void
-CicoSCPolicyManager::AMBpropertyChanged(void *data, DBusMessage *msg)
-{
- DBusMessageIter iter, variant;
- int idx;
- char type;
- int32_t i32;
- int16_t i16;
- uint32_t u32;
- uint16_t u16;
- dbus_bool_t b;
- uint8_t u8;
- double d64;
-
- int key;
- key = *((int *)data);
-
- if (!msg || !dbus_message_iter_init(msg, &iter)) {
- ICO_ERR("received illegal message.");
- return;
- }
-
- for (idx = 0; vhcl_data[idx].key; idx++) {
- if (vhcl_data[idx].key == key) {
- break;
+ if (true == sendSMEvent(EVID_CAMERA)) {
+ chgCamera = true;
}
- }
- if (idx == AMB_MAX_INFO) {
- return;
- }
-
- dbus_message_iter_recurse(&iter, &variant);
- type = dbus_message_iter_get_arg_type(&variant);
- switch (type) {
- case DBUS_TYPE_INT32:
- dbus_message_iter_get_basic(&variant, &i32);
- vhcl_data[idx].val = (double)i32;
- break;
- case DBUS_TYPE_INT16:
- dbus_message_iter_get_basic(&variant, &i16);
- vhcl_data[idx].val = (double)i16;
- break;
- case DBUS_TYPE_UINT32:
- dbus_message_iter_get_basic(&variant, &u32);
- break;
- case DBUS_TYPE_UINT16:
- dbus_message_iter_get_basic(&variant, &u16);
- vhcl_data[idx].val = (double)u16;
break;
- case DBUS_TYPE_BOOLEAN:
- dbus_message_iter_get_basic(&variant, &b);
- if (b) vhcl_data[idx].val = (double)1.0;
- else vhcl_data[idx].val = (double)0.0;
+ case ICO_VINFO_NIGHT_MODE:
+ ICO_DBG("ICO_VINFO_NIGHT_MODE : %d", vinfo->getUint32Value());
+ chgNightMode = sendSMEvent(EVID_NIGHTMODE, (int)vinfo->getUint32Value());
break;
- case DBUS_TYPE_BYTE:
- dbus_message_iter_get_basic(&variant, &u8);
- vhcl_data[idx].val = (double)u8;
- break;
- case DBUS_TYPE_DOUBLE:
- dbus_message_iter_get_basic(&variant, &d64);
- vhcl_data[idx].val = (double)d64;
+ case ICO_VINFO_DRIVING_MODE:
+ ICO_DBG("ICO_VINFO_DRIVING_MODE : %d", vinfo->getUint32Value());
+ chgRegulation = sendSMEvent(EVID_DRVREGULATION, (int)vinfo->getUint32Value());
break;
default:
- ICO_ERR("(%s) illegal data type(0x%02x)",
- apf_vhcl_info[idx].property, ((int)type) & 0x0ff);
+ ICO_WRN("not such key (%d)", vinfo->getProperty());
break;
}
-}
-
-//--------------------------------------------------------------------------
-/**
- * @brief receive AMB vehicle information
- */
-//--------------------------------------------------------------------------
-void
-CicoSCPolicyManager::recvAMBVehicleInfo(void)
-{
-// ICO_DBG("CicoSCPolicyManager::recvAMBVehicleInfo Enter");
-
- int idx = 0;
- int key = 0;
- bool chgCamera = false;
- bool chgRegulation = false;
- bool chgNightMode = false;
-
- //getVehicleInfo();
-
- /* get vehicle info values */
- for (idx = 0; idx < AMB_MAX_VHCLINFO; idx++) {
- if (vhcl_data[idx].key == 0) break;
- key = vhcl_data[idx].key;
- switch (key) {
- case AMB_VHCL_SPEED:
- (void)sendSMEvent(EVID_VELOCTY, (int)vhcl_data[idx].val);
- if (true == sendSMEvent(EVID_DRVREGULATION)) {
- chgRegulation = true;
- }
- break;
- case AMB_SHIFT_POSITION:
- (void)sendSMEvent(EVID_SHIFTPOS, (int)vhcl_data[idx].val);
- if (true == sendSMEvent(EVID_CAMERA)) {
- chgCamera = true;
- }
- break;
- case AMB_LIGHT_LEFT:
- if (0.0 == vhcl_data[idx].val) {
- (void)sendSMEvent(EVID_TURN_OFF);
- }
- else {
- (void)sendSMEvent(EVID_TURN_LEFT);
- }
- if (true == sendSMEvent(EVID_CAMERA)) {
- chgCamera = true;
- }
- break;
- case AMB_LIGHT_RIGHT:
- if (0.0 == vhcl_data[idx].val) {
- (void)sendSMEvent(EVID_TURN_OFF);
- }
- else {
- (void)sendSMEvent(EVID_TURN_LEFT);
- }
- if (true == sendSMEvent(EVID_CAMERA)) {
- chgCamera = true;
- }
- break;
- case AMB_NIGHT_MODE:
- chgNightMode = sendSMEvent(EVID_NIGHTMODE, (int)vhcl_data[idx].val);
- break;
- default:
- ICO_WRN("not such key (%d)", key);
- break;
- }
- }
if (true == chgRegulation) {
ICO_DBG("true == chgRegulation");
}
CicoSCServer::getInstance()->sendMessageToHomeScreen(message);
}
-
- /* send request to AMB */
- //sendAMBRequest();
-// ICO_DBG("CicoSCPolicyManager::recvAMBVehicleInfo Leave");
+ ICO_TRA("CicoSCPolicyManager::onChangedVehicleInfo Leave");
+}
+
+//--------------------------------------------------------------------------
+/**
+ * @brief
+ */
+//--------------------------------------------------------------------------
+Eina_Bool
+CicoSCPolicyManager::changedVehicleInfoCB(void *data, int type, void *event)
+{
+ static_cast<CicoSCPolicyManager*>(data)->onChangedVehicleInfo(type, event);
+ return EINA_TRUE;
}
//--------------------------------------------------------------------------
int
CicoSCPolicyManager::initStateMachine(void)
{
- ICO_DBG("CicoSCPolicyManager::initStateMachine Enter");
+ ICO_TRA("CicoSCPolicyManager::initStateMachine Enter");
CicoStateMachineCreator creator;
int ret = m_stateMachine->start();
if (ret == 0) {
ICO_ERR("CicoStateMachine::start failed.");
+ ICO_TRA("CicoSCPolicyManager::initStateMachine Leave(ENOSYS)");
return ICO_SYC_ENOSYS;
}
m_inputStates.push_back(m_policyStates[STID_INPUT1_USING]);
m_inputStates.push_back(m_policyStates[STID_INPUT2_USING]);
- ICO_DBG("CicoSCPolicyManager::initStateMachine Leave");
+ ICO_TRA("CicoSCPolicyManager::initStateMachine Leave(EOK)");
return ICO_SYC_EOK;
}
bool
CicoSCPolicyManager::acquireDisplayResource(int type, int zoneid, int priority)
{
- ICO_DBG("CicoSCPolicyManager::acquireDisplayResource Enter"
+ ICO_TRA("CicoSCPolicyManager::acquireDisplayResource Enter"
"(type=0x%08X zoneid=%d priority=%d)", type, zoneid, priority);
bool chg = false;
if (RESID_TYPE_BASIC == type) {
+#if 1 // MK20131223 _MK_MK_
+ unsigned short category_ev = EVID_DISPLAY0_CATEGORY;
+ if (ZONEID_CENTER_UPPER == zoneid) {
+ category_ev = EVID_DISP0_ZONE2_CATEGORY;
+
+ }
+ else if (ZONEID_CENTER_LOWER == zoneid) {
+ category_ev = EVID_DISP0_ZONE3_CATEGORY;
+ }
+
+ bool zoneChg = testSMEvent(EVID_DISPLAY_ZONE_ACQUIRE, zoneid);
+ bool cateChg = testSMEvent(category_ev, priority);
+ ICO_DBG("zoneChg=%d cateChg=%d", zoneChg, cateChg);
+ if ((true == zoneChg) && (true == cateChg)) {
+ sendSMEvent(EVID_DISPLAY_ZONE_ACQUIRE, zoneid);
+ sendSMEvent(category_ev, priority);
+ chg = true;
+ }
+#else // MK20131223 _MK_MK_
bool zoneChg = testSMEvent(EVID_DISPLAY_ZONE_ACQUIRE, zoneid);
bool cateChg = testSMEvent(EVID_DISPLAY0_CATEGORY, priority);
ICO_DBG("zoneChg=%d cateChg=%d", zoneChg, cateChg);
sendSMEvent(EVID_DISPLAY0_CATEGORY, priority);
chg = true;
}
+#endif // MK20131223 _MK_MK_
#if 0 //-- { debug dump
else {
std::map<int, const CicoState*>::iterator itr;
else if (RESID_TYPE_ONSCREEN == type) {
chg = sendSMEvent(EVID_ONSCREEN, priority);
}
- ICO_DBG("CicoSCPolicyManager::acquireDisplayResource Leave(%s)",
+ ICO_TRA("CicoSCPolicyManager::acquireDisplayResource Leave(%s)",
chg ? "true" : "false");
return chg;
}
bool
CicoSCPolicyManager::acquireSoundResource(int type, int zoneid, int priority)
{
- ICO_DBG("CicoSCPolicyManager::acquireSoundResource Enter"
+ ICO_TRA("CicoSCPolicyManager::acquireSoundResource Enter"
"(type=0x%08X zoneid=%d priority=%d)", type, zoneid, priority);
bool chg = false;
}
}
- ICO_DBG("CicoSCPolicyManager::acquireSoundResource Leave(%s)",
+ ICO_TRA("CicoSCPolicyManager::acquireSoundResource Leave(%s)",
chg ? "true" : "false");
return chg;
}
bool
CicoSCPolicyManager::releaseSoundResource(int type, int zoneid)
{
- ICO_DBG("CicoSCPolicyManager::acquireSoundResource Enter"
+ ICO_TRA("CicoSCPolicyManager::acquireSoundResource Enter"
"(type=%d zoneid=%d)", type, zoneid);
bool chg = false;
}
}
- ICO_DBG("CicoSCPolicyManager::acquireSoundResource Leave(%s)",
+ ICO_TRA("CicoSCPolicyManager::acquireSoundResource Leave(%s)",
chg ? "true" : "false");
return true;
bool
CicoSCPolicyManager::acquireInputResource(int input, int priority)
{
- ICO_DBG("CicoSCPolicyManager::acquireInputResource Enter"
- "input=%d priority=%d", input, priority);
+ ICO_TRA("CicoSCPolicyManager::acquireInputResource Enter"
+ "(input=%d priority=%d)", input, priority);
bool chg = false;
if (1 == input) {
- chg = sendSMEvent(EVID_INPUT1_ACQUIRE, input);
+ chg = testSMEvent(EVID_INPUT1_ACQUIRE, input);
+ if (true == chg) {
+ sendSMEvent(EVID_INPUT1_ACQUIRE, input);
+ }
}
else if (2 == input) {
- chg = sendSMEvent(EVID_INPUT2_ACQUIRE, input);
+ chg = testSMEvent(EVID_INPUT2_ACQUIRE, input);
+ if (true == chg) {
+ sendSMEvent(EVID_INPUT2_ACQUIRE, input);
+ }
}
- ICO_DBG("CicoSCPolicyManager::acquireInputResource Leave(%s)",
+ ICO_TRA("CicoSCPolicyManager::acquireInputResource Leave(%s)",
chg ? "true" : "false");
return chg;
}
*/
//--------------------------------------------------------------------------
void
-CicoSCPolicyManager::notifyConnected(const string & appid)
+CicoSCPolicyManager::notifyConnected(const std::string & appid)
{
// Notify regulation changed state
CicoSCMessage *message = new CicoSCMessage();
void notifyChangedState(int state);
- void recvAMBVehicleInfo(void);
-
// get states
const std::map<int, const CicoState*>& getPolicyStates(void);
// notify connected process
void notifyConnected(const std::string & appid);
- static void AMBpropertyChanged(void *data, DBusMessage *msg);
-
private:
// default constructor
CicoSCPolicyManager();
// copy constructor
CicoSCPolicyManager(const CicoSCPolicyManager &object);
- // initialize amb connection
- int initAMB(void);
-
- // send request to amb
- int sendAMBRequest(void);
-
- // get vehicle information
- int getVehicleInfo(void);
-
- // timer callback function for ecore
- static Eina_Bool ecoreTimerCB(void *user_data);
-
// initialize state machine
int initStateMachine(void);
+ // callback function for changed vehicle informantion
+ void onChangedVehicleInfo(int type, void *event);
+
private:
- bool m_initialized;
- E_DBus_Connection *m_dbusConnection;
- Ecore_Timer *m_ecoreTimer;
+ // callback function for changed vehicle informantion
+ static Eina_Bool changedVehicleInfoCB(void *data, int type, void *event);
+private:
+ // initialized flag
+ bool m_initialized;
+
+ // ecore event handler
+ Ecore_Event_Handler* m_ecoreEvHandler;
+
+ // CicoStateMachine instance
CicoStateMachine *m_stateMachine;
+
+ // CicoSCResourceManager instance
CicoSCResourceManager *m_resourceMgr;
+ // state list
std::map<int, const CicoState*> m_policyStates;
+
+ // display zone state list
std::map<int, const CicoState*> m_dispZoneStates;
+
+ // sound zone state list
std::vector<const CicoState*> m_soundZoneStates;
+
+ // input state list
std::vector<const CicoState*> m_inputStates;
};
#endif // __CICO_SC_POLICY_MANAGER_H__
#include "ico_syc_mrp_resource_private.h"
#include "ico_syc_msg_cmd_def.h"
-#include "CicoSCSystemConfig.h"
-#include "CicoSCConf.h"
+#include "CicoSystemConfig.h"
+#include "CicoConf.h"
#include "CicoSCCommand.h"
#include "CicoSCPolicyManager.h"
#include "CicoSCLifeCycleController.h"
-#include "CicoSCAilItems.h"
+#include "CicoAilItems.h"
#include "CicoSCWindowController.h"
#include "CicoSCInputController.h"
#include "CicoSCPolicyDef.h"
{
m_policyMgr = new CicoSCPolicyManager(this);
- CicoSCSystemConfig *sysConf = CicoSCSystemConfig::getInstance();
+ CicoSystemConfig *sysConf = CicoSystemConfig::getInstance();
list<resource_request_t*> l;
{
int
CicoSCResourceManager::initialize(void)
{
- ICO_DBG("CicoSCResourceManager::initialize Enter");
+ ICO_TRA("CicoSCResourceManager::initialize Enter");
int ret = ICO_SYC_EOK;
ret = ico_syc_mrp_init(enforceSound, this);
if (ICO_SYC_EOK != ret) {
+ ICO_TRA("CicoSCResourceManager::initialize Leave");
return ret;
}
ret = m_policyMgr->initialize();
if (ICO_SYC_EOK != ret) {
+ ICO_TRA("CicoSCResourceManager::initialize Leave");
return ret;
}
- ICO_DBG("CicoSCResourceManager::initialize Leave");
+ ICO_TRA("CicoSCResourceManager::initialize Leave");
return ret;
}
void
CicoSCResourceManager::terminate(void)
{
- ICO_DBG("CicoSCResourceManager::terminate Enter");
+ ICO_TRA("CicoSCResourceManager::terminate Enter");
m_policyMgr->terminate();
- ICO_DBG("CicoSCResourceManager::terminate Leave");
+ ico_syc_mrp_term();
+ ICO_TRA("CicoSCResourceManager::terminate Leave");
}
void
CicoSCResourceManager::handleCommand(const CicoSCCommand &cmd,
bool internal)
{
- ICO_DBG("CicoSCResourceManager::handleCommand Enter"
+ ICO_TRA("CicoSCResourceManager::handleCommand Enter"
"(cmdid=0x%08X internal=%s)",
cmd.cmdid, internal ? "true" : "false");
ICO_WRN("Unknown command");
}
- ICO_DBG("CicoSCResourceManager::handleCommand Leave");
+ ICO_TRA("CicoSCResourceManager::handleCommand Leave");
}
void
resource_request_t *
CicoSCResourceManager::popDispResReq(resource_request_t *req)
{
- ICO_DBG("CicoSCResourceManager::popDispResReq Enter");
+ ICO_TRA("CicoSCResourceManager::popDispResReq Enter");
map<int, list<resource_request_t*> >::iterator itr;
itr = m_dispReqQueue.begin();
ICO_DBG("Dequeue waiting display request queue zone=%d req=0x%08x",
itr->first, *itr2);
m_dispReqQueue[req->dispzoneid].erase(itr2);
- ICO_DBG("CicoSCResourceManager::popDispResReq Leave"
+ ICO_TRA("CicoSCResourceManager::popDispResReq Leave"
"(0x%08x)", *itr2);
return *itr2;
}
}
- ICO_DBG("CicoSCResourceManager::popDispResReq Leave(NULL)");
+ ICO_TRA("CicoSCResourceManager::popDispResReq Leave(NULL)");
return NULL;
}
#endif
resource_request_t *
CicoSCResourceManager::popSoundResReq(resource_request_t *req)
{
- ICO_DBG("CicoSCResourceManager::popSoundResReq Enter");
+ ICO_TRA("CicoSCResourceManager::popSoundResReq Enter");
map<int, list<resource_request_t*> >::iterator itr;
itr = m_soundReqQueue.begin();
list<resource_request_t*>::iterator itr2;
itr2 = find_if(itr->second.begin(), itr->second.end(), comp);
if (itr->second.end() != itr2) {
- ICO_DBG("Dequeue waiting sound request queue zone=%d req=0x%08x",
- itr->first, *itr2);
+ ICO_DBG("Dequeue waiting sound request queue"
+ "(req=0x%08x zone:%02d:%s appid=%s)",
+ *itr2, itr->first, (*itr2)->soundzone, (*itr2)->appid);
m_soundReqQueue[req->soundzoneid].erase(itr2);
- ICO_DBG("CicoSCResourceManager::popSoundResReq Leave"
+ ICO_TRA("CicoSCResourceManager::popSoundResReq Leave"
"(0x%08x)", *itr2);
return *itr2;
}
}
- ICO_DBG("CicoSCResourceManager::popSoundResReq Leave(NULL)");
+ ICO_TRA("CicoSCResourceManager::popSoundResReq Leave(NULL)");
return NULL;
}
resource_request_t *
CicoSCResourceManager::popInputResReq(resource_request_t *req)
{
- ICO_DBG("CicoSCResourceManager::popInputResReq Enter");
+ ICO_TRA("CicoSCResourceManager::popInputResReq Enter");
map<int, list<resource_request_t*> >::iterator itr;
itr = m_inputReqQueue.begin();
list<resource_request_t*>::iterator itr2;
itr2 = find_if(itr->second.begin(), itr->second.end(), comp);
if (itr->second.end() != itr2) {
- ICO_DBG("Dequeue waiting input request queue input=%d req=0x%08x",
- itr->first, *itr2);
+ ICO_DBG("Dequeue waiting input request queue"
+ "(req=0x%08x input:%d appid=%s)",
+ *itr2, (*itr2)->input, (*itr2)->appid);
m_inputReqQueue[req->input].erase(itr2);
- ICO_DBG("CicoSCResourceManager::popInputResReq Leave"
+ ICO_TRA("CicoSCResourceManager::popInputResReq Leave"
"(0x%08x)", *itr2);
return *itr2;
}
}
- ICO_DBG("CicoSCResourceManager::popDispResReq Leave(NULL)");
+ ICO_TRA("CicoSCResourceManager::popDispResReq Leave(NULL)");
return NULL;
}
CicoSCResourceManager::acquireDisplayResource(resource_request_t *newreq,
bool control)
{
- ICO_DBG("CicoSCResourceManager::acquireDisplayResource Enter");
+ ICO_TRA("CicoSCResourceManager::acquireDisplayResource Enter");
- CicoSCSystemConfig *sysConf = CicoSCSystemConfig::getInstance();
+ CicoSystemConfig *sysConf = CicoSystemConfig::getInstance();
const CicoSCAppKindConf *appKindConf = NULL;
appKindConf = sysConf->findAppKindConfbyId(newreq->appkind);
if (NULL == appKindConf) {
ICO_ERR("not found CicoSCAppKindConf instance");
- ICO_DBG("CicoSCResourceManager::acquireDisplayResource Leave(false)");
+ ICO_TRA("CicoSCResourceManager::acquireDisplayResource Leave(false)");
return false;
}
delResourceRequest(newreq);
ICO_DBG("kind of system application");
- ICO_DBG("CicoSCResourceManager::acquireDisplayResource Leave(true)");
+ ICO_TRA("CicoSCResourceManager::acquireDisplayResource Leave(true)");
return true;
}
req->dispzoneid = newreq->dispzoneid;
if (NULL != req->dispzone) free(req->dispzone);
req->dispzone = strdup(newreq->dispzone);
+ req->layerid = newreq->layerid;
if (NULL != req->animation) free(req->animation);
req->animation = strdup(newreq->animation);
req->animationTime = newreq->animationTime;
}
if (false == control) {
- ICO_DBG("Enqueue waiting display resource request"
+ ICO_TRA("Enqueue waiting display resource request"
"(req=0x%08x appid=%s)", req, req->appid);
m_waitingDispResReq.push_front(req);
#if 1 //DEBUG
else {
if (-1 != chgzone) {
// move request window
- m_winCtrl->setGeometry(req->surfaceid, req->dispzone,
+ m_winCtrl->setGeometry(req->surfaceid, req->dispzone, req->layerid,
req->animation, req->animationTime,
req->animation, req->animationTime);
}
#endif //DEBUG
}
- ICO_DBG("CicoSCResourceManager::acquireDisplayResource Leave");
+ ICO_TRA("CicoSCResourceManager::acquireDisplayResource Leave");
return true;
}
void
CicoSCResourceManager::releaseDisplayResource(resource_request_t *newreq)
{
- ICO_DBG("CicoSCResourceManager::releaseDisplayResource Enter"
+ ICO_TRA("CicoSCResourceManager::releaseDisplayResource Enter"
"(newreq=0x%08x)", newreq);
// if exist in wating request list, pop request
if (NULL != req) {
delResourceRequest(req);
delResourceRequest(newreq);
- ICO_DBG("CicoSCResourceManager::releaseDisplayResource Leave");
+ ICO_TRA("CicoSCResourceManager::releaseDisplayResource Leave");
return;
}
}
}
- ICO_DBG("CicoSCResourceManager::releaseDisplayResource Leave");
+ ICO_TRA("CicoSCResourceManager::releaseDisplayResource Leave");
}
bool
CicoSCResourceManager::acquireSoundResource(resource_request_t *newreq)
{
- ICO_DBG("CicoSCResourceManager::acquireSoundResource Enter");
+ ICO_TRA("CicoSCResourceManager::acquireSoundResource Enter");
- CicoSCSystemConfig *sysConf = CicoSCSystemConfig::getInstance();
+ CicoSystemConfig *sysConf = CicoSystemConfig::getInstance();
const CicoSCAppKindConf *appKindConf = NULL;
appKindConf = sysConf->findAppKindConfbyId(newreq->appkind);
if (NULL == appKindConf) {
ICO_ERR("not found CicoSCAppKindConf instance");
- ICO_DBG("CicoSCResourceManager::acquireSoundResource Leave(false)");
+ ICO_TRA("CicoSCResourceManager::acquireSoundResource Leave(false)");
return false;
}
delResourceRequest(newreq);
ICO_DBG("kind of system application");
- ICO_DBG("CicoSCResourceManager::acquireSoundResource Leave(true)");
+ ICO_TRA("CicoSCResourceManager::acquireSoundResource Leave(true)");
return true;
}
if (true == comp(m_curSoundResReq[req->soundzoneid])) {
ICO_DBG("already acquired appid=%s pid=%d soundid=0x%08X",
req->appid, req->pid, req->soundid);
- ICO_DBG("CicoSCResourceManager::acquireSoundResource Leave(true)");
+ ICO_TRA("CicoSCResourceManager::acquireSoundResource Leave(true)");
// free new request
delResourceRequest(newreq);
return true;
updateSoundResource(req);
}
else {
- ICO_DBG("Enqueue waiting sound request queue zone=%d req=0x%08x",
- req->soundzoneid, req);
+ ICO_DBG("Enqueue waiting sound request queue"
+ "(req=0x%08x zone:%02d:%s appid=%s)",
+ req, req->soundzoneid, req->soundzone, req->appid);
m_soundReqQueue[req->soundzoneid].push_front(req);
}
- ICO_DBG("CicoSCResourceManager::acquireSoundResource Leave");
+ ICO_TRA("CicoSCResourceManager::acquireSoundResource Leave");
return true;
}
void
CicoSCResourceManager::releaseSoundResource(resource_request_t *newreq)
{
- ICO_DBG("CicoSCResourceManager::releaseSoundResource Enter");
+ ICO_TRA("CicoSCResourceManager::releaseSoundResource Enter");
bool curchg = false;
CompSoundResourceRequest comp(newreq);
}
if (true == comp(m_curSoundResReq[i])) {
+ ICO_DBG("Dequeue current sound resource ower request"
+ "(req=0x%08x zoneid=%02d:%s appid=%s)",
+ m_curSoundResReq[i], m_curSoundResReq[i]->dispzoneid,
+ m_curSoundResReq[i]->dispzone,
+ m_curSoundResReq[i]->appid);
+ ICO_PRF("CHG_GUI_RES sound deprived zone=%02d:%s appid=%s",
+ m_curSoundResReq[i]->dispzoneid,
+ m_curSoundResReq[i]->dispzone,
+ m_curSoundResReq[i]->appid);
ico_syc_mrp_release_sound_resource(m_curSoundResReq[i]);
delResourceRequest(newreq);
delResourceRequest(m_curSoundResReq[i]);
req = NULL;
}
delResourceRequest(newreq);
- ICO_DBG("CicoSCResourceManager::releaseSoundResource Leave");
+ ICO_TRA("CicoSCResourceManager::releaseSoundResource Leave");
return;
}
if (true == active) {
resource_request_t* req = *itr2;
ICO_DBG("Dequeue waiting sound request queue "
- "zone=%d req=0x%08x", itr->first, *itr2);
+ "(req=0x%08x zone:%02d:%s appid=%s)",
+ *itr2, itr->first, (*itr2)->soundzone, (*itr2)->appid);
itr->second.erase(itr2);
updateSoundResource(req);
break;
}
}
- ICO_DBG("CicoSCResourceManager::releaseSoundResource Leave");
+ ICO_TRA("CicoSCResourceManager::releaseSoundResource Leave");
}
bool
CicoSCResourceManager::acquireInputResource(resource_request_t *newreq)
{
- ICO_DBG("CicoSCResourceManager::acquireInputResource Enter");
+ ICO_TRA("CicoSCResourceManager::acquireInputResource Enter");
resource_request_t *req = popInputResReq(newreq);
if (NULL == req) {
if (true == comp(m_curInputResReq[req->input])) {
ICO_DBG("already acquired appid=%s pid=%d input=0x%08X",
req->appid, req->pid, req->input);
- ICO_DBG("CicoSCResourceManager::acquireInputResource Leave(true)");
+ ICO_TRA("CicoSCResourceManager::acquireInputResource Leave(true)");
// free new request
delResourceRequest(newreq);
return true;
updateInputResource(req);
}
else {
- ICO_DBG("Enqueue waiting input request queue input=%d req=0x%08x",
- req->input, req);
+ ICO_DBG("Enqueue waiting input request queue"
+ "(req=0x%08x input:%d appid=%s)", req, req->input, req->appid);
m_inputReqQueue[req->input].push_front(req);
}
- ICO_DBG("CicoSCResourceManager::acquireInputResource Leave");
+ ICO_TRA("CicoSCResourceManager::acquireInputResource Leave(true)");
return true;
}
void
CicoSCResourceManager::releaseInputResource(resource_request_t *newreq)
{
+ ICO_TRA("CicoSCResourceManager::releaseInputResource Enter");
bool curchg = false;
CompInputResourceRequest comp(newreq);
for (int i = 0; i < (int)m_curInputResReq.size(); ++i) {
m_curInputResReq[i]->device,
m_curInputResReq[i]->input);
}
+ ICO_DBG("Dequeue current input resource ower request"
+ "(req=0x%08x input=%d appid=%s)",
+ m_curInputResReq[i], m_curInputResReq[i]->input,
+ m_curInputResReq[i]->appid);
+ ICO_PRF("CHG_GUI_RES input deprived input=%d appid=%s",
+ m_curInputResReq[i]->input, m_curInputResReq[i]->appid);
delResourceRequest(newreq);
delResourceRequest(m_curInputResReq[i]);
m_curInputResReq[i] = NULL;
req = NULL;
}
delResourceRequest(newreq);
- ICO_DBG("CicoSCResourceManager::releaseInputResource Leave");
+ ICO_TRA("CicoSCResourceManager::releaseInputResource Leave");
return;
}
if (true == active) {
resource_request_t* req = *itr2;
ICO_DBG("Dequeue waiting input request queue "
- "input=%d req=0x%08x", itr->first, *itr2);
+ "(req=0x%08x input:%d appid=%s)",
+ *itr2, (*itr2)->input, (*itr2)->appid);
itr->second.erase(itr2);
updateInputResource(req);
break;
}
}
}
+ ICO_TRA("CicoSCResourceManager::releaseInputResource Leave");
}
resource_request_t *
int reqtype,
const CicoSCCommand &cmd)
{
- ICO_DBG("CicoSCResourceManager::newResourceRequest Enter");
+ ICO_TRA("CicoSCResourceManager::newResourceRequest Enter");
resource_request_t *req = NULL;
req = (resource_request_t*)calloc(1, sizeof(resource_request_t));
CicoSCCmdResCtrlOpt *opt = (CicoSCCmdResCtrlOpt*)cmd.opt;
- CicoSCSystemConfig *systemConfig = CicoSCSystemConfig::getInstance();
+ CicoSystemConfig *systemConfig = CicoSystemConfig::getInstance();
req->reqtype = reqtype;
CicoSCLifeCycleController *lifeCycle =
CicoSCLifeCycleController::getInstance();
- const CicoSCAilItems* ailItem = lifeCycle->findAIL(cmd.appid);
+ const CicoAilItems* ailItem = lifeCycle->findAIL(cmd.appid);
if (NULL != ailItem) {
req->category = ailItem->m_categoryID;
req->appkind = ailItem->m_kindID;
if (resid == RESID_KIND_DISPLAY) {
req->dispzone = strdup(opt->dispzone.c_str());
req->dispzoneid = systemConfig->getDizplayZoneIdbyFullName(req->dispzone);
+ req->layerid = opt->layerid;
req->winname = strdup(opt->winname.c_str());
req->surfaceid = opt->surfaceid;
req->id = opt->surfaceid;;
req->id = opt->input;
}
- ICO_DBG("CicoSCResourceManager::newResourceRequest Leave"
+ ICO_TRA("CicoSCResourceManager::newResourceRequest Leave"
"(req=0x%08x appid=%s)", req, req->appid);
return req;
}
resource_request_t *req,
void *user_data)
{
- ICO_DBG("CicoSCResourceManager::enforceSound Enter");
+ ICO_TRA("CicoSCResourceManager::enforceSound Enter");
/* NOP */
- ICO_DBG("CicoSCResourceManager::enforceSound Leave");
+ ICO_TRA("CicoSCResourceManager::enforceSound Leave");
}
// receive changed state
void
CicoSCResourceManager::receiveChangedState(int state)
{
- ICO_DBG("CicoSCResourceManager::receiveChangedState Enter"
+ ICO_TRA("CicoSCResourceManager::receiveChangedState Enter"
"(state=%d)", state);
if (STID_DRVREGULATION_ON == state) {
updateInputResourceRegulation(state);
}
- ICO_DBG("CicoSCResourceManager::receiveChangedState Leave");
+ ICO_TRA("CicoSCResourceManager::receiveChangedState Leave");
}
//--------------------------------------------------------------------------
CicoSCResourceManager::updateDisplayResource(resource_request_t *req,
int chgzoneid)
{
- ICO_DBG("CicoSCResourceManager::updateDisplayResource Enter"
+ ICO_TRA("CicoSCResourceManager::updateDisplayResource Enter"
"(req=0x%08x)", req);
std::map<unsigned int, resource_request_t*>::iterator itr;
// show request window
m_winCtrl->show(req->surfaceid, req->animation, req->animationTime);
m_winCtrl->activeCB(NULL, NULL, req->surfaceid, -1);
+ ICO_TRA("CicoSCResourceManager::updateDisplayResource Leave");
return;
}
resource_request_t *popreq = popCurDispResOwerReq(itr->second);
popreq->state = RES_STATE_WAITING;
// enqueue request
ICO_DBG("Enqueue waiting display resource request"
- "(req=0x%08x appid=%s", popreq, popreq->appid);
+ "(req=0x%08x zone=%02d:%s appid=%s",
+ popreq, popreq->dispzoneid,
+ popreq->dispzone, popreq->appid);
m_waitingDispResReq.push_front(popreq);
#if 1 //DEBUG
dumpWaitingDispResReq();
}
ICO_DBG("Dequeue current display resource ower request"
- "(req=0x%08x zoneid=%d appid=%s)",
- tmpreq, tmpreq->dispzoneid, tmpreq->appid);
+ "(req=0x%08x zoneid=%02d:%s appid=%s)",
+ tmpreq, tmpreq->dispzoneid, tmpreq->dispzone, tmpreq->appid);
+ ICO_PRF("CHG_GUI_RES display deprived zone=%02d:%s appid=%s",
+ tmpreq->dispzoneid, tmpreq->dispzone, tmpreq->appid);
itr2->second = NULL;
// hide current window
m_winCtrl->hide(tmpreq->surfaceid, NULL, 0);
ICO_DBG("Enqueue waiting display resource request"
- "(req=0x%08x appid=%s", tmpreq, tmpreq->appid);
+ "(req=0x%08x zone=%02d:%s appid=%s",
+ tmpreq, tmpreq->dispzoneid, tmpreq->dispzone, tmpreq->appid);
m_waitingDispResReq.push_front(tmpreq);
}
if (NULL != m_winCtrl) {
+ int ret = ICO_SYC_EOK;
if (-1 != chgzoneid) {
// move request window
- m_winCtrl->setGeometry(req->surfaceid, req->dispzone,
- req->animation, req->animationTime,
- req->animation, req->animationTime);
+ ret = m_winCtrl->setGeometry(req->surfaceid, req->dispzone,
+ req->layerid,
+ req->animation, req->animationTime,
+ req->animation, req->animationTime);
+ if (ICO_SYC_EOK != ret) {
+ return;
+ }
}
+
// show request window
m_winCtrl->show(req->surfaceid, req->animation, req->animationTime);
}
req->state = RES_STATE_ACQUIRED;
// update current zone request
ICO_DBG("Enqueue current display resource ower request"
- "(req=0x%08x zoneid=%d appid=%s)",
- req, req->dispzoneid, req->appid);
+ "(req=0x%08x zoneid=%02d:%s appid=%s)",
+ req, req->dispzoneid, req->dispzone, req->appid);
+ ICO_PRF("CHG_GUI_RES display acquired zone=%02d:%s appid=%s",
+ req->dispzoneid, req->dispzone, req->appid);
m_curDispResOwerReq[req->dispzoneid] = req;
#if 1 //DEBUG
dumpCurDispResOwerReq();
if (true == active) {
resource_request_t* req = *itr;
ICO_DBG("Dequeue waiting display resource request"
- "(req=0x%08x appid=%s)", *itr, (*itr)->appid);
+ "(req=0x%08x zone=%02d:%s appid=%s)",
+ *itr, (*itr)->dispzoneid,
+ (*itr)->dispzone, (*itr)->appid);
m_waitingDispResReq.erase(itr);
#if 1 //DEBUG
dumpWaitingDispResReq();
#endif //DEBUG
updateDisplayResource(req);
+#if 0
m_winCtrl->active(req->surfaceid, -1);
+#endif
break;
}
}
}
- ICO_DBG("CicoSCResourceManager::updateDisplayResource Leave");
+ ICO_TRA("CicoSCResourceManager::updateDisplayResource Leave");
}
void
CicoSCResourceManager::updateSoundResource(resource_request_t *req)
{
- ICO_DBG("CicoSCResourceManager::updateSoundResource Enter"
+ ICO_TRA("CicoSCResourceManager::updateSoundResource Enter"
"(req=0x%08x)", req);
for (int i = 0; i < (int)m_curSoundResReq.size(); ++i) {
ICO_DBG("zoneid=%d active=%d current=0x%08x",
m_curSoundResReq[i]->state = RES_STATE_WAITING;
// enqueue request
ICO_DBG("Enqueue waiting sound request queue "
- "zone=%d req=0x%08x", i, m_curSoundResReq[i]);
+ "(req=0x%08x zone:%02d:%s appid=%s)",
+ m_curSoundResReq[i], i,
+ m_curSoundResReq[i]->soundzone, m_curSoundResReq[i]->appid);
m_soundReqQueue[i].push_front(m_curSoundResReq[i]);
+
// initialize current zone request
+ ICO_DBG("Dequeue current sound request queue "
+ "(req=0x%08x zone:%02d:%s appid=%s)",
+ m_curSoundResReq[i], i,
+ m_curSoundResReq[i]->soundzone, m_curSoundResReq[i]->appid);
+ ICO_PRF("CHG_GUI_RES sound deprived zone=%02d:%s appid=%s",
+ i, m_curSoundResReq[i]->soundzone,
+ m_curSoundResReq[i]->appid);
m_curSoundResReq[i] = NULL;
}
}
// state change to acquired
req->state = RES_STATE_ACQUIRED;
// update current zone request
+ ICO_DBG("Enqueue current sound request queue "
+ "(req=0x%08x zone:%02d:%s appid=%s)",
+ req, req->soundzoneid, req->soundzone, req->appid);
+ ICO_PRF("CHG_GUI_RES sound acquired zone=%02d:%s appid=%s",
+ req->soundzoneid, req->soundzone, req->appid);
m_curSoundResReq[req->soundzoneid] = req;
}
- ICO_DBG("CicoSCResourceManager::updateSoundResource Leave");
+ ICO_TRA("CicoSCResourceManager::updateSoundResource Leave");
}
void
CicoSCResourceManager::updateInputResource(resource_request_t *req)
{
- ICO_DBG("CicoSCResourceManager::updateInputResource Enter"
+ ICO_TRA("CicoSCResourceManager::updateInputResource Enter"
"(req=0x%08x)", req);
for (int i = 0; i < (int)m_curInputResReq.size(); ++i) {
ICO_DBG("input=%d active=%d current=0x%08x",
m_curInputResReq[i]->state = RES_STATE_WAITING;
// enqueue request
ICO_DBG("Enqueue waiting input request queue "
- "zone=%d req=0x%08x", i, m_curInputResReq[i]);
+ "(req=0x%08x input:%d appid=%s)",
+ m_curInputResReq[i], i, m_curInputResReq[i]->appid);
m_inputReqQueue[i].push_front(m_curInputResReq[i]);
// initialize current zone request
+ ICO_DBG("Dequeue current input request queue "
+ "(req=0x%08x input:%d appid=%s)",
+ m_curInputResReq[i],
+ m_curInputResReq[i]->input, m_curInputResReq[i]->appid);
+ ICO_PRF("CHG_GUI_RES input deprived input=%d appid=%s",
+ m_curInputResReq[i]->input,
+ m_curInputResReq[i]->appid);
m_curInputResReq[i] = NULL;
}
}
// state change to acquired
req->state = RES_STATE_ACQUIRED;
// update current zone request
+ ICO_DBG("Enqueue current input request queue "
+ "(req=0x%08x input:%d appid=%s)", req, req->input, req->appid);
+ ICO_PRF("CHG_GUI_RES input acquired input=%d appid=%s",
+ req->input, req->appid);
m_curInputResReq[req->input] = req;
}
- ICO_DBG("CicoSCResourceManager::updateInputResource Leave");
+ ICO_TRA("CicoSCResourceManager::updateInputResource Leave");
}
void
CicoSCResourceManager::updateDisplayResourceRegulation(int state)
{
- ICO_DBG("CicoSCResourceManager::updateDisplayResourceRegulation Enter"
+ ICO_TRA("CicoSCResourceManager::updateDisplayResourceRegulation Enter"
"(state=%d)", state);
if (STID_DRVREGULATION_ON == state) {
}
if (false == curchg) {
- ICO_DBG("CicoSCResourceManager::updateDisplayResourceRegulation "
+ ICO_TRA("CicoSCResourceManager::updateDisplayResourceRegulation "
"Leave");
return;
}
req->prio);
if (true == active) {
ICO_DBG("Dequeue waiting display resource request"
- "(req=0x%08x appid=%s)", req, req->appid);
+ "(req=0x%08x zone=%02d:%s appid=%s)",
+ req, req->dispzoneid,
+ req->dispzone, req->appid);
m_waitingDispResReq.erase(itr2);
ICO_DBG("Enqueue current display resource request"
- "(req=0x%08x appid=%s)", req, req->appid);
+ "(req=0x%08x zone=%02d:%s appid=%s)",
+ req, req->dispzoneid,
+ req->dispzone, req->appid);
+ ICO_PRF("CHG_GUI_RES display acquired zone=%02d:%s "
+ "appid=%s",
+ req->dispzoneid, req->dispzone, req->appid);
m_curDispResOwerReq[req->dispzoneid] = req;
#if 1 //DEBUG
dumpCurDispResOwerReq();
}
}
- ICO_DBG("CicoSCResourceManager::updateDisplayResourceRegulation Leave");
+ ICO_TRA("CicoSCResourceManager::updateDisplayResourceRegulation Leave");
}
void
CicoSCResourceManager::updateSoundResourceRegulation(int state)
{
- ICO_DBG("CicoSCResourceManager::updateSoundResourceRegulation Enter"
+ ICO_TRA("CicoSCResourceManager::updateSoundResourceRegulation Enter"
"(state=%d)", state);
bool curchg = false;
current->state = RES_STATE_WAITING;
// enqueue request
ICO_DBG("Enqueue waiting sound request queue "
- "zone=%d req=0x%08x", i, current);
+ "(req=0x%08x zone:%02d:%s appid=%s)",
+ current, i, current->soundzone, current->appid);
m_soundReqQueue[i].push_front(current);
// initialize current zone request
m_curSoundResReq[i] = NULL;
}
if ((false == curchg) && (STID_DRVREGULATION_ON == state)) {
- ICO_DBG("CicoSCResourceManager::updateSoundResourceRegulation Leave");
+ ICO_TRA("CicoSCResourceManager::updateSoundResourceRegulation Leave");
return;
}
if (true == active) {
resource_request_t* req = *itr2;
ICO_DBG("Dequeue waiting sound request queue "
- "zone=%d req=0x%08x", itr->first, *itr2);
+ "(req=0x%08x zone:%02d:%s appid=%s)",
+ *itr2, itr->first, (*itr2)->soundzone, (*itr2)->appid);
itr->second.erase(itr2);
updateSoundResource(req);
break;
}
}
- ICO_DBG("CicoSCResourceManager::updateSoundResourceRegulation Leave");
+ ICO_TRA("CicoSCResourceManager::updateSoundResourceRegulation Leave");
}
void
CicoSCResourceManager::updateInputResourceRegulation(int state)
{
- ICO_DBG("CicoSCResourceManager::updateInputResourceRegulation Enter"
+ ICO_TRA("CicoSCResourceManager::updateInputResourceRegulation Enter"
"(state=%d)", state);
bool curchg = false;
current->state = RES_STATE_WAITING;
// enqueue request
ICO_DBG("Enqueue waiting input request queue "
- "zone=%d req=0x%08x", i, current);
+ "(req=0x%08x input:%d appid=%s)",
+ current, i, current->appid);
m_inputReqQueue[i].push_front(current);
// initialize current zone request
m_curInputResReq[i] = NULL;
}
if ((false == curchg) && (STID_DRVREGULATION_ON == state)) {
- ICO_DBG("CicoSCResourceManager::updateInputResourceRegulation Leave");
+ ICO_TRA("CicoSCResourceManager::updateInputResourceRegulation Leave");
return;
}
if (true == active) {
resource_request_t* req = *itr2;
ICO_DBG("Dequeue waiting input request queue "
- "zone=%d req=0x%08x", itr->first, *itr2);
+ "(req=0x%08x input:%d appid=%s)",
+ *itr2, (*itr2)->input, (*itr2)->appid);
itr->second.erase(itr2);
updateInputResource(req);
break;
}
}
- ICO_DBG("CicoSCResourceManager::updateInputResourceRegulation Leave");
+ ICO_TRA("CicoSCResourceManager::updateInputResourceRegulation Leave");
}
//--------------------------------------------------------------------------
CompDisplayResourceRequest comp(req);
if (true == comp(itr->second)) {
ICO_DBG("Dequeue current display resource ower request"
- "(req=0x%08x zoneid=%d appid=%s)",
- itr->second, itr->first, itr->second->appid);
+ "(req=0x%08x zoneid=%02d:%s appid=%s)",
+ itr->second, itr->first,
+ itr->second->dispzone, itr->second->appid);
+ ICO_PRF("CHG_GUI_RES display deprived zone=%02d:%s appid=%s",
+ itr->first, itr->second->dispzone, itr->second->appid);
resource_request_t *findreq = itr->second;
itr->second = NULL;
#if 1 //DEBUG
void
CicoSCResourceManager::updateDispResRegulationPreProc(resource_request_t *req)
{
- ICO_DBG("CicoSCResourceManager::updateDispResRegulationPreProc Enter");
+ ICO_TRA("CicoSCResourceManager::updateDispResRegulationPreProc Enter");
#if 1 //DEBUG
dumpCurDispResOwerReq();
dumpWaitingDispResReq();
#endif //DEBUG
if (NULL == req) {
- ICO_DBG("CicoSCResourceManager::updateDispResRegulationPreProc Leave");
+ ICO_TRA("CicoSCResourceManager::updateDispResRegulationPreProc Leave");
return;
}
if (false == m_policyMgr->getRegulation()) {
- ICO_DBG("CicoSCResourceManager::updateDispResRegulationPreProc Leave");
+ ICO_TRA("CicoSCResourceManager::updateDispResRegulationPreProc Leave");
return;
}
- CicoSCSystemConfig *sysConf = CicoSCSystemConfig::getInstance();
+ CicoSystemConfig *sysConf = CicoSystemConfig::getInstance();
const CicoSCAppKindConf *appKindConf = NULL;
appKindConf = sysConf->findAppKindConfbyId(req->appkind);
if (NULL == appKindConf) {
ICO_ERR("not found CicoSCAppKindConf instance");
- ICO_DBG("CicoSCResourceManager::updateDispResRegulationPreProc Leave");
+ ICO_TRA("CicoSCResourceManager::updateDispResRegulationPreProc Leave");
return;
}
delResourceRequest(req);
ICO_DBG("kind of system application");
- ICO_DBG("CicoSCResourceManager::updateDispResRegulationPreProc Leave");
+ ICO_TRA("CicoSCResourceManager::updateDispResRegulationPreProc Leave");
return;
}
ICO_DBG("Dequeue current display resource request"
"(req=0x%08x zone:%02d:%s appid=%s)",
curreq, curreq->dispzoneid, curreq->dispzone, curreq->appid);
+ ICO_PRF("CHG_GUI_RES display deprived zone=%02d:%s appid=%s",
+ curreq->dispzoneid, curreq->dispzone, curreq->appid);
m_curDispResOwerReq[curreq->dispzoneid] = NULL;
if (curreq->surfaceid != req->surfaceid) {
"(req=0x%08x zone:%02d:%s appid=%s)",
waitreq, waitreq->dispzoneid,
waitreq->dispzone, waitreq->appid);
+ ICO_PRF("CHG_GUI_RES display acquired zone=%02d:%s appid=%s",
+ waitreq->dispzoneid, waitreq->dispzone, waitreq->appid);
m_curDispResOwerReq[waitreq->dispzoneid] = waitreq;
}
}
"(req=0x%08x zone:%02d:%s appid=%s)",
curreq, curreq->dispzoneid,
curreq->dispzone, curreq->appid);
+ ICO_PRF("CHG_GUI_RES display acquired zone=%02d:%s appid=%s",
+ curreq->dispzoneid, curreq->dispzone, curreq->appid);
m_curDispResOwerReq[curreq->dispzoneid] = curreq;
}
}
dumpCurDispResOwerReq();
dumpWaitingDispResReq();
#endif //DEBUG
- ICO_DBG("CicoSCResourceManager::updateDispResRegulationPreProc Leave");
+ ICO_TRA("CicoSCResourceManager::updateDispResRegulationPreProc Leave");
}
//--------------------------------------------------------------------------
void
CicoSCResourceManager::updateSoundResRegulationPreProc(resource_request_t *req)
{
+ ICO_TRA("CicoSCResourceManager::updateSoundResRegulationPreProc Enter");
+
if (NULL == req) {
return;
}
return;
}
- CicoSCSystemConfig *sysConf = CicoSCSystemConfig::getInstance();
+ CicoSystemConfig *sysConf = CicoSystemConfig::getInstance();
const CicoSCAppKindConf *appKindConf = NULL;
appKindConf = sysConf->findAppKindConfbyId(req->appkind);
if (NULL == appKindConf) {
ICO_ERR("not found CicoSCAppKindConf instance");
- ICO_DBG("CicoSCResourceManager::acquireSoundResource Leave(false)");
+ ICO_TRA("CicoSCResourceManager::updateSoundResRegulationPreProc Leave");
return;
}
delResourceRequest(req);
ICO_DBG("kind of system application");
- ICO_DBG("CicoSCResourceManager::acquireSoundResource Leave(true)");
+ ICO_TRA("CicoSCResourceManager::updateSoundResRegulationPreProc Leave");
return;
}
if (NULL != curreq) {
ICO_DBG("Dequeue current sound resource request"
- "(req=0x%08x zone:%02d appid=%s)",
- curreq, curreq->soundzoneid, curreq->appid);
+ "(req=0x%08x zone:%02d:%s appid=%s)",
+ curreq, curreq->soundzoneid, curreq->soundzone, curreq->appid);
+ ICO_PRF("CHG_GUI_RES sound deprived zone=%02d:%s appid=%s",
+ curreq->soundzoneid, curreq->soundzone, curreq->appid);
m_curSoundResReq[curreq->soundzoneid] = NULL;
if (0 != strcmp(curreq->appid, req->appid)) {
resource_request_t *waitreq = popSoundResReq(req);
ICO_DBG("Enqueue waiting sound resource request"
- "(req=0x%08x zone:%02d appid=%s)",
- curreq, curreq->soundzoneid, curreq->appid);
+ "(req=0x%08x zone:%02d:%s appid=%s)",
+ curreq, curreq->soundzoneid,
+ curreq->soundzone, curreq->appid);
m_soundReqQueue[curreq->soundzoneid].push_front(curreq);
if (NULL != waitreq) {
ICO_DBG("Enqueue current sound resource request"
- "(req=0x%08x zone:%02d appid=%s)",
- waitreq, waitreq->soundzoneid, waitreq->appid);
+ "(req=0x%08x zone:%02d:%s appid=%s)",
+ waitreq, waitreq->soundzoneid,
+ waitreq->soundzone, waitreq->appid);
+ ICO_PRF("CHG_GUI_RES sound acquired zone=%02d:%s appid=%s",
+ waitreq->soundzoneid, waitreq->soundzoneid,
+ waitreq->appid);
m_curSoundResReq[curreq->soundzoneid] = waitreq;
}
}
else {
ICO_DBG("Enqueue current sound resource request"
- "(req=0x%08x zone:%02d appid=%s)",
- curreq, curreq->soundzoneid, curreq->appid);
+ "(req=0x%08x zone:%02d:%s appid=%s)",
+ curreq, curreq->soundzoneid,
+ curreq->soundzone, curreq->appid);
+ ICO_PRF("CHG_GUI_RES sound acquired zone=%d:%s appid=%s",
+ curreq->soundzoneid, curreq->soundzone, curreq->appid);
m_curSoundResReq[curreq->soundzoneid] = curreq;
}
}
delResourceRequest(req);
+ ICO_TRA("CicoSCResourceManager::updateSoundResRegulationPreProc Leave");
}
//--------------------------------------------------------------------------
void
CicoSCResourceManager::updateInputResRegulationPreProc(resource_request_t *req)
{
+ ICO_TRA("CicoSCResourceManager::updateInputResRegulationPreProc Enter");
+
if (NULL == req) {
return;
}
if (NULL != curreq) {
ICO_DBG("Dequeue current input resource request"
- "(req=0x%08x zone:%02d appid=%s)",
+ "(req=0x%08x input:%d appid=%s)",
curreq, curreq->input, curreq->appid);
+ ICO_PRF("CHG_GUI_RES input deprived input=%d appid=%s",
+ curreq->input, curreq->appid);
m_curInputResReq[curreq->input] = NULL;
if (0 != strcmp(curreq->appid, req->appid)) {
resource_request_t *waitreq = popInputResReq(req);
ICO_DBG("Enqueue waiting input resource request"
- "(req=0x%08x zone:%02d appid=%s)",
+ "(req=0x%08x input:%d appid=%s)",
curreq, curreq->input, curreq->appid);
m_inputReqQueue[curreq->input].push_front(curreq);
if (NULL != waitreq) {
ICO_DBG("Enqueue current input resource request"
- "(req=0x%08x zone:%02d appid=%s)",
+ "(req=0x%08x input:%d appid=%s)",
waitreq, waitreq->input, waitreq->appid);
+ ICO_PRF("CHG_GUI_RES input acquired input=%d appid=%s",
+ waitreq->input, waitreq->appid);
m_curInputResReq[curreq->input] = waitreq;
}
}
else {
ICO_DBG("Enqueue current input resource request"
- "(req=0x%08x zone:%02d appid=%s)",
+ "(req=0x%08x input:%d appid=%s)",
curreq, curreq->input, curreq->appid);
+ ICO_PRF("CHG_GUI_RES input acquired input=%d appid=%s",
+ curreq->input, curreq->appid);
m_curInputResReq[curreq->input] = curreq;
}
}
delResourceRequest(req);
+ ICO_TRA("CicoSCResourceManager::updateInputResRegulationPreProc Leave");
}
//--------------------------------------------------------------------------
//--------------------------------------------------------------------------
CicoSCServer::~CicoSCServer()
{
- // TODO
+ if (NULL != m_uwsContext) {
+ ico_uws_close(m_uwsContext);
+ }
}
//--------------------------------------------------------------------------
//--------------------------------------------------------------------------
/**
+ * @brief teardown server
+ */
+//--------------------------------------------------------------------------
+void
+CicoSCServer::teardown(void)
+{
+ ICO_TRA("CicoSCServer::teardown Enter");
+ {
+ std::list<CicoSCUwsHandler*>::iterator itr;
+ itr = m_uwsHandlerList.begin();
+ for (; itr != m_uwsHandlerList.end(); ++itr) {
+ if (NULL != (*itr)->ecoreFdHandler) {
+ ecore_main_fd_handler_del((*itr)->ecoreFdHandler);
+ (*itr)->ecoreFdHandler = NULL;
+ }
+ delete(*itr);
+ }
+ m_uwsHandlerList.clear();
+ }
+
+ {
+ std::list<CicoSCMessage*>::iterator itr;
+ itr = m_sendMsgQueue.begin();
+ for (; itr != m_sendMsgQueue.end(); ++itr) {
+ delete(*itr);
+ }
+ m_sendMsgQueue.clear();
+ }
+
+ {
+ std::list<CicoSCCommand*>::iterator itr;
+ itr = m_recvCmdQueue.begin();
+ for (; itr != m_recvCmdQueue.end(); ++itr) {
+ delete(*itr);
+ }
+ }
+
+ if (NULL != m_uwsContext) {
+ ico_uws_close(m_uwsContext);
+ m_uwsContext = NULL;
+ }
+ ICO_TRA("CicoSCServer::teardown Leave");
+}
+
+//--------------------------------------------------------------------------
+/**
* @brief add poll websocket file destructor
*
* @param [in] handler websocket handler
void
CicoSCServer::addPollFd(CicoSCUwsHandler *handler)
{
- ICO_DBG("CicoSCServer::addPollFd Enter(fd=%d)", handler->fd);
+ ICO_TRA("CicoSCServer::addPollFd Enter(fd=%d)", handler->fd);
Ecore_Fd_Handler_Flags flags;
flags = (Ecore_Fd_Handler_Flags)(ECORE_FD_READ | ECORE_FD_ERROR);
ICO_DBG("Enqueue uwsHandler(0x%08x)", handler);
m_uwsHandlerList.push_back(handler);
- ICO_DBG("CicoSCServer::addPollFd Leave");
+ ICO_TRA("CicoSCServer::addPollFd Leave");
}
//--------------------------------------------------------------------------
void
CicoSCServer::delPollFd(CicoSCUwsHandler *handler)
{
- ICO_DBG("CicoSCServer::delPollFd Enter");
+ ICO_TRA("CicoSCServer::delPollFd Enter");
+
+ if (NULL == handler) {
+ ICO_WRN("handler is null");
+ ICO_TRA("CicoSCServer::delPollFd Leave");
+ return;
+ }
- ecore_main_fd_handler_del(handler->ecoreFdHandler);
- handler->ecoreFdHandler = NULL;
+ if (NULL != handler->ecoreFdHandler) {
+ ecore_main_fd_handler_del(handler->ecoreFdHandler);
+ handler->ecoreFdHandler = NULL;
+ }
list<CicoSCUwsHandler*>::iterator itr;
itr = m_uwsHandlerList.begin();
}
delete handler;
- ICO_DBG("CicoSCServer::delPollFd Enter");
+ ICO_TRA("CicoSCServer::delPollFd Leave");
}
//--------------------------------------------------------------------------
void
CicoSCServer::dispatch(const CicoSCUwsHandler *handler)
{
-// ICO_DBG("CicoSCServer::dispatch Enter(handler=0x%08x)", handler);
+// ICO_TRA("CicoSCServer::dispatch Enter(handler=0x%08x)", handler);
if (NULL == handler) {
ICO_WRN("handler is null");
- ICO_DBG("CicoSCServer::dispatch Leave");
+ ICO_TRA("CicoSCServer::dispatch Leave");
return;
}
// There is a possibility that after calling ico_uws_service function,
// the file is deleted. Check whether handler not the disabled.
if (false == isExistUwsHandler(handler)) {
- ICO_DBG("CicoSCServer::dispatch Leave");
+ ICO_TRA("CicoSCServer::dispatch Leave");
return;
}
if (true == m_dispatchProcessing) {
- ICO_DBG("CicoSCServer::dispatch Leave(disptch processing)");
+ ICO_TRA("CicoSCServer::dispatch Leave(disptch processing)");
return;
}
if (NULL == handler->ecoreFdHandler) {
ICO_ERR("ecoreFdHandler is null");
- ICO_DBG("CicoSCServer::dispatch Leave");
+ ICO_TRA("CicoSCServer::dispatch Leave");
return;
}
send_itr = m_sendMsgQueue.erase(send_itr);
ICO_DBG("Dequeue Message(id=%d)", msg->getId());
if ((NULL != sendHandler) && (true == sendHandler->serviceFlag)) {
+ const char *data = msg->getData();
ICO_DBG("<<<SEND appid=%s id=0x%08x msg=%s",
- sendHandler->appid.c_str(), sendHandler->id, msg->getData());
+ sendHandler->appid.c_str(), sendHandler->id, data);
// ICO_DBG("called: ico_usw_send called(context=0x%08x id=0x%08x)",
// sendHandler->uwsContext, sendHandler->id);
ico_uws_send(sendHandler->uwsContext, sendHandler->id,
- (unsigned char *)msg->getData(),
- strlen(msg->getData()));
+ (unsigned char *)data, strlen(data));
delete msg;
ecore_main_fd_handler_active_set(handler->ecoreFdHandler, flags);
}
-// ICO_DBG("CicoSCServer::dispatch Leave");
+// ICO_TRA("CicoSCServer::dispatch Leave");
}
//--------------------------------------------------------------------------
int
CicoSCServer::sendMessage(const string & appid, CicoSCMessage* msg)
{
- ICO_DBG("CicoSCServer::sendMessage Enter(appid=%s, msg=%s)",
+ ICO_TRA("CicoSCServer::sendMessage Enter(appid=%s, msg=%s)",
appid.c_str(), msg->getData());
msg->setSendToAppid(appid);
dispatch(handler);
}
- ICO_DBG("CicoSCServer::sendMessage Leave(EOK)");
+ ICO_TRA("CicoSCServer::sendMessage Leave(EOK)");
return ICO_SYC_EOK;
}
int
CicoSCServer::sendMessageToHomeScreen(CicoSCMessage* msg)
{
+ // if user change processing(homescree is not running)
+ if (true == m_userMgr->isStoppingNow()) {
+ ICO_DBG("homescreen not running");
+ return ICO_SYC_ENOENT;
+ }
+
const CicoSCUser *loginUser = m_userMgr->getLoginUser();
if (NULL == loginUser) {
ICO_WRN("homescreen unknown");
Eina_Bool
CicoSCServer::ecoreFdCallback(void *data, Ecore_Fd_Handler *ecoreFdhandler)
{
-// ICO_DBG("CicoSCServer::ecoreFdCallback Enter");
+// ICO_TRA("CicoSCServer::ecoreFdCallback Enter");
CicoSCUwsHandler *handler = NULL;
handler = static_cast<CicoSCServer*>(data)->findUwsHandler(ecoreFdhandler);
static_cast<CicoSCServer*>(data)->dispatch(handler);
}
-// ICO_DBG("CicoSCServer::ecoreFdCallback Leave");
+// ICO_TRA("CicoSCServer::ecoreFdCallback Leave");
return ECORE_CALLBACK_RENEW;
}
const ico_uws_detail *detail,
void *user_data)
{
-// ICO_DBG("CicoSCServer::receiveEventCB Enter");
+// ICO_TRA("CicoSCServer::receiveEventCB Enter");
+
+ switch (event) {
+ case ICO_UWS_EVT_CLOSE:
+ ICO_DBG(">>>RECV ICO_UWS_EVT_CLOSE(id=0x%08x)", (int)id);
+// ICO_TRA("CicoSCServer::receiveEventCB Leave");
+ return;
+ case ICO_UWS_EVT_ERROR:
+ ICO_DBG(">>>RECV ICO_UWS_EVT_ERROR(id=0x%08x, err=%d)",
+ (int)id, detail->_ico_uws_error.code);
+// ICO_TRA("CicoSCServer::receiveEventCB Leave");
+ return;
+ default:
+ break;
+ }
// find handler
CicoSCUwsHandler *handler = findUwsHandler(context, id);
break;
case ICO_UWS_EVT_CLOSE:
ICO_DBG(">>>RECV ICO_UWS_EVT_CLOSE(id=0x%08x)", (int)id);
+ delete handler;
break;
case ICO_UWS_EVT_RECEIVE:
{
if (cmd->cmdid == MSG_CMD_SEND_APPID) {
if (0 == cmd->appid.length()) {
ICO_WRN("command argument invalid appid null");
+ delete cmd;
break;
}
handler->appid = cmd->appid;
ecore_main_fd_handler_active_set(handler->ecoreFdHandler, flags);
notifyConnected(handler->appid);
+ delete cmd;
break;
}
m_recvCmdQueue.push_back(cmd);
break;
}
- case ICO_UWS_EVT_ERROR:
- ICO_DBG(">>>RECV ICO_UWS_EVT_ERROR(id=0x%08x, err=%d)",
- (int)id, detail->_ico_uws_error.code);
- break;
case ICO_UWS_EVT_ADD_FD:
ICO_DBG(">>>RECV ICO_UWS_EVT_ADD_FD(id=0x%08x, fd=%d)",
- (int)id, detail->_ico_uws_fd.fd);
+ (int)id, detail->_ico_uws_fd.fd);
handler->fd = detail->_ico_uws_fd.fd;
addPollFd(handler);
break;
case ICO_UWS_EVT_DEL_FD:
- ICO_DBG(">>>RECV ICO_UWS_EVT_DEL_FD(id=0x%08x, fd=%d)",
- (int)id, detail->_ico_uws_fd.fd);
+ ICO_DBG(">>>RECV ICO_UWS_EVT_DEL_FD(id=0x%08x, fd=%d, appid=%s)",
+ (int)id, detail->_ico_uws_fd.fd, handler->appid.c_str());
+ clearRecvCmdQueue(handler->appid);
+ clearSendMsgQueue(handler->appid);
delPollFd(handler);
break;
default:
break;
}
-// ICO_DBG("CicoSCServer::receiveEventCB Leave");
+// ICO_TRA("CicoSCServer::receiveEventCB Leave");
+}
+
+//--------------------------------------------------------------------------
+/**
+ * @brief clear receive command queue
+ *
+ * @param [in] appid clear command application id
+ */
+//--------------------------------------------------------------------------
+void
+CicoSCServer::clearRecvCmdQueue(const std::string & appid)
+{
+ ICO_TRA("CicoSCServer::clearCmdQueue Enter(appid=%s)", appid.c_str());
+
+ std::list<CicoSCCommand*>::iterator itr;
+ itr = m_recvCmdQueue.begin();
+ for (; itr != m_recvCmdQueue.end(); ) {
+ if (0 == appid.compare((*itr)->appid)) {
+ ICO_DBG("Dequeue command(0x%08x)", (*itr)->cmdid);
+ delete *itr;
+ itr = m_recvCmdQueue.erase(itr);
+ }
+ else {
+ ++itr;
+ }
+ }
+ m_recvCmdQueue.clear();
+
+ ICO_TRA("CicoSCServer::clearCmdQueue Leave")
+}
+
+//--------------------------------------------------------------------------
+/**
+ * @brief clear send message queue
+ *
+ * @param [in] appid clear message application id
+ */
+//--------------------------------------------------------------------------
+void
+CicoSCServer::clearSendMsgQueue(const std::string & appid)
+{
+ ICO_TRA("CicoSCServer::clearMsgQueue Enter(appid=%s)", appid.c_str())
+
+ std::list<CicoSCMessage*>::iterator itr;
+ itr = m_sendMsgQueue.begin();
+ while(itr != m_sendMsgQueue.end()) {
+ if (0 == appid.compare((*itr)->getSendToAppid())) {
+ ICO_DBG("Dequeue Message(id=%d)", (*itr)->getId());
+ delete *itr;
+ itr = m_sendMsgQueue.erase(itr);
+ }
+ else {
+ ++itr;
+ }
+ }
+ m_sendMsgQueue.clear();
+
+ ICO_TRA("CicoSCServer::clearMsgQueue Leave")
}
//--------------------------------------------------------------------------
// startup server
int startup(int port, const char *protocol);
+ // startup server
+ void teardown(void);
+
// send message to application client
int sendMessage(const std::string & appid, CicoSCMessage* msg);
const ico_uws_detail *detail,
void *user_data);
+ // clear receive command queue
+ void clearRecvCmdQueue(const std::string & appid);
+
+ // clear send message queue
+ void clearSendMsgQueue(const std::string & appid);
+
private:
// default constructor
CicoSCServer();
#include "CicoSCSysResourceMonitor.h"
#include "CicoSCLifeCycleController.h"
#include "CicoSCSysResourceController.h"
-#include "CicoSCConf.h"
-#include "CicoSCSystemConfig.h"
+#include "CicoConf.h"
+#include "CicoSystemConfig.h"
#include <Ecore.h>
//#include <Ecore_Evas.h>
m_cgrpMEM = 0;
m_cpu = -1;
m_mem = -1;
- m_rConf = CicoSCSystemConfig::getInstance()->getResourceConf();
+ m_bDoIt = false;
+ m_rConf = CicoSystemConfig::getInstance()->getResourceConf();
if (0 != m_rConf) {
g_RC_LOG = m_rConf->m_bLog;
if (-1 != m_rConf->m_sampling) {
g_samplingWaitTimer = m_rConf->m_sampling;
}
}
- if (false == m_rConf->m_bDoIt) {
- ICO_TRA("end");
- return ;
- }
// cpu,cpuacct cgroup init
- init_cgroup(); // cgroup
- m_monitor = new CicoSCSysResourceMonitor();
- CicoSCSystemConfig* CSCSC = CicoSCSystemConfig::getInstance();
- string filePath(CSCSC->getDefaultConf()->confdir);
- filePath += string("/");
- filePath += gstrStateMachineFileName;
-
- CicoStateMachineCreator csmc;
- m_stt = csmc.createFile(filePath);
- if ((CicoStateMachine*)0 == m_stt) {
- ICO_ERR("state machine create error(%s)", filePath.c_str());
- return;
- }
-
- m_SRCCPU_LOW = new CicoSRCCPU_LOW(this);
- m_SRCCPU_HIGH = new CicoSRCCPU_HIGH(this);
- m_SRCMEM_LOW = new CicoSRCMEM_LOW(this);
- m_SRCMEM_HIGH = new CicoSRCMEM_HIGH(this);
-
- CicoState* s = (CicoState*)m_stt->getState(gstrSRCCPU_LOW);
- if ((CicoState*)0 != s) {
- s->addEntryAction(m_SRCCPU_LOW);
- s->addDoAction(m_SRCCPU_LOW);
- }
- s = (CicoState*)m_stt->getState(gstrSRCCPU_HIGH);
- if ((CicoState*)0 != s) {
- s->addEntryAction(m_SRCCPU_HIGH);
- s->addDoAction(m_SRCCPU_HIGH);
- }
- s = (CicoState*)m_stt->getState(gstrSRCMEM_LOW);
- if ((CicoState*)0 != s) {
- s->addEntryAction(m_SRCMEM_LOW);
- s->addDoAction(m_SRCMEM_LOW);
- }
- s = (CicoState*)m_stt->getState(gstrSRCMEM_HIGH);
- if ((CicoState*)0 != s) {
- s->addEntryAction(m_SRCMEM_HIGH);
- s->addDoAction(m_SRCMEM_HIGH);
- }
- m_stt->start();
- double tVal = (double)g_samplingWaitTimer / 100;
-#if 1
- ICO_TRA("ECORE_TIMER(%f)", tVal);
- g_SCResourceWatch = ecore_timer_add(tVal, ico_SCResourceWatch, this);
-#else
- ICO_TRA("ECORE_TIMER(%f)", tVal);
- g_SCResourceWatch = ecore_timer_add(tVal, ico_SCResourceWatch, 0);
-#endif
ICO_TRA("end");
}
}
/**
+ * @brief startWatch
+ */
+bool CicoSCSysResourceController::startSysResource()
+{
+ ICO_TRA("start");
+ if (0 == m_rConf) {
+ ICO_TRA("end");
+ return false;
+ }
+ m_bDoIt = m_rConf->m_bDoIt;
+ if (false == m_bDoIt) {
+ ICO_TRA("end");
+ return false;
+ }
+ // cpu,cpuacct cgroup init
+ init_cgroup(); // cgroup
+ m_monitor = new CicoSCSysResourceMonitor();
+ CicoSystemConfig* CSCSC = CicoSystemConfig::getInstance();
+ string filePath(CSCSC->getDefaultConf()->confdir);
+ filePath += string("/");
+ filePath += gstrStateMachineFileName;
+
+ CicoStateMachineCreator csmc;
+ m_stt = csmc.createFile(filePath);
+ if ((CicoStateMachine*)0 == m_stt) {
+ ICO_ERR("state machine create error(%s)", filePath.c_str());
+ ICO_TRA("end");
+ return false;
+ }
+
+ m_SRCCPU_LOW = new CicoSRCCPU_LOW(this);
+ m_SRCCPU_HIGH = new CicoSRCCPU_HIGH(this);
+ m_SRCMEM_LOW = new CicoSRCMEM_LOW(this);
+ m_SRCMEM_HIGH = new CicoSRCMEM_HIGH(this);
+
+ CicoState* s = (CicoState*)m_stt->getState(gstrSRCCPU_LOW);
+ if ((CicoState*)0 != s) {
+ s->addEntryAction(m_SRCCPU_LOW);
+ s->addDoAction(m_SRCCPU_LOW);
+ }
+ s = (CicoState*)m_stt->getState(gstrSRCCPU_HIGH);
+ if ((CicoState*)0 != s) {
+ s->addEntryAction(m_SRCCPU_HIGH);
+ s->addDoAction(m_SRCCPU_HIGH);
+ }
+ s = (CicoState*)m_stt->getState(gstrSRCMEM_LOW);
+ if ((CicoState*)0 != s) {
+ s->addEntryAction(m_SRCMEM_LOW);
+ s->addDoAction(m_SRCMEM_LOW);
+ }
+ s = (CicoState*)m_stt->getState(gstrSRCMEM_HIGH);
+ if ((CicoState*)0 != s) {
+ s->addEntryAction(m_SRCMEM_HIGH);
+ s->addDoAction(m_SRCMEM_HIGH);
+ }
+ m_stt->start();
+ double tVal = (double)g_samplingWaitTimer / 100;
+ ICO_TRA("ECORE_TIMER(%f)", tVal);
+ g_SCResourceWatch = ecore_timer_add(tVal, ico_SCResourceWatch, this);
+ ICO_TRA("end");
+ return true;
+}
+
+/**
* @brief watch
* @return true:change level false:no change
*/
bool CicoSCSysResourceController::entryCgroupCPU(int pid, int grpNo)
{
ICO_TRA("start pid(%d), cgrpNo(%d)", pid, grpNo);
- if ((0 > grpNo) || ((int)m_RCCpuTasks.size() <= grpNo)) {
+ if (((0 > grpNo) || ((int)m_RCCpuTasks.size() <= grpNo)) ||
+ ((NULL == m_rConf) || (false == m_rConf->m_bDoIt))) {
ICO_TRA("end %d", m_RCCpuTasks.size());
return false;
}
return;
}
string ss("/");
- string sTasks("tasks");
- string sShares("cpu.shares");
+ string sTasks(D_STRtasks);
+ string sShares(D_STRcpushares);
string t1(m_rConf->m_cpuCGRPPath);
if ('/' != t1[t1.size()-1]) {
t1 += ss;
m_val = -1; // cpu or memory usage value
m_baseVal = -1; // cpu or memory base usage value
m_cnt = 0;
- m_rConf = CicoSCSystemConfig::getInstance()->getResourceConf();
+ m_rConf = CicoSystemConfig::getInstance()->getResourceConf();
}
/**
class CicoSCResourceConf;
#endif
+#define D_STRtasks "tasks"
+#define D_STRcpushares "cpu.shares"
+
class CicoSCSysResourceController;
/**
bool isWactchAllReady() const;
+ bool startSysResource(); // start cgroup controll
+
bool watch(); // watch request (please interval call)
const CicoSCSysResourceMonitor& getMonitor() const;
int getCpuUsge() const;
bool replaceCgroupFile(const std::string& tgt, int val);
bool replaceCgroupFile(const std::string& tgt, const char* val);
-private:
+protected:
CicoSCSysResourceMonitor* m_monitor;
const CicoSCResourceConf* m_rConf;
+ std::vector<std::string> m_RCCpuTasks;
+ std::vector<std::string> m_RCCpuShares;
+ bool m_bDoIt;
+private:
CicoStateMachine* m_stt;
CicoSRCCPU_LOW* m_SRCCPU_LOW;
int m_cpu;
int m_mem;
- std::vector<std::string> m_RCCpuTasks;
- std::vector<std::string> m_RCCpuShares;
int m_cgrpCPU;
int m_cgrpMEM;
-
};
/**
#include "CicoSCCommand.h"
#include "CicoSCLastInfo.h"
-#include "CicoSCAulItems.h"
+#include "CicoAulItems.h"
#include "CicoSCLifeCycleController.h"
#include "CicoSCMessage.h"
#include "CicoSCServer.h"
#include "CicoSCUserManager.h"
#include "CicoSCUser.h"
-#include "CicoSCConf.h"
-#include "CicoSCSystemConfig.h"
+#include "CicoConf.h"
+#include "CicoSystemConfig.h"
#include "Cico_aul_listen_app.h"
using namespace std;
m_waitHS.clear();
m_wait = false;
// login-user application information file
- m_uConfig = CicoSCSystemConfig::getInstance()->getUserConf();
+ m_uConfig = CicoSystemConfig::getInstance()->getUserConf();
if ((NULL == m_uConfig) || (true == m_uConfig->m_parent_dir.empty())) {
m_parentDir = ICO_SYC_DEFAULT_PATH;
}
//--------------------------------------------------------------------------
CicoSCUserManager::~CicoSCUserManager()
{
- ICO_DBG("CicoSCUserManager::~CicoSCUserManager() Enter");
+ ICO_TRA("CicoSCUserManager::~CicoSCUserManager Enter");
// clear homescreen list
m_homescreenList.clear();
m_userList.clear();
m_vppa.clear();
- ICO_DBG("CicoSCUserManager::~CicoSCUserManager() Leave(EOK)");
+ ICO_TRA("CicoSCUserManager::~CicoSCUserManager Leave");
}
//--------------------------------------------------------------------------
void
CicoSCUserManager::handleCommand(const CicoSCCommand * cmd)
{
- ICO_DBG("CicoSCUserManager::handleCommand Enter (%d)", cmd->cmdid);
+ ICO_TRA("CicoSCUserManager::handleCommand Enter(%d)", cmd->cmdid);
CicoSCCmdUserMgrOpt *opt = static_cast<CicoSCCmdUserMgrOpt*>(cmd->opt);
break;
}
- ICO_DBG("CicoSCUserManager::handleCommand Leave(EOK)");
+ ICO_TRA("CicoSCUserManager::handleCommand Leave");
}
//--------------------------------------------------------------------------
int
CicoSCUserManager::load(const string & confFile)
{
- ICO_DBG("CicoSCUserManager::load Enter (%s)", confFile.c_str());
+ ICO_TRA("CicoSCUserManager::load Enter (%s)", confFile.c_str());
ptree root;
// read config file (xml)
// set login user name
setLoginUser(root);
- ICO_DBG("CicoSCUserManager::load Leave(EOK)");
+ ICO_TRA("CicoSCUserManager::load Leave(EOK)");
// always success
return ICO_SYC_EOK;
int
CicoSCUserManager::initialize(void)
{
- ICO_DBG("CicoSCUserManager::initialize Enter");
+ ICO_TRA("CicoSCUserManager::initialize Enter");
// get login user information
const CicoSCUser *user = findUserConfbyName(m_login);
if (NULL == user) {
- ICO_ERR("CicoSCUserManager::initialize Leave(ENXIO)");
+ ICO_ERR("user not found");
+ ICO_TRA("CicoSCUserManager::initialize Leave(ENXIO)");
return ICO_SYC_ENXIO;
}
// save last user
saveLastUser();
- ICO_DBG("CicoSCUserManager::initialize Leave(EOK)");
+ ICO_TRA("CicoSCUserManager::initialize Leave(EOK)");
return ICO_SYC_EOK;
}
void
CicoSCUserManager::changeUser(const string & name, const string & passwd)
{
- ICO_DBG("CicoSCUserManager::changeUser Enter"
+ ICO_TRA("CicoSCUserManager::changeUser Enter"
"(user=%s pass=%s)", name.c_str(), passwd.c_str());
char tmpText[128];
const CicoSCUser *conf = NULL;
// check all user logoff
if ((name.empty()) || (name[0] == ' ')) {
- ICO_DBG("CicoSCUserManager::changeUser Leave(all user logoff)");
+ ICO_TRA("CicoSCUserManager::changeUser Leave(all user logoff)");
flagFileOn();
killingAppsAndHS(oldUsr);
return;
}
+ // if changed user name is same last user name
+ if (0 == name.compare(m_login)) {
+ ICO_TRA("CicoSCUserManager::changeUser Leave(request is same user)");
+ return;
+ }
+
// get user config
conf = findUserConfbyName(name);
if (NULL == conf) {
- ICO_ERR("CicoSCUserManager::changeUser Leave(ENXIO)");
+ ICO_TRA("CicoSCUserManager::changeUser Leave(ENXIO)");
return;
}
// check password
if (passwd != conf->passwd) {
- ICO_ERR("CicoSCUserManager::changeUser Leave(EINVAL)");
+ ICO_TRA("CicoSCUserManager::changeUser Leave(EINVAL)");
return;
}
// killing running application and homeScreen
killingAppsAndHS(oldUsr);
+ CicoSCLifeCycleController* csclcc = CicoSCLifeCycleController::getInstance();
+ csclcc->startAppResource(name);
// check wheather directory exists
vector<string> mk_dir_info;
}
mkdir(dir, S_IRWXU | S_IRWXG | S_IRWXO);
}
+ csclcc->createAppResourceFile(name);
if (0 != m_vppa.size()) {
// wait dead signal recieve
m_waitHS = conf->homescreen;
m_wait = true;
// run call launchHomescreenReq is appDeadHandler !
- ICO_DBG("CicoSCUserManager::changeUser Leave(WAIT:%s)", m_waitName.c_str());
+ ICO_TRA("CicoSCUserManager::changeUser Leave(WAIT:%s)", m_waitName.c_str());
return;
}
// change homescreen application
m_waitName.clear();
m_waitHS.clear();
m_wait = false;
- ICO_DBG("CicoSCUserManager::changeUser Leave(EOK)");
+ ICO_TRA("CicoSCUserManager::changeUser Leave(EOK)");
}
//--------------------------------------------------------------------------
//--------------------------------------------------------------------------
bool CicoSCUserManager::impritingLastApps(const string& ofnm)
{
- // <TODO></TODO>
- // <TODO></TODO>
- // <TODO></TODO>
+ ICO_TRA("CicoSCUserManager::impritingLastApps Enter");
vector<string> vs;
-#if 0
-
- AAAAAAAAAA
-
-#else
CicoSCLifeCycleController* oCSCLCC;
oCSCLCC = CicoSCLifeCycleController::getInstance();
if ((NULL == oCSCLCC) || (0 == oCSCLCC)) {
- ICO_ERR("CicoSCUserManager::impritingLastApps Leave(ENXIO)");
+ ICO_ERR(" CicoSCLifeCycleController is null");
+ ICO_TRA("CicoSCUserManager::impritingLastApps Leave(false)");
return false;
}
- const vector<CicoSCAulItems>& aulList = oCSCLCC->getAulList();
+ const vector<CicoAulItems>& aulList = oCSCLCC->getAulList();
for (int i=aulList.size() ; i != 1; i--) {
- const CicoSCAulItems* pO = aulList[i-1].p();
+ const CicoAulItems* pO = aulList[i-1].p();
if ((NULL == pO) || (0 == pO)) {
continue;
}
}
vs.push_back(pO->m_appid);
}
-#endif
+
if (0 == vs.size()) {
remove(ofnm.c_str());
- ICO_ERR("CicoSCUserManager::impritingLastApps app none");
+ ICO_TRA("CicoSCUserManager::impritingLastApps Leave(app none)");
return true;
}
ofstream ofs;
ofs << *it << endl;
}
ofs.close();
- ICO_ERR("CicoSCUserManager::impritingLastApps app = %d", vs.size());
+ ICO_TRA("CicoSCUserManager::impritingLastApps app = %d", vs.size());
return false;
}
//--------------------------------------------------------------------------
bool CicoSCUserManager::killingAppsAndHS(const string&)
{
-/* TODO
- const CicoSCUser *cnf = findUserConfbyName(usrnm);
- if (NULL == cnf) {
- ICO_ERR("CicoSCUserManager::killingAppsAndHS Leave(ENXIO)");
- return false;
- }
-*/
+ ICO_TRA("CicoSCUserManager::killingAppsAndHS Enter");
+
m_vppa.clear();
CicoSCLifeCycleController* oCSCLCC;
oCSCLCC = CicoSCLifeCycleController::getInstance();
if ((NULL == oCSCLCC) || (0 == oCSCLCC)) {
- ICO_ERR("CicoSCUserManager::killingAppsAndHS Leave(ENXIO)");
+ ICO_TRA("CicoSCUserManager::killingAppsAndHS Leave(ENXIO)");
return false;
}
bool r = false;
- const vector<CicoSCAulItems>& aulList = oCSCLCC->getAulList();
+ const vector<CicoAulItems>& aulList = oCSCLCC->getAulList();
vector<int> pids;
for (int i=aulList.size() ; i != 0; i--) {
- const CicoSCAulItems* pObj = aulList[i-1].p();
+ const CicoAulItems* pObj = aulList[i-1].p();
if ((NULL == pObj) || (0 == pObj)) {
continue;
}
for (int j=0; j < sz; j++) {
oCSCLCC->terminate(pids[j]);
}
- ICO_DBG("CicoSCUserManager::killingAppsAndHS ret=%s", r? "true": "false");
+ ICO_TRA("CicoSCUserManager::killingAppsAndHS Leave(ret=%s)",
+ r? "true": "false");
return r;
}
oCSCLCC = CicoSCLifeCycleController::getInstance();
int r = oCSCLCC->launch(appid_hs.c_str(), b);
-// <TODO>
-// ??? bundle_free(b);
-// </TODO>
+ bundle_free(b);
if (ICO_SYC_EOK != r) {
ICO_DBG("CicoSCUserManager::launchHomescreenReq false(%d)", r);
void
CicoSCUserManager::userlistCB(const string & appid)
{
- ICO_DBG("CicoSCUserManager::userlistCB Enter (%s)", appid.c_str());
+ ICO_TRA("CicoSCUserManager::userlistCB Enter (%s)", appid.c_str());
// send message
CicoSCMessage *message = new CicoSCMessage();
CicoSCServer::getInstance()->sendMessage(appid, message);
- ICO_DBG("CicoSCUserManager::userlistCB Leave(EOK)");
+ ICO_TRA("CicoSCUserManager::userlistCB Leave");
}
//--------------------------------------------------------------------------
void
CicoSCUserManager::lastinfoCB(const string & appid)
{
- ICO_DBG("CicoSCUserManager::lastinfoCB Enter (%s)", appid.c_str());
+ ICO_TRA("CicoSCUserManager::lastinfoCB Enter(%s)", appid.c_str());
// send message
CicoSCMessage *message = new CicoSCMessage();
CicoSCServer::getInstance()->sendMessage(appid, message);
- ICO_DBG("CicoSCUserManager::lastinfoCB Leave(EOK)");
+ ICO_TRA("CicoSCUserManager::lastinfoCB Leave");
}
//--------------------------------------------------------------------------
void
CicoSCUserManager::saveLastUser(void)
{
- ICO_DBG("CicoSCUserManager::saveLastUser Enter (name=%s)", m_login.c_str());
+ ICO_TRA("CicoSCUserManager::saveLastUser Enter(name=%s)", m_login.c_str());
// output last user name to file
std::ofstream stream;
stream << m_login << std::endl;
stream.close();
- ICO_DBG("CicoSCUserManager::saveLastUser Leave(EOK)");
+ ICO_TRA("CicoSCUserManager::saveLastUser Leave");
}
//--------------------------------------------------------------------------
void
CicoSCUserManager::loadLastUser(void)
{
- ICO_DBG("CicoSCUserManager::loadLastUser Enter");
+ ICO_TRA("CicoSCUserManager::loadLastUser Enter");
// check weather file exists
struct stat st;
int ret = stat(ICO_SYC_LASTUSER_FILE, &st);
if (0 != ret) {
// last user file does not exist
- ICO_DBG("CicoSCUserManager::loadLastUser Leave(ENXIO)");
+ ICO_TRA("CicoSCUserManager::loadLastUser Leave");
return;
}
}
}
- ICO_DBG("CicoSCUserManager::loadLastUser Leave(EOK)");
+ ICO_TRA("CicoSCUserManager::loadLastUser Leave");
}
//--------------------------------------------------------------------------
void
CicoSCUserManager::loadLastInfo()
{
- ICO_DBG("CicoSCUserManager::loadLastInfo Enter (name=%s)", m_login.c_str());
+ ICO_TRA("CicoSCUserManager::loadLastInfo Enter(name=%s)", m_login.c_str());
if (m_login.empty()) {
- ICO_ERR("CicoSCUserManager::loadLastInfo Leave(EINVAL)");
+ ICO_ERR("m_login is empty");
+ ICO_TRA("CicoSCUserManager::loadLastInfo Leave(m_login is empty)");
return;
}
// check login user
if (NULL == loginUser) {
// login user does not exist in the user list
- ICO_DBG("CicoSCUserManager::setLastInfo Leave(ENXIO)");
+ ICO_ERR("login user not found");
+ ICO_TRA("CicoSCUserManager::setLastInfo Leave(login user not found)");
return;
}
int ret = stat(dir.c_str(), &st);
if (0 != ret) {
// lastinfo directory does not exist
- ICO_DBG("CicoSCUserManager::loadLastInfo Leave(ENXIO)");
+ ICO_ERR("lastinfo directory dose not exist)");
+ ICO_TRA("CicoSCUserManager::loadLastInfo Leave(dir dose not exist)");
return;
}
}
free(filelist);
- ICO_DBG("CicoSCUserManager::loadLastInfo Leave(EOK)");
+ ICO_TRA("CicoSCUserManager::loadLastInfo Leave");
}
//--------------------------------------------------------------------------
void
CicoSCUserManager::setLoginUser(const ptree & root)
{
- ICO_DBG("CicoSCUserManager::setLoginUser Enter");
+ ICO_TRA("CicoSCUserManager::setLoginUser Enter");
// load last user name
loadLastUser();
// dump data
ICO_DBG("login user name: %s", m_login.c_str());
- ICO_DBG("CicoSCUserManager::setLoginUser Leave(EOK)");
+ ICO_TRA("CicoSCUserManager::setLoginUser Leave");
}
//--------------------------------------------------------------------------
void
CicoSCUserManager::createUserList(const ptree & root)
{
- ICO_DBG("CicoSCUserManager::createUserList Enter");
+ ICO_TRA("CicoSCUserManager::createUserList Enter");
ptree homescreens = root.get_child("userconfig.users");
m_userList.push_back(userConf);
}
- ICO_DBG("CicoSCUserManager::createUserList Leave(EOK)");
+ ICO_TRA("CicoSCUserManager::createUserList Leave");
}
//--------------------------------------------------------------------------
void
CicoSCUserManager::createHomeScreenList(const ptree & root)
{
- ICO_DBG("CicoSCUserManager::createHomeScreenList Enter");
+ ICO_TRA("CicoSCUserManager::createHomeScreenList Enter");
ptree homescreens = root.get_child("userconfig.homescreens");
// dump data
dumpHomeScreenList();
- ICO_DBG("CicoSCUserManager::createHomeScreenList Leave(EOK)");
+ ICO_TRA("CicoSCUserManager::createHomeScreenList Leave");
}
//--------------------------------------------------------------------------
void
CicoSCUserManager::setLastInfo(const string & appid, const string & info)
{
- ICO_DBG("CicoSCUserManager::setLastInfo Enter(appid: %s, info: %s)",
+ ICO_TRA("CicoSCUserManager::setLastInfo Enter(appid: %s, info: %s)",
appid.c_str(), info.c_str());
CicoSCUser* loginUser = NULL;
// check login user
if (NULL == loginUser) {
// login user does not exist in the user list
- ICO_DBG("CicoSCUserManager::setLastInfo Leave(ENXIO)");
+ ICO_ERR("login user does not exist in the user list");
+ ICO_TRA("CicoSCUserManager::setLastInfo Leave");
return;
}
ICO_DBG("login user=%s", (loginUser->name).c_str());
lastInfo->dumpLastInfo();
- ICO_DBG("CicoSCUserManager::setLastInfo Leave(EOK)");
+ ICO_TRA("CicoSCUserManager::setLastInfo Leave(EOK)");
}
//--------------------------------------------------------------------------
const CicoSCUser*
CicoSCUserManager::findUserConfbyName(const string & name)
{
-// ICO_DBG("CicoSCUserManager::findUserConfbyName Enter (%s)", name.c_str());
+// ICO_TRA("CicoSCUserManager::findUserConfbyName Enter (%s)", name.c_str());
vector<CicoSCUser*>::iterator itr;
itr = m_userList.begin();
for (; itr != m_userList.end(); ++itr) {
const CicoSCUser* conf = const_cast<CicoSCUser*>(*itr);
if (name == conf->name) {
-// ICO_DBG("CicoSCUserManager::findUserConfbyName Leave(%s)",
+// ICO_TRA("CicoSCUserManager::findUserConfbyName Leave(%s)",
// conf->name);
return conf;
}
}
-// ICO_DBG("CicoSCUserManager::findUserConfbyName Leave(NULL)");
+// ICO_TRA("CicoSCUserManager::findUserConfbyName Leave(NULL)");
return NULL;
}
}
/**
- * @brief directory last slash add
- * @param s directory path string
- */
-void chkAndAddSlash(string& s)
-{
- int sz = s.size();
- const char* p = s.c_str();
- if ('/' != p[sz-1]) {
- s += "/";
- }
-}
-
-
-/**
* @brief app dead Handler
* @param pid dead pid
* @return bool
m_waitName.clear();
m_waitHS.clear();
m_wait = false;
- ICO_DBG("end homescreen start req.(%s)", appid.c_str());
+ ICO_TRA("end homescreen start req.(%s)", appid.c_str());
return true;
}
-
// vim:set expandtab ts=4 sw=4:
// change user
void changeUser(const std::string & name, const std::string & passwd);
+ void cloaseUser();
// dump log
void dumpUserList(void);
// application daed watcher
bool appDeadHandler(int pid);
+
+ bool isStoppingNow();
+
+ // working user directory make
+ void getWorkingDir(const std::string& usr, std::string& dir);
+ const std::string& getHomeDir() const;
private:
// default constructor
CicoSCUserManager();
// Killing running application and homeScreen
bool killingAppsAndHS(const std::string& usrnm);
- // working user directory make
- void getWorkingDir(const std::string& usr, std::string& dir);
-
// launch homescreen request
bool launchHomescreenReq(const std::string& usr,
const std::string& appid_hs);
std::string m_waitName; /// wait backup login name
std::string m_waitHS; /// wait backup homescreen appid
};
+
+/**
+ * @brief get Homescreen Stopping Status
+ * @ret bool
+ * @retval true: stopping now
+ * @retval false: no stop
+ *
+ */
+inline bool CicoSCUserManager::isStoppingNow(){
+ return !m_vppa.empty();
+}
+
+/**
+ * @brief close User
+ */
+inline void CicoSCUserManager::cloaseUser()
+{
+ flagFileOn();
+ killingAppsAndHS(m_login);
+}
+
+/**
+ *
+ */
+inline const std::string& CicoSCUserManager::getHomeDir() const
+{
+ return m_parentDir;
+}
+
#endif // __CICO_SC_USER_MANAGER_H__
// vim:set expandtab ts=4 sw=4:
--- /dev/null
+/*
+ * Copyright (c) 2013, TOYOTA MOTOR CORPORATION.
+ *
+ * This program is licensed under the terms and conditions of the
+ * Apache License, version 2.0. The full text of the Apache License is at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ */
+
+//==========================================================================
+/**
+ * @file CicoSCVInfo.h
+ *
+ * @brief This file is definition of CicoSCVInfo class
+ */
+//==========================================================================
+#ifndef __CICO_SC_VINFO_H__
+#define __CICO_SC_VINFO_H__
+
+#include <ico_dbus_amb_efl.h>
+
+//--------------------------------------------------------------------------
+/**
+ * @brief Enumerations of vehicle information property
+ */
+//--------------------------------------------------------------------------
+typedef enum _ico_vinfo_prop {
+ ICO_VINFO_VEHICLE_SPEED = 1, ///< vehicle speed
+ ICO_VINFO_SHIFT_POSITION, ///< shift position
+ ICO_VINFO_LIGHT_LEFT, ///< light left(Turn left)
+ ICO_VINFO_LIGHT_RIGHT, ///< light right(Turn right)
+ ICO_VINFO_NIGHT_MODE, ///< night mode
+ ICO_VINFO_DRIVING_MODE, ///< driving mode
+
+ ICO_VINFO_MAX ///< maximum number of type
+} ico_vinfo_prop_e;
+
+//--------------------------------------------------------------------------
+/**
+ * @brief This class holds vehicle information
+ */
+//--------------------------------------------------------------------------
+class CicoSCVInfo
+{
+public:
+ // default constructor
+ CicoSCVInfo(int type, int prop, union dbus_value_variant value)
+ : m_type(type), m_prop(prop), m_value(value) {}
+
+ // destructor
+ virtual ~CicoSCVInfo() {}
+
+ // get value type
+ int getType(void) { return m_type; }
+
+ // get property
+ int getProperty(void) { return m_prop; }
+
+ // get boolean value
+ bool getBooleanValue(void) { return (m_value.bval != 0) ? true : false; }
+
+ // get int8_t value
+ int8_t getint8Value(void) { return m_value.yval; }
+
+ // get uint8_t value
+ uint8_t getUint8Value(void) { return m_value.yval; }
+
+ // get int16_t value
+ int16_t getInt16Value(void) { return m_value.i16val; }
+
+ // get uint16_t value
+ uint16_t getUint16Value(void) { return m_value.ui16val; }
+
+ // get int32_t value
+ int32_t getInt32Value(void) { return m_value.i32val; }
+
+ // get uint32_t value
+ uint32_t getUint32Value(void) { return m_value.ui32val; }
+
+ // get int64_t value
+ int64_t getInt64Value(void) { return m_value.i64val; }
+
+ // get uint64_t value
+ uint64_t getUint64Value(void) { return m_value.ui64val; }
+
+ // get double value
+ double getDoubleValue(void) { return m_value.dval; }
+
+ // get string value
+ const char* getStringValue(void) { return (const char*)m_value.sval; }
+
+private:
+ // default constructor
+ CicoSCVInfo();
+
+ // assignment operator
+ CicoSCVInfo& operator=(const CicoSCVInfo &object);
+
+ // copy constructor
+ CicoSCVInfo(const CicoSCVInfo &object);
+
+private:
+ // type of value
+ int m_type;
+
+ // property id of vehicle information
+ int m_prop;
+
+ // vehicle information value
+ union dbus_value_variant m_value;
+};
+#endif // __CICO_SC_VINFO_H__
+// vim:set expandtab ts=4 sw=4:
--- /dev/null
+/*
+ * Copyright (c) 2013, TOYOTA MOTOR CORPORATION.
+ *
+ * This program is licensed under the terms and conditions of the
+ * Apache License, version 2.0. The full text of the Apache License is at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ */
+
+//==========================================================================
+/**
+ * @file CicoSCVInfoManager.cpp
+ *
+ * @brief This file implementation of CicoSCVInfoManager class
+ */
+//==========================================================================
+
+#include <string>
+
+#include <Ecore.h>
+
+#include "CicoLog.h"
+#include <ico_dbus_amb_efl.h>
+#include "CicoSCVInfoManager.h"
+#include "CicoSystemConfig.h"
+#include "CicoConf.h"
+#include "CicoSCVInfo.h"
+
+//==========================================================================
+// private static variable
+//==========================================================================
+CicoSCVInfoManager* CicoSCVInfoManager::ms_myInstance = NULL;
+int CicoSCVInfoManager::ms_ecoreEvType= 0;
+dbus_type CicoSCVInfoManager::ms_dbusTypes[ICO_TYPE_MAX];
+int CicoSCVInfoManager::ms_retryCnt = 0;
+
+//--------------------------------------------------------------------------
+/**
+ * @brief default constructor
+ */
+//--------------------------------------------------------------------------
+CicoSCVInfoManager::CicoSCVInfoManager()
+ : m_initialized(false)
+{
+ ms_dbusTypes[ICO_TYPE_UNKNOW] = DBUS_TYPE_INT32;
+ ms_dbusTypes[ICO_TYPE_BOOLEAN] = DBUS_TYPE_BOOLEAN;
+ ms_dbusTypes[ICO_TYPE_INT8] = DBUS_TYPE_BYTE;
+ ms_dbusTypes[ICO_TYPE_UINT8] = DBUS_TYPE_BYTE;
+ ms_dbusTypes[ICO_TYPE_INT16] = DBUS_TYPE_INT16;
+ ms_dbusTypes[ICO_TYPE_UINT16] = DBUS_TYPE_UINT16;
+ ms_dbusTypes[ICO_TYPE_INT32] = DBUS_TYPE_INT32;
+ ms_dbusTypes[ICO_TYPE_UINT32] = DBUS_TYPE_UINT32;
+ ms_dbusTypes[ICO_TYPE_INT64] = DBUS_TYPE_INT64;
+ ms_dbusTypes[ICO_TYPE_UINT64] = DBUS_TYPE_UINT64;
+ ms_dbusTypes[ICO_TYPE_DOUBLE] = DBUS_TYPE_DOUBLE;
+ ms_dbusTypes[ICO_TYPE_STRING] = DBUS_TYPE_STRING;
+
+ ms_ecoreEvType = ecore_event_type_new();
+}
+
+//--------------------------------------------------------------------------
+/**
+ * @brief destructor
+ */
+//--------------------------------------------------------------------------
+CicoSCVInfoManager::~CicoSCVInfoManager()
+{
+}
+
+//--------------------------------------------------------------------------
+/**
+ * @brief get instance of CicoSystemConfig
+ *
+ * @return pointer of CicoSystemConfig object
+ */
+//--------------------------------------------------------------------------
+CicoSCVInfoManager*
+CicoSCVInfoManager::getInstance(void)
+{
+ if (NULL == ms_myInstance) {
+ ms_myInstance = new CicoSCVInfoManager();
+ }
+ return ms_myInstance;
+}
+
+//--------------------------------------------------------------------------
+/**
+ * @brief startup communication of vehicle information
+ *
+ * @return result
+ * @retval true success
+ * @retval false error
+ */
+//--------------------------------------------------------------------------
+bool
+CicoSCVInfoManager::startup(void)
+{
+ ICO_TRA("CicoSCVInfoManager::startup Enter");
+
+ if (true == m_initialized) {
+ ICO_DBG("already initialized.");
+ ICO_TRA("CicoSCVInfoManager::startup Leave(true)");
+ }
+
+ ICO_DBG("called: ico_dbus_amb_start");
+ int ret = ico_dbus_amb_start();
+ if (0 != ret) {
+ ICO_ERR("ico_dbus_amb_start failed. ret=%d", ret);
+ ICO_TRA("CicoSCVInfoManager::startup Leave(false)");
+ return false;
+ }
+
+ m_initialized = true;
+
+ startMonitoring();
+
+
+ ICO_TRA("CicoSCVInfoManager::startup Leave(true)");
+ return true;
+}
+
+//--------------------------------------------------------------------------
+/**
+ * @brief teardown communication of vehicle information
+ *
+ * @return result
+ * @retval true success
+ * @retval false error
+ */
+//--------------------------------------------------------------------------
+bool
+CicoSCVInfoManager::teardown(void)
+{
+ ICO_TRA("CicoSCVInfoManager::teardown Enter");
+
+ if (false == m_initialized) {
+ ICO_DBG("not initialized.");
+ ICO_TRA("CicoSCVInfoManager::teardown Leave(true)");
+ }
+
+ m_initialized = false;
+
+ stopMonitoring();
+
+ ICO_DBG("called: ico_dbus_amb_end");
+ int ret = ico_dbus_amb_end();
+ if (0 != ret) {
+ ICO_ERR("ico_dbus_amb_end faile. ret=%d", ret);
+ ICO_TRA("CicoSCVInfoManager::teardown Leave(false)");
+ return false;
+ }
+
+ ICO_TRA("CicoSCVInfoManager::teardown Leave(true)");
+ return true;
+}
+
+//--------------------------------------------------------------------------
+/**
+ * @brief get ecore event type of changed vehicle information
+ *
+ * @return ecore event type
+ */
+//--------------------------------------------------------------------------
+int
+CicoSCVInfoManager::getEcoreEvType(void)
+{
+ return ms_ecoreEvType;
+}
+
+//--------------------------------------------------------------------------
+/**
+ * @brief get vehicle information
+ *
+ * @param [in] property vehicle information property
+ *
+ * @return result
+ * @retval true success
+ * @retval false error
+ */
+//--------------------------------------------------------------------------
+bool
+CicoSCVInfoManager::getVehicleInfo(int property)
+{
+ ICO_TRA("CicoSCVInfoManager::getVehicleInfo Enter(prop=%d)", property);
+
+ if (false == m_initialized) {
+ ICO_DBG("not initialized.");
+ ICO_TRA("CicoSCVInfoManager::getVehicleInfo Leave(false)");
+ return false;
+ }
+
+ CicoSystemConfig* sysconf = CicoSystemConfig::getInstance();
+ CicoSCVehicleInfoConf* viconf = sysconf->getVehicleInfoConf();
+ std::map<int, CicoSCVIPropertyConf*>::iterator itr;
+ itr = viconf->properties.find(property);
+ if (itr == viconf->properties.end()) {
+ ICO_WRN("not found propetry(%d)", property);
+ return false;
+ }
+
+ ICO_DBG("called: ico_dbus_amb_get(objname=%s prop=%s zone=%d type=%d)",
+ itr->second->objname.c_str(),
+ itr->second->property.c_str(),
+ itr->second->zone,
+ ms_dbusTypes[itr->second->type]);
+ int ret = ico_dbus_amb_get(itr->second->objname.c_str(),
+ itr->second->property.c_str(),
+ itr->second->zone,
+ ms_dbusTypes[itr->second->type],
+ CicoSCVInfoManager::dbusAMBGetCB,
+ itr->second);
+ if (0 != ret) {
+ ICO_WRN("ico_dbus_amb_get failed. ret=%d", ret);
+ ICO_TRA("CicoSCVInfoManager::getVehicleInfo Leave(false)");
+ return false;
+ }
+
+ ICO_TRA("CicoSCVInfoManager::getVehicleInfo Leave(true)");
+ return true;
+}
+
+//==========================================================================
+// private functions
+//==========================================================================
+
+//--------------------------------------------------------------------------
+/**
+ * @brief start vehicle information monitoring
+ */
+//--------------------------------------------------------------------------
+void
+CicoSCVInfoManager::startMonitoring(void)
+{
+ ICO_TRA("CicoSCVInfoManager::startMonitoring Enter");
+
+ CicoSystemConfig* sysconf = CicoSystemConfig::getInstance();
+ CicoSCVehicleInfoConf* viconf = sysconf->getVehicleInfoConf();
+ std::map<int, CicoSCVIPropertyConf*>::iterator itr;
+ itr = viconf->properties.begin();
+
+ for (; itr != viconf->properties.end(); ++itr) {
+ ICO_DBG("called: ico_dbus_amb_find_property"
+ "(objname=%s prop=%s zone=%d type=%d)",
+ itr->second->objname.c_str(),
+ itr->second->property.c_str(),
+ itr->second->zone,
+ ms_dbusTypes[itr->second->type]);
+ int ret = ico_dbus_amb_find_property(itr->second->objname.c_str(),
+ itr->second->property.c_str(),
+ itr->second->zone,
+ ms_dbusTypes[itr->second->type],
+ CicoSCVInfoManager::dbusAMBFindCB,
+ itr->second);
+ if (0 != ret) {
+ ICO_WRN("ico_dbus_amb_find_property failed. ret=%d", ret);
+ }
+ }
+
+ ICO_TRA("CicoSCVInfoManager::startMonitoring Leave");
+}
+
+//--------------------------------------------------------------------------
+/**
+ * @brief stop vehicle information monitoring
+ */
+//--------------------------------------------------------------------------
+void
+CicoSCVInfoManager::stopMonitoring(void)
+{
+ ICO_TRA("CicoSCVInfoManager::stopMonitoring Enter");
+
+ CicoSystemConfig* sysconf = CicoSystemConfig::getInstance();
+ CicoSCVehicleInfoConf* viconf = sysconf->getVehicleInfoConf();
+ std::map<int, CicoSCVIPropertyConf*>::iterator itr;
+ itr = viconf->properties.begin();
+ for (; itr != viconf->properties.end(); ++itr) {
+ ICO_DBG("called: ico_dbus_amb_unsubscribe"
+ "(objname=%s prop=%s zone=%d type=%d)",
+ itr->second->objname.c_str(),
+ itr->second->property.c_str(),
+ itr->second->zone,
+ ms_dbusTypes[itr->second->type]);
+ int ret = ico_dbus_amb_unsubscribe(itr->second->objname.c_str(),
+ itr->second->property.c_str(),
+ itr->second->zone);
+ if (0 != ret) {
+ ICO_WRN("ico_dbus_amb_subscribe failed. ret=%d", ret);
+ }
+ }
+
+ ICO_TRA("CicoSCVInfoManager::stopMonitoring Leave");
+}
+
+//--------------------------------------------------------------------------
+/**
+ * @brief callback function of Ecore_End_Cb
+ *
+ * @param [in] user_data user data
+ * @param [in] func_data funnction data
+ */
+//--------------------------------------------------------------------------
+void
+CicoSCVInfoManager::evVInfoFree(void* user_data, void* func_data)
+{
+ ICO_TRA("CicoSCVInfoManager::evVInfoFree Enter");
+ delete static_cast<CicoSCVInfo*>(func_data);
+ ICO_TRA("CicoSCVInfoManager::evVInfoFree Leave");
+}
+
+//--------------------------------------------------------------------------
+/**
+ * @brief callback function of ecore timer
+ *
+ * @param [in] data user data
+ */
+//--------------------------------------------------------------------------
+Eina_Bool
+CicoSCVInfoManager::ecoreRetryFindPropCB(void *data)
+{
+ ICO_TRA("CicoSCVInfoManager::ecoreRetryFindPropCB Enter");
+ if (NULL != data) {
+ CicoSCVIPropertyConf* viProp = static_cast<CicoSCVIPropertyConf*>(data);
+ ICO_DBG("called: ico_dbus_amb_find_property"
+ "(objname=%s prop=%s zone=%d type=%d)",
+ viProp->objname.c_str(),
+ viProp->property.c_str(),
+ viProp->zone,
+ ms_dbusTypes[viProp->type]);
+ int ret = ico_dbus_amb_find_property(viProp->objname.c_str(),
+ viProp->property.c_str(),
+ viProp->zone,
+ ms_dbusTypes[viProp->type],
+ CicoSCVInfoManager::dbusAMBFindCB,
+ viProp);
+ if (0 != ret) {
+ ICO_WRN("ico_dbus_amb_property failed. ret=%d", ret);
+ }
+
+ }
+ ICO_TRA("CicoSCVInfoManager::ecoreRetryFindPropCB Leave(cancel)");
+ return ECORE_CALLBACK_CANCEL;
+}
+
+//--------------------------------------------------------------------------
+/**
+ * @brief callback function of ico_dbus_amb_get result
+ *
+ * @param [in] objectname dbus object name
+ * @param [in] property vehicle information's name
+ * @param [in] type type of vechcle information
+ * @param [in] data user data
+ * @param [in] error error information
+ */
+//--------------------------------------------------------------------------
+void
+CicoSCVInfoManager::dbusAMBFindCB(const char *objectname,
+ const char *property,
+ dbus_type type,
+ void *data,
+ ico_dbus_error_t *error)
+{
+ ICO_TRA("CicoSCVInfoManager::dbusAMBFindCB Enter"
+ "(objname=%s prop=%s type=%d)",
+ objectname, property, type);
+
+ if (NULL == data) {
+ ICO_WRN("data is null");
+ return;
+ }
+
+ CicoSCVIPropertyConf* viProp = static_cast<CicoSCVIPropertyConf*>(data);
+
+ // if find property is error, retry.
+ if (NULL != error) {
+ CicoSystemConfig* sysconf = CicoSystemConfig::getInstance();
+ CicoSCVehicleInfoConf* viconf = sysconf->getVehicleInfoConf();
+ ICO_DBG("retryCnt=%d/%d", ms_retryCnt, viconf->retryCnt);
+ if (viconf->retryCnt > ms_retryCnt) {
+ ms_retryCnt++;
+ ICO_DBG("called: ecore_timer_add");
+ Ecore_Timer *timer = NULL;
+ timer = ecore_timer_add((double)viconf->waitTime/1000.0f,
+ CicoSCVInfoManager::ecoreRetryFindPropCB,
+ viProp);
+ if (NULL == timer) {
+ ICO_ERR("ecore_timer_add() failed.");
+ }
+
+ }
+ ICO_TRA("CicoSCVInfoManager::dbusAMBFindCB Levae");
+ return;
+ }
+
+ // get vehicle information
+ ICO_DBG("called: ico_dbus_amb_get(objname=%s prop=%s zone=%d type=%d)",
+ viProp->objname.c_str(),
+ viProp->property.c_str(),
+ viProp->zone,
+ ms_dbusTypes[viProp->type]);
+ int ret = ico_dbus_amb_get(viProp->objname.c_str(),
+ viProp->property.c_str(),
+ viProp->zone,
+ ms_dbusTypes[viProp->type],
+ CicoSCVInfoManager::dbusAMBGetCB,
+ viProp);
+ if (0 != ret) {
+ ICO_WRN("ico_dbus_amb_subscribe failed. ret=%d", ret);
+ }
+
+ // subscribe vehicle information
+ ICO_DBG("called: ico_dbus_amb_subscribe"
+ "(objname=%s prop=%s zone=%d type=%d)",
+ viProp->objname.c_str(),
+ viProp->property.c_str(),
+ viProp->zone,
+ ms_dbusTypes[viProp->type]);
+ ret = ico_dbus_amb_subscribe(viProp->objname.c_str(),
+ viProp->property.c_str(),
+ viProp->zone,
+ ms_dbusTypes[viProp->type],
+ CicoSCVInfoManager::dbusAMBNotifyCB,
+ viProp);
+ if (0 != ret) {
+ ICO_WRN("ico_dbus_amb_subscribe failed. ret=%d", ret);
+ }
+
+ ICO_TRA("CicoSCVInfoManager::dbusAMBFindCB Levae");
+}
+
+//--------------------------------------------------------------------------
+/**
+ * @brief callback function of ico_dbus_amb_get result
+ *
+ * @param [in] objectname dbus object name
+ * @param [in] property vehicle information's name
+ * @param [in] type type of vechcle information
+ * @param [in] value vechcle information's value
+ * @param [in] data user data
+ */
+//--------------------------------------------------------------------------
+void
+CicoSCVInfoManager::dbusAMBGetCB(const char *objectname,
+ const char *property,
+ dbus_type type,
+ union dbus_value_variant value,
+ void *data)
+{
+ ICO_TRA("CicoSCVInfoManager::dbusAMBGetCB Enter"
+ "(objname=%s prop=%s type=%d)",
+ objectname, property, type);
+
+ if (NULL == data) {
+ ICO_WRN("data is null");
+ return;
+ }
+
+ CicoSCVIPropertyConf* viConf = static_cast<CicoSCVIPropertyConf*>(data);
+
+ CicoSCVInfo* vinfo = new CicoSCVInfo(type, viConf->id, value);
+ ecore_event_add(ms_ecoreEvType, vinfo,
+ CicoSCVInfoManager::evVInfoFree, NULL);
+
+ ICO_TRA("CicoSCVInfoManager::dbusAMBGetCB Levae");
+}
+
+//--------------------------------------------------------------------------
+/**
+ * @brief callback function of ico_dbus_amb_get result
+ *
+ * @param [in] objectname dbus object name
+ * @param [in] property vehicle information's name
+ * @param [in] type type of vechcle information
+ * @param [in] value vechcle information's value
+ * @param [in] sequence number of sequence
+ * @parma [in] tv recored time
+ * @param [in] data user data
+ */
+//--------------------------------------------------------------------------
+void
+CicoSCVInfoManager::dbusAMBNotifyCB(const char *objectname,
+ const char *property,
+ dbus_type type,
+ union dbus_value_variant value,
+ int sequence,
+ struct timeval tv,
+ void *data)
+{
+ ICO_TRA("CicoSCVInfoManager::dbusAMBNotifyCB Enter"
+ "(objname=%s prop=%s type=%d)",
+ objectname, property, type);
+
+ if (NULL == data) {
+ ICO_WRN("data is null");
+ return;
+ }
+
+ CicoSCVIPropertyConf* viConf = static_cast<CicoSCVIPropertyConf*>(data);
+
+ CicoSCVInfo* vinfo = new CicoSCVInfo(type, viConf->id, value);
+ ecore_event_add(ms_ecoreEvType, vinfo,
+ CicoSCVInfoManager::evVInfoFree, NULL);
+
+ ICO_TRA("CicoSCVInfoManager::dbusAMBNotifyCB Leave");
+}
+// vim:set expandtab ts=4 sw=4:
--- /dev/null
+/*
+ * Copyright (c) 2013, TOYOTA MOTOR CORPORATION.
+ *
+ * This program is licensed under the terms and conditions of the
+ * Apache License, version 2.0. The full text of the Apache License is at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ */
+
+//==========================================================================
+/**
+ * @file CicoSCVInfoManager.h
+ *
+ * @brief This file is definition of CicoSCVInfoManager class
+ */
+//==========================================================================
+#ifndef __CICO_SC_VINFO_MANAGER_H__
+#define __CICO_SC_VINFO_MANAGER_H__
+
+#include <string>
+#include <map>
+
+#include <ico_dbus_amb_efl.h>
+#include "CicoCommonDef.h"
+
+//==========================================================================
+// Forward declaration
+//==========================================================================
+
+//==========================================================================
+/*
+ * @brief This class manage vehicle information
+ */
+//==========================================================================
+class CicoSCVInfoManager
+{
+public:
+ // get CicoSCVInfoManager instance
+ static CicoSCVInfoManager* getInstance(void);
+
+ // startup communication of vehicle information
+ bool startup(void);
+
+ // teardown communication of vehicle information
+ bool teardown(void);
+
+ // get ecore event type
+ int getEcoreEvType(void);
+
+ // get vehicle information
+ bool getVehicleInfo(int property);
+
+private:
+ // default constructor
+ CicoSCVInfoManager();
+
+ // destructor
+ ~CicoSCVInfoManager();
+
+ // assignment operator
+ CicoSCVInfoManager& operator=(const CicoSCVInfoManager &object);
+
+ // copy constructor
+ CicoSCVInfoManager(const CicoSCVInfoManager &object);
+
+ // start vehicle information monitoring
+ void startMonitoring(void);
+
+ // stop vehicle information monitoring
+ void stopMonitoring(void);
+
+ // callback find vehicle information
+ static void dbusAMBFindCB(const char *objectname,
+ const char *property,
+ dbus_type type,
+ void *user_data,
+ ico_dbus_error_t *error);
+
+ // callback get vehicle information
+ static void dbusAMBGetCB(const char *objectname,
+ const char *property,
+ dbus_type type,
+ union dbus_value_variant value,
+ void *user_data);
+
+ // callback notify vehicle information
+ static void dbusAMBNotifyCB(const char *objectname,
+ const char *property,
+ dbus_type type,
+ union dbus_value_variant value,
+ int sequence,
+ struct timeval tv,
+ void *user_data);
+
+ // callback function of Ecore_End_Cb
+ static void evVInfoFree(void* user_data, void* func_data);
+
+ // callback function of ecore timer
+ static Eina_Bool ecoreRetryFindPropCB(void *data);
+
+private:
+ // CicoSCVInfoManager instannce
+ static CicoSCVInfoManager* ms_myInstance;
+
+ // ecore event type
+ static int ms_ecoreEvType;
+
+ // dbus_type table
+ static dbus_type ms_dbusTypes[ICO_TYPE_MAX];
+
+ static int ms_retryCnt;
+
+ // initialized flag
+ bool m_initialized;
+};
+#endif // __CICO_SC_VINFO_MANAGER_H__
+// vim:set expandtab ts=4 sw=4:
*/
//--------------------------------------------------------------------------
int
-CicoSCWayland::intialize(void)
+CicoSCWayland::initialize(void)
{
- ICO_DBG("CicoSCWayland::initialize Enter");
+ ICO_TRA("CicoSCWayland::initialize Enter");
for (int i = 0; i < (5000/50); ++i) {
m_wlDisplay = wl_display_connect(NULL);
if (NULL != m_wlDisplay) {
if (NULL == m_wlDisplay) {
ICO_ERR("wl_display_connect failed.");
- ICO_ERR("CicoSCWayland::initialize Leave(EIO)");
+ ICO_TRA("CicoSCWayland::initialize Leave(EIO)");
return ICO_SYC_EIO;
}
m_wlRegistry = wl_display_get_registry(m_wlDisplay);
if (NULL == m_wlRegistry) {
ICO_ERR("wl_display_get_registry failed.");
- ICO_ERR("CicoSCWayland::initialize Leave(EIO)");
+ ICO_TRA("CicoSCWayland::initialize Leave(EIO)");
return ICO_SYC_EIO;
}
}
if (ifcount != initCount) {
- ICO_DBG("initialize interface time up NG");
- ICO_ERR("CicoSCWayland::initialize Leave(EIO)");
+ ICO_ERR("initialize interface time up NG");
+ ICO_TRA("CicoSCWayland::initialize Leave(EIO)");
return ICO_SYC_EIO;
}
else {
ICO_DBG("CicoSCWayland::initialize: Wayland/Weston connect OK");
- ICO_DBG("CicoSCWayland::initialize: Leave(EOK)");
+ ICO_TRA("CicoSCWayland::initialize: Leave(EOK)");
return ICO_SYC_EOK;
}
int
CicoSCWayland::addEcoreMainWlFdHandler(void)
{
- ICO_DBG("CicoSCWayland::addEcoreMainWlFdHandler Enter");
+ ICO_TRA("CicoSCWayland::addEcoreMainWlFdHandler Enter");
ICO_DBG("called: ecore_main_fd_handler_add(fd=%d)", m_wlFd);
m_ecoreFdHandler = ecore_main_fd_handler_add(m_wlFd,
ECORE_FD_READ,
NULL);
if (NULL == m_ecoreFdHandler) {
ICO_ERR("ecore_main_fd_handler_add failed.");
- ICO_DBG("CicoSCWayland::addEcoreMainWlFdHandler Leave(EIO)");
+ ICO_TRA("CicoSCWayland::addEcoreMainWlFdHandler Leave(EIO)");
return ICO_SYC_EIO;
}
ecore_main_loop_iterate();
CicoSCWayland::getInstance()->dispatchDisplay();
}
- ICO_DBG("CicoSCWayland::addEcoreMainWlFdHandler Leave");
+ ICO_TRA("CicoSCWayland::addEcoreMainWlFdHandler Leave");
return ICO_SYC_EOK;
}
Eina_Bool
CicoSCWayland::waylandFdHandler(void *data, Ecore_Fd_Handler *handler)
{
-// ICO_DBG("waylandFdHandler: Enter");
+// ICO_TRA("waylandFdHandler: Enter");
CicoSCWayland::getInstance()->flushDisplay();
}
CicoSCWayland::getInstance()->flushDisplay();
-// ICO_DBG("waylandFdHandler: Leave");
+// ICO_TRA("waylandFdHandler: Leave");
return ECORE_CALLBACK_RENEW ;
}
// vim:set expandtab ts=4 sw=4:
static CicoSCWayland* getInstance();
// initialize wayland connection
- int intialize(void);
+ int initialize(void);
// flush display
void flushDisplay(void);
subwindow(0), eventmask(0), x(-1), y(-1), width(-1), height(-1),
visible(false), raise(false), active(false)
{
- ICO_DBG("CicoSCWindow::CicoSCWindow Enter");
- ICO_DBG("CicoSCWindow::CicoSCWindow Leave");
+// ICO_TRA("CicoSCWindow::CicoSCWindow Enter");
+// ICO_TRA("CicoSCWindow::CicoSCWindow Leave");
}
//--------------------------------------------------------------------------
//--------------------------------------------------------------------------
CicoSCWindow::~CicoSCWindow()
{
- ICO_DBG("CicoSCWindow::~CicoSCWindow Enter");
- ICO_DBG("CicoSCWindow::~CicoSCWindow Leave");
+// ICO_TRA("CicoSCWindow::~CicoSCWindow Enter");
+// ICO_TRA("CicoSCWindow::~CicoSCWindow Leave");
}
//--------------------------------------------------------------------------
#include "CicoSCWindowController.h"
#include "CicoLog.h"
-#include "CicoSCSystemConfig.h"
-#include "CicoSCConf.h"
+#include "CicoSystemConfig.h"
+#include "CicoConf.h"
#include "CicoSCDisplay.h"
#include "CicoSCLayer.h"
#include "CicoSCDisplayZone.h"
int
CicoSCWindowController::initDB(void)
{
- ICO_DBG("CicoSCWindowController::initDB: Enter");
+ ICO_TRA("CicoSCWindowController::initDB: Enter");
const vector<CicoSCDisplayConf*>& displayList =
- CicoSCSystemConfig::getInstance()->getDisplayConfList();
+ CicoSystemConfig::getInstance()->getDisplayConfList();
vector<CicoSCDisplayConf*>::const_iterator itr;
itr = displayList.begin();
for (; itr != displayList.end(); ++itr) {
m_displayList.push_back(display);
}
- ICO_DBG("CicoSCWindowController::initDB: Leave");
+ ICO_TRA("CicoSCWindowController::initDB: Leave");
return ICO_SYC_EOK;
}
const char *animation,
int animationTime)
{
- ICO_DBG("CicoSCWindowController::show Enter"
+ ICO_TRA("CicoSCWindowController::show Enter"
"(surfaceid=0x%08X animation=%s animationTime=%d)",
surfaceid, animation, animationTime);
// find window information in window list
CicoSCWindow *window = findWindow(surfaceid);
if (NULL == window) {
- ICO_WRN("CicoSCWindowController::show Leave(ENOENT)");
+ ICO_WRN("not found window information");
+ ICO_TRA("CicoSCWindowController::show Leave(ENOENT)");
return ICO_SYC_ENOENT;
}
// flush display
CicoSCWayland::getInstance()->flushDisplay();
- ICO_DBG("CicoSCWindowController::show Leave(EOK)");
+ ICO_TRA("CicoSCWindowController::show Leave(EOK)");
return ICO_SYC_EOK;
}
const char *animation,
int animationTime)
{
- ICO_DBG("CicoSCWindowController::hide Enter"
+ ICO_TRA("CicoSCWindowController::hide Enter"
"(surfaceid=0x%08X animation=%s animationTime=%d)",
surfaceid, animation, animationTime);
// find window information in window list
CicoSCWindow *window = findWindow(surfaceid);
if (NULL == window) {
- ICO_WRN("CicoSCWindowController::hide Leave(ENOENT)");
+ ICO_WRN("not found window information");
+ ICO_TRA("CicoSCWindowController::hide Leave(ENOENT)");
return ICO_SYC_ENOENT;
}
if (false == window->visible) {
ICO_DBG("already hide state");
- ICO_DBG("CicoSCWindowController::hide Leave(EOK)");
+ ICO_TRA("CicoSCWindowController::hide Leave(EOK)");
return ICO_SYC_EOK;
}
// flush display
CicoSCWayland::getInstance()->flushDisplay();
- ICO_DBG("CicoSCWindowController::hide Leave(EOK)");
+ ICO_TRA("CicoSCWindowController::hide Leave(EOK)");
return ICO_SYC_EOK;
}
const char *animation,
int animationTime)
{
- ICO_DBG("CicoSCWindowController::resize Enter"
+ ICO_TRA("CicoSCWindowController::resize Enter"
"(surfaceid=0x%08X h=%d w=%d animation=%s animationTime=%d)",
surfaceid, w, h, animation, animationTime);
// find window information in window list
CicoSCWindow *window = findWindow(surfaceid);
if (NULL == window) {
- ICO_WRN("CicoSCWindowController::resize Leave(ENOENT)");
+ ICO_WRN("not found window information");
+ ICO_TRA("CicoSCWindowController::resize Leave(ENOENT)");
return ICO_SYC_ENOENT;
}
// flush display
CicoSCWayland::getInstance()->flushDisplay();
- ICO_DBG("CicoSCWindowController::resize Leave(EOK)");
+ ICO_TRA("CicoSCWindowController::resize Leave(EOK)");
return ICO_SYC_EOK;
}
const char *animation,
int animationTime)
{
- ICO_DBG("CicoSCWindowController::move Enter"
+ ICO_TRA("CicoSCWindowController::move Enter"
"(surfaceid=0x%08X nodeid=%d x=%d y=%d "
"animation=%s animationTime=%d)",
surfaceid, nodeid, x, y, animation, animationTime);
// find window information in window list
CicoSCWindow *window = findWindow(surfaceid);
if (NULL == window) {
- ICO_WRN("CicoSCWindowController::move Leave(ENOENT)");
+ ICO_WRN("not found window information");
+ ICO_TRA("CicoSCWindowController::move Leave(ENOENT)");
return ICO_SYC_ENOENT;
}
// flush display
CicoSCWayland::getInstance()->flushDisplay();
- ICO_DBG("CicoSCWindowController::move Leave(EOK)");
+ ICO_TRA("CicoSCWindowController::move Leave(EOK)");
return ICO_SYC_EOK;
}
const char *animation,
int animationTime)
{
- ICO_DBG("CicoSCWindowController::raise Enter"
+ ICO_TRA("CicoSCWindowController::raise Enter"
"(surfaceid=0x%08X animation=%s animationTime=%d)",
surfaceid, animation, animationTime);
// find window information in window list
CicoSCWindow *window = findWindow(surfaceid);
if (NULL == window) {
- ICO_WRN("CicoSCWindowController::raise Leave(ENOENT)");
+ ICO_WRN("not found window information");
+ ICO_TRA("CicoSCWindowController::raise Leave(ENOENT)");
return ICO_SYC_ENOENT;
}
// flush display
CicoSCWayland::getInstance()->flushDisplay();
- ICO_DBG("CicoSCWindowController::raise Leave(EOK)");
+ ICO_TRA("CicoSCWindowController::raise Leave(EOK)");
return ICO_SYC_EOK;
}
*
* @param [in] surfaceid wayland surface id
* @param [in] nodeid node id
+ * @param [in] layerid layer id
* @param [in] x window x position
* @param [in] y window y position
* @param [in] w window width
int
CicoSCWindowController::setGeometry(int surfaceid,
int nodeid,
+ int layerid,
int x,
int y,
int w,
const char *moveAnimation,
int moveAnimationTime)
{
- ICO_DBG("CicoSCWindowController::setGeometry Enter"
- "(surfaceid=0x%08X nodeid=%d x=%d y=%d w=%d h=%d "
+ ICO_TRA("CicoSCWindowController::setGeometry Enter"
+ "(surfaceid=0x%08X nodeid=%d layerid=%d x=%d y=%d w=%d h=%d "
"resizeAnimation=%s resizeAnimationTime=%d "
"moveAnimation=%s moveAnimationTime=%d)",
- surfaceid, nodeid, x, y, w, h,
+ surfaceid, nodeid, layerid, x, y, w, h,
resizeAnimation, resizeAnimationTime,
moveAnimation, moveAnimationTime);
// find window information in window list
CicoSCWindow *window = findWindow(surfaceid);
if (NULL == window) {
- ICO_WRN("CicoSCWindowController::setGeometry Leave(ENOENT)");
+ ICO_WRN("not found window information");
+ ICO_TRA("CicoSCWindowController::setGeometry Leave(ENOENT)");
return ICO_SYC_ENOENT;
}
if (m_physicalDisplayTotal <= (unsigned int)moveNodeId) {
ICO_WRN("nodeid(%d) is over physical display total(%d)",
m_physicalDisplayTotal, nodeid);
- ICO_WRN("CicoSCWindowController::setGeometry Leave(EINVAL)");
+ ICO_TRA("CicoSCWindowController::setGeometry Leave(EINVAL)");
return ICO_SYC_EINVAL;
}
moveH = h;
}
+ // set window layer to Multi Window Manager
+ if (0 <= layerid) {
+ setWindowLayer(window->surfaceid, layerid);
+ }
+
+ // update window attr
+ window->nodeid = moveNodeId;
+
// set visible request to Multi Window Manager
CicoSCWlWinMgrIF::setPositionsize(window->surfaceid, moveNodeId,
moveX, moveY, moveW, moveH,
// flush display
CicoSCWayland::getInstance()->flushDisplay();
- ICO_DBG("CicoSCWindowController::setGeometry Leave(EOK)");
+ ICO_TRA("CicoSCWindowController::setGeometry Leave(EOK)");
return ICO_SYC_EOK;
}
* @brief set window(surface) geometry
*
* @param [in] surfaceid wayland surface id
+ * @param [in] layerid layer id
* @param [in] nodeid node id
* @param [in] zone display zone name
* @param [in] resizeAnimation resize animation name
int
CicoSCWindowController::setGeometry(int surfaceid,
const char *zone,
+ int layerid,
const char *resizeAnimation,
int resizeAnimationTime,
const char *moveAnimation,
int moveAnimationTime)
{
- ICO_DBG("CicoSCWindowController::setGeometry Enter"
- "(surfaceid=0x%08X zone=%s "
+ ICO_TRA("CicoSCWindowController::setGeometry Enter"
+ "(surfaceid=0x%08X zone=%s layerid=%d "
"resizeAnimation=%s resizeAnimationTime=%d "
"moveAnimation=%s moveAnimationTime=%d)",
- surfaceid, zone,
+ surfaceid, zone, layerid,
resizeAnimation, resizeAnimationTime,
moveAnimation, moveAnimationTime);
// find window information in window list
CicoSCWindow *window = findWindow(surfaceid);
if (NULL == window) {
- ICO_WRN("CicoSCWindowController::setGeometry Leave(ENOENT)");
+ ICO_WRN("not found window information");
+ ICO_TRA("CicoSCWindowController::setGeometry Leave(ENOENT)");
return ICO_SYC_ENOENT;
}
if ((NULL == zone) || ('\0' == zone[0])) {
- ICO_WRN("CicoSCWindowController::setGeometry Leave(EINVAL)");
+ ICO_WRN("zone value is invalid");
+ ICO_TRA("CicoSCWindowController::setGeometry Leave(EINVAL)");
return ICO_SYC_EINVAL;
}
if (NULL == dispzone) {
ICO_WRN("display zone name(%s) is invalid.", zone);
- ICO_WRN("CicoSCWindowController::setGeometry Leave(EINVAL)");
+ ICO_TRA("CicoSCWindowController::setGeometry Leave(EINVAL)");
return ICO_SYC_EINVAL;
}
if (m_physicalDisplayTotal <= (unsigned int)displayno) {
ICO_WRN("nodeid(%d) is over physical display total(%d)",
m_physicalDisplayTotal, displayno);
- ICO_WRN("CicoSCWindowController::setGeometry Leave(EINVAL)");
+ ICO_TRA("CicoSCWindowController::setGeometry Leave(EINVAL)");
return ICO_SYC_EINVAL;
}
window->zone = dispzone->fullname;
setAttributes(window->surfaceid);
- int ret = setGeometry(surfaceid, displayno,
+ int ret = setGeometry(surfaceid, displayno, layerid,
dispzone->x, dispzone->y,
dispzone->width, dispzone->height,
resizeAnimation, resizeAnimationTime,
moveAnimation, moveAnimationTime);
- ICO_DBG("CicoSCWindowController::setGeometry Leave(EOK)");
+ ICO_TRA("CicoSCWindowController::setGeometry Leave(EOK)");
return ret;
}
const char *animation,
int animationTime)
{
- ICO_DBG("CicoSCWindowController::lower Enter"
+ ICO_TRA("CicoSCWindowController::lower Enter"
"(surfaceid=0x%08X animation=%s animationTime=%d)",
surfaceid, animation, animationTime);
// find window information in window list
CicoSCWindow *window = findWindow(surfaceid);
if (NULL == window) {
- ICO_WRN("CicoSCWindowController::lower Leave(ENOENT)");
+ ICO_WRN("not found window information");
+ ICO_TRA("CicoSCWindowController::lower Leave(ENOENT)");
return ICO_SYC_ENOENT;
}
// flush display
CicoSCWayland::getInstance()->flushDisplay();
- ICO_DBG("CicoSCWindowController::lower Leave(EOK)");
+ ICO_TRA("CicoSCWindowController::lower Leave(EOK)");
return ICO_SYC_EOK;
}
int
CicoSCWindowController::setWindowLayer(int surfaceid, int layerid)
{
- ICO_DBG("CicoSCWindowController::setWindowLayer Enter"
+ ICO_TRA("CicoSCWindowController::setWindowLayer Enter"
"(surfaceid=0x%08X layerid=%x)", surfaceid, layerid);
// find window information in window list
CicoSCWindow *window = findWindow(surfaceid);
if (NULL == window) {
- ICO_WRN("CicoSCWindowController::setWindowLayer Leave(ENOENT)");
+ ICO_WRN("not found window information");
+ ICO_TRA("CicoSCWindowController::setWindowLayer Leave(ENOENT)");
return ICO_SYC_ENOENT;
}
// check special layer
if ((layerid != ICO_WINDOW_MGR_LAYERTYPE_TOUCH) &&
(layerid != ICO_WINDOW_MGR_LAYERTYPE_CURSOR)) {
- ICO_WRN("CicoSCWindowController::setWindowLayer Leave(ENOENT[disp=%d,layer=%d])",
+ ICO_TRA("CicoSCWindowController::setWindowLayer Leave(ENOENT[disp=%d,layer=%d])",
window->displayid, layerid);
return ICO_SYC_ENOENT;
}
// flush display
CicoSCWayland::getInstance()->flushDisplay();
- ICO_DBG("CicoSCWindowController::setWindowLayer Leave(EOK)");
+ ICO_TRA("CicoSCWindowController::setWindowLayer Leave(EOK)");
return ICO_SYC_EOK;
}
int
CicoSCWindowController::showLayer(int displayid, int layerid)
{
- ICO_DBG("CicoSCWindowController::showLayer Enter"
+ ICO_TRA("CicoSCWindowController::showLayer Enter"
"(displayid=%d layerid=%d)", displayid, layerid);
// find layer information in layer list
CicoSCLayer* layer = findLayer(displayid, layerid);
if (NULL == layer) {
- ICO_WRN("CicoSCWindowController::showLayer Leave(ENOENT)");
+ ICO_WRN("not found layer information");
+ ICO_TRA("CicoSCWindowController::showLayer Leave(ENOENT)");
return ICO_SYC_ENOENT;
}
// flush display
CicoSCWayland::getInstance()->flushDisplay();
- ICO_DBG("CicoSCWindowController::showLayer Leave(EOK)");
+ ICO_TRA("CicoSCWindowController::showLayer Leave(EOK)");
return ICO_SYC_EOK;
}
int
CicoSCWindowController::hideLayer(int displayid, int layerid)
{
- ICO_DBG("CicoSCWindowController::hideLayer Enter"
+ ICO_TRA("CicoSCWindowController::hideLayer Enter"
"displayid=%d layerid=%d)",
displayid, layerid);
// find layer information in layer list
CicoSCLayer* layer = findLayer(displayid, layerid);
if (NULL == layer) {
- ICO_WRN("CicoSCWindowController::hideLayer Leave(ENOENT)");
+ ICO_WRN("not found layer information");
+ ICO_TRA("CicoSCWindowController::hideLayer Leave(ENOENT)");
return ICO_SYC_ENOENT;
}
// flush display
CicoSCWayland::getInstance()->flushDisplay();
- ICO_DBG("CicoSCWindowController::hideVisible Leave(EOK)");
+ ICO_TRA("CicoSCWindowController::hideVisible Leave(EOK)");
return ICO_SYC_EOK;
}
{
CicoSCWindow *window = NULL;
- ICO_DBG("CicoSCWindowController::active Enter"
+ ICO_TRA("CicoSCWindowController::active Enter"
"(surfaceid=0x%08X, target=%08X)", surfaceid, target);
// find window information in window list
if (surfaceid) {
window = findWindow(surfaceid);
if (NULL == window) {
- ICO_WRN("CicoSCWindowController::active Leave(ENOENT)");
+ ICO_WRN("not found window information");
+ ICO_TRA("CicoSCWindowController::active Leave(ENOENT)");
return ICO_SYC_ENOENT;
}
}
}
}
- ICO_DBG("CicoSCWindowController::active Leave(EOK)");
+ ICO_TRA("CicoSCWindowController::active Leave(EOK)");
return ICO_SYC_EOK;
}
int
CicoSCWindowController::mapSurface(int surfaceid, int framerate)
{
- ICO_WRN("CicoSCWindowController::mapSurface Enter");
+ ICO_TRA("CicoSCWindowController::mapSurface Enter");
// find window information in window list
CicoSCWindow *window = findWindow(surfaceid);
if (NULL == window) {
- ICO_WRN("CicoSCWindowController::mapSurface Leave(ENOENT)");
+ ICO_WRN("not found window information");
+ ICO_TRA("CicoSCWindowController::mapSurface Leave(ENOENT)");
return ICO_SYC_ENOENT;
}
CicoSCWlWinMgrIF::mapSurface(surfaceid, framerate);
CicoSCWayland::getInstance()->flushDisplay();
- ICO_DBG("CicoSCWindowController::mapSurface Leave(EOK)");
+ ICO_TRA("CicoSCWindowController::mapSurface Leave(EOK)");
return ICO_SYC_EOK;
}
int
CicoSCWindowController::unmapSurface(int surfaceid)
{
- ICO_DBG("CicoSCWindowController::unmapSurface Enter");
+ ICO_TRA("CicoSCWindowController::unmapSurface Enter");
// find window information in window list
CicoSCWindow *window = findWindow(surfaceid);
if (NULL == window) {
- ICO_WRN("CicoSCWindowController::unmapSurface Leave(ENOENT)");
+ ICO_WRN("not found window information");
+ ICO_TRA("CicoSCWindowController::unmapSurface Leave(ENOENT)");
return ICO_SYC_ENOENT;
}
CicoSCWlWinMgrIF::unmapSurface(surfaceid);
CicoSCWayland::getInstance()->flushDisplay();
- ICO_DBG("CicoSCWindowController::unmapSurface Leave(EOK)");
+ ICO_TRA("CicoSCWindowController::unmapSurface Leave(EOK)");
return ICO_SYC_EOK;
}
int
CicoSCWindowController::setAttributes(int surfaceid)
{
- ICO_DBG("CicoSCWindowController::setAttributes Enter"
+ ICO_TRA("CicoSCWindowController::setAttributes Enter"
"(surfaceid=0x%08X)", surfaceid);
// find window information in window list
CicoSCWindow *window = findWindow(surfaceid);
if (NULL == window) {
- ICO_WRN("CicoSCWindowController::setAttributes Leave(ENOENT)");
+ ICO_WRN("not found window information");
+ ICO_TRA("CicoSCWindowController::setAttributes Leave(ENOENT)");
return ICO_SYC_ENOENT;
}
// find zone
const CicoSCDisplayZone* zone = findDisplayZone(window->zoneid);
if (NULL == zone) {
- ICO_WRN("CicoSCWindowController::setAttributes Leave(ENOENT)");
+ ICO_WRN("not found zone information");
+ ICO_TRA("CicoSCWindowController::setAttributes Leave(ENOENT)");
return ICO_SYC_ENOENT;
}
CicoSCWlWinMgrIF::setAttributes(surfaceid, attributes);
CicoSCWayland::getInstance()->flushDisplay();
- ICO_DBG("CicoSCWindowController::setAttributes Leave(EOK)");
+ ICO_TRA("CicoSCWindowController::setAttributes Leave(EOK)");
return ICO_SYC_EOK;
}
const char *appid,
int32_t layertype)
{
- ICO_DBG("CicoSCWindowController::createdCB Enter"
+ ICO_TRA("CicoSCWindowController::createdCB Enter"
"(surfaceid=0x%08X winname=%s pid=%d appid=%s layer=%x)",
surfaceid, winname, pid, appid, layertype);
if (layertype == ICO_WINDOW_MGR_LAYERTYPE_INPUTPANEL) {
// So far, SystemController ignores this event
// because it does not support InputPanel(Software Keyboard).
- ICO_DBG("CicoSCWindowController::createdCB Leave(Input Panel)");
+ ICO_WRN("Input Panel layer create window information skip.");
+ ICO_TRA("CicoSCWindowController::createdCB Leave(Input Panel)");
return;
}
CicoSCLifeCycleController* appctrl;
appctrl = CicoSCLifeCycleController::getInstance();
- const CicoSCAilItems *ailItem = appctrl->findAIL(appid);
+ const CicoAilItems *ailItem = appctrl->findAIL(appid);
if (NULL == ailItem) {
- const CicoSCAulItems* aulitem = appctrl->findAUL(pid);
+ const CicoAulItems* aulitem = appctrl->findAUL(pid);
if (NULL != aulitem) {
window->appid = aulitem->m_appid;
ICO_DBG("appid=%s", window->appid.c_str());
}
}
else{
+ delete window;
ICO_WRN("ail item not found.");
- ICO_WRN("CicoSCWindowController::createdCB Leave(ENOENT)");
+ ICO_TRA("CicoSCWindowController::createdCB Leave(ENOENT)");
return;
}
opt->soundres = true;
opt->soundname = window->appid;
opt->soundid = 0;
- CicoSCSystemConfig *sysconf = CicoSCSystemConfig::getInstance();
+ CicoSystemConfig *sysconf = CicoSystemConfig::getInstance();
const CicoSCDefaultConf *defconf = sysconf->getDefaultConf();
if (NULL != defconf) {
const CicoSCSoundZoneConf *zoneconf =
}
#endif
- ICO_DBG("CicoSCWindowController::createdCB Leave");
+ ICO_TRA("CicoSCWindowController::createdCB Leave");
}
//--------------------------------------------------------------------------
uint32_t surfaceid,
const char *winname)
{
- ICO_DBG("CicoSCWindowController::nameCB Enter"
+ ICO_TRA("CicoSCWindowController::nameCB Enter"
"(surfaceid=0x%08X winname=%s)", surfaceid, winname);
CicoSCWindow *window = findWindow(surfaceid);
if (NULL == window) {
- ICO_DBG("CicoSCWindowController::nameCB Leave");
+ ICO_WRN("not found window information");
+ ICO_TRA("CicoSCWindowController::nameCB Leave");
return;
}
message->addArgObject("winname", window->name);
CicoSCServer::getInstance()->sendMessageToHomeScreen(message);
- ICO_DBG("CicoSCWindowController::nameCB Leave");
+ ICO_TRA("CicoSCWindowController::nameCB Leave");
}
//--------------------------------------------------------------------------
struct ico_window_mgr *ico_window_mgr,
uint32_t surfaceid)
{
- ICO_DBG("CicoSCWindowController::destroyedCB Enter"
+ ICO_TRA("CicoSCWindowController::destroyedCB Enter"
"(surfaceid=0x%08X)", surfaceid);
CicoSCWindow *window = findWindow(surfaceid);
if (NULL == window) {
- ICO_DBG("CicoSCWindowController::destroyedCB Leave");
+ ICO_WRN("not found window information");
+ ICO_TRA("CicoSCWindowController::destroyedCB Leave");
return;
}
opt->soundres = true;
opt->soundname = window->appid;
opt->soundid = 0;
- CicoSCSystemConfig *sysconf = CicoSCSystemConfig::getInstance();
+ CicoSystemConfig *sysconf = CicoSystemConfig::getInstance();
const CicoSCDefaultConf *defconf = sysconf->getDefaultConf();
if (NULL != defconf) {
const CicoSCSoundZoneConf *zoneconf =
m_windowList.erase(window->surfaceid);
delete(window);
- ICO_DBG("CicoSCWindowController::destroyedCB Leave");
+ ICO_TRA("CicoSCWindowController::destroyedCB Leave");
}
//--------------------------------------------------------------------------
int32_t raise,
int32_t hint)
{
- ICO_DBG("CicoSCWindowController::visibleCB Enter"
+ ICO_TRA("CicoSCWindowController::visibleCB Enter"
"(surfaceid=0x%08X visible=%d raise=%d hint=%d)",
surfaceid, visible, raise, hint);
CicoSCWindow *window = findWindow(surfaceid);
if (NULL == window) {
- ICO_DBG("CicoSCWindowController::visibleCB Leave");
+ ICO_WRN("not found window information");
+ ICO_TRA("CicoSCWindowController::visibleCB Leave");
return;
}
}
if ((window->visible == newVisible) && (window->raise == newRaise) ){
- ICO_DBG("CicoSCWindowController::visibleCB Leave");
+ ICO_TRA("CicoSCWindowController::visibleCB Leave");
return;
}
message->addArgObject("active", window->active ? 1 : 0);
CicoSCServer::getInstance()->sendMessageToHomeScreen(message);
- ICO_DBG("CicoSCWindowController::visibleCB Leave");
+ ICO_TRA("CicoSCWindowController::visibleCB Leave");
}
//--------------------------------------------------------------------------
int32_t height,
int32_t hint)
{
- ICO_DBG("CicoSCWindowController::configureCB Enter"
+ ICO_TRA("CicoSCWindowController::configureCB Enter"
"(surfaceid=0x%08X node=%d layer=%x.%x x=%d y=%d "
"width=%d height=%d hint=%d)",
surfaceid, node, layertype, layer, x, y, width, height, hint);
if (layertype == ICO_WINDOW_MGR_LAYERTYPE_INPUTPANEL) {
// So far, SystemController ignores this event
// because it does not support InputPanel(Software Keyboard).
- ICO_DBG("CicoSCWindowController::configureCB Leave(Input Panel)");
+ ICO_TRA("CicoSCWindowController::configureCB Leave(Input Panel)");
return;
}
CicoSCWindow *window = findWindow(surfaceid);
if (NULL == window) {
- ICO_DBG("CicoSCWindowController::visibleCB Leave"
+ ICO_WRN("not found window information");
+ ICO_TRA("CicoSCWindowController::visibleCB Leave"
"(update window visible failed)");
return;
}
window->width = width;
window->height = height;
window->layertype = layertype;
-#if 0
- if (window->layerid != layer) {
- window->layerid = layer;
- layer = findLayer(window->displayid, layer);
- }
-#endif
}
// send message
message->addArgObject("active", window->active ? 1 : 0);
CicoSCServer::getInstance()->sendMessageToHomeScreen(message);
- ICO_DBG("CicoSCWindowController::configureCB Leave");
+ ICO_TRA("CicoSCWindowController::configureCB Leave");
}
//--------------------------------------------------------------------------
uint32_t surfaceid,
int32_t active)
{
- ICO_DBG("CicoSCWindowController::activeCB Enter"
+ ICO_TRA("CicoSCWindowController::activeCB Enter"
"(surfaceid=0x%08X active=%d)", surfaceid, active);
CicoSCWindow *window = findWindow(surfaceid);
if (NULL == window) {
- ICO_DBG("CicoSCWindowController::activeCB Leave(not found window)");
+ ICO_WRN("not found window information");
+ ICO_TRA("CicoSCWindowController::activeCB Leave(not found window)");
return;
}
if (0 == active) {
- ICO_DBG("CicoSCWindowController::activeCB Leave(not active)");
+ ICO_TRA("CicoSCWindowController::activeCB Leave(not active)");
return;
}
if (0 != window->active) {
- ICO_DBG("CicoSCWindowController::activeCB Leave(already active)");
+ ICO_TRA("CicoSCWindowController::activeCB Leave(already active)");
return;
}
message->addArgObject("winname", window->name);
CicoSCServer::getInstance()->sendMessageToHomeScreen(message);
- ICO_DBG("CicoSCWindowController::activeCB Leave");
+ ICO_TRA("CicoSCWindowController::activeCB Leave");
}
//--------------------------------------------------------------------------
uint32_t layer,
int32_t visible)
{
- ICO_DBG("CicoSCWindowController::layerVisibleCB Enter"
+ ICO_TRA("CicoSCWindowController::layerVisibleCB Enter"
"layer=%d visible=%d)", layer, visible);
// send message
message->addArgObject("visible", visible);
CicoSCServer::getInstance()->sendMessageToHomeScreen(message);
- ICO_DBG("CicoSCWindowController::layerVisibleCB Leave");
+ ICO_TRA("CicoSCWindowController::layerVisibleCB Leave");
}
//--------------------------------------------------------------------------
const char *appid,
struct wl_array *surfaces)
{
- ICO_DBG("CicoSCWindowController::appSurfacesCB Enter(appid=%s)", appid);
+ ICO_TRA("CicoSCWindowController::appSurfacesCB Enter(appid=%s)", appid);
//struct wl_array {
// size_t size;
ICO_DBG("appSurfacesCB: surface=%d", (int)*p);
}
- ICO_DBG("CicoSCWindowController::appSurfacesCB Leave");
+ ICO_TRA("CicoSCWindowController::appSurfacesCB Leave");
}
//--------------------------------------------------------------------------
{
int command;
- ICO_DBG("CicoSCWindowController::mapSurfaceCB Enter(ev=%d surf=%x "
+ ICO_TRA("CicoSCWindowController::mapSurfaceCB Enter(ev=%d surf=%x "
"type=%d target=%d w/h=%d/%d stride=%d form=%x)",
event, surfaceid, type, target, width, height, stride, format);
command = MSG_CMD_UNMAP_THUMB;
break;
default:
- ICO_DBG("CicoSCWindowController::mapSurfaceCB Leave(Unknown event(%d))", event);
+ ICO_TRA("CicoSCWindowController::mapSurfaceCB Leave(Unknown event(%d))", event);
return;
}
message->addArgObject("format", format);
CicoSCServer::getInstance()->sendMessageToHomeScreen(message);
- ICO_DBG("CicoSCWindowController::mapSurfaceCB Leave");
+ ICO_TRA("CicoSCWindowController::mapSurfaceCB Leave");
}
//--------------------------------------------------------------------------
const char *model,
int32_t transform)
{
- ICO_DBG("CicoSCWlWinMgrIF::outputGeometryCB Enter"
+ ICO_TRA("CicoSCWindowController::outputGeometryCB Enter"
"(x=%d y=%d physical_width=%d physical_height=%d "
"subpixel=%d make=%s model=%s transform=%d)",
x, y, physical_width, physical_height,
++m_physicalDisplayTotal;
if (0 == m_displayList.size()) {
- ICO_DBG("CicoSCWlWinMgrIF::outputGeometryCB Leave(display is zero)");
+ ICO_TRA("CicoSCWindowController::outputGeometryCB Leave"
+ "(display is zero)");
return;
}
if (m_displayList.size() < m_physicalDisplayTotal) {
- ICO_WRN("CicoSCWlWinMgrIF::outputGeometryCB Leave(display total unmatch)");
+ ICO_TRA("CicoSCWindowController::outputGeometryCB Leave"
+ "(display total unmatch)");
return;
}
}
display->dump();
- ICO_DBG("CicoSCWlWinMgrIF::outputGeometryCB Leave");
+ ICO_TRA("CicoSCWindowController::outputGeometryCB Leave");
}
//--------------------------------------------------------------------------
int32_t height,
int32_t refresh)
{
- ICO_DBG("CicoSCWlWinMgrIF::outputModeCB Enter"
+ ICO_TRA("CicoSCWindowController::outputModeCB Enter"
"(flags=%d width=%d height=%d refresh=%d)",
flags, width, height, refresh);
if (0 == m_displayList.size()) {
- ICO_DBG("CicoSCWlWinMgrIF::outputModeCB Leave(display is zero");
+ ICO_TRA("CicoSCWindowController::outputModeCB Leave(display is zero)");
return;
}
display->dump();
}
- ICO_DBG("CicoSCWlWinMgrIF::outputModeCB Leave");
+ ICO_TRA("CicoSCWindowController::outputModeCB Leave");
}
//==========================================================================
void
CicoSCWindowController::handleCommand(const CicoSCCommand * cmd)
{
-// ICO_DBG("CicoSCWindowController::handleCommand Enter(%d)", cmd->cmdid);
+// ICO_TRA("CicoSCWindowController::handleCommand Enter(%d)", cmd->cmdid);
CicoSCCmdWinCtrlOpt *opt = static_cast<CicoSCCmdWinCtrlOpt*>(cmd->opt);
/* show command (normal) */
(void)notifyResourceManager(opt->surfaceid,
NULL,
+ opt->layerid,
opt->animation.c_str(),
opt->animationTime);
}
break;
}
if (true == opt->zone.empty()) {
- (void)setGeometry(opt->surfaceid, opt->nodeid, opt->x, opt->y,
- opt->width, opt->height,
+ (void)setGeometry(opt->surfaceid, opt->nodeid, opt->layerid,
+ opt->x, opt->y, opt->width, opt->height,
opt->animation.c_str(), opt->animationTime,
opt->animation.c_str(), opt->animationTime);
}
else if (opt->zone == window->zone) {
- (void)setGeometry(opt->surfaceid, opt->zone.c_str(),
+ (void)setGeometry(opt->surfaceid, opt->zone.c_str(), opt->layerid,
opt->animation.c_str(), opt->animationTime,
opt->animation.c_str(), opt->animationTime);
}
else {
(void)notifyResourceManager(opt->surfaceid,
opt->zone.c_str(),
+ opt->layerid,
opt->animation.c_str(),
opt->animationTime);
}
break;
}
-// ICO_DBG("CicoSCWindowController::handleCommand Leave");
+// ICO_TRA("CicoSCWindowController::handleCommand Leave");
}
int
CicoSCWindowController::notifyResourceManager(int surfaceid,
const char *zone,
+ int layerid,
const char *animation,
int animationTime)
{
- ICO_DBG("CicoSCWindowController::notifyResourceManager Enter"
- "(surfaceid=0x%08X zone=%s animation=%s animationTime=%d)",
- surfaceid, zone, animation, animationTime);
+ ICO_TRA("CicoSCWindowController::notifyResourceManager Enter"
+ "(surfaceid=0x%08X zone=%s layerid=%d "
+ "animation=%s animationTime=%d)",
+ surfaceid, zone, layerid, animation, animationTime);
// find window information in window list
CicoSCWindow *window = findWindow(surfaceid);
if (NULL == window) {
- ICO_WRN("CicoSCWindowController::notifyResourceManager Leave(ENOENT)");
+ ICO_WRN("not found window information");
+ ICO_TRA("CicoSCWindowController::notifyResourceManager Leave(ENOENT)");
return ICO_SYC_ENOENT;
}
opt->dispres = true;
opt->winname = window->name;
+ opt->layerid = layerid;
opt->surfaceid = window->surfaceid;
opt->animation = animation ? animation : "";
opt->animationTime = animationTime;
opt->dispzone = zone->fullname;
}
else {
- ICO_WRN("CicoSCWindowController::notifyResourceManager Leave(ENOENT)");
+ ICO_WRN("not found zone information");
+ ICO_TRA("CicoSCWindowController::notifyResourceManager Leave(ENOENT)");
return ICO_SYC_ENOENT;
}
}
opt->soundres = true;
opt->soundname = window->appid;
opt->soundid = 0;
- CicoSCSystemConfig *sysconf = CicoSCSystemConfig::getInstance();
+ CicoSystemConfig *sysconf = CicoSystemConfig::getInstance();
const CicoSCDefaultConf *defconf = sysconf->getDefaultConf();
if (NULL != defconf) {
const CicoSCSoundZoneConf *zoneconf =
m_resMgr->handleCommand((const CicoSCCommand&)cmd, true);
- ICO_DBG("CicoSCWindowController::notifyResourceManager Leave(EOK)");
+ ICO_TRA("CicoSCWindowController::notifyResourceManager Leave(EOK)");
return ICO_SYC_EOK;
}
// vim:set expandtab ts=4 sw=4:
int setGeometry(int surfaceid,
int nodeid,
+ int layerid,
int x,
int y,
int w,
int setGeometry(int surfaceid,
const char *zone,
+ int layerid,
const char *resizeAnimation,
int resizeAnimationTime,
const char *moveAnimation,
int notifyResourceManager(int surfaceid,
const char *zone,
+ int layerid,
const char *animation,
int animationTime);
const char *interface,
uint32_t version)
{
- ICO_DBG("CicoSCWlInputMgrIF::initInterface : Enter(interface=%s)",
+ ICO_TRA("CicoSCWlInputMgrIF::initInterface : Enter(interface=%s)",
interface);
if (0 == strcmp(interface, ICO_WL_INPUT_MGR_CTRL_IF)) {
// get interface instance
+ ICO_DBG("called: wl_registry_bind");
void *wlProxy = wl_registry_bind(registry,
name,
&ico_input_mgr_control_interface,
1);
if (NULL == wlProxy) {
- ICO_WRN("initInterface : interface(%s) wl_registry_bind failed.",
- interface);
- ICO_WRN("initInterface : Leave(binding failed)");
+ ICO_WRN("interface(%s) wl_registry_bind failed.", interface);
+ ICO_TRA("CicoSCWlInputMgrIF::initInterface Leave",
+ "(binding failed)");
return;
}
m_inputmgr = (struct ico_input_mgr_control*)wlProxy;
}
else if (0 == strcmp(interface, ICO_WL_EXINPUT_IF)) {
// get interface instance
+ ICO_DBG("called: wl_registry_bind");
void *wlProxy = wl_registry_bind(registry,
name,
&ico_exinput_interface,
1);
if (NULL == wlProxy) {
- ICO_WRN("initInterface : interface(%s) wl_registry_bind failed.",
- interface);
- ICO_WRN("initInterface : Leave(binding failed)");
+ ICO_WRN("interface(%s) wl_registry_bind failed.", interface);
+ ICO_TRA("CicoSCWlInputMgrIF::initInterface Leave",
+ "(binding failed)");
return;
}
}
else if (0 == strcmp(interface, ICO_WL_INPUT_MGR_DEV_IF)) {
// get interface instance
+ ICO_DBG("called: wl_registry_bind");
void *wlProxy = wl_registry_bind(registry,
name,
&ico_input_mgr_device_interface,
1);
if (NULL == wlProxy) {
- ICO_WRN("initInterface : interface(%s) wl_registry_bind failed.",
- interface);
- ICO_WRN("initInterface : Leave(binding failed)");
+ ICO_WRN("interface(%s) wl_registry_bind failed.", interface);
+ ICO_TRA("CicoSCWlInputMgrIF::initInterface Leave"
+ "(binding failed)");
return;
}
(NULL != m_exinput)) {
m_initialized = true;
}
- ICO_DBG("CicoSCWlInputMgrIF::initInterface : Leave");
+ ICO_TRA("CicoSCWlInputMgrIF::initInterface Leave");
}
//--------------------------------------------------------------------------
const char *codename,
int32_t code)
{
- ICO_DBG("CicoSCWlInputMgrIF::wlCapabilitiesCB Enter");
+// ICO_TRA("CicoSCWlInputMgrIF::wlCapabilitiesCB Enter");
if (NULL == data) {
ICO_WRN("wlCapabilitiesCB: data is null");
device, type,
swname, input,
codename, code);
- ICO_DBG("CicoSCWlInputMgrIF::wlCapabilitiesCB Leave");
+// ICO_TRA("CicoSCWlInputMgrIF::wlCapabilitiesCB Leave");
}
//--------------------------------------------------------------------------
const char *codename,
int32_t code)
{
- ICO_DBG("CicoSCWlInputMgrIF::wlCodeCB Enter");
+// ICO_TRA("CicoSCWlInputMgrIF::wlCodeCB Enter");
if (NULL == data) {
ICO_WRN("wlCodeCB: data is null");
device, input,
codename, code);
- ICO_DBG("CicoSCWlInputMgrIF::wlCodeCB Leave");
+// ICO_TRA("CicoSCWlInputMgrIF::wlCodeCB Leave");
}
//--------------------------------------------------------------------------
int32_t code,
int32_t state)
{
- ICO_DBG("CicoSCWlInputMgrIF::wlInputCB Enter");
+// ICO_TRA("CicoSCWlInputMgrIF::wlInputCB Enter");
if (NULL == data) {
ICO_WRN("wlInputCB: data is null");
time, device, input,
code, state);
- ICO_DBG("CicoSCWlInputMgrIF::wlInputCB Leave");
+// ICO_TRA("CicoSCWlInputMgrIF::wlInputCB Leave");
}
//--------------------------------------------------------------------------
struct ico_input_mgr_device *ico_input_mgr_dev,
struct wl_array *region)
{
- ICO_DBG("CicoSCWlInputMgrIF::wlRegionCB Enter");
+// ICO_TRA("CicoSCWlInputMgrIF::wlRegionCB Enter");
if (NULL == data) {
ICO_WRN("wlRegionCB: data is null");
static_cast<CicoSCWlInputMgrIF*>(data)->regionCB(data, ico_input_mgr_dev,
region);
- ICO_DBG("CicoSCWlInputMgrIF::wlRegionCB Leave");
+// ICO_TRA("CicoSCWlInputMgrIF::wlRegionCB Leave");
}
// vim:set expandtab ts=4 sw=4:
const char *interface,
uint32_t version)
{
- ICO_DBG("CicoSCWlWinMgrIF::initInterface : Enter(interface=%s)", interface);
+ ICO_TRA("CicoSCWlWinMgrIF::initInterface Enter(interface=%s)", interface);
// check interface name
if (0 == strcmp(interface, ICO_WL_WIN_MGR_IF)) {
// get interface instance
+ ICO_DBG("called: wl_registry_bind");
void *wlProxy = wl_registry_bind(registry,
name,
&ico_window_mgr_interface,
1);
if (NULL == wlProxy) {
- ICO_WRN("initInterface : interface(%s) wl_registry_bind failed.",
+ ICO_WRN("interface(%s) wl_registry_bind failed.",
interface);
- ICO_WRN("CicoSCWlWinMgrIF::initInterface : Leave(binding failed)");
+ ICO_TRA("CicoSCWlWinMgrIF::initInterface Leave(binding failed)");
return;
}
ico_window_mgr_set_user_data(m_winmgr, NULL/*TODO*/);
#endif
- ICO_DBG("call ico_window_mgr_declare_manager");
+ ICO_DBG("called: ico_window_mgr_declare_manager");
ico_window_mgr_declare_manager(m_winmgr,
ICO_WINDOW_MGR_DECLARE_MANAGER_MANAGER);
}
else if (0 == strcmp(interface, ICO_WL_OUTPUT_IF)) {
// get interface instance
+ ICO_DBG("called: wl_registry_bind");
void *wlProxy = wl_registry_bind(registry,
name,
&wl_output_interface,
1);
if (NULL == wlProxy) {
- ICO_WRN("initInterface : interface(%s) wl_registry_bind failed.",
+ ICO_WRN("interface(%s) wl_registry_bind failed.",
interface);
- ICO_WRN("CicoSCWlWinMgrIF::initInterface : Leave(binding failed)");
+ ICO_TRA("CicoSCWlWinMgrIF::initInterface Leave(binding failed)");
return;
}
#endif
}
else {
- ICO_WRN("initInterface : Leave(unmatch interface)");
+ ICO_WRN("unmatch interface");
+ ICO_TRA("CicoSCWlWinMgrIF::initInterface Leave(unmatch interface)");
return;
}
m_initialized = true;
}
- ICO_DBG("CicoSCWlWinMgrIF::initInterface : Leave");
+ ICO_TRA("CicoSCWlWinMgrIF::initInterface Leave");
}
//--------------------------------------------------------------------------
const char *appid,
int32_t layertype)
{
- ICO_DBG("CicoSCWlWinMgrIF::createdCB called.");
+ ICO_WRN("CicoSCWlWinMgrIF::createdCB called.");
}
//--------------------------------------------------------------------------
const char *appid,
int32_t layertype)
{
-// ICO_DBG("CicoSCWlWinMgrIF::wlCreatedCB Enter");
+// ICO_TRA("CicoSCWlWinMgrIF::wlCreatedCB Enter");
if (NULL == data) {
ICO_WRN("wlCreatedCB : data is null");
return;
static_cast<CicoSCWlWinMgrIF*>(data)->createdCB(data, ico_window_mgr,
surfaceid, winname,
pid, appid, layertype);
-// ICO_DBG("CicoSCWlWinMgrIF::wlCreatedCB Leave");
+// ICO_TRA("CicoSCWlWinMgrIF::wlCreatedCB Leave");
}
//--------------------------------------------------------------------------
uint32_t surfaceid,
const char *winname)
{
-// ICO_DBG("CicoSCWlWinMgrIF::wlNameCB Enter");
+// ICO_TRA("CicoSCWlWinMgrIF::wlNameCB Enter");
if (NULL == data) {
ICO_WRN("wlNameCB: data is null");
}
static_cast<CicoSCWlWinMgrIF*>(data)->nameCB(data, ico_window_mgr,
surfaceid, winname);
-// ICO_DBG("CicoSCWlWinMgrIF::wlNameCB Leave");
+// ICO_TRA("CicoSCWlWinMgrIF::wlNameCB Leave");
}
//--------------------------------------------------------------------------
struct ico_window_mgr *ico_window_mgr,
uint32_t surfaceid)
{
-// ICO_DBG("CicoSCWlWinMgrIF::wlDestroyedCB Enter");
+// ICO_TRA("CicoSCWlWinMgrIF::wlDestroyedCB Enter");
if (NULL == data) {
ICO_WRN("wlDestroyedCB: data is null");
}
static_cast<CicoSCWlWinMgrIF*>(data)->destroyedCB(data, ico_window_mgr,
surfaceid);
-// ICO_DBG("CicoSCWlWinMgrIF::wlDestroyedCB Leave");
+// ICO_TRA("CicoSCWlWinMgrIF::wlDestroyedCB Leave");
}
//--------------------------------------------------------------------------
int32_t raise,
int32_t hint)
{
-// ICO_DBG("CicoSCWlWinMgrIF::wlVisibleCB Enter");
+// ICO_TRA("CicoSCWlWinMgrIF::wlVisibleCB Enter");
if (NULL == data) {
ICO_WRN("wlVisibleCB: data is null");
static_cast<CicoSCWlWinMgrIF*>(data)->visibleCB(data, ico_window_mgr,
surfaceid, visible,
raise, hint);
-// ICO_DBG("CicoSCWlWinMgrIF::wlVisibleCB Leave");
+// ICO_TRA("CicoSCWlWinMgrIF::wlVisibleCB Leave");
}
//--------------------------------------------------------------------------
int32_t height,
int32_t hint)
{
-// ICO_DBG("CicoSCWlWinMgrIF::wlConfigureCB Enter");
+// ICO_TRA("CicoSCWlWinMgrIF::wlConfigureCB Enter");
if (NULL == data) {
ICO_WRN("wlConfigureCB: data is null");
surfaceid, node, layertype,
layer, x, y, width, height,
hint);
-// ICO_DBG("CicoSCWlWinMgrIF::wlConfigureCB Leave");
+// ICO_TRA("CicoSCWlWinMgrIF::wlConfigureCB Leave");
}
//--------------------------------------------------------------------------
/**
uint32_t surfaceid,
int32_t active)
{
-// ICO_DBG("CicoSCWlWinMgrIF::wlActiveCB Enter");
+// ICO_TRA("CicoSCWlWinMgrIF::wlActiveCB Enter");
if (NULL == data) {
ICO_WRN("wlActiveCB: data is null");
}
static_cast<CicoSCWlWinMgrIF*>(data)->activeCB(data, ico_window_mgr,
surfaceid, active);
-// ICO_DBG("CicoSCWlWinMgrIF::wlActiveCB Leave");
+// ICO_TRA("CicoSCWlWinMgrIF::wlActiveCB Leave");
}
//--------------------------------------------------------------------------
uint32_t layer,
int32_t visible)
{
-// ICO_DBG("CicoSCWlWinMgrIF::wlLayerVisibleCB Enter");
+// ICO_TRA("CicoSCWlWinMgrIF::wlLayerVisibleCB Enter");
if (NULL == data) {
ICO_WRN("wlLayerVisibleCB: data is null");
}
static_cast<CicoSCWlWinMgrIF*>(data)->layerVisibleCB(data, ico_window_mgr,
layer, visible);
-// ICO_DBG("CicoSCWlWinMgrIF::wlLayerVisibleCB Leave");
+// ICO_TRA("CicoSCWlWinMgrIF::wlLayerVisibleCB Leave");
}
//--------------------------------------------------------------------------
int32_t pid,
struct wl_array *surfaces)
{
-// ICO_DBG("CicoSCWlWinMgrIF::wlAppSurfacesCB Enter");
+// ICO_TRA("CicoSCWlWinMgrIF::wlAppSurfacesCB Enter");
if (NULL == data) {
ICO_WRN("wlAppSurfacesCB: data is null");
}
static_cast<CicoSCWlWinMgrIF*>(data)->appSurfacesCB(data, ico_window_mgr,
appid, pid, surfaces);
-// ICO_DBG("CicoSCWlWinMgrIF::wlAppSurfacesCB Leave");
+// ICO_TRA("CicoSCWlWinMgrIF::wlAppSurfacesCB Leave");
}
//--------------------------------------------------------------------------
int32_t stride,
uint32_t format)
{
-// ICO_DBG("CicoSCWlWinMgrIF::wlMapSurfaceCB Enter");
+// ICO_TRA("CicoSCWlWinMgrIF::wlMapSurfaceCB Enter");
if (NULL == data) {
ICO_WRN("wlMapSurfaceCB: data is null");
type, target,
width, height,
stride, format);
-// ICO_DBG("CicoSCWlWinMgrIF::wlMapSurfaceCB Leave");
+// ICO_TRA("CicoSCWlWinMgrIF::wlMapSurfaceCB Leave");
}
//--------------------------------------------------------------------------
const char *model,
int32_t transform)
{
-// ICO_DBG("CicoSCWlWinMgrIF::wlOutputGeometryCB Enter");
+// ICO_TRA("CicoSCWlWinMgrIF::wlOutputGeometryCB Enter");
if (NULL == data) {
ICO_WRN("wlOutputGeometryCB: data is null");
make,
model,
transform);
-// ICO_DBG("CicoSCWlWinMgrIF::wlOutputGeometryCB Leave");
+// ICO_TRA("CicoSCWlWinMgrIF::wlOutputGeometryCB Leave");
}
//--------------------------------------------------------------------------
int32_t height,
int32_t refresh)
{
-// ICO_DBG("CicoSCWlWinMgrIF::wlOutputModeCB Enter");
+// ICO_TRA("CicoSCWlWinMgrIF::wlOutputModeCB Enter");
if (NULL == data) {
ICO_WRN("wlOutputGeometryCB: data is null");
}
static_cast<CicoSCWlWinMgrIF*>(data)->outputModeCB(data, wl_output, flags,
width, height, refresh);
-// ICO_DBG("CicoSCWlWinMgrIF::wlOutputModeCB Leave");
+// ICO_TRA("CicoSCWlWinMgrIF::wlOutputModeCB Leave");
}
// vim:set expandtab ts=4 sw=4:
+++ /dev/null
-/*
- * Copyright (c) 2013, TOYOTA MOTOR CORPORATION.
- *
- * This program is licensed under the terms and conditions of the
- * Apache License, version 2.0. The full text of the Apache License is at
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- */
-/**
- * @brief Homescreen application aul handler multi support
- *
- * @date Sep-23-2013
- */
-#include <iostream>
-#include <string>
-#include <vector>
-#include <aul/aul.h>
-
-using namespace std;
-
-
-//bool aul_listen_app_launch_signal_del(int (*func) (int, void *));
-//bool aul_listen_app_dead_signal_del(int (*func) (int, void *));
-
-static vector<void*> launch_f;
-static vector<void*> launch_p;
-static vector<void*> dead_f;
-static vector<void*> dead_p;
-
-/**
- * @brief aul launch handler
- * @param pid
- * @param data user data
- */
-static int app_launch_handler(int pid, void *data)
-{
- vector<void*>::iterator itf = launch_f.begin();
- vector<void*>::iterator itp = launch_p.begin();
- while(itf != launch_f.end()) {
- void* f = *itf;
- void* p = *itp;
- int (*fnc)(int, void*) = (int (*)(int, void*))f;
- fnc(pid, p);
- ++itf;
- ++itp;
- }
- return 0;
-}
-
-/**
- * @brief aul dead handler
- * @param pid
- * @param data user data
- */
-static int app_dead_handler(int pid, void *data)
-{
- vector<void*>::iterator itf = dead_f.begin();
- vector<void*>::iterator itp = dead_p.begin();
- while(itf != dead_f.end()) {
- void* f = *itf;
- void* p = *itp;
- int (*fnc)(int, void*) = (int (*)(int, void*))f;
- fnc(pid, p);
- ++itf;
- ++itp;
- }
- return 0;
-}
-
-/**
- * @ init. aul callback
- */
-void initAulListenXSignal()
-{
- aul_listen_app_launch_signal(app_launch_handler, NULL);
- aul_listen_app_dead_signal(app_dead_handler, NULL);
-}
-
-/**
- * @brief aul_listien_app_launch_signal multi
- * @param func callback function
- * @param data user data
- */
-bool aul_listen_app_launch_signal_add(int (*func) (int, void *), void *data)
-{
- launch_f.push_back((void*)func);
- launch_p.push_back(data);
- return true;
-}
-
-/**
- * @brief aul_listien_app_dead_signal multi
- * @param func callback function
- * @param data user data
- */
-bool aul_listen_app_dead_signal_add(int (*func) (int, void *), void *data)
-{
- dead_f.push_back((void*)func);
- dead_p.push_back(data);
- return true;
-}
libico_system_controller_la_LDFLAGS = -version-info 0:9:0
libico_system_controller_la_SOURCES = \
- CicoSCAilItems.cpp \
- CicoSCAulItems.cpp \
CicoSCLifeCycleController.cpp \
- CicoSCSystemConfig.cpp \
CicoSCWaylandIF.cpp \
CicoSCWayland.cpp \
CicoSCWlWinMgrIF.cpp \
CicoSCUserManager.cpp \
CicoSCSysResourceController.cpp \
CicoSCSysResourceMonitor.cpp \
+ CicoSCAppResourceController.cpp \
CicoSCResourceManager.cpp \
ico_syc_mrp_resource.c \
CicoSCPolicyManager.cpp \
- Cico_aul_listen_app.cpp
+ CicoSCVInfoManager.cpp
libico_system_controller_la_CPPFLAGS = \
$(GCC_CXXFLAGS) \
$(UWS_CFLAGS) \
$(WESTONPLUGIN_CFLAGS) \
-I../../include \
+ -I../common \
-I../misc/state-machine
libico_system_controller_la_LIBADD = \
+ ../common/.libs/libico-common.a \
@ECORE_LIBS@ \
@EINA_LIBS@ \
@GLIB_LIBS@ \
mrp_list_init(&mrp_reqs);
- ICO_DBG("mrp_mainloop_ecore_get() called.");
+ ICO_DBG("called: mrp_mainloop_ecore_get()");
mrp_ml = mrp_mainloop_ecore_get();
- ICO_DBG("mrp_res_connecte() called.");
+ ICO_DBG("called: mrp_res_connecte()");
mrp_ctx = mrp_res_create(mrp_ml, ico_syc_mrp_state_cb, NULL);
if (!mrp_ctx) {
return ICO_SYC_EIO;
}
- ICO_DBG("mrp_domctl_create() called.");
+ ICO_DBG("called: mrp_domctl_create()");
mrp_dc = mrp_domctl_create("ico-homescreen", mrp_ml,
ico_tables, MRP_ARRAY_SIZE(ico_tables),
ico_watches, MRP_ARRAY_SIZE(ico_watches),
return ICO_SYC_EIO;
}
- ICO_DBG("mrp_domctl_connect() called.");
+ ICO_DBG("called: mrp_domctl_connect()");
if (!mrp_domctl_connect(mrp_dc, MRP_DEFAULT_DOMCTL_ADDRESS, 0)) {
ICO_ERR("ico_syc_mrp_init: Leave(mrp_domctl_connect Error)");
return ICO_SYC_EIO;
return ICO_SYC_EOK;
}
+void ico_syc_mrp_term(void)
+{
+ if (NULL != mrp_ctx) {
+ mrp_res_destroy(mrp_ctx);
+ }
+
+ if (NULL != mrp_dc) {
+ mrp_domctl_destroy(mrp_dc);
+ }
+
+ if (NULL != mrp_ml) {
+ mrp_mainloop_destroy(mrp_ml);
+ }
+}
+
void
ico_syc_mrp_add_request(resource_request_t *req)
{
ICO_DBG("ico_syc_mrp_acquire_sound_resource: "
"could not create resource for sound");
- ICO_DBG("mrp_res_create_resource_set called.");
+ ICO_DBG("called: mrp_res_create_resource_set()");
rs = mrp_res_create_resource_set(mrp_ctx,
resource_class,
ico_syc_mrp_resource_cb,
return false;
}
- ICO_DBG("mrp_res_set_autorelease called.");
+ ICO_DBG("called: mrp_res_set_autorelease()");
if (!mrp_res_set_autorelease(mrp_ctx, FALSE, rs)) {
ICO_ERR("ico_syc_mrp_acquire_sound_resource: "
"failed to set auto release mode");
return false;
}
- ICO_DBG("mrp_res_create_resource called.");
+ ICO_DBG("called: mrp_res_create_resource");
res = mrp_res_create_resource(mrp_ctx, rs, "audio_playback", TRUE, FALSE);
if (!res) {
req->released = 0;
}
- ICO_DBG("mrp_res_acquire_resource_set called.");
+ ICO_DBG("called: mrp_res_acquire_resource_set()");
mrp_res_acquire_resource_set(mrp_ctx, req->rset);
}
values[1].type = MRP_DOMCTL_STRING;
values[1].str = appid;
+ ICO_DBG("called: mrp_domctl_set_data"
+ "(tables[0].rows[0]={\"%s\",\"%s\"})",
+ values[0].str, values[1].str);
if (!mrp_domctl_set_data(mrp_dc, tables, 1,
ico_sys_mrp_export_notify, NULL)) {
ICO_DBG("ico_syc_mrp_active_app: "
#define ICO_UXF_MAX_DEVICE_NAME 255
/* request information */
-typedef struct _resource_request {
+typedef struct _resource_request {
int id; /* request object */
int prio; /* request priority */
unsigned short reqtype; /* Request type */
char *dispzone; /* area of showing application window */
int dispzoneid; /* area of showing application window */
+ int layerid; /* layer of showing application window */
char *winname; /* window's surface name */
int surfaceid; /* window id */
char *animation; /* name of animation */
int ico_syc_mrp_init(ico_syc_mrp_enforce_sound_t soundcb,
void *user_data);
+void ico_syc_mrp_term(void);
bool ico_syc_mrp_acquire_sound_resource(resource_request_t *req);
bool ico_syc_mrp_release_sound_resource(resource_request_t *req);
+* Thu Dec 26 2013 Shibata Makoto <shibata@mac.tec.toyota.co.jp> accepted/tizen_ivi_stable/20131119.040218@878f49e
+- 0.9.10 release
+-- bug fix: An action is inaccurate when the menu of HomeScreen is multi-touched
+-- bug fix: TIVI-1997 - Touch doesn't work in ico homescreen after some operations
+-- bug fix: TIVI-2161 - Close app by long press doesn't work after some operations
+-- revise: add manifest file for SMACK label setting
+
* Wed Nov 06 2013 Shibata Makoto <shibata@mac.tec.toyota.co.jp> accepted/tizen/20131029.175553@d661402
- 0.9.07 release.
-- bugfix: Last information cannot set up / acquire.(Native app)
Name: ico-uxf-homescreen
Summary: Sample homescreen and system controller
-Version: 0.9.07
+Version: 0.9.10
Release: 1.1
Group: Graphics & UI Framework/Automotive UI
License: Apache-2.0
Source0: %{name}-%{version}.tar.bz2
BuildRequires: pkgconfig(wayland-client) >= 1.2
-BuildRequires: ico-uxf-weston-plugin-devel >= 0.9.07
+BuildRequires: ico-uxf-weston-plugin-devel >= 0.9.08
BuildRequires: pkgconfig(glib-2.0)
BuildRequires: pkgconfig(ecore)
BuildRequires: pkgconfig(ecore-wayland)
BuildRequires: mesa-devel
BuildRequires: ico-uxf-utilities-devel
Requires: weston >= 1.2
-Requires: ico-uxf-weston-plugin >= 0.9.07
-Requires: ico-uxf-utilities
+Requires: ico-uxf-weston-plugin >= 0.9.08
+Requires: ico-uxf-utilities >= 0.9.06
%description
Sample homescreen application and system controller daemon
%make_install
-STATUSBARDIR="%{buildroot}/usr/apps/org.tizen.ico.statusbar"
-mkdir -p ${STATUSBARDIR}/res/images
-mkdir -p ${STATUSBARDIR}/res/edj
-mkdir -p ${STATUSBARDIR}/res/config
-mkdir -p ${STATUSBARDIR}/bin
-mkdir -p %{_bindir}
-cp -rf data/apps/org.tizen.ico.statusbar %{buildroot}/usr/apps/
-install -m 0755 src/homescreen/StatusBar ${STATUSBARDIR}/bin/
-install -m 0644 res/org.tizen.ico.homescreen/res/images/time*.png ${STATUSBARDIR}/res/images
-install -m 0644 data/share/packages/org.tizen.ico.statusbar.xml %{buildroot}/usr/share/packages
-cp res/org.tizen.ico.homescreen/res/apps/org.tizen.ico.statusbar/* ${STATUSBARDIR}/res/config
cp tool/ico_clear_screen %{buildroot}%{_bindir}
cp tool/ico_change_loginuser %{buildroot}%{_bindir}
%{_bindir}/ail_initdb
%files
+%manifest %{name}.manifest
%defattr(-,root,root,-)
/usr/apps/org.tizen.ico.homescreen
/usr/apps/org.tizen.ico.statusbar
/home/app/ico/defaultApps.info
%files system-controller-devel
+%manifest %{name}.manifest
%defattr(-,root,root,-)
%{_includedir}/ico-appfw/ico_syc_application.h
%{_includedir}/ico-appfw/ico_syc_appresctl.h
-[homescreen]
-tileinfo_rowcnt=3
-tileinfo_colcnt=5
-tileinfo_valid=1;0;1;1;0;0;0;1;1;1;1;1;0;1;0
-tileinfo_type=22;0;11;12;0;0;0;21;11;11;11;11;0;12;0
-tileinfo_app0=org.tizen.browser
-tileinfo_app3=org.tizen.music-player
-tileinfo_app2=org.tizen.gallery
-tileinfo_app7=org.tizen.setting
-tileinfo_app8=org.tizen.calendar
-tileinfo_app9=org.tizen.dialer
-tileinfo_app10=org.tizen.calculator
-tileinfo_app11=org.tizen.memo
-tileinfo_app13=org.tizen.smartsearch
-tileinfo_app14=none
+#===========================================================================
+#
+# HomeScreen application configuration file
+#
+#===========================================================================
+#---------------------------------------------------------------------------
+# HomeScreen application setting
+#
+# -- statusbar
+# StatusBar application id
+# -- onscreen
+# OnScreen application id
+#
+#---------------------------------------------------------------------------
+[homescreen]
statusbar=org.tizen.ico.statusbar
onscreen=org.tizen.ico.onscreen
-bgimage=/opt/share/settings/Wallpapers/Home_default.jpg
+#---------------------------------------------------------------------------
+# HomeScreen application log setting
+#
+# -- filename
+# log file name
+# -- loglevel
+# none : all level log print off
+# all : all level log print on
+# performance : perfromance log print on
+# trace : trace log print on
+# debug : debug log print on
+# info : info log print on
+# warning : warning log print on
+# critical : critical print on
+# error : error print on
+# -- logflush
+# on : log output with log flush
+# off : log output without log flush
+# -- ecorelog
+# on : ecore log print enabled
+# off : ecore log print disabled
+#---------------------------------------------------------------------------
+[log]
+filename=HomeScreen
+loglevel=all
+logflush=on
+ecorelog=on
-### configuration for sounds
+#---------------------------------------------------------------------------
+# HomeScreen operation sound setting
+#
+# -- commnad
+# paly sound commnad
+# volume 0...65536
+# -- operation
+# operation sound file path
+# -- success
+# success sound file path
+# -- failure
+# failure sound file path
+#---------------------------------------------------------------------------
[sound]
-# command
-# volume 0...65536
command=paplay --device=0 --volume=30000 --stream-name=HOMESCREEN_BEEP
-
-# operation sound file path
operation=/usr/apps/org.tizen.ico.homescreen/res/sound/operation.wav
-
-# success sound file path
success=/usr/apps/org.tizen.ico.homescreen/res/sound/success.wav
-
-# failure sound file path
failure=/usr/apps/org.tizen.ico.homescreen/res/sound/failure.wav
+#---------------------------------------------------------------------------
+# HomeScreen application history setting
+#
+# -- timer
+# swipe operation timeout value[sec]
+# -- manage_off_app
+# Application to be excluded from history management
+# specify the application ID, separated by semicolons
+# -- write_off_app
+# Application to be excluded from history record
+#---------------------------------------------------------------------------
[app_history]
timer=10
manage_off_app=org.tizen.ico.homescreen;org.tizen.ico.statusbar
write_off_app=org.tizen.ico.login
+#---------------------------------------------------------------------------
+# application's window move to second display setting
+#
+# -- keyname
+# trigger switch keycode
+# -- movezone
+# zonename on second display
+# -- animation
+# animation name on move
+# -- animatime
+# animation time on move[ms]
+#---------------------------------------------------------------------------
[switchzone]
-# trigger switch keyname
keyname=m
-
-# move zone name
movezone=Mid.Left
-
-# move animation
-# animation : animation name
-# animatime : animation time [ms]
animation=Fade
animatime=400
+#---------------------------------------------------------------------------
+# control bar shortcut setting
+#
+# -- shortcut_app0
+# application id of the 1st shortcut from the left
+# -- shortcut_app1
+# application id of the 2nd shortcut from the left
+# -- shortcut_app2
+# application id of the 3rd shortcut from the left
+# -- shortcut_app3
+# application id of the 4th shortcut from the left
+#---------------------------------------------------------------------------
[controlbar]
shortcut_app0=t8j6HTRpuz.MediaPlayer
shortcut_app1=
shortcut_app2=
shortcut_app3=
+#---------------------------------------------------------------------------
+# standerd swith trigger setting
+#
+# -- homekeyname
+# trigger home switch keyname
+# -- backkeyname
+# trigger back switch keyname
+# -- menukeyname
+# trigger menu switch keyname
+#---------------------------------------------------------------------------
[standardswitch]
-# trigger home switch keyname
homekeyname=h
-
-# trigger back switch keyname
backkeyname=b
-
-# trigger menu switch keyname
menukeyname=l
+
+# vim:set expandtab ts=4 sw=4:
## statusbar private configration
[statusbar]
wsport=10001
-##orientaion(1:VERTICAL, 2:HORIZONTAL)
-#orientaion=2
+##orientation(1:VERTICAL, 2:HORIZONTAL)
+#orientation=2
shortcut_app0=org.tizen.ico.app-samplenavi
shortcut_app1=org.tizen.music-player
"stateMachine":{
"name":"Policy",
"value":1,
- "initial":[1001,2001,3001,3101,4001,5001,9001,10999,11999,12003,13009,14999,15999,16999,17999,20999,22999,30001,30101],
+ "initial":[1001,2001,3001,3101,4001,5001,9001,10999,11999,12003,12103,12203,13009,14999,15999,16999,17999,20999,22999,30001,30101],
"state":{
"name":"Driving",
"value":1000,
"state":{
"name":"Stopping",
"value":1001,
- "event":{"name":"EV1000","value":1000, "transition":1002, "guardCondition":[{"operator":">","value":0 }]}
+ "event":{"name":"EV1000", "value":1000, "transition":1002, "guardCondition":[{"operator":">", "value":0}]}
},
"state":{
"name":"Running",
"value":1002,
- "event":{"name":"EV1000","value":1000, "transition":1001, "guardCondition":[{"operator":"=","value":0 }]}
+ "event":{"name":"EV1000", "value":1000, "transition":1001, "guardCondition":[{"operator":"=", "value":0}]}
}
},
"state":{
"name":"Parking",
"value":2001,
- "event":{"name":"EV2000","value":2000, "transition":2002, "guardCondition":[{"operator":"=","value":255}]},
- "event":{"name":"EV2000","value":2000, "transition":2003, "guardCondition":[{ "operator":"!=","value":255},
- {"join":"and","operator":"!=","value":128}]}
+ "event":{"name":"EV2000", "value":2000, "transition":2002, "guardCondition":[{"operator":"=", "value":255}]},
+ "event":{"name":"EV2000", "value":2000, "transition":2003, "guardCondition":[{ "operator":"!=", "value":255},
+ {"join":"and", "operator":"!=", "value":128}]}
},
"state":{
"name":"Reverse",
"value":2002,
- "event":{"name":"EV2000","value":2000, "transition":2001, "guardCondition":[{"operator":"=","value":128}]},
- "event":{"name":"EV2000","value":2000, "transition":2003, "guardCondition":[{ "operator":"!=","value":255},
- {"join":"and","operator":"!=","value":128}]}
+ "event":{"name":"EV2000", "value":2000, "transition":2001, "guardCondition":[{"operator":"=", "value":128}]},
+ "event":{"name":"EV2000", "value":2000, "transition":2003, "guardCondition":[{ "operator":"!=", "value":255},
+ {"join":"and", "operator":"!=", "value":128}]}
},
"state":{
"name":"OtherShiftPos",
"value":2003,
- "event":{"name":"EV2000","value":2000, "transition":2001, "guardCondition":[{"operator":"=","value":255}]},
- "event":{"name":"EV2000","value":2000, "transition":2002, "guardCondition":[{"operator":"=","value":128}]}
+ "event":{"name":"EV2000", "value":2000, "transition":2001, "guardCondition":[{"operator":"=", "value":255}]},
+ "event":{"name":"EV2000", "value":2000, "transition":2002, "guardCondition":[{"operator":"=", "value":128}]}
}
},
"state":{
"name":"TurnLeftOff",
"value":3001,
- "event":{"name":"EV3001","value":3001, "transition":3002}
+ "event":{"name":"EV3001", "value":3001, "transition":3002}
},
"state":{
"name":"TurnLeftOn",
"value":3002,
- "event":{"name":"EV3000","value":3000, "transition":3001}
+ "event":{"name":"EV3000", "value":3000, "transition":3001}
}
},
"state":{
"name":"TurnRightOff",
"value":3101,
- "event":{"name":"EV3101","value":3101, "transition":3102}
+ "event":{"name":"EV3101", "value":3101, "transition":3102}
},
"state":{
"name":"TurnRightOn",
"value":3102,
- "event":{"name":"EV3100","value":3100, "transition":3101}
+ "event":{"name":"EV3100", "value":3100, "transition":3101}
}
},
"state":{
"name":"CameraOff",
"value":4001,
- "event":{"name":"EV4000","value":4000, "transition":4002, "guardCondition":[{"operator":"in","value":"Reverse"}]},
- "event":{"name":"EV4000","value":4000, "transition":4003, "guardCondition":[{"operator":"in","value":"TurnLeftOn"}]},
- "event":{"name":"EV4000","value":4000, "transition":4004, "guardCondition":[{"operator":"in","value":"TurnRightOn"}]}
+ "event":{"name":"EV4000", "value":4000, "transition":4002, "guardCondition":[{"operator":"in", "value":"Reverse"}]},
+ "event":{"name":"EV4000", "value":4000, "transition":4003, "guardCondition":[{"operator":"in", "value":"TurnLeftOn"}]},
+ "event":{"name":"EV4000", "value":4000, "transition":4004, "guardCondition":[{"operator":"in", "value":"TurnRightOn"}]}
},
"state":{
"name":"CameraBack",
"value":4002,
- "event":{"name":"EV4000","value":4000, "transition":4001, "guardCondition":[{ "operator":"not","value":"Reverse"},
- {"join":"and","operator":"in","value":"TurnLeftOff"},
- {"join":"and","operator":"in","value":"TurnRightOff"}]},
- "event":{"name":"EV4000","value":4000, "transition":4003, "guardCondition":[{ "operator":"not","value":"Reverse"},
- {"join":"and","operator":"in","value":"WinkerLeft"}]},
- "event":{"name":"EV4000","value":4000, "transition":4004, "guardCondition":[{ "operator":"not","value":"Reverse"},
- {"join":"and","operator":"in","value":"WinkerRight"}]}
+ "event":{"name":"EV4000", "value":4000, "transition":4001, "guardCondition":[{ "operator":"not", "value":"Reverse"},
+ {"join":"and", "operator":"in", "value":"TurnLeftOff"},
+ {"join":"and", "operator":"in", "value":"TurnRightOff"}]},
+ "event":{"name":"EV4000", "value":4000, "transition":4003, "guardCondition":[{ "operator":"not", "value":"Reverse"},
+ {"join":"and", "operator":"in", "value":"WinkerLeft"}]},
+ "event":{"name":"EV4000", "value":4000, "transition":4004, "guardCondition":[{ "operator":"not", "value":"Reverse"},
+ {"join":"and", "operator":"in", "value":"WinkerRight"}]}
},
"state":{
"name":"CameraLeft",
"value":4003,
- "event":{"name":"EV4000","value":4000, "transition":4001, "guardCondition":[{ "operator":"not","value":"Reverse"},
- {"join":"and","operator":"in","value":"TurnLeftOff"},
- {"join":"and","operator":"in","value":"TurnRightOff"}]},
- "event":{"name":"EV4000","value":4000, "transition":4002, "guardCondition":[{"operator":"in","value":"Reverse"}]},
- "event":{"name":"EV4000","value":4000, "transition":4004, "guardCondition":[{ "operator":"not","value":"Reverse"},
- {"join":"and","operator":"in","value":"WinkerRight"}]}
+ "event":{"name":"EV4000", "value":4000, "transition":4001, "guardCondition":[{ "operator":"not", "value":"Reverse"},
+ {"join":"and", "operator":"in", "value":"TurnLeftOff"},
+ {"join":"and", "operator":"in", "value":"TurnRightOff"}]},
+ "event":{"name":"EV4000", "value":4000, "transition":4002, "guardCondition":[{"operator":"in", "value":"Reverse"}]},
+ "event":{"name":"EV4000", "value":4000, "transition":4004, "guardCondition":[{ "operator":"not", "value":"Reverse"},
+ {"join":"and", "operator":"in", "value":"WinkerRight"}]}
},
"state":{
"name":"CameraRight",
"value":4004,
- "event":{"name":"EV4000","value":4000, "transition":4001, "guardCondition":[{"operator":"not","value":"WinkerRight"}]},
- "event":{"name":"EV4000","value":4000, "transition":4002, "guardCondition":[{"operator":"in","value":"Reverse"}]},
- "event":{"name":"EV4000","value":4000, "transition":4003, "guardCondition":[{ "operator":"not","value":"Reverse"},
- {"join":"and","operator":"in","value":"WinkerLeft"}]}
+ "event":{"name":"EV4000", "value":4000, "transition":4001, "guardCondition":[{"operator":"not", "value":"WinkerRight"}]},
+ "event":{"name":"EV4000", "value":4000, "transition":4002, "guardCondition":[{"operator":"in", "value":"Reverse"}]},
+ "event":{"name":"EV4000", "value":4000, "transition":4003, "guardCondition":[{ "operator":"not", "value":"Reverse"},
+ {"join":"and", "operator":"in", "value":"WinkerLeft"}]}
}
},
"state":{
"name":"NightModeOff",
"value":5001,
- "event":{"name":"EV5000","value":5000, "transition":5002, "guardCondition":[{"operator":"=","value":1}]}
+ "event":{"name":"EV5000", "value":5000, "transition":5002, "guardCondition":[{"operator":"=", "value":1}]}
},
"state":{
"name":"NightModeOn",
"value":5002,
- "event":{"name":"EV5000","value":5000, "transition":5001, "guardCondition":[{"operator":"=","value":0}]}
+ "event":{"name":"EV5000", "value":5000, "transition":5001, "guardCondition":[{"operator":"=", "value":0}]}
}
},
"state":{
- "name":"DrivingRegulation",
+ "name":"DrivingMode",
"value":9000,
"state":{
- "name":"NotRegulating",
+ "name":"DrivingModeOff",
"value":9001,
- "event":{"name":"EV9000","value":9000, "transition":9002, "guardCondition":[{"operator":"in","value":"Running"}]}
+ "event":{"name":"EV9000", "value":9000, "transition":9002, "guardCondition":[{"operator":"=", "value":1}]}
},
"state":{
- "name":"Regulating",
+ "name":"DrivingModeOn",
"value":9002,
- "event":{"name":"EV9000","value":9000, "transition":9001, "guardCondition":[{"operator":"in","value":"Stopping"}]}
+ "event":{"name":"EV9000", "value":9000, "transition":9001, "guardCondition":[{"operator":"=", "value":0}]}
}
},
"state":{
"name":"Display0Zone",
"value":10000,
- "state":{
- "name":"Display0Zone1",
- "value":10001,
- "event":{ "name":"EV10000","value":10000, "transition":10001, "guardCondition":[{"operator":"=","value":1}]},
- "event":{ "name":"EV10000","value":10000, "transition":10002, "guardCondition":[{"operator":"=","value":2}]},
- "event":{ "name":"EV10000","value":10000, "transition":10003, "guardCondition":[{"operator":"=","value":3}]},
- "event":{ "name":"EV10000","value":10000, "transition":10011, "guardCondition":[{"operator":"=","value":11}]},
- "event":{ "name":"EV10000","value":10000, "transition":10012, "guardCondition":[{"operator":"=","value":12}]},
- "event":{ "name":"EV10000","value":10000, "transition":10013, "guardCondition":[{"operator":"=","value":13}]},
- "event":{ "name":"EV10999","value":10999, "transition":10999, "guardCondition":[{ "operator":">=","value":1},
- {"join":"and","operator":"<=","value":20}]}
- },
- "state":{
- "name":"Display0Zone2",
- "value":10002,
- "event":{ "name":"EV10000","value":10000, "transition":10001, "guardCondition":[{"operator":"=","value":1}]},
- "event":{ "name":"EV10000","value":10000, "transition":10002, "guardCondition":[{"operator":"=","value":2}]},
- "event":{ "name":"EV10000","value":10000, "transition":10003, "guardCondition":[{"operator":"=","value":3}]},
- "event":{ "name":"EV10000","value":10000, "transition":10011, "guardCondition":[{"operator":"=","value":11}]},
- "event":{ "name":"EV10000","value":10000, "transition":10012, "guardCondition":[{"operator":"=","value":12}]},
- "event":{ "name":"EV10000","value":10000, "transition":10013, "guardCondition":[{"operator":"=","value":13}]},
- "event":{ "name":"EV10999","value":10999, "transition":10999, "guardCondition":[{ "operator":">=","value":1},
- {"join":"and","operator":"<=","value":20}]}
- },
- "state":{
- "name":"Display0Zone3",
- "value":10003,
- "event":{ "name":"EV10000","value":10000, "transition":10001, "guardCondition":[{"operator":"=","value":1}]},
- "event":{ "name":"EV10000","value":10000, "transition":10002, "guardCondition":[{"operator":"=","value":2}]},
- "event":{ "name":"EV10000","value":10000, "transition":10003, "guardCondition":[{"operator":"=","value":3}]},
- "event":{ "name":"EV10000","value":10000, "transition":10011, "guardCondition":[{"operator":"=","value":11}]},
- "event":{ "name":"EV10000","value":10000, "transition":10012, "guardCondition":[{"operator":"=","value":12}]},
- "event":{ "name":"EV10000","value":10000, "transition":10013, "guardCondition":[{"operator":"=","value":13}]},
- "event":{ "name":"EV10999","value":10999, "transition":10999, "guardCondition":[{ "operator":">=","value":1},
- {"join":"and","operator":"<=","value":20}]}
+ "state":{ /* App ONLY */
+ "name":"Display0ZoneFullA",
+ "value":10020,
+ "event":{"name":"EV10000", "value":10000, "transition":10001, "guardCondition":[{"operator":"=", "value":1}]},
+ "event":{"name":"EV10000", "value":10000, "transition":10902, "guardCondition":[{"operator":"=", "value":2}]},
+ "event":{"name":"EV10000", "value":10000, "transition":10902, "guardCondition":[{"operator":"=", "value":3}]},
+ "event":{"name":"EV10000", "value":10000, "transition":10011, "guardCondition":[{"operator":"=", "value":11}]},
+ "event":{"name":"EV10000", "value":10000, "transition":10012, "guardCondition":[{"operator":"=", "value":12}]},
+ "event":{"name":"EV10000", "value":10000, "transition":10013, "guardCondition":[{"operator":"=", "value":13}]},
+ "event":{"name":"EV10000", "value":10000, "transition":10020, "guardCondition":[{"operator":"=", "value":20}]},
+ "event":{"name":"EV10999", "value":10999, "transition":10999, "guardCondition":[{ "operator":">=", "value":1},
+ {"join":"and", "operator":"<=", "value":20}]}
+ },
+ "state":{ /* StatusBar + App + MenuBar */
+ "name":"Display0ZoneFullB",
+ "value":10901,
+ "event":{"name":"EV10000", "value":10000, "transition":10902, "guardCondition":[{"operator":"=", "value":2}]},
+ "event":{"name":"EV10000", "value":10000, "transition":10902, "guardCondition":[{"operator":"=", "value":3}]},
+ "event":{"name":"EV10000", "value":10000, "transition":10011, "guardCondition":[{"operator":"=", "value":11}]},
+ "event":{"name":"EV10000", "value":10000, "transition":10012, "guardCondition":[{"operator":"=", "value":12}]},
+ "event":{"name":"EV10000", "value":10000, "transition":10013, "guardCondition":[{"operator":"=", "value":13}]},
+ "event":{"name":"EV10000", "value":10000, "transition":10020, "guardCondition":[{"operator":"=", "value":20}]},
+ "event":{"name":"EV10999", "value":10999, "transition":10999, "guardCondition":[{ "operator":">=", "value":1},
+ {"join":"and", "operator":"<=", "value":20}]},
+ "state":{
+ "name":"Display0Zone1",
+ "value":10001,
+ "event":{"name":"EV10000", "value":10000, "transition":10001, "guardCondition":[{"operator":"=", "value":1}]}
+ }
+ },
+ "state":{ /* StatusBar + App + App + MenuBar */
+ "name":"Display0ZoneHalf",
+ "initial":[10002,10003],
+ "value":10902,
+ "event":{"name":"EV10000", "value":10000, "transition":10001, "guardCondition":[{"operator":"=", "value":1}]},
+ "event":{"name":"EV10000", "value":10000, "transition":10011, "guardCondition":[{"operator":"=", "value":11}]},
+ "event":{"name":"EV10000", "value":10000, "transition":10012, "guardCondition":[{"operator":"=", "value":12}]},
+ "event":{"name":"EV10000", "value":10000, "transition":10013, "guardCondition":[{"operator":"=", "value":13}]},
+ "event":{"name":"EV10000", "value":10000, "transition":10020, "guardCondition":[{"operator":"=", "value":20}]},
+ "event":{"name":"EV10999", "value":10999, "transition":10999, "guardCondition":[{ "operator":">=", "value":1},
+ {"join":"and", "operator":"<=", "value":20}]},
+ "state":{
+ "name":"Display0Zone2",
+ "value":10002,
+ "event":{"name":"EV10000", "value":10000, "transition":10002, "guardCondition":[{"operator":"=", "value":2}]}
+ },
+ "state":{
+ "name":"Display0Zone3",
+ "value":10003,
+ "event":{"name":"EV10000", "value":10000, "transition":10003, "guardCondition":[{"operator":"=", "value":3}]}
+ }
},
"state":{
"name":"Display0Zone11",
"value":10011,
- "event":{ "name":"EV10000","value":10000, "transition":10001, "guardCondition":[{"operator":"=","value":1}]},
- "event":{ "name":"EV10000","value":10000, "transition":10002, "guardCondition":[{"operator":"=","value":2}]},
- "event":{ "name":"EV10000","value":10000, "transition":10003, "guardCondition":[{"operator":"=","value":3}]},
- "event":{ "name":"EV10000","value":10000, "transition":10011, "guardCondition":[{"operator":"=","value":11}]},
- "event":{ "name":"EV10000","value":10000, "transition":10012, "guardCondition":[{"operator":"=","value":12}]},
- "event":{ "name":"EV10000","value":10000, "transition":10013, "guardCondition":[{"operator":"=","value":13}]},
- "event":{ "name":"EV10999","value":10999, "transition":10999, "guardCondition":[{ "operator":">=","value":1},
- {"join":"and","operator":"<=","value":20}]}
+ "event":{"name":"EV10000", "value":10000, "transition":10001, "guardCondition":[{"operator":"=", "value":1}]},
+ "event":{"name":"EV10000", "value":10000, "transition":10902, "guardCondition":[{"operator":"=", "value":2}]},
+ "event":{"name":"EV10000", "value":10000, "transition":10902, "guardCondition":[{"operator":"=", "value":3}]},
+ "event":{"name":"EV10000", "value":10000, "transition":10011, "guardCondition":[{"operator":"=", "value":11}]},
+ "event":{"name":"EV10000", "value":10000, "transition":10012, "guardCondition":[{"operator":"=", "value":12}]},
+ "event":{"name":"EV10000", "value":10000, "transition":10013, "guardCondition":[{"operator":"=", "value":13}]},
+ "event":{"name":"EV10000", "value":10000, "transition":10020, "guardCondition":[{"operator":"=", "value":20}]},
+ "event":{"name":"EV10999", "value":10999, "transition":10999, "guardCondition":[{ "operator":">=", "value":1},
+ {"join":"and", "operator":"<=", "value":20}]}
},
"state":{
"name":"Display0Zone12",
"value":10012,
- "event":{ "name":"EV10000","value":10000, "transition":10001, "guardCondition":[{"operator":"=","value":1}]},
- "event":{ "name":"EV10000","value":10000, "transition":10002, "guardCondition":[{"operator":"=","value":2}]},
- "event":{ "name":"EV10000","value":10000, "transition":10003, "guardCondition":[{"operator":"=","value":3}]},
- "event":{ "name":"EV10000","value":10000, "transition":10011, "guardCondition":[{"operator":"=","value":11}]},
- "event":{ "name":"EV10000","value":10000, "transition":10012, "guardCondition":[{"operator":"=","value":12}]},
- "event":{ "name":"EV10000","value":10000, "transition":10013, "guardCondition":[{"operator":"=","value":13}]},
- "event":{ "name":"EV10999","value":10999, "transition":10999, "guardCondition":[{ "operator":">=","value":1},
- {"join":"and","operator":"<=","value":20}]}
+ "event":{"name":"EV10000", "value":10000, "transition":10001, "guardCondition":[{"operator":"=", "value":1}]},
+ "event":{"name":"EV10000", "value":10000, "transition":10902, "guardCondition":[{"operator":"=", "value":2}]},
+ "event":{"name":"EV10000", "value":10000, "transition":10902, "guardCondition":[{"operator":"=", "value":3}]},
+ "event":{"name":"EV10000", "value":10000, "transition":10011, "guardCondition":[{"operator":"=", "value":11}]},
+ "event":{"name":"EV10000", "value":10000, "transition":10012, "guardCondition":[{"operator":"=", "value":12}]},
+ "event":{"name":"EV10000", "value":10000, "transition":10013, "guardCondition":[{"operator":"=", "value":13}]},
+ "event":{"name":"EV10000", "value":10000, "transition":10020, "guardCondition":[{"operator":"=", "value":20}]},
+ "event":{"name":"EV10999", "value":10999, "transition":10999, "guardCondition":[{ "operator":">=", "value":1},
+ {"join":"and", "operator":"<=", "value":20}]}
},
"state":{
"name":"Display0Zone13",
"value":10013,
- "event":{ "name":"EV10000","value":10000, "transition":10001, "guardCondition":[{"operator":"=","value":1}]},
- "event":{ "name":"EV10000","value":10000, "transition":10002, "guardCondition":[{"operator":"=","value":2}]},
- "event":{ "name":"EV10000","value":10000, "transition":10003, "guardCondition":[{"operator":"=","value":3}]},
- "event":{ "name":"EV10000","value":10000, "transition":10011, "guardCondition":[{"operator":"=","value":11}]},
- "event":{ "name":"EV10000","value":10000, "transition":10012, "guardCondition":[{"operator":"=","value":12}]},
- "event":{ "name":"EV10000","value":10000, "transition":10013, "guardCondition":[{"operator":"=","value":13}]},
- "event":{ "name":"EV10999","value":10999, "transition":10999, "guardCondition":[{ "operator":">=","value":1},
- {"join":"and","operator":"<=","value":20}]}
+ "event":{"name":"EV10000", "value":10000, "transition":10001, "guardCondition":[{"operator":"=", "value":1}]},
+ "event":{"name":"EV10000", "value":10000, "transition":10902, "guardCondition":[{"operator":"=", "value":2}]},
+ "event":{"name":"EV10000", "value":10000, "transition":10902, "guardCondition":[{"operator":"=", "value":3}]},
+ "event":{"name":"EV10000", "value":10000, "transition":10011, "guardCondition":[{"operator":"=", "value":11}]},
+ "event":{"name":"EV10000", "value":10000, "transition":10012, "guardCondition":[{"operator":"=", "value":12}]},
+ "event":{"name":"EV10000", "value":10000, "transition":10013, "guardCondition":[{"operator":"=", "value":13}]},
+ "event":{"name":"EV10000", "value":10000, "transition":10020, "guardCondition":[{"operator":"=", "value":20}]},
+ "event":{"name":"EV10999", "value":10999, "transition":10999, "guardCondition":[{ "operator":">=", "value":1},
+ {"join":"and", "operator":"<=", "value":20}]}
},
"state":{
"name":"Display0NoOwer",
"value":10999,
- "event":{ "name":"EV10000","value":10000, "transition":10001, "guardCondition":[{"operator":"=","value":1}]},
- "event":{ "name":"EV10000","value":10000, "transition":10002, "guardCondition":[{"operator":"=","value":2}]},
- "event":{ "name":"EV10000","value":10000, "transition":10003, "guardCondition":[{"operator":"=","value":3}]},
- "event":{ "name":"EV10000","value":10000, "transition":10011, "guardCondition":[{"operator":"=","value":11}]},
- "event":{ "name":"EV10000","value":10000, "transition":10012, "guardCondition":[{"operator":"=","value":12}]},
- "event":{ "name":"EV10000","value":10000, "transition":10013, "guardCondition":[{"operator":"=","value":13}]}
+ "event":{"name":"EV10000", "value":10000, "transition":10001, "guardCondition":[{"operator":"=", "value":1}]},
+ "event":{"name":"EV10000", "value":10000, "transition":10902, "guardCondition":[{"operator":"=", "value":2}]},
+ "event":{"name":"EV10000", "value":10000, "transition":10902, "guardCondition":[{"operator":"=", "value":3}]},
+ "event":{"name":"EV10000", "value":10000, "transition":10011, "guardCondition":[{"operator":"=", "value":11}]},
+ "event":{"name":"EV10000", "value":10000, "transition":10012, "guardCondition":[{"operator":"=", "value":12}]},
+ "event":{"name":"EV10000", "value":10000, "transition":10013, "guardCondition":[{"operator":"=", "value":13}]},
+ "event":{"name":"EV10000", "value":10000, "transition":10020, "guardCondition":[{"operator":"=", "value":20}]}
}
},
"state":{
"name":"Display1Zone1",
"value":11001,
- "event":{ "name":"EV10000","value":10000, "transition":11001, "guardCondition":[{"operator":"=","value":21}]},
- "event":{ "name":"EV10000","value":10000, "transition":11002, "guardCondition":[{"operator":"=","value":22}]},
- "event":{ "name":"EV10000","value":10000, "transition":11003, "guardCondition":[{"operator":"=","value":23}]},
- "event":{ "name":"EV10999","value":10999, "transition":11999, "guardCondition":[{ "operator":">=","value":21},
- {"join":"and","operator":"<=","value":40}]}
+ "event":{"name":"EV10000", "value":10000, "transition":11001, "guardCondition":[{"operator":"=", "value":21}]},
+ "event":{"name":"EV10000", "value":10000, "transition":11002, "guardCondition":[{"operator":"=", "value":22}]},
+ "event":{"name":"EV10000", "value":10000, "transition":11003, "guardCondition":[{"operator":"=", "value":23}]},
+ "event":{"name":"EV10999", "value":10999, "transition":11999, "guardCondition":[{ "operator":">=", "value":21},
+ {"join":"and", "operator":"<=", "value":40}]}
},
"state":{
"name":"Display1Zone2",
"value":11002,
- "event":{ "name":"EV10000","value":10000, "transition":11001, "guardCondition":[{"operator":"=","value":21}]},
- "event":{ "name":"EV10000","value":10000, "transition":11002, "guardCondition":[{"operator":"=","value":22}]},
- "event":{ "name":"EV10000","value":10000, "transition":11003, "guardCondition":[{"operator":"=","value":23}]},
- "event":{ "name":"EV10999","value":10999, "transition":11999, "guardCondition":[{ "operator":">=","value":21},
- {"join":"and","operator":"<=","value":40}]}
+ "event":{"name":"EV10000", "value":10000, "transition":11001, "guardCondition":[{"operator":"=", "value":21}]},
+ "event":{"name":"EV10000", "value":10000, "transition":11002, "guardCondition":[{"operator":"=", "value":22}]},
+ "event":{"name":"EV10000", "value":10000, "transition":11003, "guardCondition":[{"operator":"=", "value":23}]},
+ "event":{"name":"EV10999", "value":10999, "transition":11999, "guardCondition":[{ "operator":">=", "value":21},
+ {"join":"and", "operator":"<=", "value":40}]}
},
"state":{
"name":"Display1Zone3",
"value":11003,
- "event":{ "name":"EV10000","value":10000, "transition":11001, "guardCondition":[{"operator":"=","value":21}]},
- "event":{ "name":"EV10000","value":10000, "transition":11002, "guardCondition":[{"operator":"=","value":22}]},
- "event":{ "name":"EV10000","value":10000, "transition":11003, "guardCondition":[{"operator":"=","value":23}]},
- "event":{ "name":"EV10999","value":10999, "transition":11999, "guardCondition":[{ "operator":">=","value":21},
- {"join":"and","operator":"<=","value":40}]}
+ "event":{"name":"EV10000", "value":10000, "transition":11001, "guardCondition":[{"operator":"=", "value":21}]},
+ "event":{"name":"EV10000", "value":10000, "transition":11002, "guardCondition":[{"operator":"=", "value":22}]},
+ "event":{"name":"EV10000", "value":10000, "transition":11003, "guardCondition":[{"operator":"=", "value":23}]},
+ "event":{"name":"EV10999", "value":10999, "transition":11999, "guardCondition":[{ "operator":">=", "value":21},
+ {"join":"and", "operator":"<=", "value":40}]}
},
"state":{
"name":"Display1NoOwer",
"value":11999,
- "event":{ "name":"EV10000","value":10000, "transition":11001, "guardCondition":[{"operator":"=","value":21}]},
- "event":{ "name":"EV10000","value":10000, "transition":11002, "guardCondition":[{"operator":"=","value":22}]},
- "event":{ "name":"EV10000","value":10000, "transition":11003, "guardCondition":[{"operator":"=","value":23}]}
+ "event":{"name":"EV10000", "value":10000, "transition":11001, "guardCondition":[{"operator":"=", "value":21}]},
+ "event":{"name":"EV10000", "value":10000, "transition":11002, "guardCondition":[{"operator":"=", "value":22}]},
+ "event":{"name":"EV10000", "value":10000, "transition":11003, "guardCondition":[{"operator":"=", "value":23}]}
}
},
"state":{
"name":"Display0Category1", /* Menu */
"value":12001,
- "event":{ "name":"EV12000","value":12000, "transition":12001, "guardCondition":[{"operator":"=","value":1}]},
- "event":{ "name":"EV12000","value":12000, "transition":12002, "guardCondition":[{"operator":"=","value":2}]},
- "event":{ "name":"EV12000","value":12000, "transition":12003, "guardCondition":[{"operator":"=","value":3}]},
- "event":{ "name":"EV12000","value":12000, "transition":12004, "guardCondition":[{"operator":"=","value":4}]},
- "event":{ "name":"EV12000","value":12000, "transition":12005, "guardCondition":[{"operator":"=","value":5}]},
- "event":{ "name":"EV12000","value":12000, "transition":12006, "guardCondition":[{"operator":"=","value":6}]},
- "event":{ "name":"EV12000","value":12000, "transition":12007, "guardCondition":[{"operator":"=","value":7}]},
- "event":{ "name":"EV12000","value":12000, "transition":12008, "guardCondition":[{"operator":"=","value":8}]},
- "event":{ "name":"EV12000","value":12000, "transition":12009, "guardCondition":[{ "operator":"=","value":9},
- {"join":"and","operator":"not","value":"Regulating"}]},
- "event":{ "name":"EV12000","value":12000, "transition":12010, "guardCondition":[{ "operator":"=","value":10},
- {"join":"and","operator":"not","value":"Regulating"}]},
- "event":{ "name":"EV12000","value":12000, "transition":12011, "guardCondition":[{"operator":"=","value":11}]}
+ "event":{"name":"EV12000", "value":12000, "transition":12001, "guardCondition":[{"operator":"=", "value":1}]},
+ "event":{"name":"EV12000", "value":12000, "transition":12002, "guardCondition":[{"operator":"=", "value":2}]},
+ "event":{"name":"EV12000", "value":12000, "transition":12003, "guardCondition":[{"operator":"=", "value":3}]},
+ "event":{"name":"EV12000", "value":12000, "transition":12004, "guardCondition":[{"operator":"=", "value":4}]},
+ "event":{"name":"EV12000", "value":12000, "transition":12005, "guardCondition":[{"operator":"=", "value":5}]},
+ "event":{"name":"EV12000", "value":12000, "transition":12006, "guardCondition":[{"operator":"=", "value":6}]},
+ "event":{"name":"EV12000", "value":12000, "transition":12007, "guardCondition":[{"operator":"=", "value":7}]},
+ "event":{"name":"EV12000", "value":12000, "transition":12008, "guardCondition":[{"operator":"=", "value":8}]},
+ "event":{"name":"EV12000", "value":12000, "transition":12009, "guardCondition":[{ "operator":"=", "value":9},
+ {"join":"and", "operator":"not", "value":"DrivingModeOn"}]},
+ "event":{"name":"EV12000", "value":12000, "transition":12010, "guardCondition":[{ "operator":"=", "value":10},
+ {"join":"and", "operator":"not", "value":"DrivingModeOn"}]},
+ "event":{"name":"EV12000", "value":12000, "transition":12011, "guardCondition":[{"operator":"=", "value":11}]}
},
"state":{
"name":"Display0Category2", /* Message */
"value":12002,
- "event":{ "name":"EV12000","value":12000, "transition":12001, "guardCondition":[{"operator":"=","value":1}]},
- "event":{ "name":"EV12000","value":12000, "transition":12002, "guardCondition":[{"operator":"=","value":2}]},
- "event":{ "name":"EV12000","value":12000, "transition":12003, "guardCondition":[{"operator":"=","value":3}]},
- "event":{ "name":"EV12000","value":12000, "transition":12004, "guardCondition":[{"operator":"=","value":4}]},
- "event":{ "name":"EV12000","value":12000, "transition":12005, "guardCondition":[{"operator":"=","value":5}]},
- "event":{ "name":"EV12000","value":12000, "transition":12006, "guardCondition":[{"operator":"=","value":6}]},
- "event":{ "name":"EV12000","value":12000, "transition":12007, "guardCondition":[{"operator":"=","value":7}]},
- "event":{ "name":"EV12000","value":12000, "transition":12008, "guardCondition":[{"operator":"=","value":8}]},
- "event":{ "name":"EV12000","value":12000, "transition":12009, "guardCondition":[{ "operator":"=","value":9},
- {"join":"and","operator":"not","value":"Regulating"}]},
- "event":{ "name":"EV12000","value":12000, "transition":12010, "guardCondition":[{ "operator":"=","value":10},
- {"join":"and","operator":"not","value":"Regulating"}]},
- "event":{ "name":"EV12000","value":12000, "transition":12011, "guardCondition":[{"operator":"=","value":11}]}
+ "event":{"name":"EV12000", "value":12000, "transition":12001, "guardCondition":[{"operator":"=", "value":1}]},
+ "event":{"name":"EV12000", "value":12000, "transition":12002, "guardCondition":[{"operator":"=", "value":2}]},
+ "event":{"name":"EV12000", "value":12000, "transition":12003, "guardCondition":[{"operator":"=", "value":3}]},
+ "event":{"name":"EV12000", "value":12000, "transition":12004, "guardCondition":[{"operator":"=", "value":4}]},
+ "event":{"name":"EV12000", "value":12000, "transition":12005, "guardCondition":[{"operator":"=", "value":5}]},
+ "event":{"name":"EV12000", "value":12000, "transition":12006, "guardCondition":[{"operator":"=", "value":6}]},
+ "event":{"name":"EV12000", "value":12000, "transition":12007, "guardCondition":[{"operator":"=", "value":7}]},
+ "event":{"name":"EV12000", "value":12000, "transition":12008, "guardCondition":[{"operator":"=", "value":8}]},
+ "event":{"name":"EV12000", "value":12000, "transition":12009, "guardCondition":[{ "operator":"=", "value":9},
+ {"join":"and", "operator":"not", "value":"DrivingModeOn"}]},
+ "event":{"name":"EV12000", "value":12000, "transition":12010, "guardCondition":[{ "operator":"=", "value":10},
+ {"join":"and", "operator":"not", "value":"DrivingModeOn"}]},
+ "event":{"name":"EV12000", "value":12000, "transition":12011, "guardCondition":[{"operator":"=", "value":11}]}
},
"state":{
"name":"Display0Category3", /* Map */
"value":12003,
- "event":{ "name":"EV12000","value":12000, "transition":12001, "guardCondition":[{"operator":"=","value":1}]},
- "event":{ "name":"EV12000","value":12000, "transition":12002, "guardCondition":[{"operator":"=","value":2}]},
- "event":{ "name":"EV12000","value":12000, "transition":12004, "guardCondition":[{"operator":"=","value":4}]},
- "event":{ "name":"EV12000","value":12000, "transition":12003, "guardCondition":[{"operator":"=","value":3}]},
- "event":{ "name":"EV12000","value":12000, "transition":12005, "guardCondition":[{"operator":"=","value":5}]},
- "event":{ "name":"EV12000","value":12000, "transition":12006, "guardCondition":[{"operator":"=","value":6}]},
- "event":{ "name":"EV12000","value":12000, "transition":12007, "guardCondition":[{"operator":"=","value":7}]},
- "event":{ "name":"EV12000","value":12000, "transition":12008, "guardCondition":[{"operator":"=","value":8}]},
- "event":{ "name":"EV12000","value":12000, "transition":12009, "guardCondition":[{ "operator":"=","value":9},
- {"join":"and","operator":"not","value":"Regulating"}]},
- "event":{ "name":"EV12000","value":12000, "transition":12010, "guardCondition":[{ "operator":"=","value":10},
- {"join":"and","operator":"not","value":"Regulating"}]},
- "event":{ "name":"EV12000","value":12000, "transition":12011, "guardCondition":[{"operator":"=","value":11}]}
+ "event":{"name":"EV12000", "value":12000, "transition":12001, "guardCondition":[{"operator":"=", "value":1}]},
+ "event":{"name":"EV12000", "value":12000, "transition":12002, "guardCondition":[{"operator":"=", "value":2}]},
+ "event":{"name":"EV12000", "value":12000, "transition":12004, "guardCondition":[{"operator":"=", "value":4}]},
+ "event":{"name":"EV12000", "value":12000, "transition":12003, "guardCondition":[{"operator":"=", "value":3}]},
+ "event":{"name":"EV12000", "value":12000, "transition":12005, "guardCondition":[{"operator":"=", "value":5}]},
+ "event":{"name":"EV12000", "value":12000, "transition":12006, "guardCondition":[{"operator":"=", "value":6}]},
+ "event":{"name":"EV12000", "value":12000, "transition":12007, "guardCondition":[{"operator":"=", "value":7}]},
+ "event":{"name":"EV12000", "value":12000, "transition":12008, "guardCondition":[{"operator":"=", "value":8}]},
+ "event":{"name":"EV12000", "value":12000, "transition":12009, "guardCondition":[{ "operator":"=", "value":9},
+ {"join":"and", "operator":"not", "value":"DrivingModeOn"}]},
+ "event":{"name":"EV12000", "value":12000, "transition":12010, "guardCondition":[{ "operator":"=", "value":10},
+ {"join":"and", "operator":"not", "value":"DrivingModeOn"}]},
+ "event":{"name":"EV12000", "value":12000, "transition":12011, "guardCondition":[{"operator":"=", "value":11}]}
},
"state":{
"name":"Display0Category4", /* Driving */
"value":12004,
- "event":{ "name":"EV12000","value":12000, "transition":12001, "guardCondition":[{"operator":"=","value":1}]},
- "event":{ "name":"EV12000","value":12000, "transition":12002, "guardCondition":[{"operator":"=","value":2}]},
- "event":{ "name":"EV12000","value":12000, "transition":12003, "guardCondition":[{"operator":"=","value":3}]},
- "event":{ "name":"EV12000","value":12000, "transition":12004, "guardCondition":[{"operator":"=","value":4}]},
- "event":{ "name":"EV12000","value":12000, "transition":12005, "guardCondition":[{"operator":"=","value":5}]},
- "event":{ "name":"EV12000","value":12000, "transition":12006, "guardCondition":[{"operator":"=","value":6}]},
- "event":{ "name":"EV12000","value":12000, "transition":12007, "guardCondition":[{"operator":"=","value":7}]},
- "event":{ "name":"EV12000","value":12000, "transition":12008, "guardCondition":[{"operator":"=","value":8}]},
- "event":{ "name":"EV12000","value":12000, "transition":12009, "guardCondition":[{ "operator":"=","value":9},
- {"join":"and","operator":"not","value":"Regulating"}]},
- "event":{ "name":"EV12000","value":12000, "transition":12010, "guardCondition":[{ "operator":"=","value":10},
- {"join":"and","operator":"not","value":"Regulating"}]},
- "event":{ "name":"EV12000","value":12000, "transition":12011, "guardCondition":[{"operator":"=","value":11}]}
+ "event":{"name":"EV12000", "value":12000, "transition":12001, "guardCondition":[{"operator":"=", "value":1}]},
+ "event":{"name":"EV12000", "value":12000, "transition":12002, "guardCondition":[{"operator":"=", "value":2}]},
+ "event":{"name":"EV12000", "value":12000, "transition":12003, "guardCondition":[{"operator":"=", "value":3}]},
+ "event":{"name":"EV12000", "value":12000, "transition":12004, "guardCondition":[{"operator":"=", "value":4}]},
+ "event":{"name":"EV12000", "value":12000, "transition":12005, "guardCondition":[{"operator":"=", "value":5}]},
+ "event":{"name":"EV12000", "value":12000, "transition":12006, "guardCondition":[{"operator":"=", "value":6}]},
+ "event":{"name":"EV12000", "value":12000, "transition":12007, "guardCondition":[{"operator":"=", "value":7}]},
+ "event":{"name":"EV12000", "value":12000, "transition":12008, "guardCondition":[{"operator":"=", "value":8}]},
+ "event":{"name":"EV12000", "value":12000, "transition":12009, "guardCondition":[{ "operator":"=", "value":9},
+ {"join":"and", "operator":"not", "value":"DrivingModeOn"}]},
+ "event":{"name":"EV12000", "value":12000, "transition":12010, "guardCondition":[{ "operator":"=", "value":10},
+ {"join":"and", "operator":"not", "value":"DrivingModeOn"}]},
+ "event":{"name":"EV12000", "value":12000, "transition":12011, "guardCondition":[{"operator":"=", "value":11}]}
},
"state":{
"name":"Display0Category5", /* CarSetting */
"value":12005,
- "event":{ "name":"EV12000","value":12000, "transition":12001, "guardCondition":[{"operator":"=","value":1}]},
- "event":{ "name":"EV12000","value":12000, "transition":12002, "guardCondition":[{"operator":"=","value":2}]},
- "event":{ "name":"EV12000","value":12000, "transition":12003, "guardCondition":[{"operator":"=","value":3}]},
- "event":{ "name":"EV12000","value":12000, "transition":12004, "guardCondition":[{"operator":"=","value":4}]},
- "event":{ "name":"EV12000","value":12000, "transition":12005, "guardCondition":[{"operator":"=","value":5}]},
- "event":{ "name":"EV12000","value":12000, "transition":12006, "guardCondition":[{"operator":"=","value":6}]},
- "event":{ "name":"EV12000","value":12000, "transition":12007, "guardCondition":[{"operator":"=","value":7}]},
- "event":{ "name":"EV12000","value":12000, "transition":12008, "guardCondition":[{"operator":"=","value":8}]},
- "event":{ "name":"EV12000","value":12000, "transition":12009, "guardCondition":[{ "operator":"=","value":9},
- {"join":"and","operator":"not","value":"Regulating"}]},
- "event":{ "name":"EV12000","value":12000, "transition":12010, "guardCondition":[{ "operator":"=","value":10},
- {"join":"and","operator":"not","value":"Regulating"}]},
- "event":{ "name":"EV12000","value":12000, "transition":12011, "guardCondition":[{"operator":"=","value":11}]}
+ "event":{"name":"EV12000", "value":12000, "transition":12001, "guardCondition":[{"operator":"=", "value":1}]},
+ "event":{"name":"EV12000", "value":12000, "transition":12002, "guardCondition":[{"operator":"=", "value":2}]},
+ "event":{"name":"EV12000", "value":12000, "transition":12003, "guardCondition":[{"operator":"=", "value":3}]},
+ "event":{"name":"EV12000", "value":12000, "transition":12004, "guardCondition":[{"operator":"=", "value":4}]},
+ "event":{"name":"EV12000", "value":12000, "transition":12005, "guardCondition":[{"operator":"=", "value":5}]},
+ "event":{"name":"EV12000", "value":12000, "transition":12006, "guardCondition":[{"operator":"=", "value":6}]},
+ "event":{"name":"EV12000", "value":12000, "transition":12007, "guardCondition":[{"operator":"=", "value":7}]},
+ "event":{"name":"EV12000", "value":12000, "transition":12008, "guardCondition":[{"operator":"=", "value":8}]},
+ "event":{"name":"EV12000", "value":12000, "transition":12009, "guardCondition":[{ "operator":"=", "value":9},
+ {"join":"and", "operator":"not", "value":"DrivingModeOn"}]},
+ "event":{"name":"EV12000", "value":12000, "transition":12010, "guardCondition":[{ "operator":"=", "value":10},
+ {"join":"and", "operator":"not", "value":"DrivingModeOn"}]},
+ "event":{"name":"EV12000", "value":12000, "transition":12011, "guardCondition":[{"operator":"=", "value":11}]}
},
"state":{
"name":"Display0Category6", /* Camera.Back */
"value":12006,
- "event":{ "name":"EV12000","value":12000, "transition":12001, "guardCondition":[{"operator":"=","value":1}]},
- "event":{ "name":"EV12000","value":12000, "transition":12002, "guardCondition":[{"operator":"=","value":2}]},
- "event":{ "name":"EV12000","value":12000, "transition":12003, "guardCondition":[{"operator":"=","value":3}]},
- "event":{ "name":"EV12000","value":12000, "transition":12004, "guardCondition":[{"operator":"=","value":4}]},
- "event":{ "name":"EV12000","value":12000, "transition":12005, "guardCondition":[{"operator":"=","value":5}]},
- "event":{ "name":"EV12000","value":12000, "transition":12006, "guardCondition":[{"operator":"=","value":6}]},
- "event":{ "name":"EV12000","value":12000, "transition":12007, "guardCondition":[{"operator":"=","value":7}]},
- "event":{ "name":"EV12000","value":12000, "transition":12008, "guardCondition":[{"operator":"=","value":8}]},
- "event":{ "name":"EV12000","value":12000, "transition":12009, "guardCondition":[{ "operator":"=","value":9},
- {"join":"and","operator":"not","value":"Regulating"}]},
- "event":{ "name":"EV12000","value":12000, "transition":12010, "guardCondition":[{ "operator":"=","value":10},
- {"join":"and","operator":"not","value":"Regulating"}]},
- "event":{ "name":"EV12000","value":12000, "transition":12011, "guardCondition":[{"operator":"=","value":11}]}
+ "event":{"name":"EV12000", "value":12000, "transition":12001, "guardCondition":[{"operator":"=", "value":1}]},
+ "event":{"name":"EV12000", "value":12000, "transition":12002, "guardCondition":[{"operator":"=", "value":2}]},
+ "event":{"name":"EV12000", "value":12000, "transition":12003, "guardCondition":[{"operator":"=", "value":3}]},
+ "event":{"name":"EV12000", "value":12000, "transition":12004, "guardCondition":[{"operator":"=", "value":4}]},
+ "event":{"name":"EV12000", "value":12000, "transition":12005, "guardCondition":[{"operator":"=", "value":5}]},
+ "event":{"name":"EV12000", "value":12000, "transition":12006, "guardCondition":[{"operator":"=", "value":6}]},
+ "event":{"name":"EV12000", "value":12000, "transition":12007, "guardCondition":[{"operator":"=", "value":7}]},
+ "event":{"name":"EV12000", "value":12000, "transition":12008, "guardCondition":[{"operator":"=", "value":8}]},
+ "event":{"name":"EV12000", "value":12000, "transition":12009, "guardCondition":[{ "operator":"=", "value":9},
+ {"join":"and", "operator":"not", "value":"DrivingModeOn"}]},
+ "event":{"name":"EV12000", "value":12000, "transition":12010, "guardCondition":[{ "operator":"=", "value":10},
+ {"join":"and", "operator":"not", "value":"DrivingModeOn"}]},
+ "event":{"name":"EV12000", "value":12000, "transition":12011, "guardCondition":[{"operator":"=", "value":11}]}
},
"state":{
"name":"Display0Category7", /* Camera.Left */
"value":12007,
- "event":{ "name":"EV12000","value":12000, "transition":12001, "guardCondition":[{"operator":"=","value":1}]},
- "event":{ "name":"EV12000","value":12000, "transition":12002, "guardCondition":[{"operator":"=","value":2}]},
- "event":{ "name":"EV12000","value":12000, "transition":12003, "guardCondition":[{"operator":"=","value":3}]},
- "event":{ "name":"EV12000","value":12000, "transition":12004, "guardCondition":[{"operator":"=","value":4}]},
- "event":{ "name":"EV12000","value":12000, "transition":12005, "guardCondition":[{"operator":"=","value":5}]},
- "event":{ "name":"EV12000","value":12000, "transition":12006, "guardCondition":[{"operator":"=","value":6}]},
- "event":{ "name":"EV12000","value":12000, "transition":12007, "guardCondition":[{"operator":"=","value":7}]},
- "event":{ "name":"EV12000","value":12000, "transition":12008, "guardCondition":[{"operator":"=","value":8}]},
- "event":{ "name":"EV12000","value":12000, "transition":12009, "guardCondition":[{ "operator":"=","value":9},
- {"join":"and","operator":"not","value":"Regulating"}]},
- "event":{ "name":"EV12000","value":12000, "transition":12010, "guardCondition":[{ "operator":"=","value":10},
- {"join":"and","operator":"not","value":"Regulating"}]},
- "event":{ "name":"EV12000","value":12000, "transition":12011, "guardCondition":[{"operator":"=","value":11}]}
+ "event":{"name":"EV12000", "value":12000, "transition":12001, "guardCondition":[{"operator":"=", "value":1}]},
+ "event":{"name":"EV12000", "value":12000, "transition":12002, "guardCondition":[{"operator":"=", "value":2}]},
+ "event":{"name":"EV12000", "value":12000, "transition":12003, "guardCondition":[{"operator":"=", "value":3}]},
+ "event":{"name":"EV12000", "value":12000, "transition":12004, "guardCondition":[{"operator":"=", "value":4}]},
+ "event":{"name":"EV12000", "value":12000, "transition":12005, "guardCondition":[{"operator":"=", "value":5}]},
+ "event":{"name":"EV12000", "value":12000, "transition":12006, "guardCondition":[{"operator":"=", "value":6}]},
+ "event":{"name":"EV12000", "value":12000, "transition":12007, "guardCondition":[{"operator":"=", "value":7}]},
+ "event":{"name":"EV12000", "value":12000, "transition":12008, "guardCondition":[{"operator":"=", "value":8}]},
+ "event":{"name":"EV12000", "value":12000, "transition":12009, "guardCondition":[{ "operator":"=", "value":9},
+ {"join":"and", "operator":"not", "value":"DrivingModeOn"}]},
+ "event":{"name":"EV12000", "value":12000, "transition":12010, "guardCondition":[{ "operator":"=", "value":10},
+ {"join":"and", "operator":"not", "value":"DrivingModeOn"}]},
+ "event":{"name":"EV12000", "value":12000, "transition":12011, "guardCondition":[{"operator":"=", "value":11}]}
},
"state":{
"name":"Display0Category8", /* Camera.Right */
"value":12008,
- "event":{ "name":"EV12000","value":12000, "transition":12001, "guardCondition":[{"operator":"=","value":1}]},
- "event":{ "name":"EV12000","value":12000, "transition":12002, "guardCondition":[{"operator":"=","value":2}]},
- "event":{ "name":"EV12000","value":12000, "transition":12003, "guardCondition":[{"operator":"=","value":3}]},
- "event":{ "name":"EV12000","value":12000, "transition":12004, "guardCondition":[{"operator":"=","value":4}]},
- "event":{ "name":"EV12000","value":12000, "transition":12005, "guardCondition":[{"operator":"=","value":5}]},
- "event":{ "name":"EV12000","value":12000, "transition":12006, "guardCondition":[{"operator":"=","value":6}]},
- "event":{ "name":"EV12000","value":12000, "transition":12007, "guardCondition":[{"operator":"=","value":7}]},
- "event":{ "name":"EV12000","value":12000, "transition":12008, "guardCondition":[{"operator":"=","value":8}]},
- "event":{ "name":"EV12000","value":12000, "transition":12009, "guardCondition":[{ "operator":"=","value":9},
- {"join":"and","operator":"not","value":"Regulating"}]},
- "event":{ "name":"EV12000","value":12000, "transition":12010, "guardCondition":[{ "operator":"=","value":10},
- {"join":"and","operator":"not","value":"Regulating"}]},
- "event":{ "name":"EV12000","value":12000, "transition":12011, "guardCondition":[{"operator":"=","value":11}]}
+ "event":{"name":"EV12000", "value":12000, "transition":12001, "guardCondition":[{"operator":"=", "value":1}]},
+ "event":{"name":"EV12000", "value":12000, "transition":12002, "guardCondition":[{"operator":"=", "value":2}]},
+ "event":{"name":"EV12000", "value":12000, "transition":12003, "guardCondition":[{"operator":"=", "value":3}]},
+ "event":{"name":"EV12000", "value":12000, "transition":12004, "guardCondition":[{"operator":"=", "value":4}]},
+ "event":{"name":"EV12000", "value":12000, "transition":12005, "guardCondition":[{"operator":"=", "value":5}]},
+ "event":{"name":"EV12000", "value":12000, "transition":12006, "guardCondition":[{"operator":"=", "value":6}]},
+ "event":{"name":"EV12000", "value":12000, "transition":12007, "guardCondition":[{"operator":"=", "value":7}]},
+ "event":{"name":"EV12000", "value":12000, "transition":12008, "guardCondition":[{"operator":"=", "value":8}]},
+ "event":{"name":"EV12000", "value":12000, "transition":12009, "guardCondition":[{ "operator":"=", "value":9},
+ {"join":"and", "operator":"not", "value":"DrivingModeOn"}]},
+ "event":{"name":"EV12000", "value":12000, "transition":12010, "guardCondition":[{ "operator":"=", "value":10},
+ {"join":"and", "operator":"not", "value":"DrivingModeOn"}]},
+ "event":{"name":"EV12000", "value":12000, "transition":12011, "guardCondition":[{"operator":"=", "value":11}]}
},
"state":{
"name":"Display0Category9", /* Entertainment */
"value":12009,
- "event":{ "name":"EV12000","value":12000, "transition":12001, "guardCondition":[{"operator":"=","value":1}]},
- "event":{ "name":"EV12000","value":12000, "transition":12002, "guardCondition":[{"operator":"=","value":2}]},
- "event":{ "name":"EV12000","value":12000, "transition":12003, "guardCondition":[{"operator":"=","value":3}]},
- "event":{ "name":"EV12000","value":12000, "transition":12004, "guardCondition":[{"operator":"=","value":4}]},
- "event":{ "name":"EV12000","value":12000, "transition":12005, "guardCondition":[{"operator":"=","value":5}]},
- "event":{ "name":"EV12000","value":12000, "transition":12006, "guardCondition":[{"operator":"=","value":6}]},
- "event":{ "name":"EV12000","value":12000, "transition":12007, "guardCondition":[{"operator":"=","value":7}]},
- "event":{ "name":"EV12000","value":12000, "transition":12008, "guardCondition":[{"operator":"=","value":8}]},
- "event":{ "name":"EV12000","value":12000, "transition":12009, "guardCondition":[{ "operator":"=","value":9},
- {"join":"and","operator":"not","value":"Regulating"}]},
- "event":{ "name":"EV12000","value":12000, "transition":12010, "guardCondition":[{ "operator":"=","value":10},
- {"join":"and","operator":"not","value":"Regulating"}]},
- "event":{ "name":"EV12000","value":12000, "transition":12011, "guardCondition":[{"operator":"=","value":11}]}
+ "event":{"name":"EV12000", "value":12000, "transition":12001, "guardCondition":[{"operator":"=", "value":1}]},
+ "event":{"name":"EV12000", "value":12000, "transition":12002, "guardCondition":[{"operator":"=", "value":2}]},
+ "event":{"name":"EV12000", "value":12000, "transition":12003, "guardCondition":[{"operator":"=", "value":3}]},
+ "event":{"name":"EV12000", "value":12000, "transition":12004, "guardCondition":[{"operator":"=", "value":4}]},
+ "event":{"name":"EV12000", "value":12000, "transition":12005, "guardCondition":[{"operator":"=", "value":5}]},
+ "event":{"name":"EV12000", "value":12000, "transition":12006, "guardCondition":[{"operator":"=", "value":6}]},
+ "event":{"name":"EV12000", "value":12000, "transition":12007, "guardCondition":[{"operator":"=", "value":7}]},
+ "event":{"name":"EV12000", "value":12000, "transition":12008, "guardCondition":[{"operator":"=", "value":8}]},
+ "event":{"name":"EV12000", "value":12000, "transition":12009, "guardCondition":[{ "operator":"=", "value":9},
+ {"join":"and", "operator":"not", "value":"DrivingModeOn"}]},
+ "event":{"name":"EV12000", "value":12000, "transition":12010, "guardCondition":[{ "operator":"=", "value":10},
+ {"join":"and", "operator":"not", "value":"DrivingModeOn"}]},
+ "event":{"name":"EV12000", "value":12000, "transition":12011, "guardCondition":[{"operator":"=", "value":11}]}
},
"state":{
"name":"Display0Category10", /* Entertainment.audio */
"value":12010,
- "event":{ "name":"EV12000","value":12000, "transition":12001, "guardCondition":[{"operator":"=","value":1}]},
- "event":{ "name":"EV12000","value":12000, "transition":12002, "guardCondition":[{"operator":"=","value":2}]},
- "event":{ "name":"EV12000","value":12000, "transition":12003, "guardCondition":[{"operator":"=","value":3}]},
- "event":{ "name":"EV12000","value":12000, "transition":12004, "guardCondition":[{"operator":"=","value":4}]},
- "event":{ "name":"EV12000","value":12000, "transition":12005, "guardCondition":[{"operator":"=","value":5}]},
- "event":{ "name":"EV12000","value":12000, "transition":12006, "guardCondition":[{"operator":"=","value":6}]},
- "event":{ "name":"EV12000","value":12000, "transition":12007, "guardCondition":[{"operator":"=","value":7}]},
- "event":{ "name":"EV12000","value":12000, "transition":12008, "guardCondition":[{"operator":"=","value":8}]},
- "event":{ "name":"EV12000","value":12000, "transition":12009, "guardCondition":[{ "operator":"=","value":9},
- {"join":"and","operator":"not","value":"Regulating"}]},
- "event":{ "name":"EV12000","value":12000, "transition":12010, "guardCondition":[{ "operator":"=","value":10},
- {"join":"and","operator":"not","value":"Regulating"}]},
- "event":{ "name":"EV12000","value":12000, "transition":12011, "guardCondition":[{"operator":"=","value":11}]}
+ "event":{"name":"EV12000", "value":12000, "transition":12001, "guardCondition":[{"operator":"=", "value":1}]},
+ "event":{"name":"EV12000", "value":12000, "transition":12002, "guardCondition":[{"operator":"=", "value":2}]},
+ "event":{"name":"EV12000", "value":12000, "transition":12003, "guardCondition":[{"operator":"=", "value":3}]},
+ "event":{"name":"EV12000", "value":12000, "transition":12004, "guardCondition":[{"operator":"=", "value":4}]},
+ "event":{"name":"EV12000", "value":12000, "transition":12005, "guardCondition":[{"operator":"=", "value":5}]},
+ "event":{"name":"EV12000", "value":12000, "transition":12006, "guardCondition":[{"operator":"=", "value":6}]},
+ "event":{"name":"EV12000", "value":12000, "transition":12007, "guardCondition":[{"operator":"=", "value":7}]},
+ "event":{"name":"EV12000", "value":12000, "transition":12008, "guardCondition":[{"operator":"=", "value":8}]},
+ "event":{"name":"EV12000", "value":12000, "transition":12009, "guardCondition":[{ "operator":"=", "value":9},
+ {"join":"and", "operator":"not", "value":"DrivingModeOn"}]},
+ "event":{"name":"EV12000", "value":12000, "transition":12010, "guardCondition":[{ "operator":"=", "value":10},
+ {"join":"and", "operator":"not", "value":"DrivingModeOn"}]},
+ "event":{"name":"EV12000", "value":12000, "transition":12011, "guardCondition":[{"operator":"=", "value":11}]}
},
"state":{
"name":"Display0Category11", /* Entertainment.visiual */
"value":12011,
- "event":{ "name":"EV12000","value":12000, "transition":12001, "guardCondition":[{"operator":"=","value":1}]},
- "event":{ "name":"EV12000","value":12000, "transition":12002, "guardCondition":[{"operator":"=","value":2}]},
- "event":{ "name":"EV12000","value":12000, "transition":12003, "guardCondition":[{"operator":"=","value":3}]},
- "event":{ "name":"EV12000","value":12000, "transition":12004, "guardCondition":[{"operator":"=","value":4}]},
- "event":{ "name":"EV12000","value":12000, "transition":12005, "guardCondition":[{"operator":"=","value":5}]},
- "event":{ "name":"EV12000","value":12000, "transition":12006, "guardCondition":[{"operator":"=","value":6}]},
- "event":{ "name":"EV12000","value":12000, "transition":12007, "guardCondition":[{"operator":"=","value":7}]},
- "event":{ "name":"EV12000","value":12000, "transition":12008, "guardCondition":[{"operator":"=","value":8}]},
- "event":{ "name":"EV12000","value":12000, "transition":12009, "guardCondition":[{ "operator":"=","value":9},
- {"join":"and","operator":"not","value":"Regulating"}]},
- "event":{ "name":"EV12000","value":12000, "transition":12010, "guardCondition":[{ "operator":"=","value":10},
- {"join":"and","operator":"not","value":"Regulating"}]},
- "event":{ "name":"EV12000","value":12000, "transition":12011, "guardCondition":[{"operator":"=","value":11}]}
+ "event":{"name":"EV12000", "value":12000, "transition":12001, "guardCondition":[{"operator":"=", "value":1}]},
+ "event":{"name":"EV12000", "value":12000, "transition":12002, "guardCondition":[{"operator":"=", "value":2}]},
+ "event":{"name":"EV12000", "value":12000, "transition":12003, "guardCondition":[{"operator":"=", "value":3}]},
+ "event":{"name":"EV12000", "value":12000, "transition":12004, "guardCondition":[{"operator":"=", "value":4}]},
+ "event":{"name":"EV12000", "value":12000, "transition":12005, "guardCondition":[{"operator":"=", "value":5}]},
+ "event":{"name":"EV12000", "value":12000, "transition":12006, "guardCondition":[{"operator":"=", "value":6}]},
+ "event":{"name":"EV12000", "value":12000, "transition":12007, "guardCondition":[{"operator":"=", "value":7}]},
+ "event":{"name":"EV12000", "value":12000, "transition":12008, "guardCondition":[{"operator":"=", "value":8}]},
+ "event":{"name":"EV12000", "value":12000, "transition":12009, "guardCondition":[{ "operator":"=", "value":9},
+ {"join":"and", "operator":"not", "value":"DrivingModeOn"}]},
+ "event":{"name":"EV12000", "value":12000, "transition":12010, "guardCondition":[{ "operator":"=", "value":10},
+ {"join":"and", "operator":"not", "value":"DrivingModeOn"}]},
+ "event":{"name":"EV12000", "value":12000, "transition":12011, "guardCondition":[{"operator":"=", "value":11}]}
+ }
+ },
+
+ "state":{
+ "name":"Disp0Zone2Category",
+ "value":12100,
+ "state":{
+ "name":"Disp0Zone2Category1", /* Menu */
+ "value":12101,
+ "event":{"name":"EV12100", "value":12100, "transition":12101, "guardCondition":[{"operator":"=", "value":1}]},
+ "event":{"name":"EV12100", "value":12100, "transition":12102, "guardCondition":[{"operator":"=", "value":2}]},
+ "event":{"name":"EV12100", "value":12100, "transition":12103, "guardCondition":[{"operator":"=", "value":3}]},
+ "event":{"name":"EV12100", "value":12100, "transition":12104, "guardCondition":[{"operator":"=", "value":4}]},
+ "event":{"name":"EV12100", "value":12100, "transition":12105, "guardCondition":[{"operator":"=", "value":5}]},
+ "event":{"name":"EV12100", "value":12100, "transition":12106, "guardCondition":[{"operator":"=", "value":6}]},
+ "event":{"name":"EV12100", "value":12100, "transition":12107, "guardCondition":[{"operator":"=", "value":7}]},
+ "event":{"name":"EV12100", "value":12100, "transition":12108, "guardCondition":[{"operator":"=", "value":8}]},
+ "event":{"name":"EV12100", "value":12100, "transition":12109, "guardCondition":[{ "operator":"=", "value":9},
+ {"join":"and", "operator":"not", "value":"DrivingModeOn"}]},
+ "event":{"name":"EV12100", "value":12100, "transition":12110, "guardCondition":[{ "operator":"=", "value":10},
+ {"join":"and", "operator":"not", "value":"DrivingModeOn"}]},
+ "event":{"name":"EV12100", "value":12100, "transition":12111, "guardCondition":[{"operator":"=", "value":11}]}
+ },
+ "state":{
+ "name":"Disp0Zone2Category2", /* Message */
+ "value":12102,
+ "event":{"name":"EV12100", "value":12100, "transition":12101, "guardCondition":[{"operator":"=", "value":1}]},
+ "event":{"name":"EV12100", "value":12100, "transition":12102, "guardCondition":[{"operator":"=", "value":2}]},
+ "event":{"name":"EV12100", "value":12100, "transition":12103, "guardCondition":[{"operator":"=", "value":3}]},
+ "event":{"name":"EV12100", "value":12100, "transition":12104, "guardCondition":[{"operator":"=", "value":4}]},
+ "event":{"name":"EV12100", "value":12100, "transition":12105, "guardCondition":[{"operator":"=", "value":5}]},
+ "event":{"name":"EV12100", "value":12100, "transition":12106, "guardCondition":[{"operator":"=", "value":6}]},
+ "event":{"name":"EV12100", "value":12100, "transition":12107, "guardCondition":[{"operator":"=", "value":7}]},
+ "event":{"name":"EV12100", "value":12100, "transition":12108, "guardCondition":[{"operator":"=", "value":8}]},
+ "event":{"name":"EV12100", "value":12100, "transition":12109, "guardCondition":[{ "operator":"=", "value":9},
+ {"join":"and", "operator":"not", "value":"DrivingModeOn"}]},
+ "event":{"name":"EV12100", "value":12100, "transition":12110, "guardCondition":[{ "operator":"=", "value":10},
+ {"join":"and", "operator":"not", "value":"DrivingModeOn"}]},
+ "event":{"name":"EV12100", "value":12100, "transition":12111, "guardCondition":[{"operator":"=", "value":11}]}
+ },
+ "state":{
+ "name":"Disp0Zone2Category3", /* Map */
+ "value":12103,
+ "event":{"name":"EV12100", "value":12100, "transition":12101, "guardCondition":[{"operator":"=", "value":1}]},
+ "event":{"name":"EV12100", "value":12100, "transition":12102, "guardCondition":[{"operator":"=", "value":2}]},
+ "event":{"name":"EV12100", "value":12100, "transition":12104, "guardCondition":[{"operator":"=", "value":4}]},
+ "event":{"name":"EV12100", "value":12100, "transition":12103, "guardCondition":[{"operator":"=", "value":3}]},
+ "event":{"name":"EV12100", "value":12100, "transition":12105, "guardCondition":[{"operator":"=", "value":5}]},
+ "event":{"name":"EV12100", "value":12100, "transition":12106, "guardCondition":[{"operator":"=", "value":6}]},
+ "event":{"name":"EV12100", "value":12100, "transition":12107, "guardCondition":[{"operator":"=", "value":7}]},
+ "event":{"name":"EV12100", "value":12100, "transition":12108, "guardCondition":[{"operator":"=", "value":8}]},
+ "event":{"name":"EV12100", "value":12100, "transition":12109, "guardCondition":[{ "operator":"=", "value":9},
+ {"join":"and", "operator":"not", "value":"DrivingModeOn"}]},
+ "event":{"name":"EV12100", "value":12100, "transition":12110, "guardCondition":[{ "operator":"=", "value":10},
+ {"join":"and", "operator":"not", "value":"DrivingModeOn"}]},
+ "event":{"name":"EV12100", "value":12100, "transition":12111, "guardCondition":[{"operator":"=", "value":11}]}
+ },
+ "state":{
+ "name":"Disp0Zone2Category4", /* Driving */
+ "value":12104,
+ "event":{"name":"EV12100", "value":12100, "transition":12101, "guardCondition":[{"operator":"=", "value":1}]},
+ "event":{"name":"EV12100", "value":12100, "transition":12102, "guardCondition":[{"operator":"=", "value":2}]},
+ "event":{"name":"EV12100", "value":12100, "transition":12103, "guardCondition":[{"operator":"=", "value":3}]},
+ "event":{"name":"EV12100", "value":12100, "transition":12104, "guardCondition":[{"operator":"=", "value":4}]},
+ "event":{"name":"EV12100", "value":12100, "transition":12105, "guardCondition":[{"operator":"=", "value":5}]},
+ "event":{"name":"EV12100", "value":12100, "transition":12106, "guardCondition":[{"operator":"=", "value":6}]},
+ "event":{"name":"EV12100", "value":12100, "transition":12107, "guardCondition":[{"operator":"=", "value":7}]},
+ "event":{"name":"EV12100", "value":12100, "transition":12108, "guardCondition":[{"operator":"=", "value":8}]},
+ "event":{"name":"EV12100", "value":12100, "transition":12109, "guardCondition":[{ "operator":"=", "value":9},
+ {"join":"and", "operator":"not", "value":"DrivingModeOn"}]},
+ "event":{"name":"EV12100", "value":12100, "transition":12110, "guardCondition":[{ "operator":"=", "value":10},
+ {"join":"and", "operator":"not", "value":"DrivingModeOn"}]},
+ "event":{"name":"EV12100", "value":12100, "transition":12111, "guardCondition":[{"operator":"=", "value":11}]}
+ },
+ "state":{
+ "name":"Disp0Zone2Category5", /* CarSetting */
+ "value":12105,
+ "event":{"name":"EV12100", "value":12100, "transition":12101, "guardCondition":[{"operator":"=", "value":1}]},
+ "event":{"name":"EV12100", "value":12100, "transition":12102, "guardCondition":[{"operator":"=", "value":2}]},
+ "event":{"name":"EV12100", "value":12100, "transition":12103, "guardCondition":[{"operator":"=", "value":3}]},
+ "event":{"name":"EV12100", "value":12100, "transition":12104, "guardCondition":[{"operator":"=", "value":4}]},
+ "event":{"name":"EV12100", "value":12100, "transition":12105, "guardCondition":[{"operator":"=", "value":5}]},
+ "event":{"name":"EV12100", "value":12100, "transition":12106, "guardCondition":[{"operator":"=", "value":6}]},
+ "event":{"name":"EV12100", "value":12100, "transition":12107, "guardCondition":[{"operator":"=", "value":7}]},
+ "event":{"name":"EV12100", "value":12100, "transition":12108, "guardCondition":[{"operator":"=", "value":8}]},
+ "event":{"name":"EV12100", "value":12100, "transition":12109, "guardCondition":[{ "operator":"=", "value":9},
+ {"join":"and", "operator":"not", "value":"DrivingModeOn"}]},
+ "event":{"name":"EV12100", "value":12100, "transition":12110, "guardCondition":[{ "operator":"=", "value":10},
+ {"join":"and", "operator":"not", "value":"DrivingModeOn"}]},
+ "event":{"name":"EV12100", "value":12100, "transition":12111, "guardCondition":[{"operator":"=", "value":11}]}
+ },
+ "state":{
+ "name":"Disp0Zone2Category6", /* Camera.Back */
+ "value":12106,
+ "event":{"name":"EV12100", "value":12100, "transition":12101, "guardCondition":[{"operator":"=", "value":1}]},
+ "event":{"name":"EV12100", "value":12100, "transition":12102, "guardCondition":[{"operator":"=", "value":2}]},
+ "event":{"name":"EV12100", "value":12100, "transition":12103, "guardCondition":[{"operator":"=", "value":3}]},
+ "event":{"name":"EV12100", "value":12100, "transition":12104, "guardCondition":[{"operator":"=", "value":4}]},
+ "event":{"name":"EV12100", "value":12100, "transition":12105, "guardCondition":[{"operator":"=", "value":5}]},
+ "event":{"name":"EV12100", "value":12100, "transition":12106, "guardCondition":[{"operator":"=", "value":6}]},
+ "event":{"name":"EV12100", "value":12100, "transition":12107, "guardCondition":[{"operator":"=", "value":7}]},
+ "event":{"name":"EV12100", "value":12100, "transition":12108, "guardCondition":[{"operator":"=", "value":8}]},
+ "event":{"name":"EV12100", "value":12100, "transition":12109, "guardCondition":[{ "operator":"=", "value":9},
+ {"join":"and", "operator":"not", "value":"DrivingModeOn"}]},
+ "event":{"name":"EV12100", "value":12100, "transition":12110, "guardCondition":[{ "operator":"=", "value":10},
+ {"join":"and", "operator":"not", "value":"DrivingModeOn"}]},
+ "event":{"name":"EV12100", "value":12100, "transition":12111, "guardCondition":[{"operator":"=", "value":11}]}
+ },
+ "state":{
+ "name":"Disp0Zone2Category7", /* Camera.Left */
+ "value":12107,
+ "event":{"name":"EV12100", "value":12100, "transition":12101, "guardCondition":[{"operator":"=", "value":1}]},
+ "event":{"name":"EV12100", "value":12100, "transition":12102, "guardCondition":[{"operator":"=", "value":2}]},
+ "event":{"name":"EV12100", "value":12100, "transition":12103, "guardCondition":[{"operator":"=", "value":3}]},
+ "event":{"name":"EV12100", "value":12100, "transition":12104, "guardCondition":[{"operator":"=", "value":4}]},
+ "event":{"name":"EV12100", "value":12100, "transition":12105, "guardCondition":[{"operator":"=", "value":5}]},
+ "event":{"name":"EV12100", "value":12100, "transition":12106, "guardCondition":[{"operator":"=", "value":6}]},
+ "event":{"name":"EV12100", "value":12100, "transition":12107, "guardCondition":[{"operator":"=", "value":7}]},
+ "event":{"name":"EV12100", "value":12100, "transition":12108, "guardCondition":[{"operator":"=", "value":8}]},
+ "event":{"name":"EV12100", "value":12100, "transition":12109, "guardCondition":[{ "operator":"=", "value":9},
+ {"join":"and", "operator":"not", "value":"DrivingModeOn"}]},
+ "event":{"name":"EV12100", "value":12100, "transition":12110, "guardCondition":[{ "operator":"=", "value":10},
+ {"join":"and", "operator":"not", "value":"DrivingModeOn"}]},
+ "event":{"name":"EV12100", "value":12100, "transition":12111, "guardCondition":[{"operator":"=", "value":11}]}
+ },
+ "state":{
+ "name":"Disp0Zone2Category8", /* Camera.Right */
+ "value":12108,
+ "event":{"name":"EV12100", "value":12100, "transition":12101, "guardCondition":[{"operator":"=", "value":1}]},
+ "event":{"name":"EV12100", "value":12100, "transition":12102, "guardCondition":[{"operator":"=", "value":2}]},
+ "event":{"name":"EV12100", "value":12100, "transition":12103, "guardCondition":[{"operator":"=", "value":3}]},
+ "event":{"name":"EV12100", "value":12100, "transition":12104, "guardCondition":[{"operator":"=", "value":4}]},
+ "event":{"name":"EV12100", "value":12100, "transition":12105, "guardCondition":[{"operator":"=", "value":5}]},
+ "event":{"name":"EV12100", "value":12100, "transition":12106, "guardCondition":[{"operator":"=", "value":6}]},
+ "event":{"name":"EV12100", "value":12100, "transition":12107, "guardCondition":[{"operator":"=", "value":7}]},
+ "event":{"name":"EV12100", "value":12100, "transition":12108, "guardCondition":[{"operator":"=", "value":8}]},
+ "event":{"name":"EV12100", "value":12100, "transition":12109, "guardCondition":[{ "operator":"=", "value":9},
+ {"join":"and", "operator":"not", "value":"DrivingModeOn"}]},
+ "event":{"name":"EV12100", "value":12100, "transition":12110, "guardCondition":[{ "operator":"=", "value":10},
+ {"join":"and", "operator":"not", "value":"DrivingModeOn"}]},
+ "event":{"name":"EV12100", "value":12100, "transition":12111, "guardCondition":[{"operator":"=", "value":11}]}
+ },
+ "state":{
+ "name":"Disp0Zone2Category9", /* Entertainment */
+ "value":12109,
+ "event":{"name":"EV12100", "value":12100, "transition":12101, "guardCondition":[{"operator":"=", "value":1}]},
+ "event":{"name":"EV12100", "value":12100, "transition":12102, "guardCondition":[{"operator":"=", "value":2}]},
+ "event":{"name":"EV12100", "value":12100, "transition":12103, "guardCondition":[{"operator":"=", "value":3}]},
+ "event":{"name":"EV12100", "value":12100, "transition":12104, "guardCondition":[{"operator":"=", "value":4}]},
+ "event":{"name":"EV12100", "value":12100, "transition":12105, "guardCondition":[{"operator":"=", "value":5}]},
+ "event":{"name":"EV12100", "value":12100, "transition":12106, "guardCondition":[{"operator":"=", "value":6}]},
+ "event":{"name":"EV12100", "value":12100, "transition":12107, "guardCondition":[{"operator":"=", "value":7}]},
+ "event":{"name":"EV12100", "value":12100, "transition":12108, "guardCondition":[{"operator":"=", "value":8}]},
+ "event":{"name":"EV12100", "value":12100, "transition":12109, "guardCondition":[{ "operator":"=", "value":9},
+ {"join":"and", "operator":"not", "value":"DrivingModeOn"}]},
+ "event":{"name":"EV12100", "value":12100, "transition":12110, "guardCondition":[{ "operator":"=", "value":10},
+ {"join":"and", "operator":"not", "value":"DrivingModeOn"}]},
+ "event":{"name":"EV12100", "value":12100, "transition":12111, "guardCondition":[{"operator":"=", "value":11}]}
+ },
+ "state":{
+ "name":"Disp0Zone2Category10", /* Entertainment.audio */
+ "value":12110,
+ "event":{"name":"EV12100", "value":12100, "transition":12101, "guardCondition":[{"operator":"=", "value":1}]},
+ "event":{"name":"EV12100", "value":12100, "transition":12102, "guardCondition":[{"operator":"=", "value":2}]},
+ "event":{"name":"EV12100", "value":12100, "transition":12103, "guardCondition":[{"operator":"=", "value":3}]},
+ "event":{"name":"EV12100", "value":12100, "transition":12104, "guardCondition":[{"operator":"=", "value":4}]},
+ "event":{"name":"EV12100", "value":12100, "transition":12105, "guardCondition":[{"operator":"=", "value":5}]},
+ "event":{"name":"EV12100", "value":12100, "transition":12106, "guardCondition":[{"operator":"=", "value":6}]},
+ "event":{"name":"EV12100", "value":12100, "transition":12107, "guardCondition":[{"operator":"=", "value":7}]},
+ "event":{"name":"EV12100", "value":12100, "transition":12108, "guardCondition":[{"operator":"=", "value":8}]},
+ "event":{"name":"EV12100", "value":12100, "transition":12109, "guardCondition":[{ "operator":"=", "value":9},
+ {"join":"and", "operator":"not", "value":"DrivingModeOn"}]},
+ "event":{"name":"EV12100", "value":12100, "transition":12110, "guardCondition":[{ "operator":"=", "value":10},
+ {"join":"and", "operator":"not", "value":"DrivingModeOn"}]},
+ "event":{"name":"EV12100", "value":12100, "transition":12111, "guardCondition":[{"operator":"=", "value":11}]}
+ },
+ "state":{
+ "name":"Disp0Zone2Category11", /* Entertainment.visiual */
+ "value":12111,
+ "event":{"name":"EV12100", "value":12100, "transition":12101, "guardCondition":[{"operator":"=", "value":1}]},
+ "event":{"name":"EV12100", "value":12100, "transition":12102, "guardCondition":[{"operator":"=", "value":2}]},
+ "event":{"name":"EV12100", "value":12100, "transition":12103, "guardCondition":[{"operator":"=", "value":3}]},
+ "event":{"name":"EV12100", "value":12100, "transition":12104, "guardCondition":[{"operator":"=", "value":4}]},
+ "event":{"name":"EV12100", "value":12100, "transition":12105, "guardCondition":[{"operator":"=", "value":5}]},
+ "event":{"name":"EV12100", "value":12100, "transition":12106, "guardCondition":[{"operator":"=", "value":6}]},
+ "event":{"name":"EV12100", "value":12100, "transition":12107, "guardCondition":[{"operator":"=", "value":7}]},
+ "event":{"name":"EV12100", "value":12100, "transition":12108, "guardCondition":[{"operator":"=", "value":8}]},
+ "event":{"name":"EV12100", "value":12100, "transition":12109, "guardCondition":[{ "operator":"=", "value":9},
+ {"join":"and", "operator":"not", "value":"DrivingModeOn"}]},
+ "event":{"name":"EV12100", "value":12100, "transition":12110, "guardCondition":[{ "operator":"=", "value":10},
+ {"join":"and", "operator":"not", "value":"DrivingModeOn"}]},
+ "event":{"name":"EV12100", "value":12100, "transition":12111, "guardCondition":[{"operator":"=", "value":11}]}
+ }
+ },
+
+ "state":{
+ "name":"Disp0Zone3Category",
+ "value":12200,
+ "state":{
+ "name":"Disp0Zone3Category1", /* Menu */
+ "value":12201,
+ "event":{"name":"EV12200", "value":12200, "transition":12201, "guardCondition":[{"operator":"=", "value":1}]},
+ "event":{"name":"EV12200", "value":12200, "transition":12202, "guardCondition":[{"operator":"=", "value":2}]},
+ "event":{"name":"EV12200", "value":12200, "transition":12203, "guardCondition":[{"operator":"=", "value":3}]},
+ "event":{"name":"EV12200", "value":12200, "transition":12204, "guardCondition":[{"operator":"=", "value":4}]},
+ "event":{"name":"EV12200", "value":12200, "transition":12205, "guardCondition":[{"operator":"=", "value":5}]},
+ "event":{"name":"EV12200", "value":12200, "transition":12206, "guardCondition":[{"operator":"=", "value":6}]},
+ "event":{"name":"EV12200", "value":12200, "transition":12207, "guardCondition":[{"operator":"=", "value":7}]},
+ "event":{"name":"EV12200", "value":12200, "transition":12208, "guardCondition":[{"operator":"=", "value":8}]},
+ "event":{"name":"EV12200", "value":12200, "transition":12209, "guardCondition":[{ "operator":"=", "value":9},
+ {"join":"and", "operator":"not", "value":"DrivingModeOn"}]},
+ "event":{"name":"EV12200", "value":12200, "transition":12210, "guardCondition":[{ "operator":"=", "value":10},
+ {"join":"and", "operator":"not", "value":"DrivingModeOn"}]},
+ "event":{"name":"EV12200", "value":12200, "transition":12211, "guardCondition":[{"operator":"=", "value":11}]}
+ },
+ "state":{
+ "name":"Disp0Zone3Category2", /* Message */
+ "value":12202,
+ "event":{"name":"EV12200", "value":12200, "transition":12201, "guardCondition":[{"operator":"=", "value":1}]},
+ "event":{"name":"EV12200", "value":12200, "transition":12202, "guardCondition":[{"operator":"=", "value":2}]},
+ "event":{"name":"EV12200", "value":12200, "transition":12203, "guardCondition":[{"operator":"=", "value":3}]},
+ "event":{"name":"EV12200", "value":12200, "transition":12204, "guardCondition":[{"operator":"=", "value":4}]},
+ "event":{"name":"EV12200", "value":12200, "transition":12205, "guardCondition":[{"operator":"=", "value":5}]},
+ "event":{"name":"EV12200", "value":12200, "transition":12206, "guardCondition":[{"operator":"=", "value":6}]},
+ "event":{"name":"EV12200", "value":12200, "transition":12207, "guardCondition":[{"operator":"=", "value":7}]},
+ "event":{"name":"EV12200", "value":12200, "transition":12208, "guardCondition":[{"operator":"=", "value":8}]},
+ "event":{"name":"EV12200", "value":12200, "transition":12209, "guardCondition":[{ "operator":"=", "value":9},
+ {"join":"and", "operator":"not", "value":"DrivingModeOn"}]},
+ "event":{"name":"EV12200", "value":12200, "transition":12210, "guardCondition":[{ "operator":"=", "value":10},
+ {"join":"and", "operator":"not", "value":"DrivingModeOn"}]},
+ "event":{"name":"EV12200", "value":12200, "transition":12211, "guardCondition":[{"operator":"=", "value":11}]}
+ },
+ "state":{
+ "name":"Disp0Zone3Category3", /* Map */
+ "value":12203,
+ "event":{"name":"EV12200", "value":12200, "transition":12201, "guardCondition":[{"operator":"=", "value":1}]},
+ "event":{"name":"EV12200", "value":12200, "transition":12202, "guardCondition":[{"operator":"=", "value":2}]},
+ "event":{"name":"EV12200", "value":12200, "transition":12204, "guardCondition":[{"operator":"=", "value":4}]},
+ "event":{"name":"EV12200", "value":12200, "transition":12203, "guardCondition":[{"operator":"=", "value":3}]},
+ "event":{"name":"EV12200", "value":12200, "transition":12205, "guardCondition":[{"operator":"=", "value":5}]},
+ "event":{"name":"EV12200", "value":12200, "transition":12206, "guardCondition":[{"operator":"=", "value":6}]},
+ "event":{"name":"EV12200", "value":12200, "transition":12207, "guardCondition":[{"operator":"=", "value":7}]},
+ "event":{"name":"EV12200", "value":12200, "transition":12208, "guardCondition":[{"operator":"=", "value":8}]},
+ "event":{"name":"EV12200", "value":12200, "transition":12209, "guardCondition":[{ "operator":"=", "value":9},
+ {"join":"and", "operator":"not", "value":"DrivingModeOn"}]},
+ "event":{"name":"EV12200", "value":12200, "transition":12210, "guardCondition":[{ "operator":"=", "value":10},
+ {"join":"and", "operator":"not", "value":"DrivingModeOn"}]},
+ "event":{"name":"EV12200", "value":12200, "transition":12211, "guardCondition":[{"operator":"=", "value":11}]}
+ },
+ "state":{
+ "name":"Disp0Zone3Category4", /* Driving */
+ "value":12204,
+ "event":{"name":"EV12200", "value":12200, "transition":12201, "guardCondition":[{"operator":"=", "value":1}]},
+ "event":{"name":"EV12200", "value":12200, "transition":12202, "guardCondition":[{"operator":"=", "value":2}]},
+ "event":{"name":"EV12200", "value":12200, "transition":12203, "guardCondition":[{"operator":"=", "value":3}]},
+ "event":{"name":"EV12200", "value":12200, "transition":12204, "guardCondition":[{"operator":"=", "value":4}]},
+ "event":{"name":"EV12200", "value":12200, "transition":12205, "guardCondition":[{"operator":"=", "value":5}]},
+ "event":{"name":"EV12200", "value":12200, "transition":12206, "guardCondition":[{"operator":"=", "value":6}]},
+ "event":{"name":"EV12200", "value":12200, "transition":12207, "guardCondition":[{"operator":"=", "value":7}]},
+ "event":{"name":"EV12200", "value":12200, "transition":12208, "guardCondition":[{"operator":"=", "value":8}]},
+ "event":{"name":"EV12200", "value":12200, "transition":12209, "guardCondition":[{ "operator":"=", "value":9},
+ {"join":"and", "operator":"not", "value":"DrivingModeOn"}]},
+ "event":{"name":"EV12200", "value":12200, "transition":12210, "guardCondition":[{ "operator":"=", "value":10},
+ {"join":"and", "operator":"not", "value":"DrivingModeOn"}]},
+ "event":{"name":"EV12200", "value":12200, "transition":12211, "guardCondition":[{"operator":"=", "value":11}]}
+ },
+ "state":{
+ "name":"Disp0Zone3Category5", /* CarSetting */
+ "value":12205,
+ "event":{"name":"EV12200", "value":12200, "transition":12201, "guardCondition":[{"operator":"=", "value":1}]},
+ "event":{"name":"EV12200", "value":12200, "transition":12202, "guardCondition":[{"operator":"=", "value":2}]},
+ "event":{"name":"EV12200", "value":12200, "transition":12203, "guardCondition":[{"operator":"=", "value":3}]},
+ "event":{"name":"EV12200", "value":12200, "transition":12204, "guardCondition":[{"operator":"=", "value":4}]},
+ "event":{"name":"EV12200", "value":12200, "transition":12205, "guardCondition":[{"operator":"=", "value":5}]},
+ "event":{"name":"EV12200", "value":12200, "transition":12206, "guardCondition":[{"operator":"=", "value":6}]},
+ "event":{"name":"EV12200", "value":12200, "transition":12207, "guardCondition":[{"operator":"=", "value":7}]},
+ "event":{"name":"EV12200", "value":12200, "transition":12208, "guardCondition":[{"operator":"=", "value":8}]},
+ "event":{"name":"EV12200", "value":12200, "transition":12209, "guardCondition":[{ "operator":"=", "value":9},
+ {"join":"and", "operator":"not", "value":"DrivingModeOn"}]},
+ "event":{"name":"EV12200", "value":12200, "transition":12210, "guardCondition":[{ "operator":"=", "value":10},
+ {"join":"and", "operator":"not", "value":"DrivingModeOn"}]},
+ "event":{"name":"EV12200", "value":12200, "transition":12211, "guardCondition":[{"operator":"=", "value":11}]}
+ },
+ "state":{
+ "name":"Disp0Zone3Category6", /* Camera.Back */
+ "value":12206,
+ "event":{"name":"EV12200", "value":12200, "transition":12201, "guardCondition":[{"operator":"=", "value":1}]},
+ "event":{"name":"EV12200", "value":12200, "transition":12202, "guardCondition":[{"operator":"=", "value":2}]},
+ "event":{"name":"EV12200", "value":12200, "transition":12203, "guardCondition":[{"operator":"=", "value":3}]},
+ "event":{"name":"EV12200", "value":12200, "transition":12204, "guardCondition":[{"operator":"=", "value":4}]},
+ "event":{"name":"EV12200", "value":12200, "transition":12205, "guardCondition":[{"operator":"=", "value":5}]},
+ "event":{"name":"EV12200", "value":12200, "transition":12206, "guardCondition":[{"operator":"=", "value":6}]},
+ "event":{"name":"EV12200", "value":12200, "transition":12207, "guardCondition":[{"operator":"=", "value":7}]},
+ "event":{"name":"EV12200", "value":12200, "transition":12208, "guardCondition":[{"operator":"=", "value":8}]},
+ "event":{"name":"EV12200", "value":12200, "transition":12209, "guardCondition":[{ "operator":"=", "value":9},
+ {"join":"and", "operator":"not", "value":"DrivingModeOn"}]},
+ "event":{"name":"EV12200", "value":12200, "transition":12210, "guardCondition":[{ "operator":"=", "value":10},
+ {"join":"and", "operator":"not", "value":"DrivingModeOn"}]},
+ "event":{"name":"EV12200", "value":12200, "transition":12211, "guardCondition":[{"operator":"=", "value":11}]}
+ },
+ "state":{
+ "name":"Disp0Zone3Category7", /* Camera.Left */
+ "value":12207,
+ "event":{"name":"EV12200", "value":12200, "transition":12201, "guardCondition":[{"operator":"=", "value":1}]},
+ "event":{"name":"EV12200", "value":12200, "transition":12202, "guardCondition":[{"operator":"=", "value":2}]},
+ "event":{"name":"EV12200", "value":12200, "transition":12203, "guardCondition":[{"operator":"=", "value":3}]},
+ "event":{"name":"EV12200", "value":12200, "transition":12204, "guardCondition":[{"operator":"=", "value":4}]},
+ "event":{"name":"EV12200", "value":12200, "transition":12205, "guardCondition":[{"operator":"=", "value":5}]},
+ "event":{"name":"EV12200", "value":12200, "transition":12206, "guardCondition":[{"operator":"=", "value":6}]},
+ "event":{"name":"EV12200", "value":12200, "transition":12207, "guardCondition":[{"operator":"=", "value":7}]},
+ "event":{"name":"EV12200", "value":12200, "transition":12208, "guardCondition":[{"operator":"=", "value":8}]},
+ "event":{"name":"EV12200", "value":12200, "transition":12209, "guardCondition":[{ "operator":"=", "value":9},
+ {"join":"and", "operator":"not", "value":"DrivingModeOn"}]},
+ "event":{"name":"EV12200", "value":12200, "transition":12210, "guardCondition":[{ "operator":"=", "value":10},
+ {"join":"and", "operator":"not", "value":"DrivingModeOn"}]},
+ "event":{"name":"EV12200", "value":12200, "transition":12211, "guardCondition":[{"operator":"=", "value":11}]}
+ },
+ "state":{
+ "name":"Disp0Zone3Category8", /* Camera.Right */
+ "value":12208,
+ "event":{"name":"EV12200", "value":12200, "transition":12201, "guardCondition":[{"operator":"=", "value":1}]},
+ "event":{"name":"EV12200", "value":12200, "transition":12202, "guardCondition":[{"operator":"=", "value":2}]},
+ "event":{"name":"EV12200", "value":12200, "transition":12203, "guardCondition":[{"operator":"=", "value":3}]},
+ "event":{"name":"EV12200", "value":12200, "transition":12204, "guardCondition":[{"operator":"=", "value":4}]},
+ "event":{"name":"EV12200", "value":12200, "transition":12205, "guardCondition":[{"operator":"=", "value":5}]},
+ "event":{"name":"EV12200", "value":12200, "transition":12206, "guardCondition":[{"operator":"=", "value":6}]},
+ "event":{"name":"EV12200", "value":12200, "transition":12207, "guardCondition":[{"operator":"=", "value":7}]},
+ "event":{"name":"EV12200", "value":12200, "transition":12208, "guardCondition":[{"operator":"=", "value":8}]},
+ "event":{"name":"EV12200", "value":12200, "transition":12209, "guardCondition":[{ "operator":"=", "value":9},
+ {"join":"and", "operator":"not", "value":"DrivingModeOn"}]},
+ "event":{"name":"EV12200", "value":12200, "transition":12210, "guardCondition":[{ "operator":"=", "value":10},
+ {"join":"and", "operator":"not", "value":"DrivingModeOn"}]},
+ "event":{"name":"EV12200", "value":12200, "transition":12211, "guardCondition":[{"operator":"=", "value":11}]}
+ },
+ "state":{
+ "name":"Disp0Zone3Category9", /* Entertainment */
+ "value":12209,
+ "event":{"name":"EV12200", "value":12200, "transition":12201, "guardCondition":[{"operator":"=", "value":1}]},
+ "event":{"name":"EV12200", "value":12200, "transition":12202, "guardCondition":[{"operator":"=", "value":2}]},
+ "event":{"name":"EV12200", "value":12200, "transition":12203, "guardCondition":[{"operator":"=", "value":3}]},
+ "event":{"name":"EV12200", "value":12200, "transition":12204, "guardCondition":[{"operator":"=", "value":4}]},
+ "event":{"name":"EV12200", "value":12200, "transition":12205, "guardCondition":[{"operator":"=", "value":5}]},
+ "event":{"name":"EV12200", "value":12200, "transition":12206, "guardCondition":[{"operator":"=", "value":6}]},
+ "event":{"name":"EV12200", "value":12200, "transition":12207, "guardCondition":[{"operator":"=", "value":7}]},
+ "event":{"name":"EV12200", "value":12200, "transition":12208, "guardCondition":[{"operator":"=", "value":8}]},
+ "event":{"name":"EV12200", "value":12200, "transition":12209, "guardCondition":[{ "operator":"=", "value":9},
+ {"join":"and", "operator":"not", "value":"DrivingModeOn"}]},
+ "event":{"name":"EV12200", "value":12200, "transition":12210, "guardCondition":[{ "operator":"=", "value":10},
+ {"join":"and", "operator":"not", "value":"DrivingModeOn"}]},
+ "event":{"name":"EV12200", "value":12200, "transition":12211, "guardCondition":[{"operator":"=", "value":11}]}
+ },
+ "state":{
+ "name":"Disp0Zone3Category10", /* Entertainment.audio */
+ "value":12210,
+ "event":{"name":"EV12200", "value":12200, "transition":12201, "guardCondition":[{"operator":"=", "value":1}]},
+ "event":{"name":"EV12200", "value":12200, "transition":12202, "guardCondition":[{"operator":"=", "value":2}]},
+ "event":{"name":"EV12200", "value":12200, "transition":12203, "guardCondition":[{"operator":"=", "value":3}]},
+ "event":{"name":"EV12200", "value":12200, "transition":12204, "guardCondition":[{"operator":"=", "value":4}]},
+ "event":{"name":"EV12200", "value":12200, "transition":12205, "guardCondition":[{"operator":"=", "value":5}]},
+ "event":{"name":"EV12200", "value":12200, "transition":12206, "guardCondition":[{"operator":"=", "value":6}]},
+ "event":{"name":"EV12200", "value":12200, "transition":12207, "guardCondition":[{"operator":"=", "value":7}]},
+ "event":{"name":"EV12200", "value":12200, "transition":12208, "guardCondition":[{"operator":"=", "value":8}]},
+ "event":{"name":"EV12200", "value":12200, "transition":12209, "guardCondition":[{ "operator":"=", "value":9},
+ {"join":"and", "operator":"not", "value":"DrivingModeOn"}]},
+ "event":{"name":"EV12200", "value":12200, "transition":12210, "guardCondition":[{ "operator":"=", "value":10},
+ {"join":"and", "operator":"not", "value":"DrivingModeOn"}]},
+ "event":{"name":"EV12200", "value":12200, "transition":12211, "guardCondition":[{"operator":"=", "value":11}]}
+ },
+ "state":{
+ "name":"Disp0Zone3Category11", /* Entertainment.visiual */
+ "value":12211,
+ "event":{"name":"EV12200", "value":12200, "transition":12201, "guardCondition":[{"operator":"=", "value":1}]},
+ "event":{"name":"EV12200", "value":12200, "transition":12202, "guardCondition":[{"operator":"=", "value":2}]},
+ "event":{"name":"EV12200", "value":12200, "transition":12203, "guardCondition":[{"operator":"=", "value":3}]},
+ "event":{"name":"EV12200", "value":12200, "transition":12204, "guardCondition":[{"operator":"=", "value":4}]},
+ "event":{"name":"EV12200", "value":12200, "transition":12205, "guardCondition":[{"operator":"=", "value":5}]},
+ "event":{"name":"EV12200", "value":12200, "transition":12206, "guardCondition":[{"operator":"=", "value":6}]},
+ "event":{"name":"EV12200", "value":12200, "transition":12207, "guardCondition":[{"operator":"=", "value":7}]},
+ "event":{"name":"EV12200", "value":12200, "transition":12208, "guardCondition":[{"operator":"=", "value":8}]},
+ "event":{"name":"EV12200", "value":12200, "transition":12209, "guardCondition":[{ "operator":"=", "value":9},
+ {"join":"and", "operator":"not", "value":"DrivingModeOn"}]},
+ "event":{"name":"EV12200", "value":12200, "transition":12210, "guardCondition":[{ "operator":"=", "value":10},
+ {"join":"and", "operator":"not", "value":"DrivingModeOn"}]},
+ "event":{"name":"EV12200", "value":12200, "transition":12211, "guardCondition":[{"operator":"=", "value":11}]}
}
},
"state":{
"name":"Display1Category1",
"value":13001,
- "event":{ "name":"EV13000","value":13000, "transition":13001, "guardCondition":[{"operator":"=","value":1}]},
- "event":{ "name":"EV13000","value":13000, "transition":13002, "guardCondition":[{"operator":"=","value":2}]},
- "event":{ "name":"EV13000","value":13000, "transition":13003, "guardCondition":[{"operator":"=","value":3}]},
- "event":{ "name":"EV13000","value":13000, "transition":13004, "guardCondition":[{"operator":"=","value":4}]},
- "event":{ "name":"EV13000","value":13000, "transition":13005, "guardCondition":[{"operator":"=","value":5}]},
- "event":{ "name":"EV13000","value":13000, "transition":13006, "guardCondition":[{"operator":"=","value":6}]},
- "event":{ "name":"EV13000","value":13000, "transition":13007, "guardCondition":[{"operator":"=","value":7}]},
- "event":{ "name":"EV13000","value":13000, "transition":13008, "guardCondition":[{"operator":"=","value":8}]},
- "event":{ "name":"EV13000","value":13000, "transition":13009, "guardCondition":[{"operator":"=","value":9}]},
- "event":{ "name":"EV13000","value":13000, "transition":13010, "guardCondition":[{"operator":"=","value":10}]},
- "event":{ "name":"EV13000","value":13000, "transition":13011, "guardCondition":[{"operator":"=","value":11}]}
+ "event":{"name":"EV13000", "value":13000, "transition":13001, "guardCondition":[{"operator":"=", "value":1}]},
+ "event":{"name":"EV13000", "value":13000, "transition":13002, "guardCondition":[{"operator":"=", "value":2}]},
+ "event":{"name":"EV13000", "value":13000, "transition":13003, "guardCondition":[{"operator":"=", "value":3}]},
+ "event":{"name":"EV13000", "value":13000, "transition":13004, "guardCondition":[{"operator":"=", "value":4}]},
+ "event":{"name":"EV13000", "value":13000, "transition":13005, "guardCondition":[{"operator":"=", "value":5}]},
+ "event":{"name":"EV13000", "value":13000, "transition":13006, "guardCondition":[{"operator":"=", "value":6}]},
+ "event":{"name":"EV13000", "value":13000, "transition":13007, "guardCondition":[{"operator":"=", "value":7}]},
+ "event":{"name":"EV13000", "value":13000, "transition":13008, "guardCondition":[{"operator":"=", "value":8}]},
+ "event":{"name":"EV13000", "value":13000, "transition":13009, "guardCondition":[{"operator":"=", "value":9}]},
+ "event":{"name":"EV13000", "value":13000, "transition":13010, "guardCondition":[{"operator":"=", "value":10}]},
+ "event":{"name":"EV13000", "value":13000, "transition":13011, "guardCondition":[{"operator":"=", "value":11}]}
},
"state":{
"name":"Display1Category2",
"value":13002,
- "event":{ "name":"EV13000","value":13000, "transition":13001, "guardCondition":[{"operator":"=","value":1}]},
- "event":{ "name":"EV13000","value":13000, "transition":13002, "guardCondition":[{"operator":"=","value":2}]},
- "event":{ "name":"EV13000","value":13000, "transition":13003, "guardCondition":[{"operator":"=","value":3}]},
- "event":{ "name":"EV13000","value":13000, "transition":13004, "guardCondition":[{"operator":"=","value":4}]},
- "event":{ "name":"EV13000","value":13000, "transition":13005, "guardCondition":[{"operator":"=","value":5}]},
- "event":{ "name":"EV13000","value":13000, "transition":13006, "guardCondition":[{"operator":"=","value":6}]},
- "event":{ "name":"EV13000","value":13000, "transition":13007, "guardCondition":[{"operator":"=","value":7}]},
- "event":{ "name":"EV13000","value":13000, "transition":13008, "guardCondition":[{"operator":"=","value":8}]},
- "event":{ "name":"EV13000","value":13000, "transition":13009, "guardCondition":[{"operator":"=","value":9}]},
- "event":{ "name":"EV13000","value":13000, "transition":13010, "guardCondition":[{"operator":"=","value":10}]},
- "event":{ "name":"EV13000","value":13000, "transition":13011, "guardCondition":[{"operator":"=","value":11}]}
+ "event":{"name":"EV13000", "value":13000, "transition":13001, "guardCondition":[{"operator":"=", "value":1}]},
+ "event":{"name":"EV13000", "value":13000, "transition":13002, "guardCondition":[{"operator":"=", "value":2}]},
+ "event":{"name":"EV13000", "value":13000, "transition":13003, "guardCondition":[{"operator":"=", "value":3}]},
+ "event":{"name":"EV13000", "value":13000, "transition":13004, "guardCondition":[{"operator":"=", "value":4}]},
+ "event":{"name":"EV13000", "value":13000, "transition":13005, "guardCondition":[{"operator":"=", "value":5}]},
+ "event":{"name":"EV13000", "value":13000, "transition":13006, "guardCondition":[{"operator":"=", "value":6}]},
+ "event":{"name":"EV13000", "value":13000, "transition":13007, "guardCondition":[{"operator":"=", "value":7}]},
+ "event":{"name":"EV13000", "value":13000, "transition":13008, "guardCondition":[{"operator":"=", "value":8}]},
+ "event":{"name":"EV13000", "value":13000, "transition":13009, "guardCondition":[{"operator":"=", "value":9}]},
+ "event":{"name":"EV13000", "value":13000, "transition":13010, "guardCondition":[{"operator":"=", "value":10}]},
+ "event":{"name":"EV13000", "value":13000, "transition":13011, "guardCondition":[{"operator":"=", "value":11}]}
},
"state":{
"name":"Display1Category3",
"value":13003,
- "event":{ "name":"EV13000","value":13000, "transition":13001, "guardCondition":[{"operator":"=","value":1}]},
- "event":{ "name":"EV13000","value":13000, "transition":13002, "guardCondition":[{"operator":"=","value":2}]},
- "event":{ "name":"EV13000","value":13000, "transition":13003, "guardCondition":[{"operator":"=","value":3}]},
- "event":{ "name":"EV13000","value":13000, "transition":13004, "guardCondition":[{"operator":"=","value":4}]},
- "event":{ "name":"EV13000","value":13000, "transition":13005, "guardCondition":[{"operator":"=","value":5}]},
- "event":{ "name":"EV13000","value":13000, "transition":13006, "guardCondition":[{"operator":"=","value":6}]},
- "event":{ "name":"EV13000","value":13000, "transition":13007, "guardCondition":[{"operator":"=","value":7}]},
- "event":{ "name":"EV13000","value":13000, "transition":13008, "guardCondition":[{"operator":"=","value":8}]},
- "event":{ "name":"EV13000","value":13000, "transition":13009, "guardCondition":[{"operator":"=","value":9}]},
- "event":{ "name":"EV13000","value":13000, "transition":13010, "guardCondition":[{"operator":"=","value":10}]},
- "event":{ "name":"EV13000","value":13000, "transition":13011, "guardCondition":[{"operator":"=","value":11}]}
+ "event":{"name":"EV13000", "value":13000, "transition":13001, "guardCondition":[{"operator":"=", "value":1}]},
+ "event":{"name":"EV13000", "value":13000, "transition":13002, "guardCondition":[{"operator":"=", "value":2}]},
+ "event":{"name":"EV13000", "value":13000, "transition":13003, "guardCondition":[{"operator":"=", "value":3}]},
+ "event":{"name":"EV13000", "value":13000, "transition":13004, "guardCondition":[{"operator":"=", "value":4}]},
+ "event":{"name":"EV13000", "value":13000, "transition":13005, "guardCondition":[{"operator":"=", "value":5}]},
+ "event":{"name":"EV13000", "value":13000, "transition":13006, "guardCondition":[{"operator":"=", "value":6}]},
+ "event":{"name":"EV13000", "value":13000, "transition":13007, "guardCondition":[{"operator":"=", "value":7}]},
+ "event":{"name":"EV13000", "value":13000, "transition":13008, "guardCondition":[{"operator":"=", "value":8}]},
+ "event":{"name":"EV13000", "value":13000, "transition":13009, "guardCondition":[{"operator":"=", "value":9}]},
+ "event":{"name":"EV13000", "value":13000, "transition":13010, "guardCondition":[{"operator":"=", "value":10}]},
+ "event":{"name":"EV13000", "value":13000, "transition":13011, "guardCondition":[{"operator":"=", "value":11}]}
},
"state":{
"name":"Display1Category4",
"value":13004,
- "event":{ "name":"EV13000","value":13000, "transition":13001, "guardCondition":[{"operator":"=","value":1}]},
- "event":{ "name":"EV13000","value":13000, "transition":13002, "guardCondition":[{"operator":"=","value":2}]},
- "event":{ "name":"EV13000","value":13000, "transition":13003, "guardCondition":[{"operator":"=","value":3}]},
- "event":{ "name":"EV13000","value":13000, "transition":13004, "guardCondition":[{"operator":"=","value":4}]},
- "event":{ "name":"EV13000","value":13000, "transition":13005, "guardCondition":[{"operator":"=","value":5}]},
- "event":{ "name":"EV13000","value":13000, "transition":13006, "guardCondition":[{"operator":"=","value":6}]},
- "event":{ "name":"EV13000","value":13000, "transition":13007, "guardCondition":[{"operator":"=","value":7}]},
- "event":{ "name":"EV13000","value":13000, "transition":13008, "guardCondition":[{"operator":"=","value":8}]},
- "event":{ "name":"EV13000","value":13000, "transition":13009, "guardCondition":[{"operator":"=","value":9}]},
- "event":{ "name":"EV13000","value":13000, "transition":13010, "guardCondition":[{"operator":"=","value":10}]},
- "event":{ "name":"EV13000","value":13000, "transition":13011, "guardCondition":[{"operator":"=","value":11}]}
+ "event":{"name":"EV13000", "value":13000, "transition":13001, "guardCondition":[{"operator":"=", "value":1}]},
+ "event":{"name":"EV13000", "value":13000, "transition":13002, "guardCondition":[{"operator":"=", "value":2}]},
+ "event":{"name":"EV13000", "value":13000, "transition":13003, "guardCondition":[{"operator":"=", "value":3}]},
+ "event":{"name":"EV13000", "value":13000, "transition":13004, "guardCondition":[{"operator":"=", "value":4}]},
+ "event":{"name":"EV13000", "value":13000, "transition":13005, "guardCondition":[{"operator":"=", "value":5}]},
+ "event":{"name":"EV13000", "value":13000, "transition":13006, "guardCondition":[{"operator":"=", "value":6}]},
+ "event":{"name":"EV13000", "value":13000, "transition":13007, "guardCondition":[{"operator":"=", "value":7}]},
+ "event":{"name":"EV13000", "value":13000, "transition":13008, "guardCondition":[{"operator":"=", "value":8}]},
+ "event":{"name":"EV13000", "value":13000, "transition":13009, "guardCondition":[{"operator":"=", "value":9}]},
+ "event":{"name":"EV13000", "value":13000, "transition":13010, "guardCondition":[{"operator":"=", "value":10}]},
+ "event":{"name":"EV13000", "value":13000, "transition":13011, "guardCondition":[{"operator":"=", "value":11}]}
},
"state":{
"name":"Display1Category5",
"value":13005,
- "event":{ "name":"EV13000","value":13000, "transition":13001, "guardCondition":[{"operator":"=","value":1}]},
- "event":{ "name":"EV13000","value":13000, "transition":13002, "guardCondition":[{"operator":"=","value":2}]},
- "event":{ "name":"EV13000","value":13000, "transition":13003, "guardCondition":[{"operator":"=","value":3}]},
- "event":{ "name":"EV13000","value":13000, "transition":13004, "guardCondition":[{"operator":"=","value":4}]},
- "event":{ "name":"EV13000","value":13000, "transition":13005, "guardCondition":[{"operator":"=","value":5}]},
- "event":{ "name":"EV13000","value":13000, "transition":13006, "guardCondition":[{"operator":"=","value":6}]},
- "event":{ "name":"EV13000","value":13000, "transition":13007, "guardCondition":[{"operator":"=","value":7}]},
- "event":{ "name":"EV13000","value":13000, "transition":13008, "guardCondition":[{"operator":"=","value":8}]},
- "event":{ "name":"EV13000","value":13000, "transition":13009, "guardCondition":[{"operator":"=","value":9}]},
- "event":{ "name":"EV13000","value":13000, "transition":13010, "guardCondition":[{"operator":"=","value":10}]},
- "event":{ "name":"EV13000","value":13000, "transition":13011, "guardCondition":[{"operator":"=","value":11}]}
+ "event":{"name":"EV13000", "value":13000, "transition":13001, "guardCondition":[{"operator":"=", "value":1}]},
+ "event":{"name":"EV13000", "value":13000, "transition":13002, "guardCondition":[{"operator":"=", "value":2}]},
+ "event":{"name":"EV13000", "value":13000, "transition":13003, "guardCondition":[{"operator":"=", "value":3}]},
+ "event":{"name":"EV13000", "value":13000, "transition":13004, "guardCondition":[{"operator":"=", "value":4}]},
+ "event":{"name":"EV13000", "value":13000, "transition":13005, "guardCondition":[{"operator":"=", "value":5}]},
+ "event":{"name":"EV13000", "value":13000, "transition":13006, "guardCondition":[{"operator":"=", "value":6}]},
+ "event":{"name":"EV13000", "value":13000, "transition":13007, "guardCondition":[{"operator":"=", "value":7}]},
+ "event":{"name":"EV13000", "value":13000, "transition":13008, "guardCondition":[{"operator":"=", "value":8}]},
+ "event":{"name":"EV13000", "value":13000, "transition":13009, "guardCondition":[{"operator":"=", "value":9}]},
+ "event":{"name":"EV13000", "value":13000, "transition":13010, "guardCondition":[{"operator":"=", "value":10}]},
+ "event":{"name":"EV13000", "value":13000, "transition":13011, "guardCondition":[{"operator":"=", "value":11}]}
},
"state":{
"name":"Display1Category6",
"value":13006,
- "event":{ "name":"EV13000","value":13000, "transition":13001, "guardCondition":[{"operator":"=","value":1}]},
- "event":{ "name":"EV13000","value":13000, "transition":13002, "guardCondition":[{"operator":"=","value":2}]},
- "event":{ "name":"EV13000","value":13000, "transition":13003, "guardCondition":[{"operator":"=","value":3}]},
- "event":{ "name":"EV13000","value":13000, "transition":13004, "guardCondition":[{"operator":"=","value":4}]},
- "event":{ "name":"EV13000","value":13000, "transition":13005, "guardCondition":[{"operator":"=","value":5}]},
- "event":{ "name":"EV13000","value":13000, "transition":13006, "guardCondition":[{"operator":"=","value":6}]},
- "event":{ "name":"EV13000","value":13000, "transition":13007, "guardCondition":[{"operator":"=","value":7}]},
- "event":{ "name":"EV13000","value":13000, "transition":13008, "guardCondition":[{"operator":"=","value":8}]},
- "event":{ "name":"EV13000","value":13000, "transition":13009, "guardCondition":[{"operator":"=","value":9}]},
- "event":{ "name":"EV13000","value":13000, "transition":13010, "guardCondition":[{"operator":"=","value":10}]},
- "event":{ "name":"EV13000","value":13000, "transition":13011, "guardCondition":[{"operator":"=","value":11}]}
+ "event":{"name":"EV13000", "value":13000, "transition":13001, "guardCondition":[{"operator":"=", "value":1}]},
+ "event":{"name":"EV13000", "value":13000, "transition":13002, "guardCondition":[{"operator":"=", "value":2}]},
+ "event":{"name":"EV13000", "value":13000, "transition":13003, "guardCondition":[{"operator":"=", "value":3}]},
+ "event":{"name":"EV13000", "value":13000, "transition":13004, "guardCondition":[{"operator":"=", "value":4}]},
+ "event":{"name":"EV13000", "value":13000, "transition":13005, "guardCondition":[{"operator":"=", "value":5}]},
+ "event":{"name":"EV13000", "value":13000, "transition":13006, "guardCondition":[{"operator":"=", "value":6}]},
+ "event":{"name":"EV13000", "value":13000, "transition":13007, "guardCondition":[{"operator":"=", "value":7}]},
+ "event":{"name":"EV13000", "value":13000, "transition":13008, "guardCondition":[{"operator":"=", "value":8}]},
+ "event":{"name":"EV13000", "value":13000, "transition":13009, "guardCondition":[{"operator":"=", "value":9}]},
+ "event":{"name":"EV13000", "value":13000, "transition":13010, "guardCondition":[{"operator":"=", "value":10}]},
+ "event":{"name":"EV13000", "value":13000, "transition":13011, "guardCondition":[{"operator":"=", "value":11}]}
},
"state":{
"name":"Display1Category7",
"value":13007,
- "event":{ "name":"EV13000","value":13000, "transition":13001, "guardCondition":[{"operator":"=","value":1}]},
- "event":{ "name":"EV13000","value":13000, "transition":13002, "guardCondition":[{"operator":"=","value":2}]},
- "event":{ "name":"EV13000","value":13000, "transition":13003, "guardCondition":[{"operator":"=","value":3}]},
- "event":{ "name":"EV13000","value":13000, "transition":13004, "guardCondition":[{"operator":"=","value":4}]},
- "event":{ "name":"EV13000","value":13000, "transition":13005, "guardCondition":[{"operator":"=","value":5}]},
- "event":{ "name":"EV13000","value":13000, "transition":13006, "guardCondition":[{"operator":"=","value":6}]},
- "event":{ "name":"EV13000","value":13000, "transition":13007, "guardCondition":[{"operator":"=","value":7}]},
- "event":{ "name":"EV13000","value":13000, "transition":13008, "guardCondition":[{"operator":"=","value":8}]},
- "event":{ "name":"EV13000","value":13000, "transition":13009, "guardCondition":[{"operator":"=","value":9}]},
- "event":{ "name":"EV13000","value":13000, "transition":13010, "guardCondition":[{"operator":"=","value":10}]},
- "event":{ "name":"EV13000","value":13000, "transition":13011, "guardCondition":[{"operator":"=","value":11}]}
+ "event":{"name":"EV13000", "value":13000, "transition":13001, "guardCondition":[{"operator":"=", "value":1}]},
+ "event":{"name":"EV13000", "value":13000, "transition":13002, "guardCondition":[{"operator":"=", "value":2}]},
+ "event":{"name":"EV13000", "value":13000, "transition":13003, "guardCondition":[{"operator":"=", "value":3}]},
+ "event":{"name":"EV13000", "value":13000, "transition":13004, "guardCondition":[{"operator":"=", "value":4}]},
+ "event":{"name":"EV13000", "value":13000, "transition":13005, "guardCondition":[{"operator":"=", "value":5}]},
+ "event":{"name":"EV13000", "value":13000, "transition":13006, "guardCondition":[{"operator":"=", "value":6}]},
+ "event":{"name":"EV13000", "value":13000, "transition":13007, "guardCondition":[{"operator":"=", "value":7}]},
+ "event":{"name":"EV13000", "value":13000, "transition":13008, "guardCondition":[{"operator":"=", "value":8}]},
+ "event":{"name":"EV13000", "value":13000, "transition":13009, "guardCondition":[{"operator":"=", "value":9}]},
+ "event":{"name":"EV13000", "value":13000, "transition":13010, "guardCondition":[{"operator":"=", "value":10}]},
+ "event":{"name":"EV13000", "value":13000, "transition":13011, "guardCondition":[{"operator":"=", "value":11}]}
},
"state":{
"name":"Display1Category8",
"value":13008,
- "event":{ "name":"EV13000","value":13000, "transition":13001, "guardCondition":[{"operator":"=","value":1}]},
- "event":{ "name":"EV13000","value":13000, "transition":13002, "guardCondition":[{"operator":"=","value":2}]},
- "event":{ "name":"EV13000","value":13000, "transition":13003, "guardCondition":[{"operator":"=","value":3}]},
- "event":{ "name":"EV13000","value":13000, "transition":13004, "guardCondition":[{"operator":"=","value":4}]},
- "event":{ "name":"EV13000","value":13000, "transition":13005, "guardCondition":[{"operator":"=","value":5}]},
- "event":{ "name":"EV13000","value":13000, "transition":13006, "guardCondition":[{"operator":"=","value":6}]},
- "event":{ "name":"EV13000","value":13000, "transition":13007, "guardCondition":[{"operator":"=","value":7}]},
- "event":{ "name":"EV13000","value":13000, "transition":13008, "guardCondition":[{"operator":"=","value":8}]},
- "event":{ "name":"EV13000","value":13000, "transition":13009, "guardCondition":[{"operator":"=","value":9}]},
- "event":{ "name":"EV13000","value":13000, "transition":13010, "guardCondition":[{"operator":"=","value":10}]},
- "event":{ "name":"EV13000","value":13000, "transition":13011, "guardCondition":[{"operator":"=","value":11}]}
+ "event":{"name":"EV13000", "value":13000, "transition":13001, "guardCondition":[{"operator":"=", "value":1}]},
+ "event":{"name":"EV13000", "value":13000, "transition":13002, "guardCondition":[{"operator":"=", "value":2}]},
+ "event":{"name":"EV13000", "value":13000, "transition":13003, "guardCondition":[{"operator":"=", "value":3}]},
+ "event":{"name":"EV13000", "value":13000, "transition":13004, "guardCondition":[{"operator":"=", "value":4}]},
+ "event":{"name":"EV13000", "value":13000, "transition":13005, "guardCondition":[{"operator":"=", "value":5}]},
+ "event":{"name":"EV13000", "value":13000, "transition":13006, "guardCondition":[{"operator":"=", "value":6}]},
+ "event":{"name":"EV13000", "value":13000, "transition":13007, "guardCondition":[{"operator":"=", "value":7}]},
+ "event":{"name":"EV13000", "value":13000, "transition":13008, "guardCondition":[{"operator":"=", "value":8}]},
+ "event":{"name":"EV13000", "value":13000, "transition":13009, "guardCondition":[{"operator":"=", "value":9}]},
+ "event":{"name":"EV13000", "value":13000, "transition":13010, "guardCondition":[{"operator":"=", "value":10}]},
+ "event":{"name":"EV13000", "value":13000, "transition":13011, "guardCondition":[{"operator":"=", "value":11}]}
},
"state":{
"name":"Display1Category9",
"value":13009,
- "event":{ "name":"EV13000","value":13000, "transition":13001, "guardCondition":[{"operator":"=","value":1}]},
- "event":{ "name":"EV13000","value":13000, "transition":13002, "guardCondition":[{"operator":"=","value":2}]},
- "event":{ "name":"EV13000","value":13000, "transition":13003, "guardCondition":[{"operator":"=","value":3}]},
- "event":{ "name":"EV13000","value":13000, "transition":13004, "guardCondition":[{"operator":"=","value":4}]},
- "event":{ "name":"EV13000","value":13000, "transition":13005, "guardCondition":[{"operator":"=","value":5}]},
- "event":{ "name":"EV13000","value":13000, "transition":13006, "guardCondition":[{"operator":"=","value":6}]},
- "event":{ "name":"EV13000","value":13000, "transition":13007, "guardCondition":[{"operator":"=","value":7}]},
- "event":{ "name":"EV13000","value":13000, "transition":13008, "guardCondition":[{"operator":"=","value":8}]},
- "event":{ "name":"EV13000","value":13000, "transition":13009, "guardCondition":[{"operator":"=","value":9}]},
- "event":{ "name":"EV13000","value":13000, "transition":13010, "guardCondition":[{"operator":"=","value":10}]},
- "event":{ "name":"EV13000","value":13000, "transition":13011, "guardCondition":[{"operator":"=","value":11}]}
+ "event":{"name":"EV13000", "value":13000, "transition":13001, "guardCondition":[{"operator":"=", "value":1}]},
+ "event":{"name":"EV13000", "value":13000, "transition":13002, "guardCondition":[{"operator":"=", "value":2}]},
+ "event":{"name":"EV13000", "value":13000, "transition":13003, "guardCondition":[{"operator":"=", "value":3}]},
+ "event":{"name":"EV13000", "value":13000, "transition":13004, "guardCondition":[{"operator":"=", "value":4}]},
+ "event":{"name":"EV13000", "value":13000, "transition":13005, "guardCondition":[{"operator":"=", "value":5}]},
+ "event":{"name":"EV13000", "value":13000, "transition":13006, "guardCondition":[{"operator":"=", "value":6}]},
+ "event":{"name":"EV13000", "value":13000, "transition":13007, "guardCondition":[{"operator":"=", "value":7}]},
+ "event":{"name":"EV13000", "value":13000, "transition":13008, "guardCondition":[{"operator":"=", "value":8}]},
+ "event":{"name":"EV13000", "value":13000, "transition":13009, "guardCondition":[{"operator":"=", "value":9}]},
+ "event":{"name":"EV13000", "value":13000, "transition":13010, "guardCondition":[{"operator":"=", "value":10}]},
+ "event":{"name":"EV13000", "value":13000, "transition":13011, "guardCondition":[{"operator":"=", "value":11}]}
},
"state":{
"name":"Display1Category10",
"value":13010,
- "event":{ "name":"EV13000","value":13000, "transition":13001, "guardCondition":[{"operator":"=","value":1}]},
- "event":{ "name":"EV13000","value":13000, "transition":13002, "guardCondition":[{"operator":"=","value":2}]},
- "event":{ "name":"EV13000","value":13000, "transition":13003, "guardCondition":[{"operator":"=","value":3}]},
- "event":{ "name":"EV13000","value":13000, "transition":13004, "guardCondition":[{"operator":"=","value":4}]},
- "event":{ "name":"EV13000","value":13000, "transition":13005, "guardCondition":[{"operator":"=","value":5}]},
- "event":{ "name":"EV13000","value":13000, "transition":13006, "guardCondition":[{"operator":"=","value":6}]},
- "event":{ "name":"EV13000","value":13000, "transition":13007, "guardCondition":[{"operator":"=","value":7}]},
- "event":{ "name":"EV13000","value":13000, "transition":13008, "guardCondition":[{"operator":"=","value":8}]},
- "event":{ "name":"EV13000","value":13000, "transition":13009, "guardCondition":[{"operator":"=","value":9}]},
- "event":{ "name":"EV13000","value":13000, "transition":13010, "guardCondition":[{"operator":"=","value":10}]},
- "event":{ "name":"EV13000","value":13000, "transition":13011, "guardCondition":[{"operator":"=","value":11}]}
+ "event":{"name":"EV13000", "value":13000, "transition":13001, "guardCondition":[{"operator":"=", "value":1}]},
+ "event":{"name":"EV13000", "value":13000, "transition":13002, "guardCondition":[{"operator":"=", "value":2}]},
+ "event":{"name":"EV13000", "value":13000, "transition":13003, "guardCondition":[{"operator":"=", "value":3}]},
+ "event":{"name":"EV13000", "value":13000, "transition":13004, "guardCondition":[{"operator":"=", "value":4}]},
+ "event":{"name":"EV13000", "value":13000, "transition":13005, "guardCondition":[{"operator":"=", "value":5}]},
+ "event":{"name":"EV13000", "value":13000, "transition":13006, "guardCondition":[{"operator":"=", "value":6}]},
+ "event":{"name":"EV13000", "value":13000, "transition":13007, "guardCondition":[{"operator":"=", "value":7}]},
+ "event":{"name":"EV13000", "value":13000, "transition":13008, "guardCondition":[{"operator":"=", "value":8}]},
+ "event":{"name":"EV13000", "value":13000, "transition":13009, "guardCondition":[{"operator":"=", "value":9}]},
+ "event":{"name":"EV13000", "value":13000, "transition":13010, "guardCondition":[{"operator":"=", "value":10}]},
+ "event":{"name":"EV13000", "value":13000, "transition":13011, "guardCondition":[{"operator":"=", "value":11}]}
},
"state":{
"name":"Display1Category11",
"value":13011,
- "event":{ "name":"EV13000","value":13000, "transition":13001, "guardCondition":[{"operator":"=","value":1}]},
- "event":{ "name":"EV13000","value":13000, "transition":13002, "guardCondition":[{"operator":"=","value":2}]},
- "event":{ "name":"EV13000","value":13000, "transition":13003, "guardCondition":[{"operator":"=","value":3}]},
- "event":{ "name":"EV13000","value":13000, "transition":13004, "guardCondition":[{"operator":"=","value":4}]},
- "event":{ "name":"EV13000","value":13000, "transition":13005, "guardCondition":[{"operator":"=","value":5}]},
- "event":{ "name":"EV13000","value":13000, "transition":13006, "guardCondition":[{"operator":"=","value":6}]},
- "event":{ "name":"EV13000","value":13000, "transition":13007, "guardCondition":[{"operator":"=","value":7}]},
- "event":{ "name":"EV13000","value":13000, "transition":13008, "guardCondition":[{"operator":"=","value":8}]},
- "event":{ "name":"EV13000","value":13000, "transition":13009, "guardCondition":[{"operator":"=","value":9}]},
- "event":{ "name":"EV13000","value":13000, "transition":13010, "guardCondition":[{"operator":"=","value":10}]},
- "event":{ "name":"EV13000","value":13000, "transition":13011, "guardCondition":[{"operator":"=","value":11}]}
+ "event":{"name":"EV13000", "value":13000, "transition":13001, "guardCondition":[{"operator":"=", "value":1}]},
+ "event":{"name":"EV13000", "value":13000, "transition":13002, "guardCondition":[{"operator":"=", "value":2}]},
+ "event":{"name":"EV13000", "value":13000, "transition":13003, "guardCondition":[{"operator":"=", "value":3}]},
+ "event":{"name":"EV13000", "value":13000, "transition":13004, "guardCondition":[{"operator":"=", "value":4}]},
+ "event":{"name":"EV13000", "value":13000, "transition":13005, "guardCondition":[{"operator":"=", "value":5}]},
+ "event":{"name":"EV13000", "value":13000, "transition":13006, "guardCondition":[{"operator":"=", "value":6}]},
+ "event":{"name":"EV13000", "value":13000, "transition":13007, "guardCondition":[{"operator":"=", "value":7}]},
+ "event":{"name":"EV13000", "value":13000, "transition":13008, "guardCondition":[{"operator":"=", "value":8}]},
+ "event":{"name":"EV13000", "value":13000, "transition":13009, "guardCondition":[{"operator":"=", "value":9}]},
+ "event":{"name":"EV13000", "value":13000, "transition":13010, "guardCondition":[{"operator":"=", "value":10}]},
+ "event":{"name":"EV13000", "value":13000, "transition":13011, "guardCondition":[{"operator":"=", "value":11}]}
}
},
"state":{
"name":"OnScreen_Invisible",
"value":14999,
- "event":{ "name":"EV14000","value":14000, "transition":14001, "guardCondition":[{"operator":"=","value":1}]},
- "event":{ "name":"EV14000","value":14000, "transition":14002, "guardCondition":[{"operator":"=","value":2}]},
- "event":{ "name":"EV14000","value":14000, "transition":14003, "guardCondition":[{"operator":"=","value":3}]}
+ "event":{"name":"EV14000", "value":14000, "transition":14001, "guardCondition":[{"operator":"=", "value":1}]},
+ "event":{"name":"EV14000", "value":14000, "transition":14002, "guardCondition":[{"operator":"=", "value":2}]},
+ "event":{"name":"EV14000", "value":14000, "transition":14003, "guardCondition":[{"operator":"=", "value":3}]}
},
"state":{
"name":"OnScreen_Warning",
"value":14001,
- "event":{ "name":"EV14001","value":14001, "transition":14999}
+ "event":{"name":"EV14001", "value":14001, "transition":14999}
},
"state":{
"name":"OnScreen_Attention",
"value":14002,
- "event":{ "name":"EV14001","value":14001, "transition":14999},
- "event":{ "name":"EV14000","value":14000, "transition":14001, "guardCondition":[{"operator":"=","value":1}]}
+ "event":{"name":"EV14001", "value":14001, "transition":14999},
+ "event":{"name":"EV14000", "value":14000, "transition":14001, "guardCondition":[{"operator":"=", "value":1}]}
},
"state":{
"name":"OnScreen_Message",
"value":14003,
- "event":{ "name":"EV14001","value":14001, "transition":14999},
- "event":{ "name":"EV14000","value":14000, "transition":14001, "guardCondition":[{"operator":"=","value":1}]},
- "event":{ "name":"EV14000","value":14000, "transition":14002, "guardCondition":[{"operator":"=","value":2}]}
+ "event":{"name":"EV14001", "value":14001, "transition":14999},
+ "event":{"name":"EV14000", "value":14000, "transition":14001, "guardCondition":[{"operator":"=", "value":1}]},
+ "event":{"name":"EV14000", "value":14000, "transition":14002, "guardCondition":[{"operator":"=", "value":2}]}
}
},
"state":{
"name":"IntterputDisplay0Zone1_Invisible",
"value":15999,
- "event":{ "name":"EV15000","value":15000, "transition":15001, "guardCondition":[{"operator":"=","value":1}]},
- "event":{ "name":"EV15000","value":15000, "transition":15002, "guardCondition":[{"operator":"=","value":2}]},
- "event":{ "name":"EV15000","value":15000, "transition":15003, "guardCondition":[{"operator":"=","value":3}]}
+ "event":{"name":"EV15000", "value":15000, "transition":15001, "guardCondition":[{"operator":"=", "value":1}]},
+ "event":{"name":"EV15000", "value":15000, "transition":15002, "guardCondition":[{"operator":"=", "value":2}]},
+ "event":{"name":"EV15000", "value":15000, "transition":15003, "guardCondition":[{"operator":"=", "value":3}]}
},
"state":{
"name":"IntterputDisplay0Zone1_Priority1",
"value":15001,
- "event":{ "name":"EV15000","value":15001, "transition":15999}
+ "event":{"name":"EV15000", "value":15001, "transition":15999}
},
"state":{
"name":"IntterputDisplay0Zone1_Priority2",
"value":15002,
- "event":{ "name":"EV15000","value":15001, "transition":15999},
- "event":{ "name":"EV15000","value":15000, "transition":15001, "guardCondition":[{"operator":"=","value":1}]}
+ "event":{"name":"EV15000", "value":15001, "transition":15999},
+ "event":{"name":"EV15000", "value":15000, "transition":15001, "guardCondition":[{"operator":"=", "value":1}]}
},
"state":{
"name":"IntterputDisplay0Zone1_Priority3",
"value":15003,
- "event":{ "name":"EV15000","value":15001, "transition":15999},
- "event":{ "name":"EV15000","value":15000, "transition":15001, "guardCondition":[{"operator":"=","value":1}]},
- "event":{ "name":"EV15000","value":15000, "transition":15002, "guardCondition":[{"operator":"=","value":2}]}
+ "event":{"name":"EV15000", "value":15001, "transition":15999},
+ "event":{"name":"EV15000", "value":15000, "transition":15001, "guardCondition":[{"operator":"=", "value":1}]},
+ "event":{"name":"EV15000", "value":15000, "transition":15002, "guardCondition":[{"operator":"=", "value":2}]}
}
},
"state":{
"name":"IntterputDisplay0Zone2_Invisible",
"value":16999,
- "event":{ "name":"EV16000","value":16000, "transition":16001, "guardCondition":[{"operator":"=","value":1}]},
- "event":{ "name":"EV16000","value":16000, "transition":16002, "guardCondition":[{"operator":"=","value":2}]},
- "event":{ "name":"EV16000","value":16000, "transition":16003, "guardCondition":[{"operator":"=","value":3}]}
+ "event":{"name":"EV16000", "value":16000, "transition":16001, "guardCondition":[{"operator":"=", "value":1}]},
+ "event":{"name":"EV16000", "value":16000, "transition":16002, "guardCondition":[{"operator":"=", "value":2}]},
+ "event":{"name":"EV16000", "value":16000, "transition":16003, "guardCondition":[{"operator":"=", "value":3}]}
},
"state":{
"name":"IntterputDisplay0Zone2_Priority1",
"value":16001,
- "event":{ "name":"EV16000","value":16001, "transition":16999}
+ "event":{"name":"EV16000", "value":16001, "transition":16999}
},
"state":{
"name":"IntterputDisplay0Zone2_Priority2",
"value":16002,
- "event":{ "name":"EV16000","value":16001, "transition":16999},
- "event":{ "name":"EV16000","value":16000, "transition":16001, "guardCondition":[{"operator":"=","value":1}]}
+ "event":{"name":"EV16000", "value":16001, "transition":16999},
+ "event":{"name":"EV16000", "value":16000, "transition":16001, "guardCondition":[{"operator":"=", "value":1}]}
},
"state":{
"name":"IntterputDisplay0Zone2_Priority3",
"value":16003,
- "event":{ "name":"EV16000","value":16001, "transition":16999},
- "event":{ "name":"EV16000","value":16000, "transition":16001, "guardCondition":[{"operator":"=","value":1}]},
- "event":{ "name":"EV16000","value":16000, "transition":16002, "guardCondition":[{"operator":"=","value":2}]}
+ "event":{"name":"EV16000", "value":16001, "transition":16999},
+ "event":{"name":"EV16000", "value":16000, "transition":16001, "guardCondition":[{"operator":"=", "value":1}]},
+ "event":{"name":"EV16000", "value":16000, "transition":16002, "guardCondition":[{"operator":"=", "value":2}]}
}
},
"state":{
"name":"IntterputDisplay0Zone3_Invisible",
"value":17999,
- "event":{ "name":"EV17000","value":17000, "transition":17001, "guardCondition":[{"operator":"=","value":1}]},
- "event":{ "name":"EV17000","value":17000, "transition":17002, "guardCondition":[{"operator":"=","value":2}]},
- "event":{ "name":"EV17000","value":17000, "transition":17003, "guardCondition":[{"operator":"=","value":3}]}
+ "event":{"name":"EV17000", "value":17000, "transition":17001, "guardCondition":[{"operator":"=", "value":1}]},
+ "event":{"name":"EV17000", "value":17000, "transition":17002, "guardCondition":[{"operator":"=", "value":2}]},
+ "event":{"name":"EV17000", "value":17000, "transition":17003, "guardCondition":[{"operator":"=", "value":3}]}
},
"state":{
"name":"IntterputDisplay0Zone3_Priority1",
"value":17001,
- "event":{ "name":"EV17000","value":17001, "transition":17999}
+ "event":{"name":"EV17000", "value":17001, "transition":17999}
},
"state":{
"name":"IntterputDisplay0Zone3_Priority2",
"value":17002,
- "event":{ "name":"EV17000","value":17001, "transition":17999},
- "event":{ "name":"EV17000","value":17000, "transition":17001, "guardCondition":[{"operator":"=","value":1}]}
+ "event":{"name":"EV17000", "value":17001, "transition":17999},
+ "event":{"name":"EV17000", "value":17000, "transition":17001, "guardCondition":[{"operator":"=", "value":1}]}
},
"state":{
"name":"IntterputDisplay0Zone3_Priority3",
"value":17003,
- "event":{ "name":"EV17000","value":17001, "transition":17999},
- "event":{ "name":"EV17000","value":17000, "transition":17001, "guardCondition":[{"operator":"=","value":1}]},
- "event":{ "name":"EV17000","value":17000, "transition":17002, "guardCondition":[{"operator":"=","value":2}]}
+ "event":{"name":"EV17000", "value":17001, "transition":17999},
+ "event":{"name":"EV17000", "value":17000, "transition":17001, "guardCondition":[{"operator":"=", "value":1}]},
+ "event":{"name":"EV17000", "value":17000, "transition":17002, "guardCondition":[{"operator":"=", "value":2}]}
}
},
"state":{
"name":"SoundZone_NoUse", /* No Use */
"value":20999,
- "event":{ "name":"EV20000","value":20000, "transition":20001, "guardCondition":[{"operator":"=","value":1}]},
- "event":{ "name":"EV20000","value":20000, "transition":20002, "guardCondition":[{"operator":"=","value":2}]},
- "event":{ "name":"EV20000","value":20000, "transition":20003, "guardCondition":[{"operator":"=","value":3}]}
+ "event":{"name":"EV20000", "value":20000, "transition":20001, "guardCondition":[{"operator":"=", "value":1}]},
+ "event":{"name":"EV20000", "value":20000, "transition":20002, "guardCondition":[{"operator":"=", "value":2}]},
+ "event":{"name":"EV20000", "value":20000, "transition":20003, "guardCondition":[{"operator":"=", "value":3}]}
},
"state":{
"name":"SoundZone1", /* Full */
"value":20001,
- "event":{ "name":"EV20999","value":20999, "transition":20999 },
- "event":{ "name":"EV20000","value":20000, "transition":20001, "guardCondition":[{"operator":"=","value":1}]},
- "event":{ "name":"EV20000","value":20000, "transition":20002, "guardCondition":[{"operator":"=","value":2}]},
- "event":{ "name":"EV20000","value":20000, "transition":20003, "guardCondition":[{"operator":"=","value":3}]}
+ "event":{"name":"EV20999", "value":20999, "transition":20999},
+ "event":{"name":"EV20000", "value":20000, "transition":20001, "guardCondition":[{"operator":"=", "value":1}]},
+ "event":{"name":"EV20000", "value":20000, "transition":20002, "guardCondition":[{"operator":"=", "value":2}]},
+ "event":{"name":"EV20000", "value":20000, "transition":20003, "guardCondition":[{"operator":"=", "value":3}]}
},
"state":{
"name":"SoundZone2", /* Driver */
"value":20002,
- "event":{ "name":"EV20999","value":20999, "transition":20999 },
- "event":{ "name":"EV20000","value":20000, "transition":20001, "guardCondition":[{"operator":"=","value":1}]},
- "event":{ "name":"EV20000","value":20000, "transition":20002, "guardCondition":[{"operator":"=","value":2}]},
- "event":{ "name":"EV20000","value":20000, "transition":20003, "guardCondition":[{"operator":"=","value":3}]}
+ "event":{"name":"EV20999", "value":20999, "transition":20999},
+ "event":{"name":"EV20000", "value":20000, "transition":20001, "guardCondition":[{"operator":"=", "value":1}]},
+ "event":{"name":"EV20000", "value":20000, "transition":20002, "guardCondition":[{"operator":"=", "value":2}]},
+ "event":{"name":"EV20000", "value":20000, "transition":20003, "guardCondition":[{"operator":"=", "value":3}]}
},
"state":{
"name":"SoundZone3", /* Passenger */
"value":20003,
- "event":{ "name":"EV20999","value":20999, "transition":20999 },
- "event":{ "name":"EV20000","value":20000, "transition":20001, "guardCondition":[{"operator":"=","value":1}]},
- "event":{ "name":"EV20000","value":20000, "transition":20002, "guardCondition":[{"operator":"=","value":2}]},
- "event":{ "name":"EV20000","value":20000, "transition":20003, "guardCondition":[{"operator":"=","value":3}]}
+ "event":{"name":"EV20999", "value":20999, "transition":20999},
+ "event":{"name":"EV20000", "value":20000, "transition":20001, "guardCondition":[{"operator":"=", "value":1}]},
+ "event":{"name":"EV20000", "value":20000, "transition":20002, "guardCondition":[{"operator":"=", "value":2}]},
+ "event":{"name":"EV20000", "value":20000, "transition":20003, "guardCondition":[{"operator":"=", "value":3}]}
}
},
"state":{
"name":"SoundCategory_Unknown", /* unknown */
"value":22999,
- "event":{ "name":"EV22000","value":22000, "transition":22001, "guardCondition":[{"operator":"=","value":1}]},
- "event":{ "name":"EV22000","value":22000, "transition":22002, "guardCondition":[{"operator":"=","value":2}]},
- "event":{ "name":"EV22000","value":22000, "transition":22003, "guardCondition":[{"operator":"=","value":3}]},
- "event":{ "name":"EV22000","value":22000, "transition":22004, "guardCondition":[{"operator":"=","value":4}]},
- "event":{ "name":"EV22000","value":22000, "transition":22005, "guardCondition":[{"operator":"=","value":5}]},
- "event":{ "name":"EV22000","value":22000, "transition":22006, "guardCondition":[{"operator":"=","value":6}]},
- "event":{ "name":"EV22000","value":22000, "transition":22007, "guardCondition":[{"operator":"=","value":7}]},
- "event":{ "name":"EV22000","value":22000, "transition":22008, "guardCondition":[{"operator":"=","value":8}]},
- "event":{ "name":"EV22000","value":22000, "transition":22009, "guardCondition":[{ "operator":"=","value":9},
- {"join":"and","operator":"not","value":"Regulating"}]},
- "event":{ "name":"EV22000","value":22000, "transition":22010, "guardCondition":[{ "operator":"=","value":10}]},
- "event":{ "name":"EV22000","value":22000, "transition":22011, "guardCondition":[{"operator":"=","value":11},
- {"join":"and","operator":"not","value":"Regulating"}]}
+ "event":{"name":"EV22000", "value":22000, "transition":22001, "guardCondition":[{"operator":"=", "value":1}]},
+ "event":{"name":"EV22000", "value":22000, "transition":22002, "guardCondition":[{"operator":"=", "value":2}]},
+ "event":{"name":"EV22000", "value":22000, "transition":22003, "guardCondition":[{"operator":"=", "value":3}]},
+ "event":{"name":"EV22000", "value":22000, "transition":22004, "guardCondition":[{"operator":"=", "value":4}]},
+ "event":{"name":"EV22000", "value":22000, "transition":22005, "guardCondition":[{"operator":"=", "value":5}]},
+ "event":{"name":"EV22000", "value":22000, "transition":22006, "guardCondition":[{"operator":"=", "value":6}]},
+ "event":{"name":"EV22000", "value":22000, "transition":22007, "guardCondition":[{"operator":"=", "value":7}]},
+ "event":{"name":"EV22000", "value":22000, "transition":22008, "guardCondition":[{"operator":"=", "value":8}]},
+ "event":{"name":"EV22000", "value":22000, "transition":22009, "guardCondition":[{ "operator":"=", "value":9},
+ {"join":"and", "operator":"not", "value":"DrivingModeOn"}]},
+ "event":{"name":"EV22000", "value":22000, "transition":22010, "guardCondition":[{ "operator":"=", "value":10}]},
+ "event":{"name":"EV22000", "value":22000, "transition":22011, "guardCondition":[{"operator":"=", "value":11},
+ {"join":"and", "operator":"not", "value":"DrivingModeOn"}]}
},
"state":{
"name":"SoundCategory1", /* Menu */
"value":22001,
- "event":{ "name":"EV22999","value":22999, "transition":22999 },
- "event":{ "name":"EV22000","value":22000, "transition":22001, "guardCondition":[{"operator":"=","value":1}]},
- "event":{ "name":"EV22000","value":22000, "transition":22002, "guardCondition":[{"operator":"=","value":2}]},
- "event":{ "name":"EV22000","value":22000, "transition":22003, "guardCondition":[{"operator":"=","value":3}]},
- "event":{ "name":"EV22000","value":22000, "transition":22004, "guardCondition":[{"operator":"=","value":4}]},
- "event":{ "name":"EV22000","value":22000, "transition":22005, "guardCondition":[{"operator":"=","value":5}]},
- "event":{ "name":"EV22000","value":22000, "transition":22006, "guardCondition":[{"operator":"=","value":6}]},
- "event":{ "name":"EV22000","value":22000, "transition":22007, "guardCondition":[{"operator":"=","value":7}]},
- "event":{ "name":"EV22000","value":22000, "transition":22008, "guardCondition":[{"operator":"=","value":8}]},
- "event":{ "name":"EV22000","value":22000, "transition":22009, "guardCondition":[{ "operator":"=","value":9},
- {"join":"and","operator":"not","value":"Regulating"}]},
- "event":{ "name":"EV22000","value":22000, "transition":22010, "guardCondition":[{ "operator":"=","value":10}]},
- "event":{ "name":"EV22000","value":22000, "transition":22011, "guardCondition":[{"operator":"=","value":11},
- {"join":"and","operator":"not","value":"Regulating"}]}
+ "event":{"name":"EV22999", "value":22999, "transition":22999},
+ "event":{"name":"EV22000", "value":22000, "transition":22001, "guardCondition":[{"operator":"=", "value":1}]},
+ "event":{"name":"EV22000", "value":22000, "transition":22002, "guardCondition":[{"operator":"=", "value":2}]},
+ "event":{"name":"EV22000", "value":22000, "transition":22003, "guardCondition":[{"operator":"=", "value":3}]},
+ "event":{"name":"EV22000", "value":22000, "transition":22004, "guardCondition":[{"operator":"=", "value":4}]},
+ "event":{"name":"EV22000", "value":22000, "transition":22005, "guardCondition":[{"operator":"=", "value":5}]},
+ "event":{"name":"EV22000", "value":22000, "transition":22006, "guardCondition":[{"operator":"=", "value":6}]},
+ "event":{"name":"EV22000", "value":22000, "transition":22007, "guardCondition":[{"operator":"=", "value":7}]},
+ "event":{"name":"EV22000", "value":22000, "transition":22008, "guardCondition":[{"operator":"=", "value":8}]},
+ "event":{"name":"EV22000", "value":22000, "transition":22009, "guardCondition":[{ "operator":"=", "value":9},
+ {"join":"and", "operator":"not", "value":"DrivingModeOn"}]},
+ "event":{"name":"EV22000", "value":22000, "transition":22010, "guardCondition":[{ "operator":"=", "value":10}]},
+ "event":{"name":"EV22000", "value":22000, "transition":22011, "guardCondition":[{"operator":"=", "value":11},
+ {"join":"and", "operator":"not", "value":"DrivingModeOn"}]}
},
"state":{
"name":"SoundCategory2", /* Message */
"value":22002,
- "event":{ "name":"EV22999","value":22999, "transition":22999 },
- "event":{ "name":"EV22000","value":22000, "transition":22001, "guardCondition":[{"operator":"=","value":1}]},
- "event":{ "name":"EV22000","value":22000, "transition":22002, "guardCondition":[{"operator":"=","value":2}]},
- "event":{ "name":"EV22000","value":22000, "transition":22003, "guardCondition":[{"operator":"=","value":3}]},
- "event":{ "name":"EV22000","value":22000, "transition":22004, "guardCondition":[{"operator":"=","value":4}]},
- "event":{ "name":"EV22000","value":22000, "transition":22005, "guardCondition":[{"operator":"=","value":5}]},
- "event":{ "name":"EV22000","value":22000, "transition":22006, "guardCondition":[{"operator":"=","value":6}]},
- "event":{ "name":"EV22000","value":22000, "transition":22007, "guardCondition":[{"operator":"=","value":7}]},
- "event":{ "name":"EV22000","value":22000, "transition":22008, "guardCondition":[{"operator":"=","value":8}]},
- "event":{ "name":"EV22000","value":22000, "transition":22009, "guardCondition":[{ "operator":"=","value":9},
- {"join":"and","operator":"not","value":"Regulating"}]},
- "event":{ "name":"EV22000","value":22000, "transition":22010, "guardCondition":[{ "operator":"=","value":10}]},
- "event":{ "name":"EV22000","value":22000, "transition":22011, "guardCondition":[{"operator":"=","value":11},
- {"join":"and","operator":"not","value":"Regulating"}]}
+ "event":{"name":"EV22999", "value":22999, "transition":22999},
+ "event":{"name":"EV22000", "value":22000, "transition":22001, "guardCondition":[{"operator":"=", "value":1}]},
+ "event":{"name":"EV22000", "value":22000, "transition":22002, "guardCondition":[{"operator":"=", "value":2}]},
+ "event":{"name":"EV22000", "value":22000, "transition":22003, "guardCondition":[{"operator":"=", "value":3}]},
+ "event":{"name":"EV22000", "value":22000, "transition":22004, "guardCondition":[{"operator":"=", "value":4}]},
+ "event":{"name":"EV22000", "value":22000, "transition":22005, "guardCondition":[{"operator":"=", "value":5}]},
+ "event":{"name":"EV22000", "value":22000, "transition":22006, "guardCondition":[{"operator":"=", "value":6}]},
+ "event":{"name":"EV22000", "value":22000, "transition":22007, "guardCondition":[{"operator":"=", "value":7}]},
+ "event":{"name":"EV22000", "value":22000, "transition":22008, "guardCondition":[{"operator":"=", "value":8}]},
+ "event":{"name":"EV22000", "value":22000, "transition":22009, "guardCondition":[{ "operator":"=", "value":9},
+ {"join":"and", "operator":"not", "value":"DrivingModeOn"}]},
+ "event":{"name":"EV22000", "value":22000, "transition":22010, "guardCondition":[{ "operator":"=", "value":10}]},
+ "event":{"name":"EV22000", "value":22000, "transition":22011, "guardCondition":[{"operator":"=", "value":11},
+ {"join":"and", "operator":"not", "value":"DrivingModeOn"}]}
},
"state":{
"name":"SoundCategory3", /* Map */
"value":22003,
- "event":{ "name":"EV22999","value":22999, "transition":22999 },
- "event":{ "name":"EV22000","value":22000, "transition":22001, "guardCondition":[{"operator":"=","value":1}]},
- "event":{ "name":"EV22000","value":22000, "transition":22002, "guardCondition":[{"operator":"=","value":2}]},
- "event":{ "name":"EV22000","value":22000, "transition":22004, "guardCondition":[{"operator":"=","value":4}]},
- "event":{ "name":"EV22000","value":22000, "transition":22003, "guardCondition":[{"operator":"=","value":3}]},
- "event":{ "name":"EV22000","value":22000, "transition":22005, "guardCondition":[{"operator":"=","value":5}]},
- "event":{ "name":"EV22000","value":22000, "transition":22006, "guardCondition":[{"operator":"=","value":6}]},
- "event":{ "name":"EV22000","value":22000, "transition":22007, "guardCondition":[{"operator":"=","value":7}]},
- "event":{ "name":"EV22000","value":22000, "transition":22008, "guardCondition":[{"operator":"=","value":8}]},
- "event":{ "name":"EV22000","value":22000, "transition":22009, "guardCondition":[{ "operator":"=","value":9},
- {"join":"and","operator":"not","value":"Regulating"}]},
- "event":{ "name":"EV22000","value":22000, "transition":22010, "guardCondition":[{ "operator":"=","value":10}]},
- "event":{ "name":"EV22000","value":22000, "transition":22011, "guardCondition":[{"operator":"=","value":11},
- {"join":"and","operator":"not","value":"Regulating"}]}
+ "event":{"name":"EV22999", "value":22999, "transition":22999},
+ "event":{"name":"EV22000", "value":22000, "transition":22001, "guardCondition":[{"operator":"=", "value":1}]},
+ "event":{"name":"EV22000", "value":22000, "transition":22002, "guardCondition":[{"operator":"=", "value":2}]},
+ "event":{"name":"EV22000", "value":22000, "transition":22004, "guardCondition":[{"operator":"=", "value":4}]},
+ "event":{"name":"EV22000", "value":22000, "transition":22003, "guardCondition":[{"operator":"=", "value":3}]},
+ "event":{"name":"EV22000", "value":22000, "transition":22005, "guardCondition":[{"operator":"=", "value":5}]},
+ "event":{"name":"EV22000", "value":22000, "transition":22006, "guardCondition":[{"operator":"=", "value":6}]},
+ "event":{"name":"EV22000", "value":22000, "transition":22007, "guardCondition":[{"operator":"=", "value":7}]},
+ "event":{"name":"EV22000", "value":22000, "transition":22008, "guardCondition":[{"operator":"=", "value":8}]},
+ "event":{"name":"EV22000", "value":22000, "transition":22009, "guardCondition":[{ "operator":"=", "value":9},
+ {"join":"and", "operator":"not", "value":"DrivingModeOn"}]},
+ "event":{"name":"EV22000", "value":22000, "transition":22010, "guardCondition":[{ "operator":"=", "value":10}]},
+ "event":{"name":"EV22000", "value":22000, "transition":22011, "guardCondition":[{"operator":"=", "value":11},
+ {"join":"and", "operator":"not", "value":"DrivingModeOn"}]}
},
"state":{
"name":"SoundCategory4", /* Driving */
"value":22004,
- "event":{ "name":"EV22999","value":22999, "transition":22999 },
- "event":{ "name":"EV22000","value":22000, "transition":22001, "guardCondition":[{"operator":"=","value":1}]},
- "event":{ "name":"EV22000","value":22000, "transition":22002, "guardCondition":[{"operator":"=","value":2}]},
- "event":{ "name":"EV22000","value":22000, "transition":22003, "guardCondition":[{"operator":"=","value":3}]},
- "event":{ "name":"EV22000","value":22000, "transition":22004, "guardCondition":[{"operator":"=","value":4}]},
- "event":{ "name":"EV22000","value":22000, "transition":22005, "guardCondition":[{"operator":"=","value":5}]},
- "event":{ "name":"EV22000","value":22000, "transition":22006, "guardCondition":[{"operator":"=","value":6}]},
- "event":{ "name":"EV22000","value":22000, "transition":22007, "guardCondition":[{"operator":"=","value":7}]},
- "event":{ "name":"EV22000","value":22000, "transition":22008, "guardCondition":[{"operator":"=","value":8}]},
- "event":{ "name":"EV22000","value":22000, "transition":22009, "guardCondition":[{ "operator":"=","value":9},
- {"join":"and","operator":"not","value":"Regulating"}]},
- "event":{ "name":"EV22000","value":22000, "transition":22010, "guardCondition":[{ "operator":"=","value":10}]},
- "event":{ "name":"EV22000","value":22000, "transition":22011, "guardCondition":[{"operator":"=","value":11},
- {"join":"and","operator":"not","value":"Regulating"}]}
+ "event":{"name":"EV22999", "value":22999, "transition":22999},
+ "event":{"name":"EV22000", "value":22000, "transition":22001, "guardCondition":[{"operator":"=", "value":1}]},
+ "event":{"name":"EV22000", "value":22000, "transition":22002, "guardCondition":[{"operator":"=", "value":2}]},
+ "event":{"name":"EV22000", "value":22000, "transition":22003, "guardCondition":[{"operator":"=", "value":3}]},
+ "event":{"name":"EV22000", "value":22000, "transition":22004, "guardCondition":[{"operator":"=", "value":4}]},
+ "event":{"name":"EV22000", "value":22000, "transition":22005, "guardCondition":[{"operator":"=", "value":5}]},
+ "event":{"name":"EV22000", "value":22000, "transition":22006, "guardCondition":[{"operator":"=", "value":6}]},
+ "event":{"name":"EV22000", "value":22000, "transition":22007, "guardCondition":[{"operator":"=", "value":7}]},
+ "event":{"name":"EV22000", "value":22000, "transition":22008, "guardCondition":[{"operator":"=", "value":8}]},
+ "event":{"name":"EV22000", "value":22000, "transition":22009, "guardCondition":[{ "operator":"=", "value":9},
+ {"join":"and", "operator":"not", "value":"DrivingModeOn"}]},
+ "event":{"name":"EV22000", "value":22000, "transition":22010, "guardCondition":[{ "operator":"=", "value":10}]},
+ "event":{"name":"EV22000", "value":22000, "transition":22011, "guardCondition":[{"operator":"=", "value":11},
+ {"join":"and", "operator":"not", "value":"DrivingModeOn"}]}
},
"state":{
"name":"SoundCategory5", /* CarSetting */
"value":22005,
- "event":{ "name":"EV22999","value":22999, "transition":22999 },
- "event":{ "name":"EV22000","value":22000, "transition":22001, "guardCondition":[{"operator":"=","value":1}]},
- "event":{ "name":"EV22000","value":22000, "transition":22002, "guardCondition":[{"operator":"=","value":2}]},
- "event":{ "name":"EV22000","value":22000, "transition":22003, "guardCondition":[{"operator":"=","value":3}]},
- "event":{ "name":"EV22000","value":22000, "transition":22004, "guardCondition":[{"operator":"=","value":4}]},
- "event":{ "name":"EV22000","value":22000, "transition":22005, "guardCondition":[{"operator":"=","value":5}]},
- "event":{ "name":"EV22000","value":22000, "transition":22006, "guardCondition":[{"operator":"=","value":6}]},
- "event":{ "name":"EV22000","value":22000, "transition":22007, "guardCondition":[{"operator":"=","value":7}]},
- "event":{ "name":"EV22000","value":22000, "transition":22008, "guardCondition":[{"operator":"=","value":8}]},
- "event":{ "name":"EV22000","value":22000, "transition":22009, "guardCondition":[{ "operator":"=","value":9},
- {"join":"and","operator":"not","value":"Regulating"}]},
- "event":{ "name":"EV22000","value":22000, "transition":22010, "guardCondition":[{ "operator":"=","value":10}]},
- "event":{ "name":"EV22000","value":22000, "transition":22011, "guardCondition":[{"operator":"=","value":11},
- {"join":"and","operator":"not","value":"Regulating"}]}
+ "event":{"name":"EV22999", "value":22999, "transition":22999},
+ "event":{"name":"EV22000", "value":22000, "transition":22001, "guardCondition":[{"operator":"=", "value":1}]},
+ "event":{"name":"EV22000", "value":22000, "transition":22002, "guardCondition":[{"operator":"=", "value":2}]},
+ "event":{"name":"EV22000", "value":22000, "transition":22003, "guardCondition":[{"operator":"=", "value":3}]},
+ "event":{"name":"EV22000", "value":22000, "transition":22004, "guardCondition":[{"operator":"=", "value":4}]},
+ "event":{"name":"EV22000", "value":22000, "transition":22005, "guardCondition":[{"operator":"=", "value":5}]},
+ "event":{"name":"EV22000", "value":22000, "transition":22006, "guardCondition":[{"operator":"=", "value":6}]},
+ "event":{"name":"EV22000", "value":22000, "transition":22007, "guardCondition":[{"operator":"=", "value":7}]},
+ "event":{"name":"EV22000", "value":22000, "transition":22008, "guardCondition":[{"operator":"=", "value":8}]},
+ "event":{"name":"EV22000", "value":22000, "transition":22009, "guardCondition":[{ "operator":"=", "value":9},
+ {"join":"and", "operator":"not", "value":"DrivingModeOn"}]},
+ "event":{"name":"EV22000", "value":22000, "transition":22010, "guardCondition":[{ "operator":"=", "value":10}]},
+ "event":{"name":"EV22000", "value":22000, "transition":22011, "guardCondition":[{"operator":"=", "value":11},
+ {"join":"and", "operator":"not", "value":"DrivingModeOn"}]}
},
"state":{
"name":"SoundCategory6", /* Camera.Back */
"value":22006,
- "event":{ "name":"EV22999","value":22999, "transition":22999 },
- "event":{ "name":"EV22000","value":22000, "transition":22001, "guardCondition":[{"operator":"=","value":1}]},
- "event":{ "name":"EV22000","value":22000, "transition":22002, "guardCondition":[{"operator":"=","value":2}]},
- "event":{ "name":"EV22000","value":22000, "transition":22003, "guardCondition":[{"operator":"=","value":3}]},
- "event":{ "name":"EV22000","value":22000, "transition":22004, "guardCondition":[{"operator":"=","value":4}]},
- "event":{ "name":"EV22000","value":22000, "transition":22005, "guardCondition":[{"operator":"=","value":5}]},
- "event":{ "name":"EV22000","value":22000, "transition":22006, "guardCondition":[{"operator":"=","value":6}]},
- "event":{ "name":"EV22000","value":22000, "transition":22007, "guardCondition":[{"operator":"=","value":7}]},
- "event":{ "name":"EV22000","value":22000, "transition":22008, "guardCondition":[{"operator":"=","value":8}]},
- "event":{ "name":"EV22000","value":22000, "transition":22009, "guardCondition":[{ "operator":"=","value":9},
- {"join":"and","operator":"not","value":"Regulating"}]},
- "event":{ "name":"EV22000","value":22000, "transition":22010, "guardCondition":[{ "operator":"=","value":10}]},
- "event":{ "name":"EV22000","value":22000, "transition":22011, "guardCondition":[{"operator":"=","value":11},
- {"join":"and","operator":"not","value":"Regulating"}]}
+ "event":{"name":"EV22999", "value":22999, "transition":22999},
+ "event":{"name":"EV22000", "value":22000, "transition":22001, "guardCondition":[{"operator":"=", "value":1}]},
+ "event":{"name":"EV22000", "value":22000, "transition":22002, "guardCondition":[{"operator":"=", "value":2}]},
+ "event":{"name":"EV22000", "value":22000, "transition":22003, "guardCondition":[{"operator":"=", "value":3}]},
+ "event":{"name":"EV22000", "value":22000, "transition":22004, "guardCondition":[{"operator":"=", "value":4}]},
+ "event":{"name":"EV22000", "value":22000, "transition":22005, "guardCondition":[{"operator":"=", "value":5}]},
+ "event":{"name":"EV22000", "value":22000, "transition":22006, "guardCondition":[{"operator":"=", "value":6}]},
+ "event":{"name":"EV22000", "value":22000, "transition":22007, "guardCondition":[{"operator":"=", "value":7}]},
+ "event":{"name":"EV22000", "value":22000, "transition":22008, "guardCondition":[{"operator":"=", "value":8}]},
+ "event":{"name":"EV22000", "value":22000, "transition":22009, "guardCondition":[{ "operator":"=", "value":9},
+ {"join":"and", "operator":"not", "value":"DrivingModeOn"}]},
+ "event":{"name":"EV22000", "value":22000, "transition":22010, "guardCondition":[{ "operator":"=", "value":10}]},
+ "event":{"name":"EV22000", "value":22000, "transition":22011, "guardCondition":[{"operator":"=", "value":11},
+ {"join":"and", "operator":"not", "value":"DrivingModeOn"}]}
},
"state":{
"name":"SoundCategory7", /* Camera.Left */
"value":22007,
- "event":{ "name":"EV22999","value":22999, "transition":22999 },
- "event":{ "name":"EV22000","value":22000, "transition":22001, "guardCondition":[{"operator":"=","value":1}]},
- "event":{ "name":"EV22000","value":22000, "transition":22002, "guardCondition":[{"operator":"=","value":2}]},
- "event":{ "name":"EV22000","value":22000, "transition":22003, "guardCondition":[{"operator":"=","value":3}]},
- "event":{ "name":"EV22000","value":22000, "transition":22004, "guardCondition":[{"operator":"=","value":4}]},
- "event":{ "name":"EV22000","value":22000, "transition":22005, "guardCondition":[{"operator":"=","value":5}]},
- "event":{ "name":"EV22000","value":22000, "transition":22006, "guardCondition":[{"operator":"=","value":6}]},
- "event":{ "name":"EV22000","value":22000, "transition":22007, "guardCondition":[{"operator":"=","value":7}]},
- "event":{ "name":"EV22000","value":22000, "transition":22008, "guardCondition":[{"operator":"=","value":8}]},
- "event":{ "name":"EV22000","value":22000, "transition":22009, "guardCondition":[{ "operator":"=","value":9},
- {"join":"and","operator":"not","value":"Regulating"}]},
- "event":{ "name":"EV22000","value":22000, "transition":22010, "guardCondition":[{ "operator":"=","value":10}]},
- "event":{ "name":"EV22000","value":22000, "transition":22011, "guardCondition":[{"operator":"=","value":11},
- {"join":"and","operator":"not","value":"Regulating"}]}
+ "event":{"name":"EV22999", "value":22999, "transition":22999},
+ "event":{"name":"EV22000", "value":22000, "transition":22001, "guardCondition":[{"operator":"=", "value":1}]},
+ "event":{"name":"EV22000", "value":22000, "transition":22002, "guardCondition":[{"operator":"=", "value":2}]},
+ "event":{"name":"EV22000", "value":22000, "transition":22003, "guardCondition":[{"operator":"=", "value":3}]},
+ "event":{"name":"EV22000", "value":22000, "transition":22004, "guardCondition":[{"operator":"=", "value":4}]},
+ "event":{"name":"EV22000", "value":22000, "transition":22005, "guardCondition":[{"operator":"=", "value":5}]},
+ "event":{"name":"EV22000", "value":22000, "transition":22006, "guardCondition":[{"operator":"=", "value":6}]},
+ "event":{"name":"EV22000", "value":22000, "transition":22007, "guardCondition":[{"operator":"=", "value":7}]},
+ "event":{"name":"EV22000", "value":22000, "transition":22008, "guardCondition":[{"operator":"=", "value":8}]},
+ "event":{"name":"EV22000", "value":22000, "transition":22009, "guardCondition":[{ "operator":"=", "value":9},
+ {"join":"and", "operator":"not", "value":"DrivingModeOn"}]},
+ "event":{"name":"EV22000", "value":22000, "transition":22010, "guardCondition":[{ "operator":"=", "value":10}]},
+ "event":{"name":"EV22000", "value":22000, "transition":22011, "guardCondition":[{"operator":"=", "value":11},
+ {"join":"and", "operator":"not", "value":"DrivingModeOn"}]}
},
"state":{
"name":"SoundCategory8", /* Camera.Right */
"value":22008,
- "event":{ "name":"EV22999","value":22999, "transition":22999 },
- "event":{ "name":"EV22000","value":22000, "transition":22001, "guardCondition":[{"operator":"=","value":1}]},
- "event":{ "name":"EV22000","value":22000, "transition":22002, "guardCondition":[{"operator":"=","value":2}]},
- "event":{ "name":"EV22000","value":22000, "transition":22003, "guardCondition":[{"operator":"=","value":3}]},
- "event":{ "name":"EV22000","value":22000, "transition":22004, "guardCondition":[{"operator":"=","value":4}]},
- "event":{ "name":"EV22000","value":22000, "transition":22005, "guardCondition":[{"operator":"=","value":5}]},
- "event":{ "name":"EV22000","value":22000, "transition":22006, "guardCondition":[{"operator":"=","value":6}]},
- "event":{ "name":"EV22000","value":22000, "transition":22007, "guardCondition":[{"operator":"=","value":7}]},
- "event":{ "name":"EV22000","value":22000, "transition":22008, "guardCondition":[{"operator":"=","value":8}]},
- "event":{ "name":"EV22000","value":22000, "transition":22009, "guardCondition":[{ "operator":"=","value":9},
- {"join":"and","operator":"not","value":"Regulating"}]},
- "event":{ "name":"EV22000","value":22000, "transition":22010, "guardCondition":[{ "operator":"=","value":10}]},
- "event":{ "name":"EV22000","value":22000, "transition":22011, "guardCondition":[{"operator":"=","value":11},
- {"join":"and","operator":"not","value":"Regulating"}]}
+ "event":{"name":"EV22999", "value":22999, "transition":22999},
+ "event":{"name":"EV22000", "value":22000, "transition":22001, "guardCondition":[{"operator":"=", "value":1}]},
+ "event":{"name":"EV22000", "value":22000, "transition":22002, "guardCondition":[{"operator":"=", "value":2}]},
+ "event":{"name":"EV22000", "value":22000, "transition":22003, "guardCondition":[{"operator":"=", "value":3}]},
+ "event":{"name":"EV22000", "value":22000, "transition":22004, "guardCondition":[{"operator":"=", "value":4}]},
+ "event":{"name":"EV22000", "value":22000, "transition":22005, "guardCondition":[{"operator":"=", "value":5}]},
+ "event":{"name":"EV22000", "value":22000, "transition":22006, "guardCondition":[{"operator":"=", "value":6}]},
+ "event":{"name":"EV22000", "value":22000, "transition":22007, "guardCondition":[{"operator":"=", "value":7}]},
+ "event":{"name":"EV22000", "value":22000, "transition":22008, "guardCondition":[{"operator":"=", "value":8}]},
+ "event":{"name":"EV22000", "value":22000, "transition":22009, "guardCondition":[{ "operator":"=", "value":9},
+ {"join":"and", "operator":"not", "value":"DrivingModeOn"}]},
+ "event":{"name":"EV22000", "value":22000, "transition":22010, "guardCondition":[{ "operator":"=", "value":10}]},
+ "event":{"name":"EV22000", "value":22000, "transition":22011, "guardCondition":[{"operator":"=", "value":11},
+ {"join":"and", "operator":"not", "value":"DrivingModeOn"}]}
},
"state":{
"name":"SoundCategory9", /* Entertainment */
"value":22009,
- "event":{ "name":"EV22999","value":22999, "transition":22999 },
- "event":{ "name":"EV22000","value":22000, "transition":22001, "guardCondition":[{"operator":"=","value":1}]},
- "event":{ "name":"EV22000","value":22000, "transition":22002, "guardCondition":[{"operator":"=","value":2}]},
- "event":{ "name":"EV22000","value":22000, "transition":22003, "guardCondition":[{"operator":"=","value":3}]},
- "event":{ "name":"EV22000","value":22000, "transition":22004, "guardCondition":[{"operator":"=","value":4}]},
- "event":{ "name":"EV22000","value":22000, "transition":22005, "guardCondition":[{"operator":"=","value":5}]},
- "event":{ "name":"EV22000","value":22000, "transition":22006, "guardCondition":[{"operator":"=","value":6}]},
- "event":{ "name":"EV22000","value":22000, "transition":22007, "guardCondition":[{"operator":"=","value":7}]},
- "event":{ "name":"EV22000","value":22000, "transition":22008, "guardCondition":[{"operator":"=","value":8}]},
- "event":{ "name":"EV22000","value":22000, "transition":22009, "guardCondition":[{ "operator":"=","value":9},
- {"join":"and","operator":"not","value":"Regulating"}]},
- "event":{ "name":"EV22000","value":22000, "transition":22010, "guardCondition":[{ "operator":"=","value":10}]},
- "event":{ "name":"EV22000","value":22000, "transition":22011, "guardCondition":[{"operator":"=","value":11},
- {"join":"and","operator":"not","value":"Regulating"}]}
+ "event":{"name":"EV22999", "value":22999, "transition":22999},
+ "event":{"name":"EV22000", "value":22000, "transition":22001, "guardCondition":[{"operator":"=", "value":1}]},
+ "event":{"name":"EV22000", "value":22000, "transition":22002, "guardCondition":[{"operator":"=", "value":2}]},
+ "event":{"name":"EV22000", "value":22000, "transition":22003, "guardCondition":[{"operator":"=", "value":3}]},
+ "event":{"name":"EV22000", "value":22000, "transition":22004, "guardCondition":[{"operator":"=", "value":4}]},
+ "event":{"name":"EV22000", "value":22000, "transition":22005, "guardCondition":[{"operator":"=", "value":5}]},
+ "event":{"name":"EV22000", "value":22000, "transition":22006, "guardCondition":[{"operator":"=", "value":6}]},
+ "event":{"name":"EV22000", "value":22000, "transition":22007, "guardCondition":[{"operator":"=", "value":7}]},
+ "event":{"name":"EV22000", "value":22000, "transition":22008, "guardCondition":[{"operator":"=", "value":8}]},
+ "event":{"name":"EV22000", "value":22000, "transition":22009, "guardCondition":[{ "operator":"=", "value":9},
+ {"join":"and", "operator":"not", "value":"DrivingModeOn"}]},
+ "event":{"name":"EV22000", "value":22000, "transition":22010, "guardCondition":[{ "operator":"=", "value":10}]},
+ "event":{"name":"EV22000", "value":22000, "transition":22011, "guardCondition":[{"operator":"=", "value":11},
+ {"join":"and", "operator":"not", "value":"DrivingModeOn"}]}
},
"state":{
"name":"SoundCategory10", /* Entertainment.audio */
"value":22010,
- "event":{ "name":"EV22999","value":22999, "transition":22999 },
- "event":{ "name":"EV22000","value":22000, "transition":22001, "guardCondition":[{"operator":"=","value":1}]},
- "event":{ "name":"EV22000","value":22000, "transition":22002, "guardCondition":[{"operator":"=","value":2}]},
- "event":{ "name":"EV22000","value":22000, "transition":22003, "guardCondition":[{"operator":"=","value":3}]},
- "event":{ "name":"EV22000","value":22000, "transition":22004, "guardCondition":[{"operator":"=","value":4}]},
- "event":{ "name":"EV22000","value":22000, "transition":22005, "guardCondition":[{"operator":"=","value":5}]},
- "event":{ "name":"EV22000","value":22000, "transition":22006, "guardCondition":[{"operator":"=","value":6}]},
- "event":{ "name":"EV22000","value":22000, "transition":22007, "guardCondition":[{"operator":"=","value":7}]},
- "event":{ "name":"EV22000","value":22000, "transition":22008, "guardCondition":[{"operator":"=","value":8}]},
- "event":{ "name":"EV22000","value":22000, "transition":22009, "guardCondition":[{ "operator":"=","value":9},
- {"join":"and","operator":"not","value":"Regulating"}]},
- "event":{ "name":"EV22000","value":22000, "transition":22010, "guardCondition":[{ "operator":"=","value":10}]},
- "event":{ "name":"EV22000","value":22000, "transition":22011, "guardCondition":[{"operator":"=","value":11},
- {"join":"and","operator":"not","value":"Regulating"}]}
+ "event":{"name":"EV22999", "value":22999, "transition":22999},
+ "event":{"name":"EV22000", "value":22000, "transition":22001, "guardCondition":[{"operator":"=", "value":1}]},
+ "event":{"name":"EV22000", "value":22000, "transition":22002, "guardCondition":[{"operator":"=", "value":2}]},
+ "event":{"name":"EV22000", "value":22000, "transition":22003, "guardCondition":[{"operator":"=", "value":3}]},
+ "event":{"name":"EV22000", "value":22000, "transition":22004, "guardCondition":[{"operator":"=", "value":4}]},
+ "event":{"name":"EV22000", "value":22000, "transition":22005, "guardCondition":[{"operator":"=", "value":5}]},
+ "event":{"name":"EV22000", "value":22000, "transition":22006, "guardCondition":[{"operator":"=", "value":6}]},
+ "event":{"name":"EV22000", "value":22000, "transition":22007, "guardCondition":[{"operator":"=", "value":7}]},
+ "event":{"name":"EV22000", "value":22000, "transition":22008, "guardCondition":[{"operator":"=", "value":8}]},
+ "event":{"name":"EV22000", "value":22000, "transition":22009, "guardCondition":[{ "operator":"=", "value":9},
+ {"join":"and", "operator":"not", "value":"DrivingModeOn"}]},
+ "event":{"name":"EV22000", "value":22000, "transition":22010, "guardCondition":[{ "operator":"=", "value":10}]},
+ "event":{"name":"EV22000", "value":22000, "transition":22011, "guardCondition":[{"operator":"=", "value":11},
+ {"join":"and", "operator":"not", "value":"DrivingModeOn"}]}
},
"state":{
"name":"SoundCategory11", /* Entertainment.visiual */
"value":22011,
- "event":{ "name":"EV22999","value":22999, "transition":22999 },
- "event":{ "name":"EV22000","value":22000, "transition":22001, "guardCondition":[{"operator":"=","value":1}]},
- "event":{ "name":"EV22000","value":22000, "transition":22002, "guardCondition":[{"operator":"=","value":2}]},
- "event":{ "name":"EV22000","value":22000, "transition":22003, "guardCondition":[{"operator":"=","value":3}]},
- "event":{ "name":"EV22000","value":22000, "transition":22004, "guardCondition":[{"operator":"=","value":4}]},
- "event":{ "name":"EV22000","value":22000, "transition":22005, "guardCondition":[{"operator":"=","value":5}]},
- "event":{ "name":"EV22000","value":22000, "transition":22006, "guardCondition":[{"operator":"=","value":6}]},
- "event":{ "name":"EV22000","value":22000, "transition":22007, "guardCondition":[{"operator":"=","value":7}]},
- "event":{ "name":"EV22000","value":22000, "transition":22008, "guardCondition":[{"operator":"=","value":8}]},
- "event":{ "name":"EV22000","value":22000, "transition":22009, "guardCondition":[{ "operator":"=","value":9},
- {"join":"and","operator":"not","value":"Regulating"}]},
- "event":{ "name":"EV22000","value":22000, "transition":22010, "guardCondition":[{ "operator":"=","value":10}]},
- "event":{ "name":"EV22000","value":22000, "transition":22011, "guardCondition":[{"operator":"=","value":11},
- {"join":"and","operator":"not","value":"Regulating"}]}
+ "event":{"name":"EV22999", "value":22999, "transition":22999},
+ "event":{"name":"EV22000", "value":22000, "transition":22001, "guardCondition":[{"operator":"=", "value":1}]},
+ "event":{"name":"EV22000", "value":22000, "transition":22002, "guardCondition":[{"operator":"=", "value":2}]},
+ "event":{"name":"EV22000", "value":22000, "transition":22003, "guardCondition":[{"operator":"=", "value":3}]},
+ "event":{"name":"EV22000", "value":22000, "transition":22004, "guardCondition":[{"operator":"=", "value":4}]},
+ "event":{"name":"EV22000", "value":22000, "transition":22005, "guardCondition":[{"operator":"=", "value":5}]},
+ "event":{"name":"EV22000", "value":22000, "transition":22006, "guardCondition":[{"operator":"=", "value":6}]},
+ "event":{"name":"EV22000", "value":22000, "transition":22007, "guardCondition":[{"operator":"=", "value":7}]},
+ "event":{"name":"EV22000", "value":22000, "transition":22008, "guardCondition":[{"operator":"=", "value":8}]},
+ "event":{"name":"EV22000", "value":22000, "transition":22009, "guardCondition":[{ "operator":"=", "value":9},
+ {"join":"and", "operator":"not", "value":"DrivingModeOn"}]},
+ "event":{"name":"EV22000", "value":22000, "transition":22010, "guardCondition":[{ "operator":"=", "value":10}]},
+ "event":{"name":"EV22000", "value":22000, "transition":22011, "guardCondition":[{"operator":"=", "value":11},
+ {"join":"and", "operator":"not", "value":"DrivingModeOn"}]}
}
},
"state":{
"name":"IntterputSoundZone1_NoOutput",
"value":25999,
- "event":{ "name":"EV25000","value":25000, "transition":25001, "guardCondition":[{"operator":"=","value":1}]},
- "event":{ "name":"EV25000","value":25000, "transition":25002, "guardCondition":[{"operator":"=","value":2}]},
- "event":{ "name":"EV25000","value":25000, "transition":25003, "guardCondition":[{"operator":"=","value":3}]}
+ "event":{"name":"EV25000", "value":25000, "transition":25001, "guardCondition":[{"operator":"=", "value":1}]},
+ "event":{"name":"EV25000", "value":25000, "transition":25002, "guardCondition":[{"operator":"=", "value":2}]},
+ "event":{"name":"EV25000", "value":25000, "transition":25003, "guardCondition":[{"operator":"=", "value":3}]}
},
"state":{
"name":"IntterputSoundZone1_Priority1",
"value":25001,
- "event":{ "name":"EV25999","value":25999, "transition":25999}
+ "event":{"name":"EV25999", "value":25999, "transition":25999}
},
"state":{
"name":"IntterputSoundZone1_Priority2",
"value":25002,
- "event":{ "name":"EV25999","value":25999, "transition":25999},
- "event":{ "name":"EV25000","value":25000, "transition":25001, "guardCondition":[{"operator":"=","value":1}]}
+ "event":{"name":"EV25999", "value":25999, "transition":25999},
+ "event":{"name":"EV25000", "value":25000, "transition":25001, "guardCondition":[{"operator":"=", "value":1}]}
},
"state":{
"name":"IntterputSoundZone1_Priority3",
"value":25003,
- "event":{ "name":"EV25999","value":25999, "transition":25999},
- "event":{ "name":"EV25000","value":25000, "transition":25001, "guardCondition":[{"operator":"=","value":1}]},
- "event":{ "name":"EV25000","value":25000, "transition":25002, "guardCondition":[{"operator":"=","value":2}]}
+ "event":{"name":"EV25999", "value":25999, "transition":25999},
+ "event":{"name":"EV25000", "value":25000, "transition":25001, "guardCondition":[{"operator":"=", "value":1}]},
+ "event":{"name":"EV25000", "value":25000, "transition":25002, "guardCondition":[{"operator":"=", "value":2}]}
}
},
"state":{
"name":"IntterputSoundZone2_NoOutput",
"value":26999,
- "event":{ "name":"EV26000","value":26000, "transition":26001, "guardCondition":[{"operator":"=","value":1}]},
- "event":{ "name":"EV26000","value":26000, "transition":26002, "guardCondition":[{"operator":"=","value":2}]},
- "event":{ "name":"EV26000","value":26000, "transition":26003, "guardCondition":[{"operator":"=","value":3}]}
+ "event":{"name":"EV26000", "value":26000, "transition":26001, "guardCondition":[{"operator":"=", "value":1}]},
+ "event":{"name":"EV26000", "value":26000, "transition":26002, "guardCondition":[{"operator":"=", "value":2}]},
+ "event":{"name":"EV26000", "value":26000, "transition":26003, "guardCondition":[{"operator":"=", "value":3}]}
},
"state":{
"name":"IntterputSoundZone2_Priority1",
"value":26001,
- "event":{ "name":"EV26999","value":26999, "transition":26999}
+ "event":{"name":"EV26999", "value":26999, "transition":26999}
},
"state":{
"name":"IntterputSoundZone2_Priority2",
"value":26002,
- "event":{ "name":"EV26999","value":26999, "transition":26999},
- "event":{ "name":"EV26000","value":26000, "transition":26001, "guardCondition":[{"operator":"=","value":1}]}
+ "event":{"name":"EV26999", "value":26999, "transition":26999},
+ "event":{"name":"EV26000", "value":26000, "transition":26001, "guardCondition":[{"operator":"=", "value":1}]}
},
"state":{
"name":"IntterputSoundZone2_Priority3",
"value":26003,
- "event":{ "name":"EV26999","value":26999, "transition":26999},
- "event":{ "name":"EV26000","value":26000, "transition":26001, "guardCondition":[{"operator":"=","value":1}]},
- "event":{ "name":"EV26000","value":26000, "transition":26002, "guardCondition":[{"operator":"=","value":2}]}
+ "event":{"name":"EV26999", "value":26999, "transition":26999},
+ "event":{"name":"EV26000", "value":26000, "transition":26001, "guardCondition":[{"operator":"=", "value":1}]},
+ "event":{"name":"EV26000", "value":26000, "transition":26002, "guardCondition":[{"operator":"=", "value":2}]}
}
},
"state":{
"name":"IntterputSoundZone3_NoOutput",
"value":27999,
- "event":{ "name":"EV27000","value":27000, "transition":27001, "guardCondition":[{"operator":"=","value":1}]},
- "event":{ "name":"EV27000","value":27000, "transition":27002, "guardCondition":[{"operator":"=","value":2}]},
- "event":{ "name":"EV27000","value":27000, "transition":27003, "guardCondition":[{"operator":"=","value":3}]}
+ "event":{"name":"EV27000", "value":27000, "transition":27001, "guardCondition":[{"operator":"=", "value":1}]},
+ "event":{"name":"EV27000", "value":27000, "transition":27002, "guardCondition":[{"operator":"=", "value":2}]},
+ "event":{"name":"EV27000", "value":27000, "transition":27003, "guardCondition":[{"operator":"=", "value":3}]}
},
"state":{
"name":"IntterputSoundZone3_Priority1",
"value":27001,
- "event":{ "name":"EV27999","value":27999, "transition":27999}
+ "event":{"name":"EV27999", "value":27999, "transition":27999}
},
"state":{
"name":"IntterputSoundZone3_Priority2",
"value":27002,
- "event":{ "name":"EV27999","value":27999, "transition":27999},
- "event":{ "name":"EV27000","value":27000, "transition":27001, "guardCondition":[{"operator":"=","value":1}]}
+ "event":{"name":"EV27999", "value":27999, "transition":27999},
+ "event":{"name":"EV27000", "value":27000, "transition":27001, "guardCondition":[{"operator":"=", "value":1}]}
},
"state":{
"name":"IntterputSoundZone3_Priority3",
"value":27003,
- "event":{ "name":"EV27999","value":27999, "transition":27999},
- "event":{ "name":"EV27000","value":27000, "transition":27001, "guardCondition":[{"operator":"=","value":1}]},
- "event":{ "name":"EV27000","value":27000, "transition":27002, "guardCondition":[{"operator":"=","value":2}]}
+ "event":{"name":"EV27999", "value":27999, "transition":27999},
+ "event":{"name":"EV27000", "value":27000, "transition":27001, "guardCondition":[{"operator":"=", "value":1}]},
+ "event":{"name":"EV27000", "value":27000, "transition":27002, "guardCondition":[{"operator":"=", "value":2}]}
}
},
"state":{
"name":"Input1_NotUsing",
"value":30001,
- "event":{ "name":"EV30000","value":30000, "transition":30002}
+ "event":{"name":"EV30000", "value":30000, "transition":30002}
},
"state":{
"name":"Input1_Using",
"value":30002,
- "event":{ "name":"EV30000","value":30000, "transition":30002},
- "event":{ "name":"EV30001","value":30000, "transition":30001}
+ "event":{"name":"EV30000", "value":30000, "transition":30002},
+ "event":{"name":"EV30001", "value":30001, "transition":30001}
}
},
"state":{
"name":"Input2_NotUsing",
"value":30101,
- "event":{ "name":"EV30100","value":30100, "transition":30102}
+ "event":{"name":"EV30100", "value":30100, "transition":30102}
},
"state":{
"name":"Input2_Using",
"value":30102,
- "event":{ "name":"EV30100","value":30100, "transition":30102},
- "event":{ "name":"EV30101","value":30100, "transition":30101}
+ "event":{"name":"EV30100", "value":30100, "transition":30102},
+ "event":{"name":"EV30101", "value":30101, "transition":30101}
}
},
- "finalState":{"name":"TheEnd","value":9999 }
+ "finalState":{"name":"TheEnd", "value":9999}
}
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+
+<!--
+ system controller application configureation
+-->
+<system-controller>
+ <!--
+ log setting
+ -->
+ <log>
+ <name>IcoSysConDaemon</name>
+ <level>
+ <performance enable="true"/>
+ <trace enable="true"/>
+ <debug enable="true"/>
+ <info enable="true"/>
+ <warning enable="true"/>
+ <critical enable="true"/>
+ <error enable="true"/>
+ </level>
+ <flush enable="true"/>
+ <ecore enalbe="true"/>
+ </log>
+</system-controller>
+<!-- vim: set expandtab ts=2 sw=2: -->
<priority>0</priority>
<r_ctrl>1</r_ctrl>
</category>
- <category id="11" name="Entertainment.visiual">
+ <category id="11" name="Entertainment.visual">
<type>unknown</type>
<view>always</view>
<sound>parked</sound>
</inputs>
<resource_cpu_control>
- <do_it>yes</do_it>
+ <do_it>app</do_it>
<ctrl_dir_path>/sys/fs/cgroup/cpu,cpuacct/SCprivate</ctrl_dir_path>
<sampling_wait>300</sampling_wait>
<retry_cnt>6</retry_cnt>
<transition>none</transition>
-<log>
- <!-- loglevel:ERROR=4,CRITICAL=8,WARNING=16,INFO=64,DEBUG=128 -->
- <loglevel>128</loglevel>
- <logflush>false</logflush>
-</log>
-
<login_user>
<parent_dir>/home/app/ico</parent_dir>
</login_user>
+<vehicle_info>
+ <retryCnt>40</retryCnt>
+ <waitTime>200</waitTime> <!-- micro srcond -->
+ <vinfo id="1" name="VehicleSpeed">
+ <objname>VehicleSpeed</objname>
+ <property>VehicleSpeed</property>
+ <zone>0</zone>
+ <type>INT32</type>
+ </vinfo>
+ <vinfo id="2" name="ShiftPosition">
+ <objname>Transmission</objname>
+ <property>ShiftPosition</property>
+ <zone>0</zone>
+ <type>BYTE</type>
+ </vinfo>
+ <vinfo id="3" name="LeftTurn">
+ <objname>LightStatus</objname>
+ <property>LeftTurn</property>
+ <zone>0</zone>
+ <type>BOOLEAN</type>
+ </vinfo>
+ <vinfo id="4" name="RightTurn">
+ <objname>LightStatus</objname>
+ <property>RightTurn</property>
+ <zone>0</zone>
+ <type>BOOLEAN</type>
+ </vinfo>
+ <vinfo id="5" name="NightMode">
+ <objname>NightMode</objname>
+ <property>NightMode</property>
+ <zone>0</zone>
+ <type>UINT32</type>
+ </vinfo>
+ <vinfo id="6" name="DrivingMode">
+ <objname>DrivingMode</objname>
+ <property>DrivingMode</property>
+ <zone>0</zone>
+ <type>UINT32</type>
+ </vinfo>
+</vehicle_info>
+
</systemconfig>
<!-- vim:set expandtab ts=4 sw=4: -->
--- /dev/null
+{
+ "function": "app",
+ "ctrl_dir_path": "/sys/fs/cgroup/cpu,cpuacct/SCprivate",
+ "sampling_wait": 300,
+ "retry_cnt": 6,
+ "low_limit_value": 30,
+ "high_limit_value": 92,
+ "sector":[
+ {
+ "id": 0,
+ "name": "groupA",
+ "hight":[500, 600, 700],
+ "low": [1000, 500, 600]
+ },
+ {
+ "id": 1,
+ "name": "groupB",
+ "hight":[300, 250, 200],
+ "low": [1000, 300, 250]
+ },
+ {
+ "id": 2,
+ "name": "groupC",
+ "hight":[200, 150, 100],
+ "low": [1000, 200, 150]
+ }
+ ]
+}
-SUBDIRS= \
- syscond \
- homescreen
+SUBDIRS= \
+ syscond \
+ homescreen \
+ statusbar
--- /dev/null
+/*
+ * Copyright (c) 2013, TOYOTA MOTOR CORPORATION.
+ *
+ * This program is licensed under the terms and conditions of the
+ * Apache License, version 2.0. The full text of the Apache License is at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ */
+/**
+ * @brief Application control class
+ *
+ * @date Dec-18-2013
+ */
+
+using namespace std;
+#include "CicoHSAppControl.h"
+#include "CicoHomeScreen.h"
+#include "CicoHSCommand.h"
+#include "CicoHSLifeCycleController.h"
+
+#include <ico_log.h>
+#include "ico_syc_msg_cmd_def.h"
+
+/*============================================================================*/
+/* static members */
+/*============================================================================*/
+CicoHSAppControl *CicoHSAppControl::ms_myInstance = NULL;
+
+/*============================================================================*/
+/* functions */
+/*============================================================================*/
+/*--------------------------------------------------------------------------*/
+/**
+ * @brief CicoHSAppControl::CicoHSAppControl
+ * Constractor
+ *
+ * @param[in] none
+ * @return none
+ */
+/*--------------------------------------------------------------------------*/
+CicoHSAppControl::CicoHSAppControl(void)
+{
+ ICO_TRA("CicoHSAppControl::CicoHSAppControl Enter");
+
+ ICO_TRA("CicoHSAppControl::CicoHSAppControl Leave");
+}
+
+/*--------------------------------------------------------------------------*/
+/**
+ * @brief CicoHSAppControl::~CicoHSMenuWindo
+ * Destractor
+ *
+ * @param[in] none
+ * @return none
+ */
+/*--------------------------------------------------------------------------*/
+CicoHSAppControl::~CicoHSAppControl(void)
+{
+ /* Do not somthing to do */
+}
+
+//--------------------------------------------------------------------------
+/**
+ * @brief CicoHSAppControl::getInstance
+ * Get instance of CicoHSAppControl
+ *
+ * @param none
+ * @return pointer of CicoHSAppControl object
+ */
+//--------------------------------------------------------------------------
+CicoHSAppControl*
+CicoHSAppControl::getInstance(void)
+{
+ if (NULL == ms_myInstance) {
+ ms_myInstance = new CicoHSAppControl();
+ }
+ return ms_myInstance;
+}
+
+//--------------------------------------------------------------------------
+/**
+ * @brief CicoHSAppControl::handleCommand
+ * Handle command
+ *
+ * @param [in] cmd control command
+ * @return none
+ */
+//--------------------------------------------------------------------------
+void
+CicoHSAppControl::handleCommand(const CicoHSCommand * cmd)
+{
+ ICO_TRA("CicoHSAppControl::handleCommand Enter(%d)", cmd->cmdid);
+
+ CicoHSCmdAppCtlOpt *opt = static_cast<CicoHSCmdAppCtlOpt*>(cmd->opt);
+ int ret = -1;
+ vector<CicoHSCommandArg>::iterator it = opt->arg.begin();
+
+ switch (cmd->cmdid) {
+ case MSG_CMD_APP_START:
+ // start application
+ ExecuteApp(it->m_appid);
+ break;
+ case MSG_CMD_APP_STOP:
+ if ((it->m_appid).empty() == true) {
+ ret = GetAppId(it->m_pid, it->m_appid);
+ if (ret != 0) {
+ break;
+ }
+ }
+ // stop application
+ TerminateApp(it->m_appid);
+ break;
+ case MSG_CMD_WIN_CHANGE:
+# if 0
+ while( it != opt->arg.end() ) {
+ if ((it->m_appid).empty() == true) {
+ ret = GetAppId(it->m_pid, it->m_appid);
+ if (ret != 0) {
+ ++it;
+ continue;
+ }
+ }
+ // change application window
+ WinChangeApp(it->m_appid, it->m_zone, it->m_visible);
+ ++it;
+ }
+#else
+ WinChgControl(opt->arg);
+#endif
+
+ break;
+ default:
+ ICO_WRN("Unknown Command(0x%08X)", cmd->cmdid);
+ break;
+ }
+ ICO_TRA("CicoHSAppControl::handleCommand Leave");
+}
+
+/*--------------------------------------------------------------------------*/
+/**
+ * @brief CicoHSAppControl::GetAppId
+ * get application id
+ *
+ * @param[in] pid pid
+ * @return appid none
+ */
+/*--------------------------------------------------------------------------*/
+int
+CicoHSAppControl::GetAppId(int pid, string& appid)
+{
+ ICO_TRA("CicoHSAppControl::GetAppId Enter");
+
+ if (pid == -1 ) {
+ ICO_ERR("No pid");
+ return -1;
+ }
+
+ const CicoAulItems* aul = CicoHSLifeCycleController::getInstance()->findAUL(pid);
+ if ((NULL == aul) || (0 == aul)) {
+ ICO_TRA("aul items not find");
+ return -1;
+ }
+ appid = aul->m_appid;
+ return 0;
+
+ ICO_TRA("CicoHSAppControl::GetAppId Leave");
+}
+
+/*--------------------------------------------------------------------------*/
+/**
+ * @brief CicoHSAppControl::WinChangeApp
+ * change application window
+ *
+ * @param[in] appid application id
+ * @param[in] zone zone
+ * @param[in] visible visible val
+ * @return none
+ */
+/*--------------------------------------------------------------------------*/
+void
+CicoHSAppControl::WinChangeApp(const string& appid, const string& zone, int visible)
+{
+ ICO_TRA("CicoHSAppControl::WinChangeApp Enter");
+
+ if (visible == 1) {
+ MoveApp(appid, zone);
+ ShowApp(appid);
+ }
+ else if (visible == 0) {
+ MoveApp(appid, zone);
+ HideApp(appid);
+ }
+ else {
+ ICO_ERR("Unknown visible(%d)", visible);
+ }
+
+ ICO_TRA("CicoHSAppControl::WinChangeApp Leave");
+}
+
+/*--------------------------------------------------------------------------*/
+/**
+ * @brief CicoHSAppControl::MoveApp
+ * move application
+ *
+ * @param[in] appid application id
+ * @param[in] zone zone
+ * @return none
+ */
+/*--------------------------------------------------------------------------*/
+void
+CicoHSAppControl::MoveApp(const string& appid, const string& zone)
+{
+ ICO_TRA("CicoHSAppControl::MoveApp Enter");
+
+ CicoHomeScreen::MoveApp(appid, zone);
+
+ ICO_TRA("CicoHSAppControl::MoveApp Leave");
+}
+
+/*--------------------------------------------------------------------------*/
+/**
+ * @brief CicoHSAppControl::ShowApp
+ * show application
+ *
+ * @param[in] appid application id
+ * @return none
+ */
+/*--------------------------------------------------------------------------*/
+void
+CicoHSAppControl::ShowApp(const string& appid)
+{
+ ICO_TRA("CicoHSAppControl::ShowApp Enter");
+
+ CicoHomeScreen::ShowApp(appid);
+
+ ICO_TRA("CicoHSAppControl::ShowApp Leave");
+}
+
+/*--------------------------------------------------------------------------*/
+/**
+ * @brief CicoHSAppControl::HideApp
+ * hide application
+ *
+ * @param[in] appid application id
+ * @return none
+ */
+/*--------------------------------------------------------------------------*/
+void
+CicoHSAppControl::HideApp(const string& appid)
+{
+ ICO_TRA("CicoHSAppControl::HideApp Enter");
+
+ CicoHomeScreen::HideApp(appid);
+
+ ICO_TRA("CicoHSAppControl::HideApp Leave");
+}
+
+/*--------------------------------------------------------------------------*/
+/**
+ * @brief CicoHSAppControl::ExecuteApp
+ * execute application
+ *
+ * @param[in] appid application id
+ * @return none
+ */
+/*--------------------------------------------------------------------------*/
+void
+CicoHSAppControl::ExecuteApp(const string& appid)
+{
+ ICO_TRA("CicoHSAppControl::ExecuteApp Enter");
+
+ CicoHomeScreen::ExecuteApp(appid.c_str());
+
+ ICO_TRA("CicoHSAppControl::ExecuteApp Leave");
+}
+
+/*--------------------------------------------------------------------------*/
+/**
+ * @brief CicoHSAppControl::TerminateApp
+ * teminate application
+ *
+ * @param[in] appid application id
+ * @return none
+ */
+/*--------------------------------------------------------------------------*/
+void
+CicoHSAppControl::TerminateApp(const string& appid)
+{
+ ICO_TRA("CicoHSAppControl::TerminateApp Enter");
+
+ CicoHomeScreen::TerminateApp(appid.c_str());
+
+ ICO_TRA("CicoHSAppControl::TerminateApp Leave");
+}
+
+/*--------------------------------------------------------------------------*/
+/**
+ * @brief CicoHSAppControl::WinChgControl
+ * WIN_CHANGE command exec.
+ *
+ * @param[in] arg appid,zone,visible data
+ * @return bool
+ * @retval true: success
+ * @retval false: fail
+ */
+/*--------------------------------------------------------------------------*/
+bool
+CicoHSAppControl::WinChgControl(vector<CicoHSCommandArg>& arg)
+{
+ ICO_TRA("start WinChgControl(%d)", arg.size());
+ // Check show control and appid get
+ bool bShow = false;
+ vector<CicoHSCommandArg>::iterator it = arg.begin();
+ while ( it != arg.end() ) {
+ if (true == (it->m_appid).empty()) {
+ if (0 != GetAppId(it->m_pid, it->m_appid)) {
+ ++it;
+ continue; // continue of while
+ }
+ ICO_DBG("%d -> %s getappid", it->m_pid, (it->m_appid).c_str());
+ }
+ if (1 == it->m_visible) {
+ bShow = true;
+ }
+ ++it;
+ }
+ if (false == bShow) {
+ ICO_TRA("end Nothing show");
+ return false;
+ }
+ // Hide set
+ it = arg.begin();
+ while ( it != arg.end() ) {
+ if ((0 == it->m_visible) && (false == (it->m_appid).empty())) {
+ WinChangeApp(it->m_appid, it->m_zone, it->m_visible);
+ }
+ ++it;
+ }
+ // Show set
+ it = arg.begin();
+ while ( it != arg.end() ) {
+ if ((1 == it->m_visible) && (false == (it->m_appid).empty())) {
+ WinChangeApp(it->m_appid, it->m_zone, it->m_visible);
+ }
+ ++it;
+ }
+ ICO_TRA("end");
+ return true;
+}
+
+// vim: set expandtab ts=4 sw=4:
--- /dev/null
+/*
+ * Copyright (c) 2013, TOYOTA MOTOR CORPORATION.
+ *
+ * This program is licensed under the terms and conditions of the
+ * Apache License, version 2.0. The full text of the Apache License is at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ */
+
+//==========================================================================
+/**
+ * @file CicoHSAppControl.h
+ *
+ * @brief This file is definition of CicoHSAppControl class
+ */
+//==========================================================================
+#ifndef __CICO_HS_APP_CONTROL_H__
+#define __CICO_HS_APP_CONTROL_H__
+#include <string>
+#include <vector>
+#include "CicoHSCommandArg.h"
+
+//==========================================================================
+// Forward declaration
+//==========================================================================
+class CicoHSCommand;
+
+//==========================================================================
+/*
+ * @brief This class manages control of user and access to user information
+ */
+//==========================================================================
+class CicoHSAppControl
+{
+public:
+ // get CicoHSAppControl instance
+ static CicoHSAppControl* getInstance(void);
+
+ // handle command
+ void handleCommand(const CicoHSCommand * cmd);
+
+ // change application window
+ void WinChangeApp(const std::string& appid, const std::string& zone, int visible);
+
+ // move application
+ void MoveApp(const std::string& appid, const std::string& zone);
+
+ // show application
+ void ShowApp(const std::string& appid);
+
+ // hide application
+ void HideApp(const std::string& appid);
+
+ // execute application
+ void ExecuteApp(const std::string& appid);
+
+ // teminate application
+ void TerminateApp(const std::string& appid);
+
+ // get application id
+ int GetAppId(int pid, std::string& appid);
+
+private:
+ // default constructor
+ CicoHSAppControl();
+
+ // destructor
+ ~CicoHSAppControl();
+
+ // assignment operator
+ CicoHSAppControl& operator=(const CicoHSAppControl &object);
+
+ bool WinChgControl(std::vector<CicoHSCommandArg>& arg);
+private:
+ static CicoHSAppControl* ms_myInstance; ///< CicoHSAppControl Object
+
+};
+
+#endif // __CICO_HS_APP_CONTROL_H__
+// vim:set expandtab ts=4 sw=4:
#include "CicoHSAppHistory.h"
#include "CicoHomeScreenCommon.h"
#include "CicoHomeScreen.h"
-#include "CicoLog.h"
+#include <ico_log.h>
using namespace std;
}
return m_swipeStr;
}
+// vim: set expandtab ts=4 sw=4:
}
#endif // CICOHSAPPHISTORY_H
+// vim: set expandtab ts=4 sw=4:
#include "Cico_aul_listen_app.h"
#include "CicoHomeScreenCommon.h"
#include "CicoHomeScreen.h"
-#include "CicoLog.h"
+#include <ico_log.h>
using namespace std;
char appid[255];
memset(appid, 0, sizeof(appid));
int iR = Xaul_app_get_appid_bypid(pid, appid, sizeof(appid));
- ICO_DBG("%d=aul_app_get_appid_bypid %d , %s", iR, pid, appid);
+ ICO_PRF("CHG_APP_STA 1.notice app=%s, pid=%d, rval=%d", appid, pid, iR);
return o->appLaunch(pid, appid, iR);
}
m_vpbpa.clear();
m_lastStartupApp.clear();
}
+// vim: set expandtab ts=4 sw=4:
}
#endif // CICOHSAPPHISTORYEXT_H
-
+// vim: set expandtab ts=4 sw=4:
//==========================================================================
#include "CicoHSAppInfo.h"
-#include "CicoSCSystemConfig.h"
-#include "CicoSCConf.h"
+#include "CicoSystemConfig.h"
+#include "CicoConf.h"
+#include "CicoHSLifeCycleController.h"
//==========================================================================
// public functions
: m_appid(appid), m_category(0), m_window_num(0), m_last_surface(0)
{
memset(m_window_info_i, 0, sizeof(m_window_info_i));
- m_life_cycle_controller = CicoSCLifeCycleController::getInstance();
+ m_life_cycle_controller = CicoHSLifeCycleController::getInstance();
}
//--------------------------------------------------------------------------
const char *
CicoHSAppInfo::GetDefaultZone(void)
{
- m_life_cycle_controller = CicoSCLifeCycleController::getInstance();
- const CicoSCAilItems* ailItem = m_life_cycle_controller->findAIL(m_appid);
+ m_life_cycle_controller = CicoHSLifeCycleController::getInstance();
+ const CicoAilItems* ailItem = m_life_cycle_controller->findAIL(m_appid);
- CicoSCSystemConfig *sysConf = CicoSCSystemConfig::getInstance();
+ CicoSystemConfig *sysConf = CicoSystemConfig::getInstance();
const CicoSCDisplayZoneConf *zoneConf = NULL;
if (NULL != ailItem) {
zoneConf = sysConf->findDisplayZoneConfbyId(ailItem->m_displayZone);
#include "ico_syc_winctl.h"
#include "CicoHomeScreenCommon.h"
-#include "CicoSCLifeCycleController.h"
+#include "CicoHSLifeCycleController.h"
#define ICO_HS_APPLICATION_FULL_SCREEN_POS_X 0
#define ICO_HS_APPLICATION_FULL_SCREEN_POS_Y 64
/// window information list
std::vector<ico_hs_window_info *> m_window_info;
/// life cycle controller instance
- CicoSCLifeCycleController *m_life_cycle_controller;
+ CicoHSLifeCycleController *m_life_cycle_controller;
};
#endif // __CICO_HS_APP_INFO_H__
// vim: set expandtab ts=4 sw=4:
* @date Aug-08-2013
*/
#include "CicoHSBackWindow.h"
-#include "CicoHomeScreenResourceConfig.h"
+#include "CicoResourceConfig.h"
/*============================================================================*/
/* functions */
{
evas = NULL;
- CicoHomeScreenResourceConfig::GetImagePath(img_dir_path,ICO_HS_MAX_PATH_BUFF_LEN);
+ CicoResourceConfig::GetImagePath(img_dir_path,ICO_HS_MAX_PATH_BUFF_LEN);
}
evas_object_del(canvas);
FreeWindow();
}
-
-
+// vim: set expandtab ts=4 sw=4:
#include <Edje.h>
#include "CicoHomeScreenCommon.h"
-#include "CicoHomeScreenConfig.h"
+#include "CicoGKeyFileConfig.h"
#include "CicoHSWindow.h"
class CicoHSBackWindow :public CicoHSWindow
CicoHSBackWindow(const CicoHSBackWindow&);
};
#endif
-
+// vim: set expandtab ts=4 sw=4:
--- /dev/null
+/*
+ * Copyright (c) 2013, TOYOTA MOTOR CORPORATION.
+ *
+ * This program is licensed under the terms and conditions of the
+ * Apache License, version 2.0. The full text of the Apache License is at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ */
+
+/*========================================================================*/
+/**
+ * @file CicoHSCmdOpts.cpp
+ *
+ * @brief This file implementation of CicoHSCmdOpts class
+ */
+/*========================================================================*/
+
+#include <cstdio>
+#include <bundle.h>
+
+#include "ico_log.h"
+#include "ico_syc_public.h"
+#include "CicoHSCmdOpts.h"
+
+CicoHSCmdOpts* CicoHSCmdOpts::ms_myInstance = NULL;
+
+//--------------------------------------------------------------------------
+/**
+ * @brief default constructor
+ */
+//--------------------------------------------------------------------------
+CicoHSCmdOpts::CicoHSCmdOpts()
+ : m_loginUser(""), m_historyFilePath(""), m_defaultHistoryFilePath(""),
+ m_flagPath("")
+{
+}
+
+//--------------------------------------------------------------------------
+/**
+ * @brief destructor
+ */
+//--------------------------------------------------------------------------
+CicoHSCmdOpts::~CicoHSCmdOpts()
+{
+}
+
+//--------------------------------------------------------------------------
+/**
+ * @brief get this class instance
+ */
+//--------------------------------------------------------------------------
+CicoHSCmdOpts*
+CicoHSCmdOpts::getInstance(void)
+{
+ if (NULL == ms_myInstance) {
+ ms_myInstance = new CicoHSCmdOpts();
+ }
+
+ return ms_myInstance;
+}
+
+//--------------------------------------------------------------------------
+/**
+ * @brief parse command options
+ */
+//--------------------------------------------------------------------------
+void
+CicoHSCmdOpts::parse(int argc, char *argv[])
+{
+ ICO_TRA("CicoHSCmdOpts::parse Enter");
+ /* get LOGIN-USER parameter */
+ bundle *b = bundle_import_from_argv(argc, argv); // import from argc+argv
+ const char* valusr = bundle_get_val(b, ICO_SYC_APP_BUNDLE_KEY1);
+ const char* valpath = bundle_get_val(b, ICO_SYC_APP_BUNDLE_KEY2);
+ const char* valpathD = bundle_get_val(b, ICO_SYC_APP_BUNDLE_KEY3);
+ const char* valFlagPath = bundle_get_val(b, ICO_SYC_APP_BUNDLE_KEY4);
+ if ((NULL != valusr) && (0 != valusr)) {
+ m_loginUser = valusr;
+ }
+ else {
+ m_loginUser.clear();
+ }
+
+ if ((NULL != valpath) && (0 != valpath)) {
+ m_historyFilePath = valpath;
+ }
+ else {
+ m_historyFilePath.clear();
+ }
+
+ if ((NULL != valpathD) && (0 != valpathD)) {
+ m_defaultHistoryFilePath = valpathD;
+ }
+ else {
+ m_defaultHistoryFilePath.clear();
+ }
+ std::string flagPath;
+ if ((NULL != valFlagPath) && (0 != valFlagPath)) {
+ m_flagPath = valFlagPath;
+ }
+ else {
+ flagPath.clear();
+ }
+ ICO_DBG("PARAM=\"%s\", \"%s\", \"%s\", \"%s\"",
+ m_loginUser.c_str(), m_historyFilePath.c_str(),
+ m_defaultHistoryFilePath.c_str(), m_flagPath.c_str());
+ bundle_free(b);
+ valusr = valpath = valpathD = valFlagPath = NULL;
+ ICO_TRA("CicoHSCmdOpts::parse Leave");
+}
+
+//--------------------------------------------------------------------------
+/**
+ * @brief get login user name
+ *
+ * @return long user name
+ */
+//--------------------------------------------------------------------------
+const std::string &
+CicoHSCmdOpts::getLoginUser(void)
+{
+ return m_loginUser;
+}
+
+//--------------------------------------------------------------------------
+/**
+ * @brief get history file path
+ *
+ * @return history file path
+ */
+//--------------------------------------------------------------------------
+const std::string &
+CicoHSCmdOpts::getHistoryFilePath(void)
+{
+ return m_historyFilePath;
+}
+
+//--------------------------------------------------------------------------
+/**
+ * @brief get application default history file path
+ *
+ * @return default history file path
+ */
+//--------------------------------------------------------------------------
+const std::string &
+CicoHSCmdOpts::getDefaultHistoryFilePath(void)
+{
+ return m_defaultHistoryFilePath;
+}
+
+//--------------------------------------------------------------------------
+/**
+ * @brief get application history file flag
+ *
+ * @return application history file flag
+ */
+//--------------------------------------------------------------------------
+const std::string &
+CicoHSCmdOpts::getFlagPath(void)
+{
+ return m_flagPath;
+}
+// vim:set expandtab ts=4 sw=4:
--- /dev/null
+/*
+ * Copyright (c) 2013, TOYOTA MOTOR CORPORATION.
+ *
+ * This program is licensed under the terms and conditions of the
+ * Apache License, version 2.0. The full text of the Apache License is at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ */
+
+//==========================================================================
+/**
+ * @file CicoHSCmdOpts.h
+ *
+ * @brief This file is definition of CicoHSCmdOpts class
+ */
+//==========================================================================
+#ifndef __CICO_HS_CMD_OPTS_H__
+#define __CICO_HS_CMD_OPTS_H__
+
+#include <string>
+
+//==========================================================================
+/**
+ * @brief This class hold command options
+ */
+//==========================================================================
+class CicoHSCmdOpts
+{
+public:
+ // get this class instance
+ static CicoHSCmdOpts* getInstance(void);
+
+ // perse command options
+ void parse(int argc, char *argv[]);
+
+ // get login user name
+ const std::string & getLoginUser(void);
+
+ // get application history file path
+ const std::string & getHistoryFilePath(void);
+
+ /// get application default history file path
+ const std::string & getDefaultHistoryFilePath(void);
+
+ /// get application history file flag
+ const std::string & getFlagPath(void);
+
+private:
+ // default constructor
+ CicoHSCmdOpts();
+
+ // destructor
+ ~CicoHSCmdOpts();
+
+ /// assignment operator
+ CicoHSCmdOpts& operator=(const CicoHSCmdOpts &object);
+
+ /// copy constructor
+ CicoHSCmdOpts(const CicoHSCmdOpts &object);
+
+public:
+ /// this class instance
+ static CicoHSCmdOpts* ms_myInstance;
+
+ /// login user name
+ std::string m_loginUser;
+ /// application history file path
+ std::string m_historyFilePath;
+ /// application default history file path
+ std::string m_defaultHistoryFilePath;
+ /// application history file flag
+ std::string m_flagPath;
+};
+#endif // __CICO_HS_CMD_OPTS_H__
+// vim:set expandtab ts=4 sw=4:
--- /dev/null
+/*
+ * Copyright (c) 2013, TOYOTA MOTOR CORPORATION.
+ *
+ * This program is licensed under the terms and conditions of the
+ * Apache License, version 2.0. The full text of the Apache License is at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ */
+
+//==========================================================================
+/**
+ * @file CicoHSCommand.cpp
+ *
+ * @brief This file is implementation of CicoHSCommand class
+ */
+//==========================================================================
+
+#include <iostream>
+#include <sstream>
+#include <exception>
+#include <boost/property_tree/ptree.hpp>
+#include <boost/property_tree/json_parser.hpp>
+#include <boost/foreach.hpp>
+#include <boost/optional.hpp>
+using namespace std;
+using namespace boost;
+using namespace boost::property_tree;
+
+#include "CicoHSCommand.h"
+#include "CicoHSCommandArg.h"
+#include <ico_log.h>
+#include "ico_syc_error.h"
+#include "ico_syc_msg_cmd_def.h"
+
+//--------------------------------------------------------------------------
+/**
+ * @brief default constructor
+ */
+//--------------------------------------------------------------------------
+CicoHSCommand::CicoHSCommand()
+ : cmdid(0), appid(""), pid(-1), seq_no(-1), opt(NULL)
+{
+}
+
+//--------------------------------------------------------------------------
+/**
+ * @brief destructor
+ */
+//--------------------------------------------------------------------------
+CicoHSCommand::~CicoHSCommand()
+{
+ delete opt;
+}
+
+//--------------------------------------------------------------------------
+/**
+ * @brief parse from message, create command
+ *
+ * @param [in] message message of interprocess communication
+ *
+ * @note
+ * message format(json format)
+ * key name of "appid", "command", "pid" is common command propety.
+ * <pre>
+ * {
+ * "appid": (string) application id,
+ * "command": (int) command id,
+ * "pid": (int) process id
+ * ...
+ * }
+ * }
+ * </pre>
+ */
+//--------------------------------------------------------------------------
+int
+CicoHSCommand::parseMessage(const char *message)
+{
+// ICO_TRA("CicoHSCommand::parseMessage Enter(%s)", message);
+ try {
+ stringstream jsonString(message);
+ ptree root;
+ read_json(jsonString, root);
+
+ this->cmdid = getIntValue(root, MSG_PRMKEY_CMD);
+ this->appid = getStrValue(root, "source.appid");
+ this->pid = getIntValue(root, "source.pid");
+ this->seq_no = getIntValue(root, "source.seq_no");
+
+ switch (this->cmdid) {
+ case MSG_CMD_APP_START:
+ case MSG_CMD_APP_STOP:
+ case MSG_CMD_WIN_CHANGE:
+ parseAppCtlOpt(root);
+ break;
+ default:
+ break;
+ }
+
+ // dump log command variables
+ dump();
+ }
+ catch (std::exception const& e)
+ {
+ ICO_WRN("catch exception %s", e.what());
+// ICO_TRA("CicoHSCommand::parseMessage Leave(EINVAL)");
+ return ICO_SYC_EINVAL;
+ }
+
+// ICO_TRA("CicoHSCommand::parseMessage Leave(EOK)");
+ return ICO_SYC_EOK;
+}
+
+//--------------------------------------------------------------------------
+/**
+ * @brief dump log this class member variables
+ */
+//--------------------------------------------------------------------------
+void
+CicoHSCommand::dump(void)
+{
+ ICO_INF("Command: cmdid=0x%08X appid=%s pid=%d seq_no=%d", cmdid, appid.c_str(), pid, seq_no);
+
+ if (NULL != this->opt) {
+// this->opt->dump();
+ }
+}
+
+//--------------------------------------------------------------------------
+/**
+ * @brief get integer value by key
+ *
+ * @param [in] root root object of json object
+ * @param [in] key Key to get the value
+ *
+ * @return integer value on success, INT_MAX on error
+ */
+//--------------------------------------------------------------------------
+int
+CicoHSCommand::getIntValue(const ptree & root, const char* key)
+{
+ int intValue = -1;
+ try {
+ intValue = root.get<int>(key);
+ }
+ catch (std::exception const& e)
+ {
+ //ICO_WRN("catch exception %s", e.what());
+ return intValue;
+ }
+ return intValue;
+}
+
+//--------------------------------------------------------------------------
+/**
+ * @brief get string value by key
+ *
+ * @param [in] root root object of json object
+ * @param [in] key Key to get the value
+ *
+ * @return string value on success, empty string on error
+ */
+//--------------------------------------------------------------------------
+string
+CicoHSCommand::getStrValue(const ptree & root, const char* key)
+{
+ string strValue = "";
+ try {
+ strValue = root.get<string>(key);
+ }
+ catch (std::exception const& e)
+ {
+ //ICO_WRN("catch exception %s", e.what());
+ return strValue;
+ }
+
+ if (strValue == "null") {
+ strValue = "";
+ }
+
+ return strValue;
+}
+
+//--------------------------------------------------------------------------
+/**
+ * @brief query whether the object exists
+ *
+ * @param [in] root root object of json object
+ * @param [in] key Key to get the value
+ *
+ * @return true on exist, false on not exist
+ */
+//--------------------------------------------------------------------------
+bool
+CicoHSCommand::isExistObject(const ptree & root, const char *key)
+{
+ try {
+ (void)root.get_child(key);
+ }
+ catch (std::exception const& e)
+ {
+ //ICO_WRN("catch exception %s", e.what());
+ return false;
+ }
+
+ return true;
+}
+
+bool
+CicoHSCommand::getArgArray(const ptree& pt, std::vector<CicoHSCommandArg>& vArg)
+{
+
+ BOOST_FOREACH (const ptree::value_type& child, pt.get_child("arg")) {
+ bool chk = false;
+ const ptree& info = child.second;
+ string Pappid;
+ string Pzone;
+ const char* sAppid = NULL;
+ const char* sZone = NULL;
+ int iPid = 0;
+ int iVisible = 0;
+ try {
+ // arg.appid
+ if (boost::optional<std::string> appid = info.get_optional<std::string>("appid")) {
+ Pappid = appid.get();
+ sAppid = Pappid.c_str();
+ ICO_DBG("appid : %s ", sAppid);
+ chk = true;
+ }
+ // arg.pid
+ if (boost::optional<int> pid = info.get_optional<int>("pid")) {
+ iPid=pid.get();
+ ICO_DBG("pid : %d ", iPid);
+ chk = true;
+ }
+ // arg.zone
+ if (boost::optional<std::string> zone = info.get_optional<std::string>("zone")) {
+ Pzone = zone.get();
+ sZone = Pzone.c_str();
+ ICO_DBG("zone : %s ", sZone);
+ chk = true;
+ }
+ // arg.visible
+ if (boost::optional<int> vis = info.get_optional<int>("visible")) {
+ iVisible = vis.get();
+ ICO_DBG("visible : %d ", iVisible);
+ chk = true;
+ }
+ }
+ catch (std::exception const& e)
+ {
+ ICO_WRN("catch exception %s", e.what());
+ return false;
+ }
+
+ if (true == chk) {
+ vArg.push_back(CicoHSCommandArg(sAppid, sZone, iVisible, iPid));
+ }
+ }
+ if (0 == vArg.size()){
+ return false;
+ }
+ return true;
+}
+
+bool
+CicoHSCommand::getArg(const ptree& pt, std::vector<CicoHSCommandArg>& vArg)
+{
+ string Pappid;
+ string Pzone;
+ const char* sAppid = NULL;
+ const char* sZone = NULL;
+ int iPid = 0;
+ int iVisible = -1;
+
+ try {
+ // Data.str
+ if (boost::optional<std::string> str1 = pt.get_optional<std::string>("arg.appid")) {
+ Pappid = str1.get();
+ sAppid = Pappid.c_str();
+ ICO_DBG("appid : %s ", sAppid);
+ }
+ if (boost::optional<std::string> str2 = pt.get_optional<std::string>("arg.zone")) {
+ Pzone = str2.get();
+ sZone = Pzone.c_str();
+ ICO_DBG("zone : %s ", sZone);
+ }
+
+ if (boost::optional<int> pid = pt.get_optional<int>("arg.pid")) {
+ iPid = pid.get();
+ ICO_DBG("pid : %d ", iPid);
+ }
+ if (boost::optional<int> visible = pt.get_optional<int>("arg.visible")) {
+ iVisible = visible.get();
+ ICO_DBG("visible : %d ", iVisible);
+ }
+ }
+ catch (std::exception const& e)
+ {
+ ICO_WRN("catch exception %s", e.what());
+ return false;
+ }
+
+// if (((NULL != sAppid) || (0 != iPid)) && ((NULL != sZone) || (-1 != iVisible))) {
+ if (((NULL != sAppid) || (0 != iPid))) {
+ vArg.push_back(CicoHSCommandArg(sAppid, sZone, iVisible, iPid));
+ return true;
+ }
+ return false;
+}
+
+void
+CicoHSCommand::parseAppCtlOpt(const ptree & root)
+{
+ CicoHSCmdAppCtlOpt* options = new CicoHSCmdAppCtlOpt();
+ this->opt = options;
+
+ switch (this->cmdid) {
+ case MSG_CMD_APP_START:
+ case MSG_CMD_APP_STOP:
+ ICO_DBG("app_start stop : %d ", this->cmdid);
+ getArg(root, options->arg);
+ break;
+ case MSG_CMD_WIN_CHANGE:
+ ICO_DBG("win_chg : %d ", this->cmdid);
+ if (false == getArg(root, options->arg)) {
+ getArgArray(root, options->arg);
+ }
+ break;
+ default:
+ break;
+ }
+}
+
+// vim:set expandtab ts=4 sw=4:
--- /dev/null
+/*
+ * Copyright (c) 2013, TOYOTA MOTOR CORPORATION.
+ *
+ * This program is licensed under the terms and conditions of the
+ * Apache License, version 2.0. The full text of the Apache License is at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ */
+
+//==========================================================================
+/**
+ * @file CicoHSCommand.h
+ *
+ * @brief This file is definition of CicoHSCommand class
+ */
+//==========================================================================
+#ifndef __CICO_HS_COMMAND_H__
+#define __CICO_HS_COMMAND_H__
+
+#include <string>
+#include <vector>
+#include <boost/property_tree/ptree.hpp>
+
+#include "CicoHSCommandArg.h"
+#include <ico_log.h>
+
+//==========================================================================
+/**
+ * @brief command option variables
+ * This class is abstract class
+ */
+//==========================================================================
+class CicoHSCommandOption
+{
+public:
+ /// default constructor
+ CicoHSCommandOption() {}
+
+ /// destructor
+ virtual ~CicoHSCommandOption() {}
+
+ /// dump log this class member variables
+ virtual void dump(void) {}
+};
+
+class CicoHSCmdAppCtlOpt : public CicoHSCommandOption
+{
+public:
+ /// default constructor
+ CicoHSCmdAppCtlOpt() {}
+
+ /// destructor
+ virtual ~CicoHSCmdAppCtlOpt() {}
+
+#if 0
+ /// dump log this class member variables
+ void dump(void)
+ {
+ ICO_DBG("AppCtlOpt: "
+ "tgt_appid=%s tgt_pid=%d zone=%s visible=%d",
+ tgt_appid.c_str(), tgt_pid, zone.c_str(), visible);
+ }
+#endif
+
+ vector<CicoHSCommandArg> arg; //!< appid,pid,zone,visible
+};
+
+//==========================================================================
+/**
+ * @brief This class holds command information
+ */
+//==========================================================================
+class CicoHSCommand
+{
+public:
+ // default constructor
+ CicoHSCommand();
+
+ // destructor
+ ~CicoHSCommand();
+
+ // parse from message of process communication
+ int parseMessage(const char *cmdMessage);
+
+ // dump log this class member variables
+ void dump(void);
+
+ // get arg
+ bool getArg(const boost::property_tree:: ptree& pt, std::vector<CicoHSCommandArg>& vArg);
+
+ // get arg array
+ bool getArgArray(const boost::property_tree:: ptree& pt, std::vector<CicoHSCommandArg>& vArg);
+
+private:
+ // get integer value
+ int getIntValue(const boost::property_tree::ptree & root,
+ const char* key);
+
+ // get string value
+ std::string getStrValue(const boost::property_tree::ptree & root,
+ const char* key);
+
+ // check exist object
+ bool isExistObject(const boost::property_tree::ptree & root,
+ const char *key);
+
+ // parse application control options
+ void parseAppCtlOpt(const boost::property_tree::ptree & root);
+
+public:
+ unsigned long cmdid; //!< id of command
+ std::string appid; //!< id of application
+ int pid; //!< id of pid
+ int seq_no; //!< id of sequence number
+ CicoHSCommandOption *opt; //!< command option instance
+};
+#endif // __CICO_HS_COMMAND_H__
+// vim:set expandtab ts=4 sw=4:
--- /dev/null
+/*
+ * Copyright (c) 2013, TOYOTA MOTOR CORPORATION.
+ *
+ * This program is licensed under the terms and conditions of the
+ * Apache License, version 2.0. The full text of the Apache License is at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ */
+
+//==========================================================================
+/**
+ * @file CicoHSCommandArg.cpp
+ *
+ * @brief This file is implementation of CicoHSCommandArg class
+ */
+//==========================================================================
+
+#include <iostream>
+#include <string>
+#include <vector>
+#include <sstream>
+#include <exception>
+#include <boost/property_tree/ptree.hpp>
+#include <boost/property_tree/json_parser.hpp>
+#include <boost/foreach.hpp>
+#include <boost/optional.hpp>
+using namespace std;
+using namespace boost;
+using namespace boost::property_tree;
+
+#include "CicoHSCommandArg.h"
+#include <ico_log.h>
+#include "ico_syc_error.h"
+#include "ico_syc_msg_cmd_def.h"
+
+//--------------------------------------------------------------------------
+/**
+ * @brief default constructor
+ */
+//--------------------------------------------------------------------------
+CicoHSCommandArg::CicoHSCommandArg()
+{
+ m_appid = "";
+ m_zone = "";
+ m_visible = 0;
+ m_pid = 0;
+}
+
+//--------------------------------------------------------------------------
+/**
+ * @brief default constructor
+ */
+//--------------------------------------------------------------------------
+CicoHSCommandArg::CicoHSCommandArg(const CicoHSCommandArg& src)
+{
+ m_appid = src.m_appid;
+ m_zone = src.m_zone;
+ m_visible = src.m_visible;
+ m_pid = src.m_pid;
+}
+
+//--------------------------------------------------------------------------
+/**
+ * @brief default constructor
+ */
+//--------------------------------------------------------------------------
+CicoHSCommandArg::CicoHSCommandArg(const char* appid,
+ const char* zone,
+ int visible,
+ int pid)
+{
+ if ((NULL != appid) &&(0 != strlen(appid))) {
+ m_appid = appid;
+ }
+ if ((NULL != zone) &&(0 != strlen(zone))) {
+ m_zone = zone;
+ }
+ m_visible = visible;
+ m_pid = pid;
+}
+
+//--------------------------------------------------------------------------
+/**
+ * @brief destructor
+ */
+//--------------------------------------------------------------------------
+CicoHSCommandArg::~CicoHSCommandArg()
+{
+}
+// vim:set expandtab ts=4 sw=4:
--- /dev/null
+/*
+ * Copyright (c) 2013, TOYOTA MOTOR CORPORATION.
+ *
+ * This program is licensed under the terms and conditions of the
+ * Apache License, version 2.0. The full text of the Apache License is at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ */
+
+//==========================================================================
+/**
+ * @file CicoHSCommandArg.h
+ *
+ * @brief This file is definition of CicoHSCommandArg class
+ */
+//==========================================================================
+#ifndef __CICO_HS_COMMAND_ARG_H__
+#define __CICO_HS_COMMAND_ARG_H__
+
+#include <string>
+#include <vector>
+#include <boost/property_tree/ptree.hpp>
+
+#include <ico_log.h>
+
+//==========================================================================
+/**
+ * @brief This class holds command information
+ */
+//==========================================================================
+class CicoHSCommandArg {
+public:
+ // default constructor
+ CicoHSCommandArg();
+
+ CicoHSCommandArg(const CicoHSCommandArg& src);
+
+ CicoHSCommandArg(const char* appid,
+ const char* zone,
+ int visible,
+ int pid=0);
+ // destructor
+ ~CicoHSCommandArg();
+
+public:
+ std::string m_appid;
+ std::string m_zone;
+ int m_visible;
+ int m_pid;
+};
+#endif // __CICO_HS_COMMAND_ARG_H__
+// vim:set expandtab ts=4 sw=4:
/* static members */
/*============================================================================*/
CicoHSControlBarWindow* CicoHSControlBarTouch::ctl_bar_window;
+bool CicoHSControlBarTouch::touch_down;
/*============================================================================*/
/* functions */
CicoHSControlBarTouch::Initialize(CicoHSControlBarWindow* ctl_bar_window)
{
CicoHSControlBarTouch::ctl_bar_window = ctl_bar_window;
+ touch_down = false;
}
/*--------------------------------------------------------------------------*/
CicoHSControlBarTouch::TouchDownControlBar(void *data, Evas *evas,
Evas_Object *obj, void *event_info)
{
+ touch_down = true;
}
/*--------------------------------------------------------------------------*/
CicoHSControlBarTouch::TouchUpControlBar(void *data, Evas *evas,
Evas_Object *obj, void *event_info)
{
-// Evas_Event_Mouse_Up *info;
-// int sub = 0;
- ICO_DBG("CicoHSControlBarTouch::TouchUpControlBar start");
- if(data == NULL) {
+ ICO_DBG("CicoHSControlBarTouch::TouchUpControlBar Enter(down=%d)",
+ (int)touch_down);
+
+ if (touch_down == false) {
+ // multi touch up, skiep
+ ICO_DBG("CicoHSControlBarTouch::TouchUpControlBar not down, Skip");
+ }
+ touch_down = false;
+
+ if (data == NULL) {
+ ICO_PRF("TOUCH_EVENT Ctrl-Bar Down->Up app=(NIL)");
ctl_bar_window->TouchHome();
}
else {
- ICO_DBG("CicoHSControlBarTouch::TouchUpControlBar appid = [%s]",
- (const char *)data);
- ctl_bar_window->TouchShortcut((const char *)data);
+ ICO_PRF("TOUCH_EVENT Ctrl-Bar Down->Up app=%s", (const char *)data);
+ ctl_bar_window->TouchShortcut((const char *)data);
}
- ICO_DBG("CicoHSControlBarTouch::TouchUpControlBar end");
+ ICO_DBG("CicoHSControlBarTouch::TouchUpControlBar Leave");
}
+// vim: set expandtab ts=4 sw=4:
public:
static void Initialize(CicoHSControlBarWindow* ctl_bar_window);
static void Finalize(void);
- static void TouchDownControlBar(void *data, Evas *evas, Evas_Object *obj, void *event_info);
- static void TouchUpControlBar(void *data, Evas *evas, Evas_Object *obj, void *event_info);
+ static void TouchDownControlBar(void *data, Evas *evas, Evas_Object *obj, void *event_info);
+ static void TouchUpControlBar(void *data, Evas *evas, Evas_Object *obj, void *event_info);
private:
static CicoHSControlBarWindow* ctl_bar_window;
+ static bool touch_down;
+
protected:
CicoHSControlBarTouch operator=(const CicoHSControlBarTouch&);
CicoHSControlBarTouch(const CicoHSControlBarTouch&);
};
-
#endif
-
+// vim: set expandtab ts=4 sw=4:
*/
#include "CicoHSControlBarWindow.h"
#include "CicoHSControlBarTouch.h"
-#include "CicoHomeScreenConfig.h"
-#include "CicoHomeScreenResourceConfig.h"
+#include "CicoGKeyFileConfig.h"
+#include "CicoResourceConfig.h"
#include "CicoHomeScreen.h"
#include "CicoHSSystemState.h"
#include "CicoSound.h"
{
evas = NULL;
- CicoHomeScreenResourceConfig::GetImagePath(img_dir_path,
- ICO_HS_MAX_PATH_BUFF_LEN);
+ CicoResourceConfig::GetImagePath(img_dir_path, ICO_HS_MAX_PATH_BUFF_LEN);
- CicoHomeScreenConfig config;
+ CicoGKeyFileConfig config;
config.Initialize(ICO_HOMESCREEN_CONFIG_FILE);
const char *value = config.ConfigGetString("switchzone", "keyname", "m");
if (strlen(value) > (sizeof(changeZoneKeyName) - 1)) {
void
CicoHSControlBarWindow::AddShortcut(Evas *evas, int width)
{
- ICO_DBG("CicoHSControlBarWindow::AddShortcut Enter");
+ ICO_TRA("CicoHSControlBarWindow::AddShortcut Enter");
int escPosX;
int x;
int tmp_space;
int s_cnt = 0;
const char *tmp_appid;
- CicoSCLifeCycleController *life_cycle_controller;
+ CicoHSLifeCycleController *life_cycle_controller;
/* menu button x position */
escPosX = (width / 2) - (ICO_HS_CONTROL_BAR_MENU_BTN_WIDTH / 2);
- life_cycle_controller = CicoSCLifeCycleController::getInstance();
+ life_cycle_controller = CicoHSLifeCycleController::getInstance();
tmp_space = (width - (ICO_HS_CONTROL_BAR_MENU_BTN_WIDTH
* ICO_HS_CONTROL_BAR_BTN_MAX_NUM))
}
/* get APP information */
- std::vector<CicoSCAilItems> aillist =
+ std::vector<CicoAilItems> aillist =
life_cycle_controller->getAilList();
/* add shortcut object */
s_cnt++;
}
- ICO_DBG("CicoHSControlBarWindow::AddShortcut Leave");
+ ICO_TRA("CicoHSControlBarWindow::AddShortcut Leave");
return;
}
void
CicoHSControlBarWindow::SetNightMode(void)
{
- ICO_DBG("CicoHSControlBarWindow::SetNightMode Enter");
+ ICO_TRA("CicoHSControlBarWindow::SetNightMode Enter");
bool state = CicoHSSystemState::getInstance()->getNightMode();
evas_object_image_file_set(menu_btn, img_path, NULL);
}
- ICO_DBG("CicoHSControlBarWindow::SetNightMode Leave");
+ ICO_TRA("CicoHSControlBarWindow::SetNightMode Leave");
}
/*--------------------------------------------------------------------------*/
void
CicoHSControlBarWindow::SetRegulation(void)
{
- ICO_DBG("CicoHSControlBarWindow::SetRegulation Enter");
+ ICO_TRA("CicoHSControlBarWindow::SetRegulation Enter");
char img_path[ICO_HS_MAX_PATH_BUFF_LEN];
if (true == CicoHSSystemState::getInstance()->getNightMode()) {
}
evas_object_image_file_set(menu_btn, img_path, NULL);
- ICO_DBG("CicoHSControlBarWindow::SetRegulation Leave");
+ ICO_TRA("CicoHSControlBarWindow::SetRegulation Leave");
}
/*--------------------------------------------------------------------------*/
void
CicoHSControlBarWindow::TouchShortcut(const char *appid)
{
- ICO_DBG("CicoHSControlBarWindow::TouchShortcut Enter");
+ ICO_TRA("CicoHSControlBarWindow::TouchShortcut Enter");
ActivationUpdate();
CicoSound::GetInstance()->PlayOperationSound();
CicoHomeScreen::ExecuteApp(appid);
}
- ICO_DBG("CicoHSControlBarWindow::TouchShortcut Leave");
+ ICO_TRA("CicoHSControlBarWindow::TouchShortcut Leave");
}
//--------------------------------------------------------------------------
CicoSound::GetInstance()->PlayOperationSound();
- ICO_DBG("onKeyDown: keyname=%s, key=%d",
+ ICO_PRF("TOUCH_EVENT Key Down keyname=%s, key=%d",
evinfo->keyname, (char)*evinfo->key);
if (0 == strcmp(evinfo->keyname, changeZoneKeyName)) {
{
return CicoHomeScreen::ActivationUpdate();
}
-
// vim: set expandtab ts=4 sw=4:
#include <Edje.h>
#include "CicoHomeScreenCommon.h"
-#include "CicoHomeScreenConfig.h"
+#include "CicoGKeyFileConfig.h"
#include "CicoHSWindow.h"
-#define ICO_HS_CONTROL_BAR_MENU_BTN_START_POS_Y 10
-#define ICO_HS_CONTROL_BAR_MENU_BTN_WIDTH 108
-#define ICO_HS_CONTROL_BAR_MENU_BTN_HEIGHT 108
+#define ICO_HS_CONTROL_BAR_MENU_BTN_START_POS_Y 14
+#define ICO_HS_CONTROL_BAR_MENU_BTN_WIDTH 100
+#define ICO_HS_CONTROL_BAR_MENU_BTN_HEIGHT 100
-#define ICO_HS_CONTROL_BAR_SHORTCUT_BTN_START_POS_Y 10
-#define ICO_HS_CONTROL_BAR_SHORTCUT_BTN_WIDTH 108
-#define ICO_HS_CONTROL_BAR_SHORTCUT_BTN_HEIGHT 108
+#define ICO_HS_CONTROL_BAR_SHORTCUT_BTN_START_POS_Y 14
+#define ICO_HS_CONTROL_BAR_SHORTCUT_BTN_WIDTH 100
+#define ICO_HS_CONTROL_BAR_SHORTCUT_BTN_HEIGHT 100
#define ICO_HS_CONTROL_BAR_SHORTCUT_MAX_NUM 4
#define ICO_HS_CONTROL_BAR_BTN_MAX_NUM (ICO_HS_CONTROL_BAR_SHORTCUT_MAX_NUM + 1)
void Finalize(void);
int CreateControlBarWindow(int pos_x,int pos_y,int width,int height);
void FreeControlBarWindow(void);
-
+
void TouchHome(void);
void SetWindowID(const char *appid,int surface);
--- /dev/null
+/*
+ * Copyright (c) 2013, TOYOTA MOTOR CORPORATION.
+ *
+ * This program is licensed under the terms and conditions of the
+ * Apache License, version 2.0. The full text of the Apache License is at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ */
+
+//==========================================================================
+/**
+ * @file CicoHSEFLApp.cpp
+ *
+ * @brief This file is implimention of CicoHSEFLApp class
+ */
+//==========================================================================
+
+#include <exception>
+#include <iostream>
+#include <string>
+
+#include "CicoHSEFLApp.h"
+#include "CicoHomeScreen.h"
+#include "CicoHSWindow.h"
+#include "ico_log.h"
+
+//--------------------------------------------------------------------------
+/**
+ * @brief default constructor
+ */
+//--------------------------------------------------------------------------
+CicoHSEFLApp::CicoHSEFLApp()
+{
+// ICO_TRA("CicoHSEFLApp::CicoHSEFLApp Enter");
+// ICO_TRA("CicoHSEFLApp::CicoHSEFLApp Leave");
+}
+
+//--------------------------------------------------------------------------
+/**
+ * @brief destructor
+ */
+//--------------------------------------------------------------------------
+CicoHSEFLApp::~CicoHSEFLApp()
+{
+// ICO_TRA("CicoHSEFLApp::~CicoHSEFLApp Enter");
+// ICO_TRA("CicoHSEFLApp::~CicoHSEFLApp Leave");
+}
+
+//--------------------------------------------------------------------------
+/**
+ * @brief callback function on create
+ *
+ * @param [in] user_data The user data passed from the callback
+ * registration function
+ *
+ * @return true on success, false on error
+ */
+//--------------------------------------------------------------------------
+bool
+CicoHSEFLApp::onCreate(void *user_data)
+{
+ ICO_TRA("CicoHSEFLApp::onCreate Enter");
+
+ try {
+ // load system config
+ CicoSystemConfig::getInstance()->load(
+ ICO_HS_LIFECYCLE_CONTROLLER_SETTING_PATH);
+
+ // start homescreen
+ m_homescreen = new CicoHomeScreen();
+ int ret = m_homescreen->StartHomeScreen(ICO_ORIENTATION_VERTICAL);
+ if(ret != ICO_OK){
+ ICO_TRA("CicoHSEFLApp::onCreate Leave(false)");
+ return false;
+ }
+ }
+ catch (const std::exception& e) {
+ std::cerr << e.what() << std::endl;
+ ICO_ERR("catch exception %s", e.what());
+ ICO_TRA("CicoHSEFLApp::onCreate Leave(false)");
+ return false;
+ }
+ catch (const std::string& str) {
+ std::cerr << str << std::endl;
+ ICO_ERR("catch exception %s", str.c_str());
+ ICO_TRA("CicoHSEFLApp::onCreate Leave(false)");
+ return false;
+ }
+ catch (...) {
+ ICO_ERR("catch exception unknown");
+ ICO_TRA("CicoHSEFLApp::onCreate Leave(false)");
+ return false;
+ }
+
+ ICO_TRA("CicoHSEFLApp::onCreate Leave(true)");
+ return true;
+}
+
+//--------------------------------------------------------------------------
+/**
+ * @brief callback function on terminate
+ *
+ * @param [in] user_data The user data passed from the callback
+ * registration function
+ */
+//--------------------------------------------------------------------------
+void
+CicoHSEFLApp::onTerminate(void *user_data)
+{
+ ICO_TRA("CicoHSEFLApp::onTerminate Enter");
+
+ m_homescreen->Finalize();
+ delete m_homescreen;
+
+ ICO_TRA("CicoHSEFLApp::onTerminate Leave");
+}
+
+//--------------------------------------------------------------------------
+/**
+ * @brief callback function on pause
+ *
+ * @param [in] user_data The user data passed from the callback
+ * registration function
+ */
+//--------------------------------------------------------------------------
+void
+CicoHSEFLApp::onPause(void *user_data)
+{
+ ICO_TRA("CicoHSEFLApp::onPause Enter");
+ ICO_TRA("CicoHSEFLApp::onPause Leave");
+}
+
+//--------------------------------------------------------------------------
+/**
+ * @brief callback function on resume
+ *
+ * @param [in] user_data The user data passed from the callback
+ * registration function
+ */
+//--------------------------------------------------------------------------
+void
+CicoHSEFLApp::onResume(void *user_data)
+{
+ ICO_TRA("CicoHSEFLApp::onResume Enter");
+ ICO_TRA("CicoHSEFLApp::onResume Leave");
+}
+
+//--------------------------------------------------------------------------
+/**
+ * @brief callback function on service
+ *
+ * @param [in] service The handle to the service
+ * @param [in] user_data The user data passed from the callback
+ * registration function
+ */
+//--------------------------------------------------------------------------
+void
+CicoHSEFLApp::onService(service_h service, void *user_data)
+{
+ ICO_TRA("CicoHSEFLApp::onService Enter");
+ ICO_TRA("CicoHSEFLApp::onService Leave");
+}
+// vim: set expandtab ts=4 sw=4:
--- /dev/null
+/*
+ * Copyright (c) 2013, TOYOTA MOTOR CORPORATION.
+ *
+ * This program is licensed under the terms and conditions of the
+ * Apache License, version 2.0. The full text of the Apache License is at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ */
+
+//==========================================================================
+/**
+ * @file CicoHSEFLApp.h
+ *
+ * @brief This file is definition of CicoHSEFLApp class
+ */
+//==========================================================================
+#ifndef __CICO_HS_EFL_APP_H__
+#define __CICO_HS_EFL_APP_H__
+
+#include "CicoEFLApp.h"
+
+//==========================================================================
+// Forward declaration
+//==========================================================================
+class CicoHomeScreen;
+
+//==========================================================================
+/**
+ * @brief ELF Application functions for HomeScreen
+ */
+//==========================================================================
+class CicoHSEFLApp : public CicoEFLApp {
+public:
+ // default constructor
+ CicoHSEFLApp();
+
+ // destructor
+ virtual ~CicoHSEFLApp();
+
+ // callback function on create
+ virtual bool onCreate(void *user_data);
+
+ // callback function on terminate
+ virtual void onTerminate(void *user_data);
+
+ // callback function on pause
+ virtual void onPause(void *user_data);
+
+ // callback function on resume
+ virtual void onResume(void *user_data);
+
+ // callback function on service
+ virtual void onService(service_h service, void *user_data);
+
+protected:
+ // assignment operator
+ CicoHSEFLApp& operator=(const CicoHSEFLApp &object);
+
+ // copy constructor
+ CicoHSEFLApp(const CicoHSEFLApp &object);
+
+private:
+ // CicoHomeScreen instance
+ CicoHomeScreen* m_homescreen;
+};
+#endif // __CICO_HS_EFL_APP_H__
+// vim:set expandtab ts=4 sw=4:
#include <sys/stat.h>
#include "ico_syc_error.h"
-#include "CicoLog.h"
-#include "CicoSCAulItems.h"
-#include "CicoSCAilItems.h"
-#include "CicoSCLifeCycleController.h"
-#include "CicoSCConf.h"
-#include "CicoSCSystemConfig.h"
+#include <ico_log.h>
+#include "CicoAulItems.h"
+#include "CicoAilItems.h"
+#include "CicoHSLifeCycleController.h"
+#include "CicoConf.h"
+#include "CicoSystemConfig.h"
#include "Cico_aul_listen_app.h"
using namespace std;
#define ICO_SYC_ENOSYS -38 /* System error */
-CicoSCLifeCycleController* CicoSCLifeCycleController::ms_myInstance = NULL;
+CicoHSLifeCycleController* CicoHSLifeCycleController::ms_myInstance = NULL;
const char* DAilTypeFilPrm_Menu="menu";
const char* DAilTypeFilPrm_App="Application";
const char *pkg_name, const char *key,
const char *val, const void *pmsg, void *data)
{
- CicoSCLifeCycleController* x = (CicoSCLifeCycleController*)data;
+ CicoHSLifeCycleController* x = (CicoHSLifeCycleController*)data;
return
CSCLCCpkgmgr_handlerX(req_id, pkg_type, pkg_name, key, val, pmsg, x);
}
static ail_cb_ret_e CSCLCCail_list_appinfo_cb(const ail_appinfo_h appinfo,
void *data)
{
- CicoSCLifeCycleController* x = (CicoSCLifeCycleController*)data;
+ CicoHSLifeCycleController* x = (CicoHSLifeCycleController*)data;
return CSCLCCail_list_appinfo_cbX(appinfo, x);
}
*/
static int CSCLCCapp_launch_handler(int pid, void *data)
{
- CicoSCLifeCycleController* x = (CicoSCLifeCycleController*)data;
+ CicoHSLifeCycleController* x = (CicoHSLifeCycleController*)data;
return CSCLCCapp_launch_handlerX(pid, x);
}
*/
static int CSCLCCapp_dead_handler(int pid, void *data)
{
- CicoSCLifeCycleController* x = (CicoSCLifeCycleController*)data;
+ CicoHSLifeCycleController* x = (CicoHSLifeCycleController*)data;
return CSCLCCapp_dead_handlerX(pid, x);
}
/**
* @brief contractor
*/
-CicoSCLifeCycleController::CicoSCLifeCycleController()
+CicoHSLifeCycleController::CicoHSLifeCycleController()
{
m_gconf = (GKeyFile*)NULL;
m_pc = (pkgmgr_client*)NULL;
/**
* @brief destructor
*/
-CicoSCLifeCycleController::~CicoSCLifeCycleController()
+CicoHSLifeCycleController::~CicoHSLifeCycleController()
{
}
-CicoSCLifeCycleController*
-CicoSCLifeCycleController::getInstance(void)
+CicoHSLifeCycleController*
+CicoHSLifeCycleController::getInstance(void)
{
if (NULL == ms_myInstance) {
- ms_myInstance = new CicoSCLifeCycleController();
+ ms_myInstance = new CicoHSLifeCycleController();
}
return ms_myInstance;
}
* @retval ICO_SYC_EBUSY error(already launch)
* @retval ICO_SYC_EPERM error(no authority)
*/
-int CicoSCLifeCycleController::launch(const char* appid)
+int CicoHSLifeCycleController::launch(const char* appid)
{
ICO_TRA("start %s", appid);
// appid check AIL table exist
if (NULL == findAIL(appid)) {
- ICO_TRA("not find");
+ ICO_TRA("end fail(not find)");
return ICO_SYC_ENOSYS;
}
+ ICO_PRF("CHG_APP_STA 2.request app=%s", appid);
int r = aul_launch_app(appid, NULL);
if (0 > r) {
- ICO_TRA("aul_launch_app NG %d", r);
+ ICO_TRA("end fail(%d)", r);
return ICO_SYC_ENOSYS;
}
- ICO_TRA("launch success");
+ ICO_TRA("end success(%d)", r);
return ICO_SYC_EOK;
}
* @retval ICO_SYC_EBUSY error(already launch)
* @retval ICO_SYC_EPERM error(no authority)
*/
-int CicoSCLifeCycleController::launch(const std::string& appid)
+int CicoHSLifeCycleController::launch(const std::string& appid)
{
return launch((const char*)appid.c_str());
}
* @retval ICO_SYC_EBUSY error(already launch)
* @retval ICO_SYC_EPERM error(no authority)
*/
-int CicoSCLifeCycleController::terminate(const char* appid)
+int CicoHSLifeCycleController::terminate(const char* appid)
{
- ICO_TRA("CicoSCLifeCycleController::terminate %s", appid);
+ ICO_TRA("CicoHSLifeCycleController::terminate %s", appid);
int r = ICO_SYC_EOK;
vector<int> pids;
if (true == getPIDs(appid, pids)) {
* @retval ICO_SYC_EBUSY error(already launch)
* @retval ICO_SYC_EPERM error(no authority)
*/
-int CicoSCLifeCycleController::terminate(const std::string& appid)
+int CicoHSLifeCycleController::terminate(const std::string& appid)
{
return terminate((const char*)appid.c_str());
}
* @retval ICO_SYC_EBUSY error(already launch)
* @retval ICO_SYC_EPERM error(no authority)
*/
-int CicoSCLifeCycleController::terminate(int pid)
+int CicoHSLifeCycleController::terminate(int pid)
{
- ICO_TRA("CicoSCLifeCycleController::terminate %d", pid);
- const CicoSCAulItems* t = findAUL(pid);
+ ICO_TRA("CicoHSLifeCycleController::terminate %d", pid);
+ const CicoAulItems* t = findAUL(pid);
if ((NULL == t) || (0 == t)) {
ICO_TRA("not find");
return ICO_SYC_EPERM;
* @retval ICO_SYC_EOK success
* @retval ICO_SYC_ENOSYS error
*/
-int CicoSCLifeCycleController::terminateR(int pid)
+int CicoHSLifeCycleController::terminateR(int pid)
{
- ICO_TRA("CicoSCLifeCycleController::terminateR %d", pid);
+ ICO_TRA("CicoHSLifeCycleController::terminateR %d", pid);
int r = aul_terminate_pid(pid);
if (r < 0) {
ICO_DBG("terminate error pid:%d, r:%d", pid, r);
* @retval ICO_SYC_EBUSY error(already launch)
* @retval ICO_SYC_EPERM error(no authority)
*/
-int CicoSCLifeCycleController::suspend(const char* appid)
+int CicoHSLifeCycleController::suspend(const char* appid)
{
int r = ICO_SYC_EOK;
vector<int> pids;
* @retval ICO_SYC_EBUSY error(already launch)
* @retval ICO_SYC_EPERM error(no authority)
*/
-int CicoSCLifeCycleController::suspend(const std::string& appid)
+int CicoHSLifeCycleController::suspend(const std::string& appid)
{
return suspend((const char*)appid.c_str());
}
* @retval ICO_SYC_EBUSY error(already launch)
* @retval ICO_SYC_EPERM error(no authority)
*/
-int CicoSCLifeCycleController::suspend(int pid)
+int CicoHSLifeCycleController::suspend(int pid)
{
// TODO mk_k
// TODO mk_k
* @retval true is running
* @retval false not running
*/
-bool CicoSCLifeCycleController::isRunning(const char* appid)
+bool CicoHSLifeCycleController::isRunning(const char* appid)
{
bool r = false;
#if 0 // TODO mk_k
- vector<CicoSCAulItems>::iterator it = m_aul.begin();
+ vector<CicoAulItems>::iterator it = m_aul.begin();
while (it != m_aul.end()) {
it->update_appid();
ICO_DBG("%s == %s", it->m_appid.c_str(), appid);
}
}
#endif
- ICO_TRA("CicoSCLifeCycleController::isRunning %s=%s", appid, r ? "true" : "false");
+ ICO_TRA("CicoHSLifeCycleController::isRunning %s=%s", appid, r ? "true" : "false");
return r;
}
* @retval true is running
* @retval false not running
*/
-bool CicoSCLifeCycleController::isRunning(const std::string& appid)
+bool CicoHSLifeCycleController::isRunning(const std::string& appid)
{
return isRunning((const char*)appid.c_str());
}
/**
* @brief find ail data
* @param appid find key
- * @return CicoSCAilItems class pointer
+ * @return CicoAilItems class pointer
* @retval NULL is not find
*/
-const CicoSCAilItems* CicoSCLifeCycleController::findAIL(const char* appid) const
+const CicoAilItems* CicoHSLifeCycleController::findAIL(const char* appid) const
{
ICO_TRA("start");
- const CicoSCAilItems* r = NULL;
+ const CicoAilItems* r = NULL;
int sz = m_ail.size();
for (int i = 0; i < sz; i++) {
if (0 == strcasecmp(m_ail[i].m_appid.c_str(), appid)) {
/**
* @brief find ail data
* @param appid find key
- * @return CicoSCAilItems class pointer
+ * @return CicoAilItems class pointer
* @retval NULL is not find
*/
-const CicoSCAilItems* CicoSCLifeCycleController::findAIL(const std::string& appid) const
+const CicoAilItems* CicoHSLifeCycleController::findAIL(const std::string& appid) const
{
ICO_TRA("call findAIL(const chr*)");
return findAIL((const char*)appid.c_str());
* @param appid target application appid
* @return pid
*/
-bool CicoSCLifeCycleController::getPIDs(const char* appid, std::vector<int>& pids) const
+bool CicoHSLifeCycleController::getPIDs(const char* appid, std::vector<int>& pids) const
{
ICO_TRA("start %s", appid);
bool r = false;
#if 0 // TODO mk_k
- vector<CicoSCAulItems>::iterator it;
+ vector<CicoAulItems>::iterator it;
for (it = m_aul.begin(); it != m_aul.end(); ++it) {
it->update_appid();
if (0 == strcasecmp(it->m_appid.c_str(), appid)) {
#else
int sz = m_aul.size();
for (int i = 0; i < sz; i++) {
- CicoSCAulItems* t = (CicoSCAulItems*)m_aul[i].p();
+ CicoAulItems* t = (CicoAulItems*)m_aul[i].p();
t->update_appid();
if (0 == strcasecmp(t->m_appid.c_str(), appid)) {
pids.push_back(t->m_pid);
* @param appid target application appid
* @return pid
*/
-bool CicoSCLifeCycleController::getPIDs(std::string& appid, std::vector<int>& pids) const
+bool CicoHSLifeCycleController::getPIDs(std::string& appid, std::vector<int>& pids) const
{
return getPIDs((const char*)appid.c_str(), pids);
}
* @param appid target application appid
* @return pid
*/
-const CicoSCAulItems* CicoSCLifeCycleController::findAUL(int pid)
+const CicoAulItems* CicoHSLifeCycleController::findAUL(int pid)
{
ICO_TRA("start %d", pid);
- const CicoSCAulItems* r = NULL;
+ const CicoAulItems* r = NULL;
int sz = m_aul.size();
for (int i = 0; i < sz; i++) {
- CicoSCAulItems* t = (CicoSCAulItems*)m_aul[i].p();
+ CicoAulItems* t = (CicoAulItems*)m_aul[i].p();
if (t->m_pid == pid) {
t->update_appid();
r = t;
/**
* @brief ail information data initialization
*/
-void CicoSCLifeCycleController::initAIL()
+void CicoHSLifeCycleController::initAIL()
{
ICO_TRA("start %x", m_pc);
createAilItems();
*/
int CSCLCCpkgmgr_handlerX(int req_id, const char *pkg_type, const char *pkg_name,
const char *key, const char *val, const void *pmsg,
- CicoSCLifeCycleController* x)
+ CicoHSLifeCycleController* x)
{
// TODO mk_k
ICO_TRA("pkgmgr t:%s, n:%s, k:%s, v:%s, m:%s",pkg_type, pkg_name, key,
/**
* @brief AIL list renew
*/
-void CicoSCLifeCycleController::renewAIL()
+void CicoHSLifeCycleController::renewAIL()
{
- vector<CicoSCAilItems> old = m_ail;
+ vector<CicoAilItems> old = m_ail;
m_ail.clear();
int cnt =0;
while (false == createAilItems()) {
vector<string> add_appid;
vector<string> remove_appid;
- vector<CicoSCAulItems>::iterator it_n;
- vector<CicoSCAulItems>::iterator it_o;
+ vector<CicoAulItems>::iterator it_n;
+ vector<CicoAulItems>::iterator it_o;
for(it_n = m_aul.begin(); it_n != m_aul.end(); ++it_n) {
bool bingo = false;
for(it_o = old.begin(); it_o != old.end(); ++it_o) {
/**
* @brief ail_filter_list_appinfo_foreach callback function
* @param appinfo appinfo_h the appinfo's handle
- * @param x CicoSCLifeCycleController class pointer
+ * @param x CicoHSLifeCycleController class pointer
* @retval AIL_CB_RET_CONTINUE return if you continue iteration
* @retval AIL_CB_RET_CANCEL return if you cancel iteration
*
*/
ail_cb_ret_e CSCLCCail_list_appinfo_cbX(const ail_appinfo_h appinfo,
- CicoSCLifeCycleController* x)
+ CicoHSLifeCycleController* x)
{
ICO_TRA("start");
if ((NULL == x) || (0 == x)) {
* @retval true success
* @retval false fail create
*/
-bool CicoSCLifeCycleController::createAilItems()
+bool CicoHSLifeCycleController::createAilItems()
{
ICO_TRA("start");
m_ail.clear(); // clear items
if (NULL == m_gconf) {
m_gconf = g_key_file_new();
GString* gsfp = g_string_new("xx");
- CicoSCSystemConfig* CSCSC = CicoSCSystemConfig::getInstance();
+ CicoSystemConfig* CSCSC = CicoSystemConfig::getInstance();
g_string_printf(gsfp, "%s/%s", CSCSC->getDefaultConf()->confdir.c_str(),
ICO_SYC_CONFIG_APPATTR);
GError *gerr = NULL;
* @retval true success added item
* @retval false fail added item
*/
-bool CicoSCLifeCycleController::addAIL(const char* sPkg, const char* sIco,
+bool CicoHSLifeCycleController::addAIL(const char* sPkg, const char* sIco,
const char* sNm, const char* sCtg,
const char* sTyp, const char* sExe,
bool bndsp)
{
string category;
getCategory(sPkg, sNm, sCtg, category);
- CicoSCAilItems CSCAI(sPkg, sIco, sNm, sCtg, sTyp, sExe, category, bndsp);
+ CicoAilItems CSCAI(sPkg, sIco, sNm, sCtg, sTyp, sExe, category, bndsp);
m_ail.push_back(CSCAI);
return true;
}
* @param sCtg ail categories (get key)
* @param category read config file category string define
*/
-void CicoSCLifeCycleController::getCategory(const char* sPkg, const char* sNm,
+void CicoHSLifeCycleController::getCategory(const char* sPkg, const char* sNm,
const char* sCtg,
std::string& category)
{
/**
* @brief aul information data initialization
*/
-void CicoSCLifeCycleController::initAUL()
+void CicoHSLifeCycleController::initAUL()
{
ICO_TRA("start");
aul_listen_app_launch_signal_add(CSCLCCapp_launch_handler, (void*)this);
/**
* @brief
*/
-void CicoSCLifeCycleController::enterAUL(const char* appid, int pid,
+void CicoHSLifeCycleController::enterAUL(const char* appid, int pid,
const CicoSCWindow* obj, int aulstt)
{
ICO_TRA("start");
bool bPushBack = true;
int sz = m_aul.size();
for (int i = 0; i < sz; i++) {
- CicoSCAulItems* t = (CicoSCAulItems*)m_aul[i].p();
+ CicoAulItems* t = (CicoAulItems*)m_aul[i].p();
if (t->m_pid == pid) {
bPushBack = false; // push_back flag off
if (NULL == obj) {
if (true == bPushBack) { // push back flag on?
// AUL list Unregistered
ICO_DBG("push_back(AUL(%s, %d, %d, %x))", appid, pid, aulstt, obj);
- m_aul.push_back(CicoSCAulItems(appid, pid, aulstt, obj));
+ int ctgry = DINITm_categoryID;
+ const CicoAilItems* ailObj = findAIL(appid);
+ if ((NULL != ailObj) && (0 != ailObj)) {
+ ctgry = ailObj->m_categoryID;
+ }
+ m_aul.push_back(CicoAulItems(appid, pid, ctgry, aulstt, obj));
}
ICO_TRA("end");
}
/**
* @brief
*/
-bool CicoSCLifeCycleController::removeAUL(int pid)
+bool CicoHSLifeCycleController::removeAUL(int pid)
{
ICO_TRA("start %d", pid);
bool r = false;
- vector<CicoSCAulItems>::iterator it;
+ vector<CicoAulItems>::iterator it;
for(it = m_aul.begin(); it != m_aul.end(); ++it) {
if (pid == it->m_pid) {
ICO_DBG("erase appid=%s", it->m_appid.c_str());
/**
* @brief
- * @param x CicoSCLifeCycleController class pointer
+ * @param x CicoHSLifeCycleController class pointer
*/
-int CSCLCCapp_launch_handlerX(int pid, CicoSCLifeCycleController* x)
+int CSCLCCapp_launch_handlerX(int pid, CicoHSLifeCycleController* x)
{
ICO_TRA("start %d, %x", pid, x);
if ((NULL == x) || (0 == x)) {
- ICO_TRA("end user data is NULL");
+ ICO_TRA("end fail(user data is NULL)");
return -1;
}
char appid[255];
memset(appid, 0, sizeof(appid));
int iR = Xaul_app_get_appid_bypid(pid, appid, sizeof(appid));
- ICO_DBG("%d=aul_app_get_appid_bypid %d , %s", iR, pid, appid);
+ ICO_PRF("CHG_APP_STA notice app=%s, pid=%d, rval=%d", appid, pid, iR);
x->enterAUL(appid, pid, NULL, iR);
- ICO_TRA("end %s %d", appid, pid);
+ ICO_TRA("end success(%d, %s)", pid, appid);
return 0;
}
* @brief applications die. callback function
* @param pid
* @param data user data
- * @param x CicoSCLifeCycleController class pointer
+ * @param x CicoHSLifeCycleController class pointer
*/
-int CSCLCCapp_dead_handlerX(int pid, CicoSCLifeCycleController* x)
+int CSCLCCapp_dead_handlerX(int pid, CicoHSLifeCycleController* x)
{
ICO_TRA("start");
if ((NULL == x) || (0 == x)) {
* @brief AUL information list
* @return AUL information item list Container
*/
-const vector<CicoSCAulItems>& CicoSCLifeCycleController::getAulList()
+const vector<CicoAulItems>& CicoHSLifeCycleController::getAulList()
{
int sz = m_aul.size();
for (int i = 0; i < sz; i++) {
- CicoSCAulItems* t = (CicoSCAulItems*)m_aul[i].p();
+ CicoAulItems* t = (CicoAulItems*)m_aul[i].p();
t->update_appid();
}
return m_aul;
}
-
+// vim: set expandtab ts=4 sw=4:
* http://www.apache.org/licenses/LICENSE-2.0
*
*/
-#ifndef CICOSCLIFECYCLECONTROLLER_H
-#define CICOSCLIFECYCLECONTROLLER_H
+#ifndef CICOHSLIFECYCLECONTROLLER_H
+#define CICOHSLIFECYCLECONTROLLER_H
#include <glib.h>
#include <vector>
#include <map>
#include <package-manager.h>
#include <aul/aul.h>
-#include "CicoSCAilItems.h"
-#include "CicoSCAulItems.h"
+#include "CicoAilItems.h"
+#include "CicoAulItems.h"
#ifndef __CICO_SC_WINDOW_H__
#endif
-class CicoSCLifeCycleController {
+class CicoHSLifeCycleController {
public:
- CicoSCLifeCycleController();
- ~CicoSCLifeCycleController();
+ CicoHSLifeCycleController();
+ ~CicoHSLifeCycleController();
- static CicoSCLifeCycleController* getInstance(void);
+ static CicoHSLifeCycleController* getInstance(void);
// Starting application
int launch(const char* appid);
bool isRunning(const char* appid);
bool isRunning(const std::string& appid);
- const std::vector<CicoSCAilItems>& getAilList() const;
- const CicoSCAilItems* findAIL(const char* appid) const;
- const CicoSCAilItems* findAIL(const std::string& appid) const;
+ const std::vector<CicoAilItems>& getAilList() const;
+ const CicoAilItems* findAIL(const char* appid) const;
+ const CicoAilItems* findAIL(const std::string& appid) const;
bool isAilRenew() const;
void ailRenewFlagOff();
- const std::vector<CicoSCAulItems>& getAulList();
+ const std::vector<CicoAulItems>& getAulList();
// TODO mk_k Should I think about the multiple return values start
/*
- const CicoSCAulItems* findAUL(const char* appid) const;
- const CicoSCAulItems* findAUL(const std::string& appid) const;
+ const CicoAulItems* findAUL(const char* appid) const;
+ const CicoAulItems* findAUL(const std::string& appid) const;
*/
- const CicoSCAulItems* findAUL(int pid);
+ const CicoAulItems* findAUL(int pid);
bool getPIDs(const char* appid, std::vector<int>& pids) const;
bool getPIDs(std::string& appid, std::vector<int>& pids) const;
void enterAUL(const char* appid, int pid, const CicoSCWindow* obj = NULL,
protected:
void initAIL();
friend ail_cb_ret_e CSCLCCail_list_appinfo_cbX(const ail_appinfo_h appinfo,
- CicoSCLifeCycleController* x);
+ CicoHSLifeCycleController* x);
bool createAilItems();
friend
int CSCLCCpkgmgr_handlerX(int req_id, const char *pkg_type,
const char *pkg_name, const char *key,
const char *val, const void *pmsg,
- CicoSCLifeCycleController *x);
+ CicoHSLifeCycleController *x);
void renewAIL();
void ailRenewFlagOn();
void initAUL();
friend int CSCLCCapp_launch_handlerX(int pid,
- CicoSCLifeCycleController *x);
- friend int CSCLCCapp_dead_handlerX(int pid, CicoSCLifeCycleController *x);
+ CicoHSLifeCycleController *x);
+ friend int CSCLCCapp_dead_handlerX(int pid, CicoHSLifeCycleController *x);
int terminateR(int pid);
void getCategory(const char* sPkg, const char* sNm, const char* sCtg,
bool bndsp);
bool removeAUL(int pid);
private:
- static CicoSCLifeCycleController* ms_myInstance;
+ static CicoHSLifeCycleController* ms_myInstance;
protected:
- std::vector<CicoSCAilItems> m_ail;
- std::vector<CicoSCAulItems> m_aul;
+ std::vector<CicoAilItems> m_ail;
+ std::vector<CicoAulItems> m_aul;
GKeyFile* m_gconf;
pkgmgr_client* m_pc;
bool m_ailRenew;
* @return AIL information item list Container
*/
inline
-const std::vector<CicoSCAilItems>& CicoSCLifeCycleController::getAilList() const
+const std::vector<CicoAilItems>& CicoHSLifeCycleController::getAilList() const
{
return m_ail;
}
* @retval true change flag on
* @retval false change flag off
*/
-inline bool CicoSCLifeCycleController::isAilRenew() const
+inline bool CicoHSLifeCycleController::isAilRenew() const
{
return m_ailRenew;
}
/**
* @brief AIL change flag off set
*/
-inline void CicoSCLifeCycleController::ailRenewFlagOff()
+inline void CicoHSLifeCycleController::ailRenewFlagOff()
{
m_ailRenew = false;
}
/**
* @brief AIL change flag on set
*/
-inline void CicoSCLifeCycleController::ailRenewFlagOn()
+inline void CicoHSLifeCycleController::ailRenewFlagOn()
{
m_ailRenew = true;
}
-#endif // CICOSCLIFECYCLECONTROLLER_H
+#endif // CICOHSLIFECYCLECONTROLLER_H
+// vim: set expandtab ts=4 sw=4:
*/
/*--------------------------------------------------------------------------*/
CicoHSMenuTile::CicoHSMenuTile(const char *appid,
- const char *icon_image_path, int page, int subpage,
+ const char *icon_image_path,
+ int page, int subpage,
int position, int width, int height)
{
+ ICO_TRA("CicoHSMenuTile::CicoHSMenuTile Enter");
if (_CicoHSMenuTile_initialized == 0) {
// Initialize and setting OpenGL/EGL functions
ICO_DBG("CicoHSMenuTile::CicoHSMenuTile: initialize OpenGL/EGL functions");
this->height = height;
pos_x = GetPositionX();
pos_y = GetPositionY();
+ ICO_TRA("CicoHSMenuTile::CicoHSMenuTile Leave");
}
/*--------------------------------------------------------------------------*/
void
CicoHSMenuTile::CreateObject(Evas *evas)
{
+ ICO_TRA("CicoHSMenuTile::CreateObject Enter");
/*initial vaule*/
menu_evas = evas;
menu_show = false;
evas_object_move(term_icon, pos_x + width - ICO_HS_MENUTILE_TERM_ICON_WIDTH, pos_y);
evas_object_resize(term_icon, ICO_HS_MENUTILE_TERM_ICON_WIDTH,
ICO_HS_MENUTILE_TERM_ICON_HEIGHT);
+ evas_object_event_callback_add(term_icon, EVAS_CALLBACK_MOUSE_DOWN,
+ CicoHSMenuTouch::TouchDownTerm, appid);
evas_object_event_callback_add(term_icon, EVAS_CALLBACK_MOUSE_UP,
CicoHSMenuTouch::TouchUpTerm, appid);
+ ICO_TRA("CicoHSMenuTile::CreateObject Leave");
}
/*--------------------------------------------------------------------------*/
thumb.height = info->height;
thumb.stride = info->stride;
thumb.format = info->format;
+#if 0 /* too many log */
ICO_DBG("CicoHSMenuTile::SetThumbnail: create %s(%08x) "
"name=%d w/h/s=%d/%d/%d tile w/h=%d/%d",
appid, thumb.surface, thumb.name,
thumb.width, thumb.height, thumb.stride, width, height);
-
+#endif
// delete image and texture
if (thumb.image) {
CicoHSMenuTile::glfunc.destroy_image(
} func;
Evas_Video_Surface video;
+#if 0 /* delete at evas-1.7.8-15.1 */
unsigned int video_caps;
-
+#endif
const char *tmpf;
int tmpf_fd;
// Evas old version check and revise
if (((int)im & 0xffff0000) == 0) {
// Evas old version
- image_obj = (struct local_Evas_Object_Image *)(((int *)image_obj) - 1);
+ image_obj = (struct local_Evas_Object_Image *)(((int *)image_obj) + 1);
im = (struct local_Evas_GL_Image *)image_obj->engine_data;
}
- im->native.yinvert = 1;
+ if (((int)im & 0xffff0000) != 0) {
+ if (im->native.yinvert == 0)
+ im->native.yinvert = 1;
+ }
}
+// vim: set expandtab ts=4 sw=4:
CicoHSMenuTile(const CicoHSMenuTile&);
};
#endif
+// vim: set expandtab ts=4 sw=4:
Ecore_Timer *CicoHSMenuTouch::timer;
bool CicoHSMenuTouch::long_act;
+bool CicoHSMenuTouch::touch_down;
CicoHSMenuWindow* CicoHSMenuTouch::menu_window;
{
timer = NULL;
long_act = false;
+ touch_down = false;
CicoHSMenuTouch::menu_window = menu_window;
}
CicoHSMenuTouch::TouchDownMenu(void *data, Evas *evas, Evas_Object *obj, void *event_info)
{
Evas_Event_Mouse_Down *info;
+ int x, y;
info = reinterpret_cast<Evas_Event_Mouse_Down*>(event_info);
- touch_state_b_x = info->output.x;
- touch_state_b_y = info->output.y;
+ x = info->output.x;
+ y = info->output.y;
+
+ touch_down = true;
+
+ if (timer) {
+ ecore_timer_del(timer);
+ timer = NULL;
+ if ((x >= 0) && (y >= 0)) {
+ touch_state_b_x = x;
+ touch_state_b_y = y;
+ }
+ }
+ else {
+ touch_state_b_x = x;
+ touch_state_b_y = y;
+ }
char *appid = reinterpret_cast<char*>(data);
- if(appid == NULL){
+ if (appid == NULL) {
+ ICO_DBG("CicoHSMenuTouch::TouchDownMenu: (%d,%d) No App",
+ touch_state_b_x, touch_state_b_y);
return;
}
+ ICO_PRF("TOUCH_EVENT Menu Down (%d,%d) app=%s",
+ touch_state_b_x, touch_state_b_y, appid);
long_act = false;
timer = ecore_timer_add(ICO_HS_MENU_TOUCH_LONG_PUSH_THREASHOLD_TIME_SECONDS,
- LongPushed,NULL);
+ LongPushed, NULL);
}
+/*--------------------------------------------------------------------------*/
+/**
+ * @brief LongPushed::Touch timeout
+ * touch down timeout called from ecore
+ *
+ * @param[in] data user data(unused)
+ * @return fixed ECORE_CALLBACK_CANCEL
+ */
+/*--------------------------------------------------------------------------*/
Eina_Bool
CicoHSMenuTouch::LongPushed(void *data)
{
- long_act = true;
- timer = NULL;
+ ICO_TRA("CicoHSMenuTouch::LongPushed Enter");
+ long_act = true;
+ timer = NULL;
- /*stop select*/
- menu_window->ChangeTerminateMode();
+ /*stop select*/
+ menu_window->ChangeTerminateMode();
- return ECORE_CALLBACK_CANCEL;
+ ICO_TRA("CicoHSMenuTouch::LongPushed Leave");
+ return ECORE_CALLBACK_CANCEL;
}
-
/*--------------------------------------------------------------------------*/
/**
* @brief CicoHSMenuTouch::TouchUpMenu
CicoHSMenuTouch::TouchUpMenu(void *data, Evas *evas, Evas_Object *obj, void *event_info)
{
Evas_Event_Mouse_Up *info;
- char *appid = reinterpret_cast<char*>(data);
- int sub_x = 0;
- int sub_y = 0;
+ char *appid = reinterpret_cast<char*>(data);
+ int sub_x;
+ int sub_y;
+ int x, y;
- if(timer != NULL){
+ info = reinterpret_cast<Evas_Event_Mouse_Up*>(event_info);
+ x = info->output.x;
+ y = info->output.y;
+
+ if (timer != NULL) {
ecore_timer_del(timer);
timer = NULL;
}
+ else if (touch_down == false) {
+ ICO_DBG("CicoHSMenuTouch::TouchUpMenu: (%d,%d) No Down, Skip", x, y);
+ return;
+ }
+ touch_down = false;
+
/* long push*/
- if(long_act == true){
+ if (long_act == true) {
+ ICO_DBG("CicoHSMenuTouch::TouchUpMenu: timedout");
long_act = false;
return;
}
- info = reinterpret_cast<Evas_Event_Mouse_Up*>(event_info);
- touch_state_a_x = info->output.x;
- touch_state_a_y = info->output.y;
+ touch_state_a_x = x;
+ touch_state_a_y = y;
+
sub_x = touch_state_a_x - touch_state_b_x;
sub_y = touch_state_a_y - touch_state_b_y;
+
+ ICO_PRF("TOUCH_EVENT Menu Up (%d,%d)->(%d,%d) app=%s",
+ touch_state_b_x, touch_state_b_y,
+ touch_state_a_x, touch_state_a_y, appid? appid: "(NULL)");
+
if (abs(sub_x) > abs(sub_y)) {
/* menu slide*/
- if( sub_x > ICO_HS_MENU_TOUCH_FLICK_THREASHOLD_DISTANCE){
+ if (sub_x > ICO_HS_MENU_TOUCH_FLICK_THREASHOLD_DISTANCE) {
menu_window->GoBackMenu();
touch_state_b_x = 0;
touch_state_b_y = 0;
return;
- }else if(sub_x < (-1 * ICO_HS_MENU_TOUCH_FLICK_THREASHOLD_DISTANCE)){
+ }
+ else if (sub_x < (-1 * ICO_HS_MENU_TOUCH_FLICK_THREASHOLD_DISTANCE)) {
menu_window->GoNextMenu();
touch_state_b_x = 0;
touch_state_b_y = 0;
}
}
else {
- if( sub_y > ICO_HS_MENU_TOUCH_FLICK_THREASHOLD_DISTANCE){
+ if (sub_y > ICO_HS_MENU_TOUCH_FLICK_THREASHOLD_DISTANCE) {
menu_window->UpBackMenu();
touch_state_b_x = 0;
touch_state_b_y = 0;
return;
- }else if(sub_y < (-1 * ICO_HS_MENU_TOUCH_FLICK_THREASHOLD_DISTANCE)){
+ }
+ else if (sub_y < (-1 * ICO_HS_MENU_TOUCH_FLICK_THREASHOLD_DISTANCE)) {
menu_window->DownNextMenu();
touch_state_b_x = 0;
touch_state_b_y = 0;
}
/*execute application*/
- if(appid != NULL){
+ if (appid != NULL) {
// play operation sound
CicoSound::GetInstance()->PlayOperationSound();
/*--------------------------------------------------------------------------*/
/**
+ * @brief CicoHSMenuTouch::TouchDownTerm
+ * touch down action at terminate icon
+ *
+ * @param[in] data data
+ * @param[in] evas evas
+ * @param[in] obj object
+ * @param[in] event_info event information
+ * @return none
+ */
+/*--------------------------------------------------------------------------*/
+void
+CicoHSMenuTouch::TouchDownTerm(void *data, Evas *evas, Evas_Object *obj, void *event_info)
+{
+ ICO_DBG("CicoHSMenuTouch::TouchDownTerm:");
+ touch_down = true;
+}
+
+/*--------------------------------------------------------------------------*/
+/**
* @brief CicoHSMenuTouch::TouchUpTerm
- * touch up action at menu
+ * touch up action at terminate icon
*
* @param[in] data data
* @param[in] evas evas
void
CicoHSMenuTouch::TouchUpTerm(void *data, Evas *evas, Evas_Object *obj, void *event_info)
{
+ // if no down, skip
+ ICO_DBG("CicoHSMenuTouch::TouchUpTerm: down=%d", (int)touch_down);
+ if (touch_down == false) {
+ ICO_DBG("CicoHSMenuTouch::TouchUpTerm: No Down, Skip");
+ return;
+ }
+ touch_down = false;
+
// play opration sound
CicoSound::GetInstance()->PlayOperationSound();
char *appid = reinterpret_cast<char*>(data);
+ ICO_PRF("TOUCH_EVENT Term Down->Up app=%s", appid? appid:"(NIL)");
strncpy(terminate_appid, appid, ICO_HS_MAX_PROCESS_NAME);
*/
/*--------------------------------------------------------------------------*/
void
-CicoHSMenuTouch::TouchUpTerminateYes(void *data, Evas *evas, Evas_Object *obj, void *event_info)
+CicoHSMenuTouch::TouchUpTerminateYes(void *data, Evas *evas, Evas_Object *obj,
+ void *event_info)
{
+ ICO_PRF("TOUCH_EVENT TermYes Up app=%s", terminate_appid);
+
// play opration sound
CicoSound::GetInstance()->PlayOperationSound();
void
CicoHSMenuTouch::TouchUpTerminateNo(void *data, Evas *evas, Evas_Object *obj, void *event_info)
{
+ ICO_PRF("TOUCH_EVENT TermNo Up app=%s", terminate_appid);
+
// play opration sound
CicoSound::GetInstance()->PlayOperationSound();
#define ICO_HS_MENU_TOUCH_FLICK_THREASHOLD_DISTANCE 100
#define ICO_HS_MENU_TOUCH_FLICK_THREASHOLD_TIME_MSECONDS 1000
-#define ICO_HS_MENU_TOUCH_LONG_PUSH_THREASHOLD_TIME_SECONDS 2.5d
+#define ICO_HS_MENU_TOUCH_LONG_PUSH_THREASHOLD_TIME_SECONDS 2.0d
class CicoHSMenuTouch
{
static Ecore_Timer *timer;
static bool long_act;
+ static bool touch_down;
protected:
CicoHSMenuTouch operator=(const CicoHSMenuTouch&);
};
#endif
+// vim: set expandtab ts=4 sw=4:
*/
#include "CicoHSMenuWindow.h"
#include "CicoHSMenuTouch.h"
-#include "CicoHomeScreenResourceConfig.h"
+#include "CicoResourceConfig.h"
#include "CicoHomeScreen.h"
#include "CicoHSSystemState.h"
#include <stdio.h>
menu_window_instance = this;
- life_cycle_controller = CicoSCLifeCycleController::getInstance();
+ life_cycle_controller = CicoHSLifeCycleController::getInstance();
- CicoHomeScreenResourceConfig::GetImagePath(img_dir_path,
- ICO_HS_MAX_PATH_BUFF_LEN);
+ CicoResourceConfig::GetImagePath(img_dir_path, ICO_HS_MAX_PATH_BUFF_LEN);
m_showState = false;
}
int err = evas_object_image_load_error_get(canvas);
if (err != EVAS_LOAD_ERROR_NONE) {
ICO_ERR("CicoHSMenuWindow::SetMenuBack: backgound image is not exist");
+ ICO_TRA("CicoHSMenuWindow::SetMenuBack Leave(ERR)");
evas_object_del(canvas);
return ICO_ERROR;
}
evas_object_event_callback_add(canvas, EVAS_CALLBACK_MOUSE_DOWN,
- CicoHSMenuTouch::TouchDownMenu,NULL);
+ CicoHSMenuTouch::TouchDownMenu,NULL);
evas_object_event_callback_add(canvas, EVAS_CALLBACK_MOUSE_UP,
- CicoHSMenuTouch::TouchUpMenu,NULL);
+ CicoHSMenuTouch::TouchUpMenu,NULL);
evas_object_move(canvas, 0, 0);
evas_object_resize(canvas, width, height);
evas_object_show(canvas);
+ ICO_ERR("CicoHSMenuWindow::SetMenuBack Leave(EOK)");
return ICO_OK;
}
void
CicoHSMenuWindow::InitAppTiles(void)
{
- ICO_DBG("CicoHSMenuWindow::InitAppTiles Enter");
+ ICO_TRA("CicoHSMenuWindow::InitAppTiles Enter");
current_page = 0;
subcurrent_page = 0;
all_tile_num = 0;
all_page_num = 0;
- ICO_DBG("CicoHSMenuWindow::InitAppTiles Leave");
+ ICO_TRA("CicoHSMenuWindow::InitAppTiles Leave");
}
/*--------------------------------------------------------------------------*/
current_page = 0;
/* get APP information */
- std::vector<CicoSCAilItems> aillist =
+ std::vector<CicoAilItems> aillist =
life_cycle_controller->getAilList();
/* get category infomation */
void
CicoHSMenuWindow::RenewAppTiles(void)
{
- ICO_DBG("CicoHSMenuWindow::RenewAppTiles Enter");
+ ICO_TRA("CicoHSMenuWindow::RenewAppTiles Enter");
int ret;
/* update app info list */
CicoHomeScreen::RenewAppInfoList();
- ICO_DBG("CicoHSMenuWindow::RenewAppTiles Leave");
+ ICO_TRA("CicoHSMenuWindow::RenewAppTiles Leave");
}
/*--------------------------------------------------------------------------*/
void
CicoHSMenuWindow::Show(ico_syc_animation_t *animation)
{
- ICO_DBG("CicoHSMenuWindow::Show Enter");
+ ICO_TRA("CicoHSMenuWindow::Show Enter");
// if regulation == true, forbid show window.
if (true == CicoHSSystemState::getInstance()->getRegulation()) {
ico_syc_show(appid, surface, animation);
- ICO_DBG("CicoHSMenuWindow::Show Leave");
+ ICO_TRA("CicoHSMenuWindow::Show Leave");
}
/*--------------------------------------------------------------------------*/
void
CicoHSMenuWindow::Hide(ico_syc_animation_t *animation)
{
- ICO_DBG("CicoHSMenuWindow::Hide Enter");
+ ICO_TRA("CicoHSMenuWindow::Hide Enter");
if(terminate_mode == true){
ChangeNormalMode();
}
}
- ICO_DBG("CicoHSMenuWindow::Hide Leave");
+ ICO_TRA("CicoHSMenuWindow::Hide Leave");
}
/*--------------------------------------------------------------------------*/
CicoHSMenuWindow::ExecuteApp(const char *appid)
{
if(terminate_mode == true){
+ ICO_DBG("CicoHSMenuWindow::ExecuteApp: exet %s but terminate_mode", appid);
return;
}
-
CicoHomeScreen::ExecuteApp(appid);
}
+
/*--------------------------------------------------------------------------*/
/**
* @brief CicoHSMenuWindow::TerminateApp
CicoHSMenuWindow::ChangeTerminateMode(void)
{
bool check = false;
+
/*check */
for (int ii = 0; ii < all_tile_num; ii++) {
if(menu_tile[ii] == NULL){
menu_tile[ii]->ShowTermIcon();
}
terminate_mode = true;
+ ICO_DBG("CicoHSMenuWindow::ChangeTerminateMode: change to terminate mode");
}
+
/*--------------------------------------------------------------------------*/
/**
* @brief CicoHSMenuWindow::ChangeNormalMode
menu_tile[ii]->HideTermIcon();
}
terminate_mode = false;
+ ICO_DBG("CicoHSMenuWindow::ChangeNormalMode: change to normal mode");
}
/*--------------------------------------------------------------------------*/
void
CicoHSMenuWindow::ValidMenuIcon(const char *appid)
{
-ICO_DBG("CicoHSMenuWindow::ValidMenuIcon(%s)", appid ? appid : "(NULL)" );
+ ICO_DBG("CicoHSMenuWindow::ValidMenuIcon(%s)", appid ? appid : "(NULL)" );
for (int ii = 0; ii < all_tile_num; ii++) {
if (strncmp(menu_tile[ii]->GetAppId(), appid, ICO_HS_MAX_PROCESS_NAME) == 0) {
menu_tile[ii]->ValidMenuIcon();
void
CicoHSMenuWindow::SetNightMode(void)
{
- ICO_DBG("CicoHSMenuWindow::SetNightMode Enter");
+ ICO_TRA("CicoHSMenuWindow::SetNightMode Enter");
if (true == CicoHSSystemState::getInstance()->getNightMode()) {
evas_object_color_set(rectangle,0,0,0,178);
}
else {
evas_object_color_set(rectangle,120,120,120,178);
}
- ICO_DBG("CicoHSMenuWindow::SetNightMode Leave");
+ ICO_TRA("CicoHSMenuWindow::SetNightMode Leave");
}
/*--------------------------------------------------------------------------*/
{
return CicoHSMenuWindow::menu_tile_height;
}
+// vim: set expandtab ts=4 sw=4:
#include <Ecore_Evas.h>
#include <Edje.h>
-#include "CicoHomeScreenConfig.h"
+#include "CicoGKeyFileConfig.h"
#include "CicoHSWindow.h"
#include "CicoHSMenuTile.h"
#include "CicoHomeScreenCommon.h"
-#include "CicoSCAilItems.h"
-#include "CicoSCLifeCycleController.h"
+#include "CicoAilItems.h"
+#include "CicoHSLifeCycleController.h"
#define ICO_HS_MENU_SHOWING 0
#define ICO_HS_MENU_HIDING 1
Evas_Object *terminate_button_yes;
Evas_Object *terminate_button_no;
- CicoSCLifeCycleController *life_cycle_controller;
+ CicoHSLifeCycleController *life_cycle_controller;
/* my instance (for callback) */
static CicoHSMenuWindow *menu_window_instance;
bool m_showState;
CicoHSMenuWindow(const CicoHSMenuWindow&);
};
#endif
-
+// vim: set expandtab ts=4 sw=4:
--- /dev/null
+/*
+ * Copyright (c) 2013, TOYOTA MOTOR CORPORATION.
+ *
+ * This program is licensed under the terms and conditions of the
+ * Apache License, version 2.0. The full text of the Apache License is at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ */
+
+//==========================================================================
+/**
+ * @file CicoHSMessage.cpp
+ *
+ * @brief This file implementation of CicoHSMessage class
+ */
+//==========================================================================
+
+#include <string>
+#include <limits.h>
+
+#include "CicoHSMessage.h"
+
+//==========================================================================
+// private static variable
+//==========================================================================
+unsigned int CicoHSMessage::ms_counter = 0;
+
+//--------------------------------------------------------------------------
+/**
+ * @brief default constructor
+ */
+//--------------------------------------------------------------------------
+CicoHSMessage::CicoHSMessage()
+{
+ if (ms_counter == UINT_MAX) {
+ ms_counter = 0;
+ }
+ m_id = ++ms_counter;
+ m_generator = json_generator_new();
+ m_root = json_node_new(JSON_NODE_OBJECT);
+ m_rootObj = json_object_new();
+ m_argObj = json_object_new();
+ m_array = json_array_new();
+ m_data.clear();
+}
+
+//--------------------------------------------------------------------------
+/**
+ * @brief destructor
+ */
+//--------------------------------------------------------------------------
+CicoHSMessage::~CicoHSMessage()
+{
+ //ICO_TRA("CicoHSMessage::~CicoHSMessage Enter");
+ json_array_unref(m_array);
+ json_object_unref(m_rootObj);
+ json_object_unref(m_argObj);
+ json_node_free(m_root);
+ g_object_unref(m_generator);
+ //ICO_TRA("CicoHSMessage::~CicoHSMessage Leave");
+}
+
+//--------------------------------------------------------------------------
+/**
+ * @brief get message id
+ *
+ * @return id of message
+ */
+//--------------------------------------------------------------------------
+unsigned int
+CicoHSMessage::getId(void)
+{
+ return m_id;
+}
+
+//--------------------------------------------------------------------------
+/**
+ * @brief add root object for char pointer type
+ *
+ * @param [in] key key name of object
+ * @param [in] value value of object for char pointer type
+ */
+//--------------------------------------------------------------------------
+void
+CicoHSMessage::addRootObject(const char * key, const char * value)
+{
+// ICO_DBG("json_object_set_string_member(%s, %s) called.", key, value);
+ json_object_set_string_member(m_rootObj, key, value);
+}
+
+//--------------------------------------------------------------------------
+/**
+ * @brief add root object for string type
+ *
+ * @param [in] key keyname of object
+ * @param [in] value value of object for string type
+ */
+//--------------------------------------------------------------------------
+void
+CicoHSMessage::addRootObject(const char * key, const std::string & value)
+{
+// ICO_DBG("json_object_set_string_member(%s, %s) called.", key, value.c_str());
+ json_object_set_string_member(m_rootObj, key, value.c_str());
+}
+
+//--------------------------------------------------------------------------
+/**
+ * @brief add root object for integer type
+ *
+ * @param [in] key key name of object
+ * @param [in] value value of object for integer type
+ */
+//--------------------------------------------------------------------------
+void
+CicoHSMessage::addRootObject(const char * key, int value)
+{
+// ICO_DBG("json_object_set_int_member(%s, %d) called.", key, value);
+ json_object_set_int_member(m_rootObj, key, value);
+}
+
+//--------------------------------------------------------------------------
+/**
+ * @brief add argument object for char pointer type
+ *
+ * @param [in] key key name of object
+ * @param [in] value value of object for char pointer type
+ */
+//--------------------------------------------------------------------------
+void
+CicoHSMessage::addArgObject(const char * key, const char * value)
+{
+// ICO_DBG("json_object_set_string_member(%s, %s) called.", key, value);
+ json_object_set_string_member(m_argObj, key, value);
+}
+
+//--------------------------------------------------------------------------
+/**
+ * @brief add argument object for string type
+ *
+ * @param [in] key key name of object
+ * @param [in] value value of object for string type
+ */
+//--------------------------------------------------------------------------
+void
+CicoHSMessage::addArgObject(const char * key, const std::string & value)
+{
+// ICO_DBG("json_object_set_string_member(%s, %s) called.", key, value.c_str());
+ json_object_set_string_member(m_argObj, key, value.c_str());
+}
+
+//--------------------------------------------------------------------------
+/**
+ * @brief add argument object for integer type
+ *
+ * @param [in] key key name of object
+ * @param [in] value value of object for integer type
+ */
+//--------------------------------------------------------------------------
+void
+CicoHSMessage::addArgObject(const char * key, int value)
+{
+// ICO_DBG("json_object_set_int_member(%s, %d) called.", key, value);
+ json_object_set_int_member(m_argObj, key, value);
+}
+
+//--------------------------------------------------------------------------
+/**
+ * @brief add argument object for array type
+ *
+ * @param [in] key key name of array
+ */
+//--------------------------------------------------------------------------
+void
+CicoHSMessage::addArgObject(const char * key)
+{
+ // count up reference
+ json_array_ref(m_array);
+
+// ICO_DBG("json_object_set_array_member(%s) called.", key);
+ json_object_set_array_member(m_argObj, key, m_array);
+}
+
+//--------------------------------------------------------------------------
+/**
+ * @brief add array element for char pointer type
+ *
+ * @param [in] value value of object for char pointer type
+ */
+//--------------------------------------------------------------------------
+void
+CicoHSMessage::addElmArray(const char * value)
+{
+// ICO_DBG("json_array_add_string_element(%s) called.", value);
+ json_array_add_string_element(m_array, value);
+}
+
+//--------------------------------------------------------------------------
+/**
+ * @brief add array element for string type
+ *
+ * @param [in] value value of object for string type
+ */
+//--------------------------------------------------------------------------
+void
+CicoHSMessage::addElmArray(const std::string & value)
+{
+// ICO_DBG("json_array_add_string_element(%s) called.", value.c_str());
+ json_array_add_string_element(m_array, value.c_str());
+}
+
+//--------------------------------------------------------------------------
+/**
+ * @brief get destination handle
+ *
+ * @return pointer of destination handle
+ */
+//--------------------------------------------------------------------------
+CicoHSUwsHandle*
+CicoHSMessage::getHandle(void)
+{
+ return m_uwsHandle;
+}
+
+//--------------------------------------------------------------------------
+/**
+ * @brief set destination handle
+ *
+ * @param [in] handle destination handle
+ */
+//--------------------------------------------------------------------------
+void
+CicoHSMessage::setHandle(CicoHSUwsHandle* handle)
+{
+ m_uwsHandle = handle;
+}
+
+//--------------------------------------------------------------------------
+/**
+ * @brief get message data
+ *
+ * @return pointer of message data
+ */
+//--------------------------------------------------------------------------
+const char*
+CicoHSMessage::getData(void)
+{
+ // count up reference
+ json_object_ref(m_rootObj);
+ json_object_ref(m_argObj);
+
+ json_object_set_object_member(m_rootObj, "arg", m_argObj);
+ json_node_take_object(m_root, m_rootObj);
+ json_generator_set_root(m_generator, m_root);
+ gsize len = 0;
+ gchar* data = json_generator_to_data(m_generator, &len);
+ m_data = data;
+ g_free(data);
+ return m_data.c_str();
+}
+
+//--------------------------------------------------------------------------
+/**
+ * @brief get application id of destination
+ *
+ * @return application id
+ */
+//--------------------------------------------------------------------------
+const std::string &
+CicoHSMessage::getSendToAppid(void)
+{
+ return m_toAppid;
+}
+
+//--------------------------------------------------------------------------
+/**
+ * @brief set application id of destination
+ */
+//--------------------------------------------------------------------------
+void
+CicoHSMessage::setSendToAppid(const std::string & appid)
+{
+ m_toAppid = appid;
+}
+// vim:set expandtab ts=4 sw=4:
--- /dev/null
+/*
+ * Copyright (c) 2013, TOYOTA MOTOR CORPORATION.
+ *
+ * This program is licensed under the terms and conditions of the
+ * Apache License, version 2.0. The full text of the Apache License is at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ */
+
+//==========================================================================
+/**
+ * @file CicoHSMessage.h
+ *
+ * @brief This file is definition of CicoHSMessage class
+ */
+//==========================================================================
+#ifndef __CICO_HS_MESSAGE_H__
+#define __CICO_HS_MESSAGE_H__
+
+#include <string>
+
+#include <json-glib/json-glib.h>
+
+//==========================================================================
+// forward declaration
+//==========================================================================
+class CicoHSUwsHandle;
+
+//==========================================================================
+/**
+ * @brief This class hold communication message
+ */
+//==========================================================================
+class CicoHSMessage
+{
+public:
+ // default constructor
+ CicoHSMessage();
+
+ // destructor
+ ~CicoHSMessage();
+
+ // get message id
+ unsigned int getId(void);
+
+ // add root object for char pointer type
+ void addRootObject(const char * key, const char * value);
+
+ // add root object for string type
+ void addRootObject(const char * key, const std::string & value);
+
+ // add root object for integer type
+ void addRootObject(const char * key, int value);
+
+ // add argument object for char pointer type
+ void addArgObject(const char * key, const char * value);
+
+ // add argument object for string type
+ void addArgObject(const char * key, const std::string & value);
+
+ // add argument object for integer type
+ void addArgObject(const char * key, int value);
+
+ // add argument object for array type
+ void addArgObject(const char * key);
+
+ // add element to array for char pointer type
+ void addElmArray(const char * value);
+
+ // add element to array for string type
+ void addElmArray(const std::string & value);
+
+ // get destination handle
+ CicoHSUwsHandle* getHandle(void);
+
+ // set destination handle
+ void setHandle(CicoHSUwsHandle* handle);
+
+ // get message data
+ const char* getData(void);
+
+ // set application id of destination
+ void setSendToAppid(const std::string & appid);
+
+ // get application id of destination
+ const std::string & getSendToAppid(void);
+
+private:
+ // assignment operator
+ CicoHSMessage& operator=(const CicoHSMessage &object);
+
+ // copy constructor
+ CicoHSMessage(const CicoHSMessage &object);
+
+private:
+ static unsigned int ms_counter; //!< message id counter
+ int m_id; //!< message id
+ CicoHSUwsHandle *m_uwsHandle; //!< communication handler
+ JsonGenerator *m_generator; //!< json generator
+ JsonNode *m_root; //!< json root node
+ JsonObject *m_rootObj; //!< json root objects
+ JsonObject *m_argObj; //!< json arg objects
+ JsonArray *m_array; //!< json array
+ std::string m_toAppid; //!< send to appid
+ std::string m_data; //!< json format data
+};
+#endif // __CICO_HS_MESSAGE_H__
+// vim:set expandtab ts=4 sw=4:
--- /dev/null
+/*
+ * Copyright (c) 2013, TOYOTA MOTOR CORPORATION.
+ *
+ * This program is licensed under the terms and conditions of the
+ * Apache License, version 2.0. The full text of the Apache License is at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ */
+
+//==========================================================================
+/**
+ * @file CicoHSServer.cpp
+ *
+ * @brief This file implementation of CicoHSServer class
+ */
+//==========================================================================
+
+#include <sstream>
+using namespace std;
+
+#include "CicoHSServer.h"
+#include "CicoHSCommand.h"
+#include "CicoHSMessage.h"
+#include "CicoHomeScreen.h"
+#include "CicoHSAppControl.h"
+
+#include <ico_log.h>
+#include "ico_syc_error.h"
+#include "ico_syc_msg_cmd_def.h"
+
+class CicoHSUwsHandler
+{
+public:
+ CicoHSUwsHandler()
+ : uwsContext(NULL), id(NULL), fd(-1), serviceFlag(false),
+ ecoreFdHandler(NULL), appid("") {}
+ void dump(void) const {
+ ICO_DBG("uwsContext=0x%08x fd=%d service=%s "
+ "ecoreFdHandler=0x%08x appid=%s",
+ uwsContext, fd, serviceFlag ? "true" : "false",
+ ecoreFdHandler, appid.c_str());
+ }
+ struct ico_uws_context *uwsContext;
+ void* id;
+ int fd;
+ bool serviceFlag;
+ Ecore_Fd_Handler *ecoreFdHandler;
+ string appid;
+};
+
+//==========================================================================
+// private static variable
+//==========================================================================
+CicoHSServer* CicoHSServer::ms_myInstance = NULL;
+
+//--------------------------------------------------------------------------
+/**
+ * @brief default constructor
+ */
+//--------------------------------------------------------------------------
+CicoHSServer::CicoHSServer()
+ : m_uwsContext(NULL), m_appCtrl(NULL),
+ m_dispatchProcessing(false)
+{
+}
+
+//--------------------------------------------------------------------------
+/**
+ * @brief destructor
+ */
+//--------------------------------------------------------------------------
+CicoHSServer::~CicoHSServer()
+{
+ if (NULL != m_uwsContext) {
+ ico_uws_close(m_uwsContext);
+ }
+}
+
+//--------------------------------------------------------------------------
+/**
+ * @brief get CicoHSServer instance
+ *
+ * @return CicoHSServer instance
+ */
+//--------------------------------------------------------------------------
+CicoHSServer*
+CicoHSServer::getInstance(void)
+{
+ if (NULL == ms_myInstance) {
+ ms_myInstance = new CicoHSServer();
+ }
+
+ return ms_myInstance;
+}
+
+//--------------------------------------------------------------------------
+/**
+ * @brief set application control instance
+ *
+ * @param [in] appCtrl application control instance
+ */
+//--------------------------------------------------------------------------
+void
+CicoHSServer::setAppCtrl(CicoHSAppControl *appCtrl)
+{
+ m_appCtrl = appCtrl;
+}
+
+//--------------------------------------------------------------------------
+/**
+ * @brief startup server
+ *
+ * @param [in] port websocket port
+ * @param [in] protocol websocket protocol name
+ *
+ * @return ICO_SYC_EOK on success, other on error
+ * @retval ICO_SYC_EOK success
+ * @retval ICO_SYC_ENOSYS error(connection fail)
+ */
+//--------------------------------------------------------------------------
+int
+CicoHSServer::startup(int port, const char *protocol)
+{
+ /* create uir string ":PORT" */
+ stringstream uri;
+ uri << ":" << port;
+
+ /* create context */
+ ICO_DBG("called: ico_uws_create_context(port=%s protocol=%s)",
+ uri.str().c_str(), protocol);
+ m_uwsContext = ico_uws_create_context(uri.str().c_str(), protocol);
+ if (NULL == m_uwsContext) {
+ ICO_ERR("ico_uws_create_context() failed.");
+ return ICO_SYC_ENOSYS;
+ }
+ ico_uws_service(m_uwsContext);
+
+ /* set callback */
+ int ret = ico_uws_set_event_cb(m_uwsContext, uwsReceiveEventCB,
+ (void *)this);
+ if (ret != ICO_UWS_ERR_NONE) {
+ ICO_ERR("ico_uws_set_event_cb() failed(%d).", ret);
+ return ICO_SYC_ENOSYS;
+ }
+ ico_uws_service(m_uwsContext);
+
+ return ICO_SYC_EOK;
+}
+
+//--------------------------------------------------------------------------
+/**
+ * @brief teardown server
+ */
+//--------------------------------------------------------------------------
+void
+CicoHSServer::teardown(void)
+{
+ ICO_TRA("CicoHSServer::teardown Enter");
+ {
+ std::list<CicoHSUwsHandler*>::iterator itr;
+ itr = m_uwsHandlerList.begin();
+ for (; itr != m_uwsHandlerList.end(); ++itr) {
+ if (NULL != (*itr)->ecoreFdHandler) {
+ ecore_main_fd_handler_del((*itr)->ecoreFdHandler);
+ (*itr)->ecoreFdHandler = NULL;
+ }
+ delete(*itr);
+ }
+ m_uwsHandlerList.clear();
+ }
+
+ {
+ std::list<CicoHSMessage*>::iterator itr;
+ itr = m_sendMsgQueue.begin();
+ for (; itr != m_sendMsgQueue.end(); ++itr) {
+ delete(*itr);
+ }
+ m_sendMsgQueue.clear();
+ }
+
+ {
+ std::list<CicoHSCommand*>::iterator itr;
+ itr = m_recvCmdQueue.begin();
+ for (; itr != m_recvCmdQueue.end(); ++itr) {
+ delete(*itr);
+ }
+ }
+
+ if (NULL != m_uwsContext) {
+ ico_uws_close(m_uwsContext);
+ m_uwsContext = NULL;
+ }
+ ICO_TRA("CicoHSServer::teardown Leave");
+}
+
+//--------------------------------------------------------------------------
+/**
+ * @brief add poll websocket file destructor
+ *
+ * @param [in] handler websocket handler
+ */
+//--------------------------------------------------------------------------
+void
+CicoHSServer::addPollFd(CicoHSUwsHandler *handler)
+{
+ ICO_TRA("CicoHSServer::addPollFd Enter(fd=%d)", handler->fd);
+ Ecore_Fd_Handler_Flags flags;
+ flags = (Ecore_Fd_Handler_Flags)(ECORE_FD_READ | ECORE_FD_ERROR);
+
+ handler->ecoreFdHandler = ecore_main_fd_handler_add(handler->fd, flags,
+ ecoreFdCallback,
+ this, NULL, NULL);
+
+ ICO_DBG("Enqueue uwsHandler(0x%08x)", handler);
+ m_uwsHandlerList.push_back(handler);
+
+ ICO_TRA("CicoHSServer::addPollFd Leave");
+}
+
+//--------------------------------------------------------------------------
+/**
+ * @brief delete poll websocket file destructor
+ *
+ * @param [in] handler websocket handler
+ */
+//--------------------------------------------------------------------------
+void
+CicoHSServer::delPollFd(CicoHSUwsHandler *handler)
+{
+ ICO_TRA("CicoHSServer::delPollFd Enter");
+
+ if (NULL == handler) {
+ ICO_WRN("handler is null");
+ ICO_TRA("CicoHSServer::delPollFd Leave");
+ return;
+ }
+
+ if (NULL != handler->ecoreFdHandler) {
+ ecore_main_fd_handler_del(handler->ecoreFdHandler);
+ handler->ecoreFdHandler = NULL;
+ }
+
+ list<CicoHSUwsHandler*>::iterator itr;
+ itr = m_uwsHandlerList.begin();
+ for (; itr != m_uwsHandlerList.end(); ++itr) {
+ if (*itr == handler) {
+ ICO_DBG("Dequeue uwsHandler(0x%08x)", *itr);
+ m_uwsHandlerList.erase(itr);
+ break;
+ }
+ }
+ delete handler;
+
+ ICO_TRA("CicoHSServer::delPollFd Leave");
+}
+
+//--------------------------------------------------------------------------
+/**
+ * @brief dispatch receive message process and send message process
+ *
+ * @param [in] handler websocket handler
+ *
+ * @return websocket handler instance on find, NULL on not found
+ */
+//--------------------------------------------------------------------------
+void
+CicoHSServer::dispatch(const CicoHSUwsHandler *handler)
+{
+// ICO_TRA("CicoHSServer::dispatch Enter(handler=0x%08x)", handler);
+
+ if (NULL == handler) {
+ ICO_WRN("handler is null");
+ ICO_TRA("CicoHSServer::dispatch Leave");
+ return;
+ }
+
+ ico_uws_service(handler->uwsContext);
+
+ // There is a possibility that after calling ico_uws_service function,
+ // the file is deleted. Check whether handler not the disabled.
+ if (false == isExistUwsHandler(handler)) {
+ ICO_TRA("CicoHSServer::dispatch Leave");
+ return;
+ }
+
+ if (true == m_dispatchProcessing) {
+ ICO_TRA("CicoHSServer::dispatch Leave(disptch processing)");
+ return;
+ }
+
+ m_dispatchProcessing = true;
+ list<CicoHSCommand*>::iterator itr;
+ itr = m_recvCmdQueue.begin();
+ while(itr != m_recvCmdQueue.end()) {
+ ICO_DBG("Dequeue command(0x%08x)", (*itr)->cmdid);
+ CicoHSCommand *cmd = *itr;
+ itr = m_recvCmdQueue.erase(itr);
+ switch (cmd->cmdid) {
+ case MSG_CMD_APP_START:
+ case MSG_CMD_APP_STOP:
+ case MSG_CMD_WIN_CHANGE:
+ m_appCtrl->handleCommand(cmd);
+ break;
+ default:
+ ICO_WRN("command: Unknown type");
+ break;
+ }
+ delete cmd;
+ }
+ m_dispatchProcessing = false;
+
+ if (NULL == handler->ecoreFdHandler) {
+ ICO_ERR("ecoreFdHandler is null");
+ ICO_TRA("CicoHSServer::dispatch Leave");
+ return;
+ }
+
+ Eina_Bool flag = ecore_main_fd_handler_active_get(handler->ecoreFdHandler,
+ ECORE_FD_WRITE);
+ if (EINA_TRUE == flag) {
+// ICO_DBG("start send message");
+ list<CicoHSMessage*>::iterator send_itr;
+ send_itr = m_sendMsgQueue.begin();
+ while (send_itr != m_sendMsgQueue.end()) {
+// ICO_DBG("m_sendMsgQueue.size=%d", m_sendMsgQueue.size());
+ CicoHSMessage* msg = *send_itr;
+ CicoHSUwsHandler *sendHandler = findUwsHandler(msg->getSendToAppid());
+ if (handler != sendHandler) {
+ ++send_itr;
+ continue;
+ }
+ send_itr = m_sendMsgQueue.erase(send_itr);
+ ICO_DBG("Dequeue Message(id=%d)", msg->getId());
+ if ((NULL != sendHandler) && (true == sendHandler->serviceFlag)) {
+ const char *data = msg->getData();
+ ICO_DBG("<<<SEND appid=%s id=0x%08x msg=%s",
+ sendHandler->appid.c_str(), sendHandler->id, data);
+// ICO_DBG("called: ico_usw_send called(context=0x%08x id=0x%08x)",
+// sendHandler->uwsContext, sendHandler->id);
+ ico_uws_send(sendHandler->uwsContext, sendHandler->id,
+ (unsigned char *)data, strlen(data));
+
+ delete msg;
+
+ usleep(200);
+ }
+ }
+
+ Ecore_Fd_Handler_Flags flags;;
+ flags = (Ecore_Fd_Handler_Flags)(ECORE_FD_READ | ECORE_FD_ERROR);
+
+ ecore_main_fd_handler_active_set(handler->ecoreFdHandler, flags);
+ }
+
+// ICO_TRA("CicoHSServer::dispatch Leave");
+}
+
+//--------------------------------------------------------------------------
+/**
+ * @brief send message to application client
+ *
+ * @param [in] appid application id of destination
+ * @param [in] msg message
+ *
+ * @return ICO_SYC_EOK on success, other on error
+ */
+//--------------------------------------------------------------------------
+int
+CicoHSServer::sendMessage(const string & appid, CicoHSMessage* msg)
+{
+ ICO_TRA("CicoHSServer::sendMessage Enter(appid=%s, msg=%s)",
+ appid.c_str(), msg->getData());
+
+ msg->setSendToAppid(appid);
+ ICO_DBG("Enqueue Message(id=%d)", msg->getId());
+ m_sendMsgQueue.push_back(msg);
+
+ CicoHSUwsHandler *handler = findUwsHandler(appid);
+ if (NULL != handler) {
+ Ecore_Fd_Handler_Flags flags;
+ flags = (Ecore_Fd_Handler_Flags)(ECORE_FD_READ |
+ ECORE_FD_WRITE |
+ ECORE_FD_ERROR);
+
+ ecore_main_fd_handler_active_set(handler->ecoreFdHandler, flags);
+
+ dispatch(handler);
+ }
+
+ ICO_TRA("CicoHSServer::sendMessage Leave(EOK)");
+ return ICO_SYC_EOK;
+}
+
+//--------------------------------------------------------------------------
+/*
+ * @brief websocket utility callback function
+ *
+ * @param [in] context context
+ * @param [in] event event kinds
+ * @param [in] id client id
+ * @param [in] detail event detail
+ * @param [in] data user data
+ */
+//--------------------------------------------------------------------------
+void
+CicoHSServer::uwsReceiveEventCB(const struct ico_uws_context *context,
+ const ico_uws_evt_e event,
+ const void *id,
+ const ico_uws_detail *detail,
+ void *user_data)
+{
+ if (NULL == user_data) {
+ ICO_ERR("user_data is NULL");
+ return;
+ }
+
+ CicoHSServer* server = static_cast<CicoHSServer*>(user_data);
+ server->receiveEventCB(context, event, id, detail, user_data);
+}
+
+//--------------------------------------------------------------------------
+/**
+ * @brief ecore file destructor callback fucntion
+ *
+ * @param [in] data user data
+ * @param [in] handler ecore file destructor handler
+ *
+ * @return ECORE_CALLBACK_RENEW on retry , ECORE_CALLBACK_CANCEL on cancel
+ */
+//--------------------------------------------------------------------------
+Eina_Bool
+CicoHSServer::ecoreFdCallback(void *data, Ecore_Fd_Handler *ecoreFdhandler)
+{
+// ICO_TRA("CicoHSServer::ecoreFdCallback Enter");
+
+ CicoHSUwsHandler *handler = NULL;
+ handler = static_cast<CicoHSServer*>(data)->findUwsHandler(ecoreFdhandler);
+ if (NULL != handler) {
+ static_cast<CicoHSServer*>(data)->dispatch(handler);
+ }
+
+// ICO_TRA("CicoHSServer::ecoreFdCallback Leave");
+ return ECORE_CALLBACK_RENEW;
+}
+
+//--------------------------------------------------------------------------
+/**
+ * @brief websocket callback function
+ *
+ * @param [in] context websocket context
+ * @param [in] event changed event
+ * @param [in] id source applicatin id
+ * @param [in] detail event detail information
+ * @param [in] user_data user data
+ */
+//--------------------------------------------------------------------------
+void
+CicoHSServer::receiveEventCB(const struct ico_uws_context *context,
+ const ico_uws_evt_e event,
+ const void *id,
+ const ico_uws_detail *detail,
+ void *user_data)
+{
+// ICO_TRA("CicoHSServer::receiveEventCB Enter");
+
+ switch (event) {
+ case ICO_UWS_EVT_CLOSE:
+ ICO_DBG(">>>RECV ICO_UWS_EVT_CLOSE(id=0x%08x)", (int)id);
+// ICO_TRA("CicoHSServer::receiveEventCB Leave");
+ return;
+ case ICO_UWS_EVT_ERROR:
+ ICO_DBG(">>>RECV ICO_UWS_EVT_ERROR(id=0x%08x, err=%d)",
+ (int)id, detail->_ico_uws_error.code);
+// ICO_TRA("CicoHSServer::receiveEventCB Leave");
+ return;
+ default:
+ break;
+ }
+
+ // find handler
+ CicoHSUwsHandler *handler = findUwsHandler(context, id);
+ // If not found handler, create new handler
+ if (NULL == handler) {
+ handler = new CicoHSUwsHandler();
+ handler->uwsContext = (struct ico_uws_context*)context;
+ handler->id = (void*)(id);
+ handler->serviceFlag = false;
+ }
+
+ switch (event) {
+ case ICO_UWS_EVT_OPEN:
+ ICO_DBG(">>>RECV ICO_UWS_EVT_OPEN(id=0x%08x)", (int)id);
+ break;
+ case ICO_UWS_EVT_CLOSE:
+ ICO_DBG(">>>RECV ICO_UWS_EVT_CLOSE(id=0x%08x)", (int)id);
+ delete handler;
+ break;
+ case ICO_UWS_EVT_RECEIVE:
+ {
+ ICO_DBG(">>>RECV ICO_UWS_EVT_RECEIVE(id=0x%08x, msg=%s, len=%d)",
+ (int)id, (char *)detail->_ico_uws_message.recv_data,
+ detail->_ico_uws_message.recv_len);
+
+ // convert message to command
+ CicoHSCommand *cmd = new CicoHSCommand();
+ cmd->parseMessage((const char*)detail->_ico_uws_message.recv_data);
+
+ // Enqueue command
+ ICO_DBG("Enqueue command(0x%08x)", cmd->cmdid);
+ m_recvCmdQueue.push_back(cmd);
+ break;
+ }
+ case ICO_UWS_EVT_ADD_FD:
+ ICO_DBG(">>>RECV ICO_UWS_EVT_ADD_FD(id=0x%08x, fd=%d)",
+ (int)id, detail->_ico_uws_fd.fd);
+ handler->fd = detail->_ico_uws_fd.fd;
+ addPollFd(handler);
+ break;
+ case ICO_UWS_EVT_DEL_FD:
+ ICO_DBG(">>>RECV ICO_UWS_EVT_DEL_FD(id=0x%08x, fd=%d, appid=%s)",
+ (int)id, detail->_ico_uws_fd.fd, handler->appid.c_str());
+ clearRecvCmdQueue(handler->appid);
+ clearSendMsgQueue(handler->appid);
+ delPollFd(handler);
+ break;
+ default:
+ break;
+ }
+// ICO_TRA("CicoHSServer::receiveEventCB Leave");
+}
+
+//--------------------------------------------------------------------------
+/**
+ * @brief clear receive command queue
+ *
+ * @param [in] appid clear command application id
+ */
+//--------------------------------------------------------------------------
+void
+CicoHSServer::clearRecvCmdQueue(const std::string & appid)
+{
+ ICO_TRA("CicoHSServer::clearCmdQueue Enter(appid=%s)", appid.c_str());
+
+ std::list<CicoHSCommand*>::iterator itr;
+ itr = m_recvCmdQueue.begin();
+ for (; itr != m_recvCmdQueue.end(); ) {
+ if (0 == appid.compare((*itr)->appid)) {
+ ICO_DBG("Dequeue command(0x%08x)", (*itr)->cmdid);
+ delete *itr;
+ itr = m_recvCmdQueue.erase(itr);
+ }
+ else {
+ ++itr;
+ }
+ }
+ m_recvCmdQueue.clear();
+
+ ICO_TRA("CicoHSServer::clearCmdQueue Leave")
+}
+
+//--------------------------------------------------------------------------
+/**
+ * @brief clear send message queue
+ *
+ * @param [in] appid clear message application id
+ */
+//--------------------------------------------------------------------------
+void
+CicoHSServer::clearSendMsgQueue(const std::string & appid)
+{
+ ICO_TRA("CicoHSServer::clearMsgQueue Enter(appid=%s)", appid.c_str())
+
+ std::list<CicoHSMessage*>::iterator itr;
+ itr = m_sendMsgQueue.begin();
+ while(itr != m_sendMsgQueue.end()) {
+ if (0 == appid.compare((*itr)->getSendToAppid())) {
+ ICO_DBG("Dequeue Message(id=%d)", (*itr)->getId());
+ delete *itr;
+ itr = m_sendMsgQueue.erase(itr);
+ }
+ else {
+ ++itr;
+ }
+ }
+ m_sendMsgQueue.clear();
+
+ ICO_TRA("CicoHSServer::clearMsgQueue Leave")
+}
+
+//--------------------------------------------------------------------------
+/**
+ * @brief find websocket handler by context and id
+ *
+ * @param [in] context websocket context
+ * @param [in] id id
+ *
+ * @return websocket handler instance on find, NULL on not found
+ */
+//--------------------------------------------------------------------------
+CicoHSUwsHandler*
+CicoHSServer::findUwsHandler(const struct ico_uws_context *context,
+ const void *id)
+{
+ list<CicoHSUwsHandler*>::iterator itr;
+ itr = m_uwsHandlerList.begin();
+ for (; itr != m_uwsHandlerList.end(); ++itr) {
+// ICO_DBG("handler->context=%p handler->id=%p context=%p id=%p",
+// (*itr)->uwsContext, (*itr)->id, context, id);
+ if (((*itr)->uwsContext == context) &&
+ ((*itr)->id == id)) {
+ return *itr;
+ }
+ }
+ return NULL;
+}
+
+//--------------------------------------------------------------------------
+/**
+ * @brief find websocket handler by ecore file destructor handler
+ *
+ * @param [in] ecoreFdHandler ecore file destructor handler
+ *
+ * @return websocket handler instance on find, NULL on not found
+ */
+//--------------------------------------------------------------------------
+CicoHSUwsHandler*
+CicoHSServer::findUwsHandler(const Ecore_Fd_Handler *ecoreFdHandler)
+{
+ list<CicoHSUwsHandler*>::iterator itr;
+ itr = m_uwsHandlerList.begin();
+ for (; itr != m_uwsHandlerList.end(); ++itr) {
+ if ((*itr)->ecoreFdHandler == ecoreFdHandler) {
+ return *itr;
+ }
+ }
+ return NULL;
+}
+
+//--------------------------------------------------------------------------
+/**
+ * @brief find websocket handler by appid
+ *
+ * @param [in] addid application id
+ *
+ * @return websocket handler instance on find, NULL on not found
+ */
+//--------------------------------------------------------------------------
+CicoHSUwsHandler*
+CicoHSServer::findUwsHandler(const string & appid)
+{
+ list<CicoHSUwsHandler*>::iterator itr;
+ itr = m_uwsHandlerList.begin();
+ for (; itr != m_uwsHandlerList.end(); ++itr) {
+// ICO_DBG("handler->id=%p handler->appid=%s appid=%s",
+// (*itr)->id, (*itr)->appid.c_str(), appid.c_str());
+ if ((*itr)->appid == appid) {
+ return *itr;
+ }
+ }
+ return NULL;
+}
+
+//--------------------------------------------------------------------------
+/**
+ * @brief find websocket handler by appid
+ *
+ * @param [in] handler websocket handler instance
+ *
+ * @return true on exist, false on not exist
+ */
+//--------------------------------------------------------------------------
+bool
+CicoHSServer::isExistUwsHandler(const CicoHSUwsHandler *handler)
+{
+ list<CicoHSUwsHandler*>::iterator itr;
+ itr = m_uwsHandlerList.begin();
+ for (; itr != m_uwsHandlerList.end(); ++itr) {
+ if (*itr == handler) {
+ return true;
+ }
+ }
+ return false;
+}
+// vim:set expandtab ts=4 sw=4:
--- /dev/null
+/*
+ * Copyright (c) 2013, TOYOTA MOTOR CORPORATION.
+ *
+ * This program is licensed under the terms and conditions of the
+ * Apache License, version 2.0. The full text of the Apache License is at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ */
+
+//==========================================================================
+/**
+ * @file CicoHSServer.h
+ *
+ * @brief This file is definition of CicoHSServer class
+ */
+//==========================================================================
+#ifndef __CICO_HS_SERVER_H__
+#define __CICO_HS_SERVER_H__
+
+#include <list>
+#include <string>
+
+#include <Ecore.h>
+#include <Eina.h>
+
+#include <ico_uws.h>
+
+//==========================================================================
+// forward declaration
+//==========================================================================
+class CicoHSUwsHandler;
+class CicoHSMessage;
+class CicoHSCommand;
+class CicoHSAppControl;
+
+//==========================================================================
+/**
+ * @brief This class has function of interprocess message server
+ */
+//==========================================================================
+class CicoHSServer
+{
+public:
+ // get CicoHSServer instance
+ static CicoHSServer* getInstance();
+
+ // set application control instance
+ void setAppCtrl(CicoHSAppControl* appCtrl);
+
+ // startup server
+ int startup(int port, const char *protocol);
+
+ // startup server
+ void teardown(void);
+
+ // send message to application client
+ int sendMessage(const std::string & appid, CicoHSMessage* msg);
+
+ // websocket callback function
+ void receiveEventCB(const struct ico_uws_context *context,
+ const ico_uws_evt_e event,
+ const void *id,
+ const ico_uws_detail *detail,
+ void *user_data);
+
+ // clear receive command queue
+ void clearRecvCmdQueue(const std::string & appid);
+
+ // clear send message queue
+ void clearSendMsgQueue(const std::string & appid);
+
+private:
+ // default constructor
+ CicoHSServer();
+
+ // destructor
+ ~CicoHSServer();
+
+ // assignment operator
+ CicoHSServer& operator=(const CicoHSServer &object);
+
+ // copy constructor
+ CicoHSServer(const CicoHSServer &object);
+
+ // websocket utility callback function
+ static void uwsReceiveEventCB(const struct ico_uws_context *context,
+ const ico_uws_evt_e event,
+ const void *id,
+ const ico_uws_detail *detail,
+ void *user_data);
+
+ // ecore file destructor callback fucntion
+ static Eina_Bool ecoreFdCallback(void *data,
+ Ecore_Fd_Handler *handler);
+
+ // add poll websocket file destructor
+ void addPollFd(CicoHSUwsHandler *handler);
+
+ // delete poll websocket file destructor
+ void delPollFd(CicoHSUwsHandler *handler);
+
+ // dispatch receive message process and send message process
+ void dispatch(const CicoHSUwsHandler *handler);
+
+ // find websocket handle by context and id
+ CicoHSUwsHandler* findUwsHandler(const struct ico_uws_context *context,
+ const void *id);
+
+ // find websocket handle by ecore file destructor handler
+ CicoHSUwsHandler* findUwsHandler(const Ecore_Fd_Handler *ecoreFdHandler);
+
+ // find websocket handle by appid
+ CicoHSUwsHandler* findUwsHandler(const std::string & appid);
+
+ // query whether the handler exists
+ bool isExistUwsHandler(const CicoHSUwsHandler *handler);
+
+private:
+ static CicoHSServer* ms_myInstance; ///< this class instance
+
+ struct ico_uws_context *m_uwsContext; ///< websocket utility context
+
+ CicoHSAppControl *m_appCtrl; ///< application control instance
+
+ bool m_dispatchProcessing;
+
+ /// websocket handler list
+ std::list<CicoHSUwsHandler*> m_uwsHandlerList;
+
+ /// send message queue
+ std::list<CicoHSMessage*> m_sendMsgQueue;
+
+ /// recieve message queue
+ std::list<CicoHSCommand*> m_recvCmdQueue;
+};
+#endif // __CICO_HS_SERVER_H__
+// vim:set expandtab ts=4 sw=4:
#include "ico_syc_type.h"
#include "CicoHomeScreenCommon.h"
-#include "CicoHomeScreenConfig.h"
+#include "CicoGKeyFileConfig.h"
#include "CicoHSWindow.h"
class CicoHSSwipeInputWindow :public CicoHSWindow
int CicoHSSwipeTouch::touch_lasttime;
Ecore_Timer *CicoHSSwipeTouch::timer;
-bool CicoHSSwipeTouch::touch_down;
+int CicoHSSwipeTouch::touch_down;
bool CicoHSSwipeTouch::long_act;
bool CicoHSSwipeTouch::set_xy_pos;
{
timer = NULL;
num_windows = 0;
- touch_down = false;
+ touch_down = 0;
long_act = false;
set_xy_pos = false;
struct timeval ctime;
int x, y;
- touch_down = true;
- gettimeofday(&ctime, NULL);
- touch_lasttime = (ctime.tv_sec * 1000 + ctime.tv_usec/1000);
+ if (timer) {
+ ecore_timer_del(timer);
+ timer = NULL;
+ }
+ touch_down ++;
+
info = reinterpret_cast<Evas_Event_Mouse_Down*>(event_info);
window = (CicoHSSwipeInputWindow *)data;
-
x = info->output.x + window->GetPosX();
y = info->output.y + window->GetPosY();
- ICO_DBG("TouchDownSwipe: x/y=%d/%d->%d/%d", info->output.x, info->output.y, x, y);
+ ICO_PRF("TOUCH_EVENT Swipe Down (%d,%d)->(%d,%d) (%d)",
+ info->output.x, info->output.y, x, y, touch_down);
+ if (touch_down == 1) {
+ gettimeofday(&ctime, NULL);
+ touch_lasttime = (ctime.tv_sec * 1000 + ctime.tv_usec/1000);
+ long_act = false;
+ timer = ecore_timer_add(ICO_HS_SWIPE_TOUCH_LONG_PUSH_THREASHOLD_TIME_SECONDS,
+ LongPushed, NULL);
+ }
if ((x >= 0) && (x < 4096) && (y >= 0) && (y < 4096)) {
if (set_xy_pos == false) {
set_xy_pos = true;
touch_state_a_x = x;
touch_state_a_y = y;
}
-
- long_act = false;
- timer = ecore_timer_add(ICO_HS_SWIPE_TOUCH_LONG_PUSH_THREASHOLD_TIME_SECONDS,
- LongPushed, NULL);
}
/*--------------------------------------------------------------------------*/
* touch down timeout called from ecore
*
* @param[in] data user data(unused)
- * @return fixed EINA_TRUE
+ * @return fixed ECORE_CALLBACK_CANCEL
*/
/*--------------------------------------------------------------------------*/
Eina_Bool
long_act = true;
timer = NULL;
+ if (touch_down > 0) {
+ /* release my grab */
+ ico_syc_send_input("\0", 0, ICO_SYC_INPUT_TYPE_TOUCH, 0, touch_lasttime,
+ BTN_TOUCH, ICO_INPUT_MGR_CONTROL_TOUCH_EVENT_RESET);
+ touch_down = 0;
+ }
if (set_xy_pos == false) {
ICO_DBG("LongPushed: unknown coordinate, Skip");
- /* release my grab */
- if (touch_down) {
- ico_syc_send_input("\0", 0, ICO_SYC_INPUT_TYPE_TOUCH, 0, touch_lasttime,
- BTN_TOUCH, 9);
- touch_down = false;
- }
long_act = false;
return ECORE_CALLBACK_CANCEL;
}
ABS_Z, (touch_state_b_x << 16) | touch_state_b_y);
/* send TOUCH Down */
ico_syc_send_input("\0", 0, ICO_SYC_INPUT_TYPE_TOUCH, 0, touch_lasttime - 1,
- BTN_TOUCH, touch_down ? 8 : 1);
- touch_down = false;
+ BTN_TOUCH, ICO_INPUT_MGR_CONTROL_TOUCH_EVENT_DOWN);
/* send ABS_X/Y */
ico_syc_send_input("\0", 0, ICO_SYC_INPUT_TYPE_TOUCH, 0, touch_lasttime,
ABS_Z, ((touch_state_a_x) << 16) | (touch_state_a_y));
touch_state_a_y = y;
}
- ICO_DBG("TouchUpSwipe: x/y=%d/%d->%d/%d (before %d/%d)",
- info->output.x, info->output.y,
- touch_state_a_x, touch_state_a_y, touch_state_b_x, touch_state_b_y);
+ ICO_PRF("TOUCH_EVENT Swipe Up (%d,%d)->(%d,%d) before(%d,%d) (%d)",
+ info->output.x, info->output.y, touch_state_a_x, touch_state_a_y,
+ touch_state_b_x, touch_state_b_y, touch_down - 1);
+
+ if (touch_down > 1) {
+ touch_down --;
+ ICO_DBG("TouchUpSwipe: touch counter not 0(%d), Skip", touch_down);
+ return;
+ }
if(timer != NULL){
ecore_timer_del(timer);
gettimeofday(&ctime, NULL);
touch_lasttime = (ctime.tv_sec * 1000 + ctime.tv_usec/1000);
+ if (touch_down == 0) {
+ /* send ABS_X/Y */
+ ico_syc_send_input("\0", 0, ICO_SYC_INPUT_TYPE_TOUCH, 0, touch_lasttime - 1,
+ ABS_Z, (touch_state_a_x << 16) | touch_state_a_y);
+ /* send TOUCH Up */
+ ico_syc_send_input("\0", 0, ICO_SYC_INPUT_TYPE_TOUCH, 0, touch_lasttime,
+ BTN_TOUCH, ICO_INPUT_MGR_CONTROL_TOUCH_EVENT_UP);
+ set_xy_pos = false;
+ long_act = false;
+ ICO_DBG("TouchUpSwipe: no touch down, Skip");
+ return;
+ }
+
+ touch_down --;
+
if (set_xy_pos == false) {
ICO_DBG("TouchUpSwipe: unknown coordinate, Skip");
ico_syc_send_input("\0", 0, ICO_SYC_INPUT_TYPE_TOUCH, 0, touch_lasttime - 2,
ABS_Z, (touch_state_a_x << 16) | touch_state_a_y);
/* send TOUCH Up */
- if ((touch_down == false) && (long_act == true)) {
- /* Probably it is an internal event of Ecore */
- ico_syc_send_input("\0", 0, ICO_SYC_INPUT_TYPE_TOUCH, 0, touch_lasttime - 1,
- BTN_TOUCH, 7);
- }
- else {
- ico_syc_send_input("\0", 0, ICO_SYC_INPUT_TYPE_TOUCH, 0, touch_lasttime - 1,
- BTN_TOUCH, 0);
- }
- touch_down = false;
+ ico_syc_send_input("\0", 0, ICO_SYC_INPUT_TYPE_TOUCH, 0, touch_lasttime - 1,
+ BTN_TOUCH, ICO_INPUT_MGR_CONTROL_TOUCH_EVENT_UP);
long_act = false;
return;
}
set_xy_pos = false;
/* long push */
- if((touch_down == false) || (long_act == true)) {
+ if(long_act == true) {
ICO_DBG("TouchUpSwipe: not down(%d) or timedout(%d)", touch_down, long_act);
- touch_down = false;
set_xy_pos = false;
+ touch_down = 0;
+ long_act = false;
/* send touch release event */
/* send ABS_X/Y */
ABS_Z, (touch_state_a_x << 16) | touch_state_a_y);
/* send TOUCH Up */
ico_syc_send_input("\0", 0, ICO_SYC_INPUT_TYPE_TOUCH, 0, touch_lasttime - 1,
- BTN_TOUCH, 0);
+ BTN_TOUCH, ICO_INPUT_MGR_CONTROL_TOUCH_EVENT_UP);
return;
}
sub = touch_state_a_x - touch_state_b_x;
ABS_Z, (touch_state_b_x << 16) | touch_state_b_y);
/* send TOUCH Down */
ico_syc_send_input("\0", 0, ICO_SYC_INPUT_TYPE_TOUCH, 0, touch_lasttime - 1,
- BTN_TOUCH, touch_down ? 8 : 1);
+ BTN_TOUCH, ICO_INPUT_MGR_CONTROL_TOUCH_EVENT_DOWN);
/* send ABS_X/Y */
ico_syc_send_input("\0", 0, ICO_SYC_INPUT_TYPE_TOUCH, 0, touch_lasttime,
ABS_Z, ((touch_state_b_x+1) << 16) | (touch_state_b_y+1));
ABS_Z, (touch_state_a_x << 16) | touch_state_a_y);
/* send TOUCH Up */
ico_syc_send_input("\0", 0, ICO_SYC_INPUT_TYPE_TOUCH, 0, touch_lasttime,
- BTN_TOUCH, 0);
+ BTN_TOUCH, ICO_INPUT_MGR_CONTROL_TOUCH_EVENT_UP);
set_xy_pos = false;
}
- touch_down = false;
}
/*--------------------------------------------------------------------------*/
touch_state_a_x = x;
touch_state_a_y = y;
- if ((set_xy_pos == false) || (touch_down == false)) {
+ if ((set_xy_pos == false) || (touch_down == 0)) {
set_xy_pos = true;
touch_state_b_x = touch_state_a_x;
touch_state_b_y = touch_state_a_y;
ICO_DBG("TouchMoveSwipe: save x/y=%d/%d", touch_state_b_x, touch_state_b_y);
}
- ICO_DBG("TouchMoveSwipe: button=%x cur.x/y=%d/%d->%d/%d",
- info->buttons, info->cur.output.x, info->cur.output.y,
- touch_state_a_x, touch_state_a_y);
+ ICO_DBG("TouchMoveSwipe: Swipe Move (%d,%d)->(%d,%d) Button=%x",
+ info->cur.output.x, info->cur.output.y,
+ touch_state_a_x, touch_state_a_y, info->buttons);
/* long push */
- if(touch_down == false) {
+ if(touch_down == 0) {
ICO_DBG("TouchMoveSwipe: no TouchDown, Skip");
return;
}
ico_syc_send_input("\0", 0, ICO_SYC_INPUT_TYPE_TOUCH, 0, touch_lasttime,
ABS_Z, (touch_state_a_x << 16) | touch_state_a_y);
+ long_act = false;
return;
}
ecore_timer_del(timer);
timer = NULL;
}
- long_act = true;
+ long_act = false;
+ if (touch_down > 0) {
+ /* release my grab */
+ ico_syc_send_input("\0", 0, ICO_SYC_INPUT_TYPE_TOUCH, 0, touch_lasttime,
+ BTN_TOUCH, ICO_INPUT_MGR_CONTROL_TOUCH_EVENT_RESET);
+ }
/* send ABS_X/Y */
ico_syc_send_input("\0", 0, ICO_SYC_INPUT_TYPE_TOUCH, 0, touch_lasttime - 2,
ABS_Z, (touch_state_b_x << 16) | touch_state_b_y);
/* send TOUCH Down */
ico_syc_send_input("\0", 0, ICO_SYC_INPUT_TYPE_TOUCH, 0, touch_lasttime - 1,
- BTN_TOUCH, touch_down ? 8 : 1);
- touch_down = false;
+ BTN_TOUCH, ICO_INPUT_MGR_CONTROL_TOUCH_EVENT_DOWN);
+ touch_down = 0;
/* send ABS_X/Y */
gettimeofday(&ctime, NULL);
touch_lasttime = (ctime.tv_sec * 1000 + ctime.tv_usec/1000);
set_xy_pos = false;
}
}
+// vim: set expandtab ts=4 sw=4:
#define ICO_HS_SWIPE_TOUCH_DISTANCE_XY 200
#define ICO_HS_SWIPE_TOUCH_SWIPE_THREASHOLD_DISTANCE 80
#define ICO_HS_SWIPE_TOUCH_SWIPE_THREASHOLD_MOVE_Y 80
-#define ICO_HS_SWIPE_TOUCH_LONG_PUSH_THREASHOLD_TIME_SECONDS 2.5d
+#define ICO_HS_SWIPE_TOUCH_LONG_PUSH_THREASHOLD_TIME_SECONDS 2.0d
#define ICO_HS_SWIPE_TOUCH_SWIPE_ANIMA_TIME 300
#define ICO_HS_MAX_SWIPEWINDOWS 4
static int touch_lasttime;
static Ecore_Timer *timer;
- static bool touch_down;
+ static int touch_down;
static bool long_act;
static bool set_xy_pos;
static int num_windows;
CicoHSSwipeTouch(const CicoHSSwipeTouch&);
};
#endif
+// vim: set expandtab ts=4 sw=4:
/* hiding */
ecore_evas_hide(window);
}
-
-
+// vim:set expandtab ts=4 sw=4:
Ecore_Evas *window; /* ecore-evas object */
};
-
#endif
+// vim:set expandtab ts=4 sw=4:
CicoHSWindowController::GetFullScreenSize(int orientation,
int *width, int *height)
{
- ICO_DBG("CicoHSWindowController::GetFullScreenSize Enter");
+ ICO_TRA("CicoHSWindowController::GetFullScreenSize Enter");
int display_width = 0;
int display_height = 0;
display_width : display_height);
}
#endif /* TizenIVI 3.0 ecore return correct display size */
- ICO_DBG("CicoHSWindowController::GetFullScreenSize Leave(w/h=%d/%d)", *width, *height);
+ ICO_TRA("CicoHSWindowController::GetFullScreenSize Leave(w/h=%d/%d)", *width, *height);
}
-
-/*--------------------------------------------------------------------------*/
-/**
- * @brief CicoHSWindowController::StartEcoreLoop
- * start loop
- *
- * @param[in] none
- * @return none
- */
-/*--------------------------------------------------------------------------*/
-void
-CicoHSWindowController::StartEcoreLoop(void)
-{
- /* Start main loop */
- ecore_main_loop_begin();
-}
-
-/*--------------------------------------------------------------------------*/
-/**
- * @brief CicoHSWindowController::QuitEcoreLoop
- * quit loop
- *
- * @param[in] none
- * @return none
- */
-/*--------------------------------------------------------------------------*/
-void
-CicoHSWindowController::QuitEcoreLoop(void)
-{
- /* Quit main loop */
- ecore_main_loop_quit();
-}
-
+// vim:set expandtab ts=4 sw=4:
static void Initialize(void);
static void Finalize(void);
static void GetFullScreenSize(int orientation,int *width,int *height);
- static void StartEcoreLoop(void);
- static void QuitEcoreLoop(void);
protected:
CicoHSWindowController operator=(const CicoHSWindowController&);
private:
static Ecore_Evas *ms_ecoreEvas;
};
-
#endif
-
+// vim:set expandtab ts=4 sw=4:
#include "CicoHSAppHistoryExt.h"
#include "CicoHomeScreen.h"
#include "CicoHSSystemState.h"
-#include "CicoSCLifeCycleController.h"
-#include "CicoSCConf.h"
-
+#include "CicoHSLifeCycleController.h"
+#include "CicoConf.h"
+#include "CicoHSCmdOpts.h"
+#include "Cico_aul_listen_app.h"
+#include "CicoLibString.h"
+#include "CicoHSServer.h"
+#include "CicoHSAppControl.h"
using namespace std;
/*============================================================================*/
/*============================================================================*/
/* functions */
/*============================================================================*/
+
/**
- * @brief split string
- * @param s split target
- * @param d
- * @param e store split word
+ * ecore timer void data typedef
*/
-#if 1
-void split(const string &s, char d, vector<string> &e);
-#else
-void split(const string &s, char d, vector<string> &e)
-{
- stringstream ss(s);
- string it;
- while (getline(ss, it, d)) {
- e.push_back(it);
- }
- return;
-}
-#endif
+typedef struct t_launcApps_data {
+ string filePath;
+ string filePathD;
+ CicoHomeScreen *hs;
+} launcApps_data_t;
/*--------------------------------------------------------------------------*/
/**
m_appHis = NULL;
- life_cycle_controller = CicoSCLifeCycleController::getInstance();
+ life_cycle_controller = CicoHSLifeCycleController::getInstance();
sub_display_appinfo = NULL;
}
CicoHomeScreen::CreateAppInfoList(void)
{
/* get APP information*/
- std::vector<CicoSCAilItems> aillist = life_cycle_controller->getAilList();
+ std::vector<CicoAilItems> aillist = life_cycle_controller->getAilList();
for (int ii = 0; ii < ICO_HS_MAX_APP_NUM; ii++) {
if (apps_info[ii] != NULL) {
if (appinfo == NULL) {
return;
}
+
+ ico_hs_window_info* wininfo = appinfo->GetWindowInfobySurface(surface);
+ if (wininfo == NULL) {
+ return;
+ }
+
appinfo->SetLastSurface(surface);
// if window invisible, not update active information
- ico_hs_window_info* wininfo = appinfo->GetWindowInfobySurface(surface);
if (0 != wininfo->visible) {
hs_instance->SetActiveAppInfo(appid);
hs_instance->setActiveApp(appid);
ICO_DBG("wininfo=%p", wininfo);
const char *dispzone = moveZoneName;
+ int layer = HS_LAYER_2NDDISP_APP;
if (NULL != GetSubDisplayAppInfo()) {
dispzone = appinfo->GetDefaultZone();
+ layer = HS_LAYER_APPLICATION;
}
if (NULL == dispzone) {
ICO_DBG("change zone: \"%s\"->\"%s\"", wininfo->zone, dispzone);
ico_syc_win_move_t move = {
.zone = (char*)dispzone,
+ .layer = layer,
.pos_x = 0,
.pos_y = 0,
.width = 0,
.height = 0
};
- int layer = HS_LAYER_APPLICATION;
- if (NULL == hs_instance->GetSubDisplayAppInfo()) {
- layer = HS_LAYER_2NDDISP_APP;
- }
-
- ico_syc_change_layer(wininfo->appid, wininfo->surface, layer);
ico_syc_move(wininfo->appid, wininfo->surface, &move,
&hs_instance->moveZoneAnimation);
- if (NULL != GetSubDisplayAppInfo()) {
- if (m_appHis) {
- const string& wapp = m_appHis->getSelectApp();
- ICO_DBG("\"%s\"->\"%s\"", wapp.c_str(), wininfo->appid);
- if ((false == wapp.empty()) &&
- (0 != wapp.compare(wininfo->appid))) {
- requestHideAppid(wapp);
- m_appHis->clearSelectApp();
- m_appHis->homeSwipe();
- }
- }
- ICO_TRA("reset sub display");
- SetSubDisplayAppInfo(NULL);
- ChangeActive(wininfo->appid, wininfo->surface);
- }
- else {
- ICO_TRA("set sub display");
- SetSubDisplayAppInfo(wininfo->appid);
- }
-
- if (m_appHis) {
- if (true == m_appHis->chgChk()) {
- m_appHis->writeAppHistory();
- }
- m_appHis->homeSwipe();
- }
-
ICO_TRA("Leave");
}
void
CicoHomeScreen::ShowApplicationWindow(ico_syc_win_info_t *win_info)
{
- ICO_DBG("CicoHomeScreen::ShowApplicationWindow Enter");
+ ICO_TRA("CicoHomeScreen::ShowApplicationWindow Enter");
- CicoSCLifeCycleController *lifecycle =
- CicoSCLifeCycleController::getInstance();
- const CicoSCAilItems* ailItem = lifecycle->findAIL(win_info->appid);
+ CicoHSLifeCycleController *lifecycle =
+ CicoHSLifeCycleController::getInstance();
+ const CicoAilItems* ailItem = lifecycle->findAIL(win_info->appid);
if (NULL == ailItem) {
ICO_WRN("ailItem not found.");
- ICO_DBG("CicoHomeScreen::ShowApplicationWindow Leave");
+ ICO_TRA("CicoHomeScreen::ShowApplicationWindow Leave");
return;
}
int zoneid = ailItem->m_displayZone;
ICO_DBG("zoneid=%d", zoneid);
const CicoSCDisplayZoneConf* dispZoneConf =
- CicoSCSystemConfig::getInstance()->findDisplayZoneConfbyId(zoneid);
+ CicoSystemConfig::getInstance()->findDisplayZoneConfbyId(zoneid);
if (NULL == dispZoneConf) {
ICO_WRN("display zone config not found.");
- ICO_DBG("CicoHomeScreen::ShowApplicationWindow Leave");
+ ICO_TRA("CicoHomeScreen::ShowApplicationWindow Leave");
return;
}
ICO_DBG("appid=%s zoneid=%d:%s",
win_info->appid, zoneid, dispZoneConf->fullname.c_str());
ico_syc_win_move_t move;
- int layer;
- move.zone = (char*)dispZoneConf->fullname.c_str();
+ move.zone = (char*)dispZoneConf->fullname.c_str();
+ move.layer = HS_LAYER_APPLICATION;
+ if (ailItem->m_display != 0) {
+ move.layer = HS_LAYER_2NDDISP_APP;
+ }
move.pos_x = 0;
move.width = full_width;
move.pos_y = ICO_HS_STATUSBAR_WINDOW_HEIGHT;
move.height = full_height - ICO_HS_STATUSBAR_WINDOW_HEIGHT -
ICO_HS_CONTROLBAR_WINDOW_HEIGHT;
- layer = HS_LAYER_APPLICATION;
- ico_syc_change_layer(win_info->appid,win_info->surface,layer);
ico_syc_move(win_info->appid,win_info->surface,&move,NULL);
ico_syc_animation_t animation;
animation.name = (char*)ICO_HS_MENU_HIDE_ANIMATION_FADE;
}
}
#endif
- ICO_DBG("CicoHomeScreen::ShowApplicationWindow Leave");
+ ICO_TRA("CicoHomeScreen::ShowApplicationWindow Leave");
}
/*--------------------------------------------------------------------------*/
if (appinfo == NULL) {
return;
}
+
+ // change layer when moved zone in second display
+ ico_hs_window_info *winfo = NULL;
+ winfo = appinfo->GetWindowInfobySurface(win_attr->surface);
+ if (NULL != winfo) {
+ if (win_attr->nodeid != winfo->nodeid) {
+ if (0 == win_attr->nodeid) {
+ if (NULL != hs_instance->GetSubDisplayAppInfo()) {
+ if (hs_instance->m_appHis) {
+ const string& wapp = hs_instance->m_appHis->getSelectApp();
+ ICO_DBG("\"%s\"->\"%s\"", wapp.c_str(), winfo->appid);
+ if ((false == wapp.empty()) &&
+ (0 != wapp.compare(winfo->appid))) {
+ hs_instance->requestHideAppid(wapp);
+ hs_instance->m_appHis->clearSelectApp();
+ hs_instance->m_appHis->homeSwipe();
+ }
+ }
+ ICO_DBG("reset sub display");
+ hs_instance->SetSubDisplayAppInfo(NULL);
+ hs_instance->ChangeActive(winfo->appid, winfo->surface);
+ }
+ }
+ else {
+ ICO_DBG("set sub display");
+ hs_instance->SetSubDisplayAppInfo(winfo->appid);
+ }
+
+ if (hs_instance->m_appHis) {
+ if (true == hs_instance->m_appHis->chgChk()) {
+ hs_instance->m_appHis->writeAppHistory();
+ }
+ hs_instance->m_appHis->homeSwipe();
+ }
+ }
+ }
+
+ // update window information
appinfo->AddWindowAttr(win_attr);
hs_instance->UpdateTile(win_attr->appid);
}
*/
/*--------------------------------------------------------------------------*/
int
-CicoHomeScreen::Initialize(int orientation,CicoHomeScreenConfig *config)
+CicoHomeScreen::Initialize(int orientation, CicoGKeyFileConfig *config)
{
ICO_DBG("CicoHomeScreen::Initialize: start");
hs_instance = this;
/*config copy*/
- this->config = config;
+ this->config = new CicoGKeyFileConfig();
+ this->config->Initialize(ICO_HOMESCREEN_CONFIG_FILE);
/*Get application info*/
CreateAppInfoList();
/**
* @brief CicoHomeScreen::InitializeAppHistory
* Initialize application History Manager
- *
- * @param[in] user login-user name
- * @param[in] path history write file path
- * @param[in] flagpath control flag file path
*/
/*--------------------------------------------------------------------------*/
void
-CicoHomeScreen::InitializeAppHistory(const string& user, const string& path,
- const string& pathD,
- const string& flagpath)
+CicoHomeScreen::InitializeAppHistory(void)
{
- ICO_DBG("start %s, %s, %s", user.c_str(), path.c_str(), flagpath.c_str());
+ ICO_DBG("start");
if (NULL != m_appHis) {
ICO_DBG("end");
return;
}
- m_appHis = new CicoHSAppHistoryExt(user, path, pathD, flagpath);
+ CicoHSCmdOpts* cmdOpts = CicoHSCmdOpts::getInstance();
+ m_appHis = new CicoHSAppHistoryExt(cmdOpts->getLoginUser(),
+ cmdOpts->getHistoryFilePath(),
+ cmdOpts->getDefaultHistoryFilePath(),
+ cmdOpts->getFlagPath());
m_appHis->force_flagoff();
m_appHis->setHomeScreen(this);
/*--------------------------------------------------------------------------*/
/**
- * @brief CicoHomeScreen::StartLoop
- * start ecore loop
+ * @brief launch applications
*
- * @param[in] none
- * @return none
- */
-/*--------------------------------------------------------------------------*/
-void
-CicoHomeScreen::StartLoop(void)
-{
- CicoHSWindowController::StartEcoreLoop();
+ * @param filepath start applications list file path
+ * @param filepathD defalt start applications list file path
+ * @return bool
+ * @retval true success
+ * @retval false fail
+ */
+/*--------------------------------------------------------------------------*/
+static Eina_Bool launchApps(void* data)
+{
+ ICO_DBG("start");
+ launcApps_data_t* x = (launcApps_data_t*) data;
+ if ((NULL == x) || (NULL == x->hs)) {
+ ICO_DBG("end fail");
+ return ECORE_CALLBACK_CANCEL;
+ }
+
+ vector<pairAppidSubd> apps;
+ x->hs->readStartupApp(apps);
+
+ int sz = apps.size();
+ for (int i =sz; i > 0; i--) {
+ string appid = apps[i-1].first;
+ bool bFLAG = apps[i-1].second;
+ const char* app = appid.c_str();
+ ICO_PRF("CHG_APP_STA 1.request app=%s", app);
+ int pid = aul_launch_app(appid.c_str(), NULL);
+ ICO_DBG(" 1.request [%d]%d:%s:%d", i, pid, app, (int)bFLAG);
+ if ((0 < pid) && (NULL != x->hs)) {
+ x->hs->startupCheckAdd(pid, appid, bFLAG);
+ }
+ }
+ ICO_DBG("end success");
+ return ECORE_CALLBACK_CANCEL;
}
/*--------------------------------------------------------------------------*/
* @return none
*/
/*--------------------------------------------------------------------------*/
-void
-CicoHomeScreen::StartHomeScreen()
+int
+CicoHomeScreen::StartHomeScreen(int orientation)
{
+ ICO_TRA("CicoHomeScreen::StartHomeScreen Enter");
+
+ /*save instance pointer */
+ hs_instance = this;
+
+ /*config copy*/
+ this->config = new CicoGKeyFileConfig();
+ this->config->Initialize(ICO_HOMESCREEN_CONFIG_FILE);
+
+ /*Get application info*/
+ CreateAppInfoList();
+
+ /* get pkg name (home screen,status bar,on screen)*/
+ char *pkg;
+ ICO_DBG("CicoHomeSceen::StartHomeScreen: %s: %s",
+ getenv("HOME"), getenv("PKG_NAME"));
+ pkg = getenv("PKG_NAME");
+ memset(hs_package_name, 0, ICO_HS_MAX_PROCESS_NAME);
+ if (pkg) {
+ strncpy(hs_package_name, pkg, ICO_HS_MAX_PROCESS_NAME);
+ }
+ else {
+ strncpy(hs_package_name, ICO_HS_PROC_DEFAULT_HOMESCREEN,
+ ICO_HS_MAX_PROCESS_NAME);
+ }
+
+ /* create application control instance */
+ CicoHSAppControl *m_appctrl = CicoHSAppControl::getInstance();
+
+ /* create server instance */
+ CicoHSServer *server = CicoHSServer::getInstance();
+ server->setAppCtrl(m_appctrl);
+ server->startup(10001, (const char*)"ico_hs_protocol");
+
+ /* Initialize WindowController */
+ CicoHSWindowController::Initialize();
+ ICO_DBG("CicoHomeScreen::StartHomeScreen: window controller initialized");
+
+ ICO_DBG("CicoHomeScreen::StartHomeScreen: start connect to systemcontroller");
+ ico_syc_connect(EventCallBack,NULL);
+ ICO_DBG("CicoHomeScreen::StartHomeScreen: end connect to systemcontroller");
+
+ /*initialize system controller*/
+ /*my info*/
+ ICO_DBG("CicoHomeScreen::StartHomeScreen: get package name %s",hs_package_name);
+ hs_app_info = GetAppInfo(hs_package_name);
+
+ /*start home statusbar and onscreen*/
+ StartRelations();
+ ICO_DBG("CicoHomeScreen::StartHomeScreen: start relation apps");
+
+ /* Get screen size */
+ CicoHSWindowController::GetFullScreenSize(orientation,
+ &full_width,&full_height);
+
+ ICO_DBG("full screen size x=%d y=%d",full_width,full_height);
+
+ /* MenuScreen Window Size */
+ menu_width = full_width;
+ menu_height = full_height - ICO_HS_STATUSBAR_WINDOW_HEIGHT -
+ ICO_HS_CONTROLBAR_WINDOW_HEIGHT;
+
+ /* BackGround Window Size */
+ bg_width = full_width;
+ bg_height = full_height;
+
+ /* Control Bar Window Size */
+ ctl_bar_width = full_width;
+ ctl_bar_height = ICO_HS_CONTROLBAR_WINDOW_HEIGHT;
+
+ // load switch display zone config
+ moveZoneName = config->ConfigGetString("switchzone", "movezone", NULL);
+
+ moveZoneAnimation.name = (char*)config->ConfigGetString("switchzone",
+ "animation",
+ ICO_HS_ANIMATION_FADE);
+
+ moveZoneAnimation.time = config->ConfigGetInteger("switchzone",
+ "animatime", 400);
+
+ // debug log
+ ICO_DBG("moveZoneName=%s animation=%s time=%d",
+ moveZoneName, moveZoneAnimation.name, moveZoneAnimation.time);
+
+ // AUL Listen Signal set(launch/dead)
+ initAulListenXSignal();
+
+ // application history class init. before call launchApps
+ InitializeAppHistory();
+
+ /* application history launch */
+ t_launcApps_data* x = new t_launcApps_data;
+ CicoHSCmdOpts* cmdOpts = CicoHSCmdOpts::getInstance();
+ x->filePath = cmdOpts->getHistoryFilePath();
+ x->filePathD = cmdOpts->getDefaultHistoryFilePath();
+ x->hs = this;
+ ecore_timer_add(0.01, launchApps, x);
+
/*Create window*/
CreateControlBarWindow();
/*Show Home Screen*/
ShowHomeScreenLayer();
- /* start loop*/
- StartLoop();
+ ICO_TRA("CicoHomeScreen::StartHomeScreen Leave");
+ return 0;
}
/*--------------------------------------------------------------------------*/
void
CicoHomeScreen::SetNightMode(void* data)
{
- ICO_DBG("CicoHomeScreen::SetNightMode Enter");
+ ICO_TRA("CicoHomeScreen::SetNightMode Enter");
// night mode action
hs_instance->ctl_bar_window->SetNightMode();
hs_instance->menu_window->SetNightMode();
- ICO_DBG("CicoHomeScreen::SetNightMode Leave");
+ ICO_TRA("CicoHomeScreen::SetNightMode Leave");
}
/*--------------------------------------------------------------------------*/
void
CicoHomeScreen::SetRegulation(void* data)
{
- ICO_DBG("CicoHomeScreen::SetRegulation Enter");
+ ICO_TRA("CicoHomeScreen::SetRegulation Enter");
// window control
hs_instance->controlRegulation();
// regulation action
}
}
- ICO_DBG("CicoHomeScreen::SetRegulation Leave");
+ ICO_TRA("CicoHomeScreen::SetRegulation Leave");
}
/*--------------------------------------------------------------------------*/
}
/* get APP information*/
- std::vector<CicoSCAilItems> aillist = life_cycle_controller->getAilList();
+ std::vector<CicoAilItems> aillist = life_cycle_controller->getAilList();
/*create instance*/
for ( ii = 0;
void
CicoHomeScreen::RenewAppInfoList(void)
{
- ICO_DBG("CicoHomeScreen::RenewAppInfoList Enter");
+ ICO_TRA("CicoHomeScreen::RenewAppInfoList Enter");
hs_instance->RenewAppInfoList_i();
- ICO_DBG("CicoHomeScreen::RenewAppInfoList Leave");
+ ICO_TRA("CicoHomeScreen::RenewAppInfoList Leave");
}
/*--------------------------------------------------------------------------*/
/*--------------------------------------------------------------------------*/
void CicoHomeScreen::startupCheck(const char* appid)
{
- ICO_TRA("start");
+ ICO_TRA("CicoHomeScreen::startupCheck Enter");
if (NULL == life_cycle_controller) {
- ICO_TRA("end");
+ ICO_ERR("life_cycle_controller is null");
+ ICO_TRA("CicoHomeScreen::startupCheck Leave");
return;
}
if (NULL == m_appHis) {
- ICO_TRA("end");
+ ICO_ERR("m_appHis is null");
+ ICO_TRA("CicoHomeScreen::startupCheck Leave");
return;
}
if (false == m_appHis->isStartupChecking()) {
- ICO_TRA("end");
+ ICO_TRA("CicoHomeScreen::startupCheck Leave");
return;
}
m_appHis->update_appid();
m_appHis->startupEntryFinish(appid);
if (false == m_appHis->isFinish()) {
- ICO_TRA("end");
+ ICO_TRA("CicoHomeScreen::startupCheck Leave");
return;
}
finishStartup();
- ICO_TRA("end");
+ ICO_TRA("CicoHomeScreen::startupCheck Leave");
}
/*--------------------------------------------------------------------------*/
void CicoHomeScreen::finishStartup(void)
{
- ICO_TRA("start");
+ ICO_TRA("CicoHomeScreen::finishStartup Enter");
string last = m_appHis->getLastStartupAppid();
const string& subDisp = m_appHis->getSubDispAppid();
}
m_appHis->stopStartupCheck();
- ICO_TRA("end");
+ ICO_TRA("CicoHomeScreen::finishStartup Leave");
}
/*--------------------------------------------------------------------------*/
/*--------------------------------------------------------------------------*/
void CicoHomeScreen::readStartupApp(std::vector<pairAppidSubd>& apps)
{
- ICO_DBG("start");
+ ICO_TRA("CicoHomeScreen::readStartupApp Enter");
if (NULL == m_appHis) {
apps.clear();
}
else {
m_appHis->readAppHistory(apps);
}
- ICO_DBG("end (%d)", (int)apps.size());
+ ICO_TRA("CicoHomeScreen::readStartupApp Leave(%d)", (int)apps.size());
return;
}
void CicoHomeScreen::requestActivationAppid(const std::string& app)
{
const char* appid = app.c_str();
- ICO_TRA("start %s", appid);
+ ICO_TRA("CicoHomeScreen::requestActivationAppid Enter(%s)", appid);
CicoHSAppInfo *ai = GetAppInfo(appid);
if (NULL == ai) {
ICO_DBG("end %d", appid);
hs_instance->SetActiveAppInfo(app.c_str());
ico_syc_show(appid, surface, NULL);
ico_syc_change_active(appid, surface);
- ICO_TRA("end");
+ ICO_TRA("CicoHomeScreen::requestActivationAppid Leave");
}
/*--------------------------------------------------------------------------*/
/*--------------------------------------------------------------------------*/
void CicoHomeScreen::controlRegulation(bool regStt)
{
- ICO_TRA("start %s", regStt? "true": "false");
+ ICO_TRA("CicoHomeScreen::controlRegulation Enter(%s)",
+ regStt? "true": "false");
if (NULL == m_appHis) {
- ICO_TRA("end");
+ ICO_ERR("m_appHis is null");
+ ICO_TRA("CicoHomeScreen::controlRegulation Leave");
return;
}
const string& wapp = m_appHis->getSelectApp(); // select appid get
m_appHis->clearSelectApp(); // select appid clear
m_appHis->homeSwipe();
}
- ICO_TRA("end");
+ ICO_TRA("CicoHomeScreen::controlRegulation Leave");
}
/*--------------------------------------------------------------------------*/
bool
CicoHomeScreen::ActivationUpdate_i(void)
{
+ ICO_TRA("CicoHomeScreen::ActivationUpdate_i Enter");
if (NULL == m_appHis) {
- ICO_DBG("false");
+ ICO_ERR("m_appHis is null");
+ ICO_TRA("CicoHomeScreen::ActivationUpdate_i Leave(false)");
return false;
}
bool bR = false;
m_appHis->clearSelectApp(); // select appid clear
m_appHis->homeSwipe();
}
- ICO_DBG("%s", bR? "true": "false");
+ ICO_TRA("CicoHomeScreen::ActivationUpdate_i Leave(%s)",
+ bR? "true": "false");
return bR;
}
+/*--------------------------------------------------------------------------*/
+/**
+ * @brief CicoHomeScreen::ShowApp_i
+ * show app
+ *
+ * @param app appid
+ */
+/*--------------------------------------------------------------------------*/
+void
+CicoHomeScreen::ShowApp_i(const std::string& app)
+{
+ CicoHSAppInfo *appinfo = GetAppInfo(app.c_str());
+ if (appinfo == NULL) {
+ ICO_TRA("end get appinfo is NULL");
+ return;
+ }
+
+ ico_syc_animation_t animation;
+ animation.name = (char*)ICO_HS_MENU_HIDE_ANIMATION_FADE;
+ animation.time = ICO_HS_MENU_ANIMATION_DURATION;
+
+ ico_syc_show(appinfo->GetAppId(), appinfo->GetLastSurface(), &animation);
+ ico_syc_change_active(appinfo->GetAppId(), appinfo->GetLastSurface());
+ hs_instance->SetActiveAppInfo(appinfo->GetAppId());
+ //raise
+// RaiseApplicationWindow(appinfo->GetAppId(),
+// appinfo->GetLastSurface());
+ ICO_DBG("raise app %s", app.c_str());
+ m_appHis->moveHistoryHead(app);
+}
+
+/*--------------------------------------------------------------------------*/
+/**
+ * @brief CicoHomeScreen::ShowApp
+ * show app
+ *
+ * @param app appid
+ */
+/*--------------------------------------------------------------------------*/
+void
+CicoHomeScreen::ShowApp(const std::string& app)
+{
+ hs_instance->ShowApp_i(app);
+}
+
+/*--------------------------------------------------------------------------*/
+/**
+ * @brief CicoHomeScreen::HideAppid
+ * hide app
+ *
+ * @param app appid
+ */
+/*--------------------------------------------------------------------------*/
+void
+CicoHomeScreen::HideApp(const std::string& app)
+{
+ const char* appid = app.c_str();
+ ICO_TRA("start %s", appid);
+ CicoHSAppInfo *ai = GetAppInfo(appid);
+ if (NULL == ai) {
+ ICO_DBG("end %d", appid);
+ return;
+ }
+
+ ico_syc_animation_t animation;
+ animation.name = (char*)ICO_HS_MENU_HIDE_ANIMATION_FADE;
+ animation.time = ICO_HS_MENU_ANIMATION_DURATION;
+
+ int surface = ai->GetLastSurface();
+ ico_syc_hide(appid, surface, &animation);
+ ICO_TRA("end");
+}
+
+/*--------------------------------------------------------------------------*/
+/**
+ * @brief CicoHomeScreen::MoveApp
+ * move app
+ *
+ * @param app appid
+ * @param zone zone
+ */
+/*--------------------------------------------------------------------------*/
+void
+CicoHomeScreen::MoveApp(const std::string& app, const std::string& zone)
+{
+ CicoHSAppInfo *appinfo = GetAppInfo((const char*)app.c_str());
+ if ((CicoHSAppInfo*)0 == appinfo) {
+ ICO_DBG("GetAppInfo(%s) is NULL" , app.c_str());
+ return;
+ }
+
+ int surface = appinfo->GetLastSurface();
+ ico_hs_window_info* wininfo = appinfo->GetWindowInfobySurface(surface);
+ int layer = HS_LAYER_APPLICATION;
+ const char *dispzone = (const char*)zone.c_str();
+ ico_syc_win_move_t move = {
+ .zone = (char*)dispzone,
+ .layer = layer,
+ .pos_x = 0,
+ .pos_y = 0,
+ .width = 0,
+ .height = 0
+ };
+
+ ico_syc_move(wininfo->appid, wininfo->surface, &move,
+ &hs_instance->moveZoneAnimation);
+}
// vim: set expandtab ts=4 sw=4:
#include "CicoHomeScreenCommon.h"
-#include "CicoHomeScreenConfig.h"
+#include "CicoGKeyFileConfig.h"
#include "CicoHSMenuWindow.h"
#include "CicoHSBackWindow.h"
#include "CicoHSControlBarWindow.h"
#include "CicoHSWindowController.h"
#include "CicoHSAppInfo.h"
-#include "CicoSCSystemConfig.h"
-#include "CicoSCLifeCycleController.h"
+#include "CicoSystemConfig.h"
+#include "CicoHSLifeCycleController.h"
#include "CicoHSAppHistory.h"
#include "CicoHSAppHistoryExt.h"
#define ICO_HS_CONFIG_HOMESCREEN "homescreen"
#define ICO_HS_CONFIG_ONSCREEN "onscreen"
-#define ICO_HS_CONFIG_STATUBAR "statusbar"
#define ICO_HS_CONFIG_SOUND "sound"
#define ICO_HS_CONFIG_SB "statusbar"
#define ICO_HS_CONFIG_ONS "onscreen"
-#define ICO_HS_APPID_DEFAULT_SB "org.tizen.ico.statusbar" /* default status bar appid */
+#define ICO_HS_APPID_DEFAULT_SB "org.tizen.ico.statusbar" /* default statusbar appid */
#define ICO_HS_APPID_DEFAULT_ONS "org.tizen.ico.onscreen" /* default on screen appid */
#define ICO_HS_GROUP_SPECIAL "menu"
public:
CicoHomeScreen(void);
~CicoHomeScreen(void);
- int Initialize(int orientation,CicoHomeScreenConfig *config);
- void InitializeAppHistory(const std::string& user, const std::string& path,
- const std::string& pathD,
- const std::string& flagpath);
+ int Initialize(int orientation,CicoGKeyFileConfig *config);
+ void InitializeAppHistory(void);
void Finalize(void);
int StartRelations();
void CreateMenuWindow(void);
void DeleteControlBarWindow(void);
void CreateSwipeInputWindow(void);
void DeleteSwipeInputWindow(void);
- void StartLoop(void);
char *GetHsPackageName(void);
char *GetSbPackageName(void);
char *GetOsPackageName(void);
static CicoHSAppInfo *GetAppInfo(const char *appid);
void SetMode(int mode);
int GetMode(void);
- void StartHomeScreen();
+ int StartHomeScreen(int orientation);
void UpdateTile(const char *appid);
static void RenewAppInfoList(void);
void controlRegulation(bool regStt=true);
static bool ActivationUpdate(void);
bool ActivationUpdate_i(void);
+ static void ShowApp(const std::string& app);
+ static void HideApp(const std::string& app);
+ static void MoveApp(const std::string& app, const std::string& zone);
private:
int GetProcessWindow(const char *appid);
static void EventCallBack(ico_syc_ev_e event,const void* detail,void* user_data);
static void SetNightMode(void* data);
static void SetRegulation(void* data);
+ void ShowApp_i(const std::string& app);
void RenewAppInfoList_i(void);
/*application control(do not use now)*/
/*mode*/
int mode;
/*configuration*/
- CicoHomeScreenConfig *config;
+ CicoGKeyFileConfig *config;
/*my instance for callback*/
static CicoHomeScreen *hs_instance;
- CicoSCLifeCycleController* life_cycle_controller;
+ CicoHSLifeCycleController* life_cycle_controller;
CicoHSAppHistoryExt* m_appHis;
// current sub display appinfo
CicoHomeScreen operator=(const CicoHomeScreen&);
CicoHomeScreen(const CicoHomeScreen&);
};
-
#endif
+// vim:set expandtab ts=4 sw=4:
#define ICO_HS_ANIMATION_DURATION (400)
#endif
+// vim:set expandtab ts=4 sw=4:
+++ /dev/null
-/*
- * Copyright (c) 2013, TOYOTA MOTOR CORPORATION.
- *
- * This program is licensed under the terms and conditions of the
- * Apache License, version 2.0. The full text of the Apache License is at
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- */
-/**
- * @brief sound an operation of homescreen
- *
- * @date Apr-04-2013
- */
-
-#include "CicoHomeScreenSound.h"
-
-/*============================================================================*/
-/* functions */
-/*============================================================================*/
-
-/*--------------------------------------------------------------------------*/
-/**
- * @brief CicoHomeScreenSound::ReadSoundConfiguration
- * read configuration and set
- *
- * @param[in] homescreen_config configuration instance
- * @param[in] type operation type
- * @param[in] conf_name configuration name
- * @return result
- * @retval >=0 success
- * @retval NULL err
- */
-/*--------------------------------------------------------------------------*/
-CicoHomeScreenSoundConfig *
-CicoHomeScreenSound::ReadSoundConfiguration(CicoHomeScreenConfig *homescreen_config,
- int type, char *conf_name)
-{
- char *file;
- CicoHomeScreenSoundConfig *sound_config;
-
- sound_config = new CicoHomeScreenSoundConfig();
- if (sound_config == NULL) {
- ICO_WRN("CicoHomeScreenSound::ReadSoundConfiguration: Leave(fail to alloc memory");
- return NULL;
- }
-
- if (strcmp(conf_name, ICO_HS_SND_CNAME_DEFAULT) == 0) {
- file = (char *)homescreen_config->ConfigGetString(ICO_HS_CONFIG_SOUND,
- conf_name,ICO_HS_SND_FNAME_DEFAULT);
- }
- else {
- file = (char *)homescreen_config->ConfigGetString(ICO_HS_CONFIG_HOMESCREEN,
- conf_name,NULL);
- }
-
- if (!file) {
- ICO_ERR("CicoHomeScreenSound::ReadSoundConfiguration: Leave(given config is not exist");
- delete sound_config;
- return NULL;
- }
-
- sound_config->SetFile(file);
- sound_config->SetType(type);
- sound_config->SetNext(sound_files);
-
- sound_files = sound_config;
-
- return sound_config;
-}
-
-/*--------------------------------------------------------------------------*/
-/**
- * @brief CicoHomeScreenSound::CicoHomeScreenSound
- * constractor
- *
- * @param none
- * @return none
- */
-/*--------------------------------------------------------------------------*/
-CicoHomeScreenSound::CicoHomeScreenSound(void){
- snd_is_initialize = false;
- sound_files = NULL;
-}
-
-/*--------------------------------------------------------------------------*/
-/**
- * @brief Initialize
- * initialize to sound a operation
- *
- * @param[in] homescreen_config configuration instance
- * @return result
- * @retval ICO_HS_OK success
- * @retval ICO_HS_ERR err
- */
-/*--------------------------------------------------------------------------*/
-int
-CicoHomeScreenSound::Initialize(CicoHomeScreenConfig *homescreen_config)
-{
- if (snd_is_initialize != true) {
- /* read sound file name from configuration */
- ReadSoundConfiguration(homescreen_config,ICO_HS_SND_TYPE_DEFAULT,
- const_cast<char*>(ICO_HS_SND_CNAME_DEFAULT));
-
- CicoHomeScreenResourceConfig::GetSoundPath(soundpath, sizeof(soundpath));
- snd_is_initialize = true;
- }
-
- return ICO_HS_OK;
-}
-
-/*--------------------------------------------------------------------------*/
-/**
- * @brief CicoHomeScreenSound::PlaySound
- * play the given sound file(.wav).
- *
- * @param[in] wav_file wav formated file.
- * @return result
- * @retval ICO_HS_OK success
- * @retval ICO_HS_ERR err
- */
-/*--------------------------------------------------------------------------*/
-int
-CicoHomeScreenSound::PlaySound(char *wav_file)
-{
- int pid;
- char command[ICO_HS_TEMP_BUF_SIZE];
-
- if (snd_is_initialize != true) {
- return ICO_HS_ERR;
- }
-
- if (!wav_file) {
- ICO_WRN("CicoHomeScreenSound::PlaySound: Leave(error file name is NULL");
- return ICO_HS_ERR;
- }
-
- if (wav_file[0] == '/') {
- /* given by full file path */
- snprintf(command, sizeof(command),
- "paplay --stream-name=HOMESCREEN_BEEP %s", wav_file);
- }
- else {
- snprintf(command, sizeof(command),
- "paplay --stream-name=HOMESCREEN_BEEP %s/%s", soundpath, wav_file);
- }
-
- ICO_DBG("CicoHomeScreenSound::PlaySound: system(%s)", command);
- pid = fork();
- if (!pid) {
- system(command);
- exit(0);
- }
-
- return ICO_HS_OK;
-}
-
-
-/*--------------------------------------------------------------------------*/
-/**
- * @brief hs_snd_get_filename
- * get the file name by given operation type
- *
- * @param[in] type operation type
- * @return pointer to the file name
- * @retval >=0 success
- * @retval NULL err
- */
-/*--------------------------------------------------------------------------*/
-char *
-CicoHomeScreenSound::GetSoundFileName(int type)
-{
- CicoHomeScreenSoundConfig *sound_config;
-
- if (snd_is_initialize != true) {
- return NULL;
- }
-
- sound_config = sound_files;
- while (sound_config != NULL) {
- if (sound_config->GetType() == type) {
- return sound_config->GetFile();
- }
- sound_config = sound_config->GetNext();
- }
-
- return NULL;
-}
-
+++ /dev/null
-#ifndef __CICOHOMESCREENSOUND_H__
-#define __CICOHOMESCREENSOUND_H__
-/*
- * Copyright (c) 2013, TOYOTA MOTOR CORPORATION.
- *
- * This program is licensed under the terms and conditions of the
- * Apache License, version 2.0. The full text of the Apache License is at
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- */
-/**
- * @brief sound an operation of homescreen
- *
- * @date Apr-04-2013
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-#include <stdbool.h>
-
-//#include "ico_uxf.h"
-//#include "ico_uxf_conf_def.h"
-//#include "home_screen.h"
-#include "CicoHomeScreenCommon.h"
-#include "CicoHomeScreenConfig.h"
-#include "CicoHomeScreenResourceConfig.h"
-#include "CicoHomeScreenSoundConfig.h"
-
-/* define for sound configuration */
-#define ICO_HS_SND_TYPE_DEFAULT (1)
-
-#define ICO_HS_SND_CNAME_DEFAULT "sound_default"
-#define ICO_HS_SND_FNAME_DEFAULT "default.wav"
-
-
-/*============================================================================*/
-/* Class Declaration (CicoHomeScreenSound) */
-/*============================================================================*/
-class CicoHomeScreenSound
-{
- public:
- CicoHomeScreenSound(void);
- CicoHomeScreenSoundConfig *ReadSoundConfiguration(CicoHomeScreenConfig *homescreen_config,
- int type,char *conf_name);
- int Initialize(CicoHomeScreenConfig *homescreen_config);
- int PlaySound(char *wav_file);
- char *GetSoundFileName(int type);
- private:
- int snd_is_initialize;
- CicoHomeScreenSoundConfig *sound_files;
- char soundpath[ICO_HS_TEMP_BUF_SIZE];
- protected:
- CicoHomeScreenSound operator = (const CicoHomeScreenSound&);
- CicoHomeScreenSound(const CicoHomeScreenSound&);
-};
-
-#endif
+++ /dev/null
-/*
- * Copyright (c) 2013, TOYOTA MOTOR CORPORATION.
- *
- * This program is licensed under the terms and conditions of the
- * Apache License, version 2.0. The full text of the Apache License is at
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- */
-/**
- * @brief sound an operation of homescreen
- *
- * @date Apr-04-2013
- */
-
-#include "CicoHomeScreenSoundConfig.h"
-
-/*============================================================================*/
-/* functions */
-/*============================================================================*/
-
-/*--------------------------------------------------------------------------*/
-/**
- * @brief CicoHomeScreenSoundConfig::SetFile
- * set sound file name
- *
- * @param[in] file_tmp sound file name
- * @return none
- */
-/*--------------------------------------------------------------------------*/
-void
-CicoHomeScreenSoundConfig::SetFile(char *file_tmp)
-{
- file = file_tmp;
-}
-
-/*--------------------------------------------------------------------------*/
-/**
- * @brief CicoHomeScreenSoundConfig::GetFile
- * get sound file name
- *
- * @param[in] none
- * @return sound file name
- */
-/*--------------------------------------------------------------------------*/
-char*
-CicoHomeScreenSoundConfig::GetFile(void)
-{
- return file;
-}
-/*--------------------------------------------------------------------------*/
-/**
- * @brief CicoHomeScreenSoundConfig::SetType
- * set sound type
- *
- * @param[in] type_tmp the value to set type
- * @return none
- */
-/*--------------------------------------------------------------------------*/
-void
-CicoHomeScreenSoundConfig::SetType(int type_tmp)
-{
- type = type_tmp;
-}
-/*--------------------------------------------------------------------------*/
-/**
- * @brief CicoHomeScreenSoundConfig::GetType
- * get sound type
- *
- * @param[in] none
- * @return type
- */
-/*--------------------------------------------------------------------------*/
-int
-CicoHomeScreenSoundConfig::GetType(void)
-{
- return type;
-}
-/*--------------------------------------------------------------------------*/
-/**
- * @brief CicoHomeScreenSoundConfig::SetNext
- * set next instance
- *
- * @param[in] next instance
- * @return none
- */
-/*--------------------------------------------------------------------------*/
-void
-CicoHomeScreenSoundConfig::SetNext(CicoHomeScreenSoundConfig *next_tmp)
-{
- next = next_tmp;
-}
-
-/*--------------------------------------------------------------------------*/
-/**
- * @brief CicoHomeScreenSoundConfig::GetNext
- * get next instance
- *
- * @param[in] none
- * @return next instance
- */
-/*--------------------------------------------------------------------------*/
-CicoHomeScreenSoundConfig*
-CicoHomeScreenSoundConfig::GetNext(void)
-{
- return next;
-}
-
+++ /dev/null
-#ifndef __HOMESCREENSOUNDCONFIG_H__
-#define __HOMESCREENSOUNDCONFIG_H__
-/*
- * Copyright (c) 2013, TOYOTA MOTOR CORPORATION.
- *
- * This program is licensed under the terms and conditions of the
- * Apache License, version 2.0. The full text of the Apache License is at
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- */
-/**
- * @brief sound an operation of homescreen
- *
- * @date Apr-04-2013
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-#include <stdbool.h>
-
-#include "CicoHomeScreenConfig.h"
-#include "CicoHomeScreenResourceConfig.h"
-
-/*============================================================================*/
-/* Class Declaration (CicoHomeScreenSoundConfig) */
-/*============================================================================*/
-class CicoHomeScreenSoundConfig
-{
- public:
- CicoHomeScreenSoundConfig(){};
- void SetFile(char *file_tmp);
- char *GetFile(void);
- void SetType(int type_tmp);
- int GetType(void);
- void SetNext(CicoHomeScreenSoundConfig *next_tmp);
- CicoHomeScreenSoundConfig *GetNext(void);
- private:
- CicoHomeScreenSoundConfig *next;
- int type; /* operation type */
- char *file; /* sound file name */
- protected:
- CicoHomeScreenSoundConfig operator=(const CicoHomeScreenSoundConfig&);
- CicoHomeScreenSoundConfig(const CicoHomeScreenSoundConfig&);
-};
-
-#endif
+++ /dev/null
-/*
- * Copyright (c) 2013, TOYOTA MOTOR CORPORATION.
- *
- * This program is licensed under the terms and conditions of the
- * Apache License, version 2.0. The full text of the Apache License is at
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- */
-/**
- * @brief Application Framework debug log function
- *
- * @date Feb-28-2013
- */
-
-#include <string>
-#include "CicoLog.h"
-
-CicoLog* CicoLog::ms_myInstance = NULL;
-int CicoLog::m_sTimeZone = 99*60*60;
-
-CicoLog::CicoLog()
- : m_logLevel(0x7fffffff), m_flushMode(true), m_initialized(false),
- m_sDbgFd(NULL), m_sDbgLines(0)
-{
- memset(&m_sDbgProg[0], 0, sizeof(m_sDbgProg));
-}
-
-CicoLog::~CicoLog()
-{
- closeLog();
-}
-
-CicoLog*
-CicoLog::getInstance(void)
-{
- if (NULL == ms_myInstance) {
- ms_myInstance = new CicoLog();
- }
- return ms_myInstance;
-}
-/*--------------------------------------------------------------------------*/
-/**
- * @brief ico_apf_log_print: printout log message
- *
- * @param[in] fmt message format(same as printf)
- * @param[in] ... arguments if need
- * @return nothing
- */
-/*--------------------------------------------------------------------------*/
-void
-CicoLog::printLog(int loglevel, const char *fmt, ...)
-{
- if (m_logLevel < loglevel) {
- return;
- }
- va_list list;
-
- if (! m_sDbgFd) {
- openLog(NULL);
- }
-#if ICO_APF_LOG_STDOUT == 0
- else if (m_sDbgLines >= (ICO_LOG_MAXLINES-2)) {
- if (m_sDbgLines >= ICO_LOG_MAXLINES) {
- closeLog();
- openLog(m_sDbgProg);
- }
- else {
- fflush(m_sDbgFd);
- }
- }
-#endif /*ICO_APF_LOG_STDOUT*/
- if (m_sDbgFd) {
- va_start(list, fmt);
- vfprintf(m_sDbgFd, fmt, list);
- va_end(list);
- if (m_flushMode) {
- fflush(m_sDbgFd);
- }
- }
- if (m_sDbgFd != stdout) {
- m_sDbgLines ++;
- }
-}
-
-/*--------------------------------------------------------------------------*/
-/**
- * @brief open: open log file
- *
- * @param[in] prog program name
- * @return nothing
- */
-/*--------------------------------------------------------------------------*/
-void
-CicoLog::openLog(const char *prog)
-{
-#if ICO_LOG_STDOUT == 0
- int idx;
- char sPath[128];
- char sPath2[128];
-#endif /*ICO_LOG_STDOUT*/
-
- if (m_sDbgFd) {
- fflush(m_sDbgFd);
- if (m_sDbgFd != stdout) {
- fclose(m_sDbgFd);
- }
- }
-
- m_sDbgLines = 0;
-
- if ((! prog) || (*prog == 0)) {
- m_sDbgFd = stdout;
- m_sDbgProg[0] = 0;
- return;
- }
- else {
- strncpy(m_sDbgProg, prog, sizeof(m_sDbgProg)-1);
- m_sDbgProg[sizeof(m_sDbgProg)-1] = 0;
- }
-#if ICO_LOG_STDOUT > 0
- m_sDbgFd = stdout;
-#else /*ICO_LOG_STDOUT*/
- snprintf(sPath, sizeof(sPath)-1, "%s/%s.log%d",
- ICO_LOG_DIR, m_sDbgProg, ICO_LOG_MAXFILES-1);
- (void) remove(sPath);
-
- for (idx = (ICO_LOG_MAXFILES-1); idx > 0; idx--) {
- strcpy(sPath2, sPath);
- if (idx > 1) {
- snprintf(sPath, sizeof(sPath)-1, "%s/%s.log%d",
- ICO_LOG_DIR, m_sDbgProg, idx-1);
- }
- else {
- snprintf(sPath, sizeof(sPath)-1, "%s/%s.log",
- ICO_LOG_DIR, m_sDbgProg);
- }
- (void) rename(sPath, sPath2);
- }
- m_sDbgFd = fopen(sPath, "w");
- if (! m_sDbgFd) {
- m_sDbgFd = stdout;
- }
- else if ((m_initialized == false) &&
- (m_sDbgFd != stdout) && (m_sDbgFd != stderr)) {
- m_initialized = true;
- fflush(stdout);
- fflush(stderr);
- stdout = m_sDbgFd;
- stderr = m_sDbgFd;
- }
-#endif /*ICO_LOG_STDOUT*/
-}
-
-/*--------------------------------------------------------------------------*/
-/**
- * @brief closeLog: close log file
- *
- * @param nothing
- * @return nothing
- */
-/*--------------------------------------------------------------------------*/
-void
-CicoLog::closeLog(void)
-{
-#if ICO_LOG_STDOUT == 0
- if (m_sDbgFd) {
- fflush(m_sDbgFd);
- if (m_sDbgFd != stdout) {
- fclose(m_sDbgFd);
- }
- m_sDbgFd = (FILE *)0;
- }
-#endif /*ICO_LOG_STDOUT*/
-}
-
-/*--------------------------------------------------------------------------*/
-/**
- * @brief flushLog: flush log file
- *
- * @param nothing
- * @return nothing
- */
-/*--------------------------------------------------------------------------*/
-void
-CicoLog::flushLog(void)
-{
- if ((m_sDbgFd != NULL) && (m_flushMode == 0)) {
- fflush(m_sDbgFd);
- }
-}
-
-/*--------------------------------------------------------------------------*/
-/**
- * @brief getStrCurtime: create current time string
- *
- * @param[in] level log level string(header of log message)
- * @return current time string
- */
-/*--------------------------------------------------------------------------*/
-char *
-CicoLog::getStrCurTime(const char *level)
-{
- struct timeval NowTime;
- extern long timezone;
- static char sBuf[28];
-
- gettimeofday(&NowTime, (struct timezone *)0);
- if (m_sTimeZone > (24*60*60)) {
- tzset();
- m_sTimeZone = timezone;
- }
- NowTime.tv_sec -= m_sTimeZone;
-
- sprintf(sBuf, "%02d:%02d:%02d.%03d[%s]@%d",
- (int)((NowTime.tv_sec/3600) % 24),
- (int)((NowTime.tv_sec/60) % 60),
- (int)(NowTime.tv_sec % 60),
- (int)NowTime.tv_usec/1000, level, getpid());
-
- return sBuf;
-}
-
-/*--------------------------------------------------------------------------*/
-/**
- * @brief setLogLevel: set log output level
- *
- * @param[in] loglevel log output level
- * @return nothing
- */
-/*--------------------------------------------------------------------------*/
-void
-CicoLog::setLogLevel(const int loglevel)
-{
- m_logLevel = loglevel & (~(ICO_LOG_FLUSH|ICO_LOG_NOFLUSH));
-
- if (m_logLevel & (ICO_LOG_FLUSH|ICO_LOG_NOFLUSH)) {
- if (m_logLevel & ICO_LOG_FLUSH) {
- m_flushMode = true;
- }
- else {
- m_flushMode = false;
- }
- }
-}
-// vim:set expandtab ts=4 sw=4:
+++ /dev/null
-/*
- * Copyright (c) 2013, TOYOTA MOTOR CORPORATION.
- *
- * This program is licensed under the terms and conditions of the
- * Apache License, version 2.0. The full text of the Apache License is at
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- */
-
-/*========================================================================*/
-/**
- * @file CicoLog.h
- *
- * @brief debug log function
- */
-/*========================================================================*/
-#ifndef __CICO_LOG_H__
-#define __CICO_LOG_H__
-
-#include <ico_log.h>
-
-#endif // __CICO__LOG_H__
-/* vim:set expandtab ts=4 sw=4: */
+++ /dev/null
-/*
- * Copyright (c) 2013, TOYOTA MOTOR CORPORATION.
- *
- * This program is licensed under the terms and conditions of the
- * Apache License, version 2.0. The full text of the Apache License is at
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- */
-#include <iostream>
-#include <string>
-#include <sstream>
-#include <vector>
-#include <utility>
-#include <cstdlib>
-
-#include "CicoSCAilItems.h"
-#include "CicoSCConf.h"
-#include "CicoSCSystemConfig.h"
-#include "CicoLog.h"
-
-using namespace std;
-
-void split(const string &s, char d, vector<string> &e)
-{
- stringstream ss(s);
- string it;
- while(getline(ss, it, d)) {
- e.push_back(it);
- }
- return;
-}
-
-/**
- * @brief constructor
- */
-CicoSCAilItems::CicoSCAilItems()
-{
- ICO_TRA("start");
- init();
- ICO_TRA("end");
-}
-
-/**
- * @brief constructor
- * @param pkg package name(appid) by ail infomation data
- * @param icon icon path and file name by ail infomation data
- * @param nam name by ail infomation data
- * @param ctgry category by ail infomation data
- * @param exe exec path by ail infomation data
- * @param cateforys environ file data
- */
-CicoSCAilItems::CicoSCAilItems(const char* pkg, const char* icon,
- const char* nam, const char* ctgry,
- const char* typ, const char* exe,
- const std::string categorys, bool ndisp)
-{
- ICO_TRA("start");
- init();
- setup(pkg, icon, nam, ctgry, typ, exe, categorys, ndisp);
- ICO_TRA("end");
-}
-
-CicoSCAilItems::CicoSCAilItems(const CicoSCAilItems &s)
-{
- m_appid = s.m_appid; // PACKAGE NAME
- m_icon = s.m_icon; // ICON
- m_name = s.m_name; // NAME
- m_execPath = s.m_execPath; // EXEC
- m_type = s.m_type; // TYPE
-
- m_categories = s.m_categories; // CATEGORIES
-
- m_nodeID = s.m_nodeID; // "run=xxx" xxx change to id
- m_kindID = s.m_kindID; // "kind=xxx" xxx change to id
- m_categoryID = s.m_categoryID; // "category=xxx" xxx change to id
-
- m_display = s.m_display; //
- m_layer = s.m_layer;
- m_displayZone = s.m_displayZone; // display zone number
- m_soundZone = s.m_soundZone; // sound zone number
- m_sound = s.m_sound;
- m_inputDev = s.m_inputDev; // input device number
- m_switch = s.m_switch;
- m_noIcon = s.m_noIcon;
- m_animation = s.m_animation;
- m_animationTime = s.m_animationTime;
- m_invisibleCPU = s.m_invisibleCPU;
- m_memnuOverlap = s.m_memnuOverlap;
- m_autoStart = s.m_autoStart; // auto start flag
-
- m_group = s.m_group;
- m_location = s.m_location;
- m_resumeShow = s.m_resumeShow;
-}
-
-/**
- * @brief
- */
-CicoSCAilItems::~CicoSCAilItems()
-{
- ICO_TRA("start");
- ICO_TRA("end");
-}
-/**
- * @brief init member
- */
-void CicoSCAilItems::init()
-{
-
- m_appid.clear(); // PACKAGE NAME
- m_icon.clear(); // ICON
- m_name.clear(); // NAME
- m_execPath.clear(); // EXEC
- m_type.clear(); // TYPE
-
- m_categories.clear(); // CATEGORIES
-
- const CicoSCDefaultConf* oCSCDC;
- oCSCDC = CicoSCSystemConfig::getInstance()->getDefaultConf();
- if (NULL != oCSCDC) {
- ICO_TRA("CicoSCAilItems::init base CicoSCDefaultConf");
- m_nodeID = oCSCDC->node;
- m_kindID = oCSCDC->appkind;
- m_categoryID = oCSCDC->category;
-
- m_display = oCSCDC->display;
- m_layer = oCSCDC->layer;
- m_displayZone = oCSCDC->displayzone;
-
- m_sound = oCSCDC->sound;
- m_soundZone = oCSCDC->soundzone;
-
- m_inputDev = oCSCDC->inputdev;
- m_switch = oCSCDC->inputsw;
- }
- else {
- ICO_TRA("CicoSCAilItems::init base define");
- m_nodeID = DINITm_nodeID; // "run=xxx" xxx change to id
- m_kindID = DINITm_kindID; // "kind=xxx" xxx change to id
- m_categoryID = DINITm_categoryID; // "category=xxx" xxx change to id
-
- m_display = DINITm_display; //
- m_layer = DINITm_layer;
- m_displayZone = DINITm_displayZone; // display zone
-
- m_soundZone = DINITm_soundZone; // sound zone
- m_sound = DINITm_sound;
-
- m_inputDev = DINITm_inputDev; // input device
- m_switch = DINITm_switch;
- }
-
- m_noIcon = false;
- m_animation.clear();
- m_animationTime = DINITm_animationTime;
- m_invisibleCPU = DINITm_invisibleCPU;
- m_memnuOverlap = false;
- m_autoStart = false; // auto start flag
-
- m_group.clear();
- m_location.clear();
- m_resumeShow = false;
-}
-
-/**
- * @brief constructor
- * @param pkg package name(appid) by ail infomation data
- * @param icon icon path and file name by ail infomation data
- * @param nam name by ail infomation data
- * @param ctgry category by ail infomation data
- * @param exe exec path by ail infomation data
- * @param cateforys environ file data
- */
-void CicoSCAilItems::setup(const char* pkg, const char* icon,
- const char* nam, const char* ctgry,
- const char* typ, const char* exe,
- std::string categorys, bool ndisp)
-{
- ICO_TRA("start");
- m_appid.assign(pkg);
- ICO_DBG("package name=%s", pkg? pkg: "(NULL)");
-
- m_noIcon = ndisp;
- if (NULL != icon) {
- m_icon.assign(icon);
- ICO_DBG("icon path=%s", icon? icon: "(NULL)");
- }
-
- if (NULL != nam) {
- m_name.assign(nam);
- ICO_DBG("name=%s", nam? nam: "(NULL)");
- }
-
- if (NULL != exe) {
- m_execPath.assign(exe);
- ICO_DBG("exec path=%s", exe? exe: "(NULL)");
- }
-
- if (NULL != typ) {
- m_type.assign(typ);
- ICO_DBG("type=%s", typ? typ: "(NULL)");
- }
-
- categoryParse(categorys);
- ICO_TRA("end");
-}
-
-const string s_run("run");
-const string s_kind("kind");
-const string s_category("category");
-const string s_display("display");
-const string s_layer("layer");
-const string s_dispzone("dispzone");
-const string s_sound("sound");
-const string s_input("input");
-const string s_NoDisplay("NoDisplay");
-const string s_Animation("Animation");
-const string s_invisiblecpu("invisiblecpu");
-const string s_noconfigure("noconfigure");
-const string s_menuoverlap("menuoverlap");
-const string s_auto("auto");
-const string s_noauto("noauto");
-
-const string s_soundzone("soundzone");
-const string s_Animation_time("Animation_time");
-
-/**
- * @brief category string parse
- * @parm category string data split code ";"
- */
-void CicoSCAilItems::categoryParse(const std::string categorys)
-{
- ICO_TRA("start");
- if (categorys.empty()) {
- ICO_TRA("end no category");
- return;
- }
- vector<string> x;
- split(categorys, ';', x);
- vector<string>::iterator it = x.begin(); // iterator
- string displayName;
- string layerName;
- string dispZoneName;
- string soundName;
- string soundZoneName;
- string inputDevName;
- string switchName;
-
- displayName.clear();
- layerName.clear();
- dispZoneName.clear();
- soundName.clear();
- soundZoneName.clear();
- inputDevName.clear();
- switchName.clear();
-
- CicoSCSystemConfig* CSCSC = CicoSCSystemConfig::getInstance();
-
- ICO_DBG("category def size = %d", x.size());
- for (it = x.begin(); it != x.end(); it++) {
-
- // run
- if (0 == strncasecmp(it->c_str(), s_run.c_str(), s_run.size())) {
- if (true == categoryParseRun(*it)) {
- ICO_DBG("Parse OK %s", it->c_str());
- continue;
- }
- }
-
- // kind
- if (0 == strncasecmp(it->c_str(), s_kind.c_str(), s_kind.size())) {
- if (true == categoryParseKind(*it)) {
- ICO_DBG("Parse OK %s", it->c_str());
- continue;
- }
- }
-
- // category
- if (0 == strncasecmp(it->c_str(), s_category.c_str(),
- s_category.size())) {
- if (true == categoryParseCategory(*it)) {
- ICO_DBG("Parse OK %s", it->c_str());
- continue;
- }
- }
-
- // display
- if (0 == strncasecmp(it->c_str(), s_display.c_str(),
- s_display.size())) {
- if (true == categoryParseGetValue(*it, s_display, displayName)) {
- ICO_DBG("Parse OK %s", it->c_str());
- continue;
- }
- }
-
- // layer
- if (0 == strncasecmp(it->c_str(), s_layer.c_str(), s_layer.size())) {
- if (true == categoryParseGetValue(*it, s_layer, layerName)) {
- ICO_DBG("Parse OK %s", it->c_str());
- continue;
- }
- }
-
- // dispzone
- if (0 == strncasecmp(it->c_str(), s_dispzone.c_str(),
- s_dispzone.size())) {
- if (true == categoryParseGetValue(*it, s_dispzone, dispZoneName)) {
- ICO_DBG("Parse OK %s", it->c_str());
- continue;
- }
- }
-
- // sound / soundzone
- if (0 == strncasecmp(it->c_str(), s_soundzone.c_str(),
- s_soundzone.size())) {
- if (true == categoryParseGetValue(*it, s_soundzone,
- soundZoneName)) {
- ICO_DBG("Parse OK %s", it->c_str());
- continue;
- }
- }
- if (0 == strncasecmp(it->c_str(), s_sound.c_str(), s_sound.size())) {
- if (true == categoryParseGetValue(*it, s_sound, soundName)) {
- ICO_DBG("Parse OK %s", it->c_str());
- continue;
- }
- }
-
- // input
- if (0 == strncasecmp(it->c_str(), s_input.c_str(), s_input.size())) {
- if (true == categoryParseGetValue(*it, s_input, inputDevName)) {
- ICO_DBG("Parse OK %s", it->c_str());
- continue;
- }
- }
-// TODO mk_k not get switchName
-// switchName
-// TODO mk_k not get switchName
-
- // NoDisplay
- if (0 == strncasecmp(it->c_str(), s_NoDisplay.c_str(),
- s_NoDisplay.size())) {
- if (true == categoryParseNodisplay(*it)) {
- ICO_DBG("Parse OK %s", it->c_str());
- continue;
- }
- }
-
- // Animation / Animation_time
- if (0 == strncasecmp(it->c_str(), s_Animation.c_str(),
- s_Animation.size())) {
- if (true == categoryParseAnimation(*it)) {
- ICO_DBG("Parse OK %s", it->c_str());
- continue;
- }
- }
-
- // invisiblecpu
- if (0 == strncasecmp(it->c_str(), s_invisiblecpu.c_str(),
- s_invisiblecpu.size())) {
- if (true == categoryParseInvisiblecpu(*it)) {
- ICO_DBG("Parse OK %s", it->c_str());
- continue;
- }
- }
-
- // noconfigure
- if (0 == strncasecmp(it->c_str(), s_noconfigure.c_str(),
- s_noconfigure.size())) {
- if (true == categoryParseNoconfigure(*it)) {
- ICO_DBG("Parse OK %s", it->c_str());
- continue;
- }
- }
-
- // menuoverlap
- if (0 == strncasecmp(it->c_str(), s_menuoverlap.c_str(),
- s_menuoverlap.size())) {
- if (true == categoryParseMenuoverlap(*it)) {
- ICO_DBG("Parse OK %s", it->c_str());
- continue;
- }
- }
-
- // auto
- if (0 == strncasecmp(it->c_str(), s_auto.c_str(), s_auto.size())) {
- if (true == categoryParseAuto(*it)) {
- ICO_DBG("Parse OK %s", it->c_str());
- continue;
- }
- }
-
- // noauto
- if (0 == strncasecmp(it->c_str(), s_noauto.c_str(),
- s_noauto.size())) {
- if (true == categoryParseNoauto(*it)) {
- ICO_DBG("Parse OK %s", it->c_str());
- continue;
- }
- }
-
- int categoryID = CSCSC->getCategoryIdbyName(*it);
- const char* ttt = it->c_str()? it->c_str(): "(NULL)";
- ICO_DBG("Category %s->%d", ttt, categoryID);
- if (-1 != categoryID) {
- ICO_DBG("Category %d -> %d(%s)", m_categoryID, categoryID, ttt);
- m_categoryID = categoryID;
- continue;
- }
-
- ICO_DBG("Parse UNKOWN %s", it->c_str());
- }
- categoryGetDisplay(displayName, layerName, dispZoneName);
- categoryGetSound(soundName, soundZoneName);
- categoryGetInput(inputDevName, switchName);
- ICO_TRA("end");
-}
-
-/**
- * @brief category string parse
- * @param category string
- * @retval true parse success
- * @retval false parse fail
- */
-bool CicoSCAilItems::categoryParseRun(const string& s)
-{
- ICO_TRA("start");
- const char* ps = s.c_str();
- int c = s_run.size();
- if ('=' != ps[c]) {
- ICO_TRA("end");
- return false;
- }
- // "run=xxx"
-// TODO mk_k START getHostID(..) request order
- CicoSCSystemConfig* CSCSC = CicoSCSystemConfig::getInstance();
- int nodeID = CSCSC->getNodeIdbyName(&ps[c+1]);
-// TODO mk_k int nodeID = -1;
-// TODO mk_k int nodeID = CSCSC->getHostID(&ps[c+1]);
-// TODO mk_k END getHostID(..) request order
- if (nodeID==-1) {
- ICO_TRA("end");
- return false;
- }
- m_nodeID = nodeID;
- ICO_TRA("end %d", m_nodeID);
- return true;
-}
-
-/**
- * @brief category string parse
- * @param category string
- * @retval true parse success
- * @retval false parse fail
- */
-bool CicoSCAilItems::categoryParseKind(const string& s)
-{
- ICO_TRA("start");
- const char* ps = s.c_str();
- int c = s_kind.size();
- if ('=' != ps[c]) {
- ICO_TRA("end");
- return false;
- }
- // "kind=xxx" xxx change to id
- CicoSCSystemConfig* CSCSC = CicoSCSystemConfig::getInstance();
- int kindID = CSCSC->getAppKindIdbyName(&ps[c+1]);
- if (kindID==-1) {
- ICO_TRA("end");
- return false;
- }
- m_kindID = kindID;
- ICO_TRA("end %d", m_kindID);
- return true;
-}
-
-/**
- * @brief category string parse
- * @param category string
- * @retval true parse success
- * @retval false parse fail
- */
-bool CicoSCAilItems::categoryParseCategory(const string& s)
-{
- ICO_TRA("start");
- const char* ps = s.c_str();
- int c = s_category.size();
- if ('=' != ps[c]) {
- ICO_TRA("end");
- return false; // not "category=xxx"
- }
- // "category=xxx" xxx change to id
- CicoSCSystemConfig* CSCSC = CicoSCSystemConfig::getInstance();
- int categoryID = CSCSC->getCategoryIdbyName(&ps[c+1]);
- if (categoryID==-1) {
- ICO_TRA("end");
- return false; // unkown category xxx
- }
- m_categoryID = categoryID;
- ICO_TRA("end");
- return true;
-}
-
-/**
- * @brief value get
- * @param s "key=value" string
- * @param k key string
- * @param val store value
- * @retval true get value success
- * @retval false get not good
- */
-bool CicoSCAilItems::categoryParseGetValue(const std::string& s,
- const std::string& k,
- std::string & val)
-{
- ICO_TRA("start, %s, %s", s.c_str(), k.c_str());
- const char* ps = s.c_str();
- int c = k.size();
- int c2;
-#if 0 // TODO mk_k x!?
- int x = -1;
-#endif // TODO mk_k x!?
- if ('=' == ps[c]) {
-#if 0 // TODO mk_k x!?
- x = 0;
-#endif // TODO mk_k x!?
- c2 = c+1;
- }
-#if 0 // TODO mk_k .[0-9] !?
- else if (('.' == ps[c]) &&
- (0 != isdigit((int)ps[c+1])) &&
- ('=' == ps[c+2])) {
- x = (int) ps[c+1] - '0';
- c2 = c+3;
-
- }
-#endif // TODO mk_k .[0-9] !?
- else {
- ICO_TRA("end NG");
- return false;
- }
- val = s.substr(c2);
- ICO_TRA("end %s", val.c_str());
- return true;
-}
-
-/**
- * @brief get
- * @param disp display key name
- * @param layer display layer key name
- * @param zone display zone key name
- * @retval true parse success
- * @retval false parse fail
- */
-bool CicoSCAilItems::categoryGetDisplay(const string& disp,
- const string& layer,
- const string& zone)
-{
- ICO_TRA("start");
- if (true == disp.empty()) {
- ICO_TRA("end not get display's data");
- return false;
- }
-
- CicoSCSystemConfig* CSCSC = CicoSCSystemConfig::getInstance();
- m_display = CSCSC->getDisplayIdbyName(disp);
- ICO_DBG("display %s->%d", disp.c_str(), m_display);
- if (false == layer.empty()) {
- m_layer = CSCSC->getLayerIdfbyName(disp, layer);
- ICO_DBG("layer %s, %s->%d", disp.c_str(), layer.c_str(), m_layer);
- }
- if (false == zone.empty()) {
- m_displayZone = CSCSC->getDizplayZoneIdbyName(disp, zone);
- ICO_DBG("zone %s, %s->%d", disp.c_str(), zone.c_str(), m_displayZone);
- }
- ICO_TRA("end d:%d l:%d z:%d", m_display, m_layer, m_displayZone);
- return true;
-}
-
-/**
- * @brief get sound config data
- * @param sound name key
- * @param soundZone name key
- * @retval true get data
- * @retval false param fail
- */
-bool CicoSCAilItems::categoryGetSound(const string& sound, const string& zone)
-{
- ICO_TRA("start");
- if (true == sound.empty()) {
- ICO_TRA("end not get sound's data");
- return false;
- }
-
- CicoSCSystemConfig* CSCSC = CicoSCSystemConfig::getInstance();
- m_sound = CSCSC->getSoundIdbyName(sound);
- ICO_DBG("sound %s->%d", sound.c_str(), m_sound);
- if (false == zone.empty()) {
- m_soundZone = CSCSC->getSoundZoneIdbyName(sound, zone);
- ICO_DBG("zone %s, %s->%d", sound.c_str(), zone.c_str(), m_soundZone);
- }
- ICO_TRA("end s:%d z:%d", m_sound, m_soundZone);
- return true;
-}
-
-bool CicoSCAilItems::categoryGetInput(const string& inputDev,
- const string& sw)
-{
- ICO_TRA("start");
- if (true == inputDev.empty()) {
- ICO_TRA("end not get input Device's data");
- return false;
- }
-
- CicoSCSystemConfig* CSCSC = CicoSCSystemConfig::getInstance();
- m_sound = CSCSC->getInputDevIdbyName(inputDev);
- ICO_DBG("sound %s->%d", inputDev.c_str(), m_sound);
- if (false == sw.empty()) {
- m_switch = CSCSC->getSwitchIdbyName(inputDev, sw);
- ICO_DBG("switch %s, %s->%d", inputDev.c_str(), sw.c_str(), m_switch);
- }
- ICO_TRA("end idev:%d i:%d", m_inputDev, m_switch);
- return true;
-}
-
-/**
- * @brief category string parse
- * @param category string
- * @retval true parse success
- * @retval false parse fail
- */
-bool CicoSCAilItems::categoryParseNodisplay(const string& s)
-{
- ICO_TRA("start");
- const char* ps = s.c_str();
- int c = s_NoDisplay.size();
- if ('=' != ps[c]) {
- ICO_TRA("end");
- return false; // not "NoDisplay=true/false"
- }
- if (0 == strcasecmp(&ps[c+1], "false")) {
- m_noIcon = false;
- }
- else {
- m_noIcon = true;
- }
- ICO_TRA("end");
- return true;
-}
-
-/**
- * @brief category string parse
- * @param category string
- * @retval true parse success
- * @retval false parse fail
- */
-bool CicoSCAilItems::categoryParseAnimation(const string& s)
-{
- ICO_TRA("start");
- const char* ps = s.c_str();
- int c = s_Animation_time.size();
- bool b_at = false; // animation time flag off
- if (0 == strncasecmp(ps, s_Animation_time.c_str(), c)) {
- b_at = true; // flag on
- }
- else {
- c = s_Animation.size(); // not Animation_time
- }
- if ('=' != ps[c]) {
- ICO_TRA("end");
- return false; // not "Animation=xxx" / "Animation_time=xxx"
- }
- if (true == b_at) {
- // Animation_time
- m_animationTime = (int)strtol(&ps[c+1], (char **)0, 0);
- }
- else {
- // Animation
- m_animation = &ps[c+1];
- }
- ICO_TRA("end");
- return true;
-}
-
-/**
- * @brief category string parse
- * @param category string
- * @retval true parse success
- * @retval false parse fail
- */
-bool CicoSCAilItems::categoryParseInvisiblecpu(const string& s)
-{
- ICO_TRA("start");
- const char* ps = s.c_str();
- int c = s_invisiblecpu.size();
- if ('=' != ps[c]) {
- ICO_TRA("end");
- return false; // not "invisibluecpu=xxx"
- }
- if (0 == strcasecmp(&ps[c+1], "yes")) {
- m_invisibleCPU = 100;
- }
- else if (0 != strcasecmp(&ps[c+1], "no")) {
- m_invisibleCPU = (int)strtol(&ps[c+1], (char **)0, 0);
- }
- else { // "no"
- m_invisibleCPU = 0;
- }
- ICO_TRA("end %s,%d", &ps[c+1], m_invisibleCPU);
- return true;
-}
-
-/**
- * @brief category string parse
- * @param category string
- * @retval true parse success
- * @retval false parse fail
- */
-bool CicoSCAilItems::categoryParseNoconfigure(const string&)
-{
-// TODO mk_k
- ICO_TRA("start");
-// m_noconfigure = true;
- ICO_TRA("end");
-// return true;
- return false;
-}
-
-/**
- * @brief category string parse
- * @param category string
- * @retval true parse success
- * @retval false parse fail
- */
-bool CicoSCAilItems::categoryParseMenuoverlap(const string&)
-{
- ICO_TRA("start");
- m_memnuOverlap = true;
- ICO_TRA("end");
- return true;
-}
-
-/**
- * @brief category string parse
- * @param category string
- * @retval true parse success
- * @retval false parse fail
- */
-bool CicoSCAilItems::categoryParseAuto(const string&)
-{
- ICO_TRA("start");
- m_autoStart = true;
- ICO_TRA("end");
- return true;
-}
-
-/**
- * @brief category string parse
- * @param category string
- * @retval true parse success
- * @retval false parse fail
- */
-bool CicoSCAilItems::categoryParseNoauto(const string&)
-{
- ICO_TRA("start");
- m_autoStart = false;
- ICO_TRA("end");
- return true;
-}
-
+++ /dev/null
-/*
- * Copyright (c) 2013, TOYOTA MOTOR CORPORATION.
- *
- * This program is licensed under the terms and conditions of the
- * Apache License, version 2.0. The full text of the Apache License is at
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- */
-#ifndef CICOSCAILITEMS_H
-#define CICOSCAILITEMS_H
-#include <glib.h>
-#include <string>
-#include <vector>
-
-
-#define DINITm_nodeID -1
-#define DINITm_kindID -1
-#define DINITm_categoryID -1
-#define DINITm_display -1
-#define DINITm_layer -1
-#define DINITm_displayZone -1
-#define DINITm_soundZone -1
-#define DINITm_sound -1
-#define DINITm_inputDev -1
-#define DINITm_switch -1
-#define DINITm_animationTime 0
-#define DINITm_invisibleCPU 0
-
-/**
- * @brief AIL infomation data class
- *
- */
-
-class CicoSCAilItems {
-public: // member method
- CicoSCAilItems();
- CicoSCAilItems(const char* pkg, const char* icon, const char* nam,
- const char* ctgry, const char* typ, const char* exe,
- std::string categorys, bool ndisp);
- CicoSCAilItems(const CicoSCAilItems& rAilItems);
- ~CicoSCAilItems();
-
- void init();
- void setup(const char* pkg, const char* icon, const char* nam,
- const char* ctgry, const char* typ, const char* exe,
- std::string categorys, bool ndisp);
-
- const CicoSCAilItems* p() const;
-
-protected: // member method
- void categoryParse(const std::string categorys);
- bool categoryParseRun(const std::string& s);
- bool categoryParseKind(const std::string& s);
- bool categoryParseCategory(const std::string& s);
- bool categoryParseGetValue(const std::string& s, const std::string& k,
- std::string & val);
- bool categoryGetDisplay(const std::string& disp, const std::string& layer,
- const std::string& zone);
- bool categoryGetSound(const std::string& sound, const std::string& zone);
- bool categoryGetInput(const std::string& inputDev,
- const std::string& sw);
- bool categoryParseNodisplay(const std::string& s);
- bool categoryParseAnimation(const std::string& s);
- bool categoryParseInvisiblecpu(const std::string& s);
- bool categoryParseNoconfigure(const std::string& s);
- bool categoryParseMenuoverlap(const std::string& s);
- bool categoryParseAuto(const std::string& s);
- bool categoryParseNoauto(const std::string& s);
-
-private: // member method
-
-public: // member aria
- std::string m_appid; // PACKAGE NAME
- std::string m_icon; // ICON
- std::string m_name; // NAME
- std::string m_execPath; // EXEC
- std::string m_type; // TYPE
-
- std::string m_categories; // CATEGORIES
-
- int m_nodeID; // "run=xxx" xxx change to id
- int m_kindID; // "kind=xxx" xxx change to id
- int m_categoryID; // "category=xxx" xxx change to id
-
- int m_display; //
- int m_layer;
- int m_displayZone; // display zone
- int m_soundZone; // sound zone
- int m_sound;
- int m_inputDev; // input device
- int m_switch;
- bool m_noIcon;
- std::string m_animation;
- int m_animationTime;
- int m_invisibleCPU;
- bool m_memnuOverlap;
- bool m_autoStart; // auto start flag
-
-
- std::string m_group;
- std::string m_location;
- bool m_resumeShow;
-};
-
-inline const CicoSCAilItems* CicoSCAilItems::p() const
-{
- return this;
-}
-
-#endif // CICOAILITEMS_H
+++ /dev/null
-/*
- * Copyright (c) 2013, TOYOTA MOTOR CORPORATION.
- *
- * This program is licensed under the terms and conditions of the
- * Apache License, version 2.0. The full text of the Apache License is at
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- */
-#include <iostream>
-#include <string>
-#include <fstream>
-#include <vector>
-#include <memory>
-#include <cstdio>
-#include <cstdlib>
-#include <string.h>
-#include <aul/aul.h>
-
-
-#include "CicoLog.h"
-#include "CicoSCAulItems.h"
-
-using namespace std;
-
-/**
- * @brief AUL Items class constructor
- */
-CicoSCAulItems::CicoSCAulItems()
-{
- ICO_TRA("CicoSCAulItems::CicoSCAulItems");
- m_appid.clear(); // appid
- m_pid = 0; // pid
- m_aulstt = AUL_R_OK;
- m_defCgrpCpu.clear();
- m_defCgrpMem.clear();
-}
-
-/**
- * @brief AUL Items class constructor
- */
-CicoSCAulItems::CicoSCAulItems(const char* appid, int pid, int aulstt,
- const CicoSCWindow* obj)
- :m_appid(appid), m_pid(pid), m_aulstt(aulstt)
-{
- ICO_TRA("CicoSCAulItems::CicoSCAulItems");
- enterWindow(obj);
- getPidCgroupInfo(pid, m_defCgrpMem, m_defCgrpCpu);
-}
-
-/**
- * @brief AUL Items class constructor
- */
-CicoSCAulItems::CicoSCAulItems(const CicoSCAulItems& s)
-{
- m_appid = s.m_appid;
- m_pid = s.m_pid;
- m_aulstt = s.m_aulstt;
-#if 1 // TODO mk_k
- m_CSCWptrs = s.m_CSCWptrs;
-#else
- int sz = s.m_CSCWptrs.size();
- for (int i = 0; i < sz; i++) {
- m_CSCWptrs.push_back(s.m_CSCWptrs[i]);
- }
-#endif
- m_defCgrpCpu = s.m_defCgrpCpu;
- m_defCgrpMem = s.m_defCgrpMem;
-}
-
-/**
- * @brief AUL Items class destructor
- */
-CicoSCAulItems::~CicoSCAulItems()
-{
- ICO_TRA("CicoSCAulItems::~CicoSCAulItems");
- m_CSCWptrs.clear();
-}
-
-/**
- * @brief CicoSCWindow pointer entry
- * @param obj entry pointer
- */
-void CicoSCAulItems::enterWindow(const CicoSCWindow* obj)
-{
- ICO_TRA("CicoSCAulItems::enterWindow %x", obj);
- if ((NULL == obj) || (0 == obj)) {
- ICO_TRA("CicoSCAulItems::enterWindow");
- return;
- }
- bool bingo = false; // Registered flag off
-#if 1 // TODO mk_k
- vector<const CicoSCWindow*>::iterator it = m_CSCWptrs.begin();
- vector<const CicoSCWindow*>::iterator theEnd = m_CSCWptrs.end();
- for(; it != theEnd; ++it) {
- if (obj == *it) { // if Registered ?
- bingo = true; // Registered flag on
- break; // break of for
- }
- }
-#else
- int sz = m_CSCWptrs.size();
- for (int i = 0; i < sz; i++) {
- if (obj == m_CSCWptrs[i]) {
- bingo = true;
- break; // break of for
- }
- }
-#endif
- if (false == bingo) {
- ICO_TRA("add window pointer");
- m_CSCWptrs.push_back(obj);
- }
- ICO_TRA("CicoSCAulItems::enterWindow");
- return;
-}
-
-/**
- * @brief removw CicoSCWindow pointer
- * @param obj remove target
- */
-void CicoSCAulItems::rmWindow(const CicoSCWindow* obj)
-{
- ICO_TRA("CicoSCAulItems::rmWindow %x", obj);
- vector<const CicoSCWindow*>::iterator it = m_CSCWptrs.begin();
- vector<const CicoSCWindow*>::iterator theEnd = m_CSCWptrs.end();
- for(; it != theEnd; ++it) {
- if (obj == *it) {
- ICO_TRA("CicoSCAulItems::rmWindow");
- m_CSCWptrs.erase(it);
- break; // break of for
- }
- }
- ICO_TRA("CicoSCAulItems::rmWindow");
- return;
-}
-
-/**
- * @brief get cgroup data by /proc/[pid]/cgroup file
- * @parm pid target pid number
- * @param m store cgroup memory directory data
- * @param c store cgroup cpu,cpuacct directory data
- */
-static const char* g_procPidCgroupFileFmt="/proc/%d/cgroup";
-static const char* g_cpuWord = "cpuacct,cpu:";
-static const char* g_memWord = "memory:";
-bool CicoSCAulItems::getPidCgroupInfo(int pid, string& m, string& c)
-{
- ICO_TRA("CicoSCAulItems::getPidCgroupInfo");
- char fn[64];
- sprintf(fn, g_procPidCgroupFileFmt, pid);
- const size_t cpuWdSz = strlen(g_cpuWord);
- const size_t memWdSz = strlen(g_memWord);
- string tmp;
- ifstream ifs(fn);
- bool bR = false;
- const char* pC = 0;
- const char* pM = 0;
- while (ifs >> tmp) {
- if (true == tmp.empty()) {
- continue;
- }
- const char* pT = tmp.c_str();
- const char* pS = pT;
- for (;pS != '\0'; pS++) {
- if (':' == *pS) {
- pS++;
- if (0 == strncmp(pS, g_cpuWord, cpuWdSz)) { //cpu
- pC = pS + cpuWdSz; // get cgroup cpu directory
- }
- else if (0 == strncmp(pS, g_memWord, memWdSz)) { // memory
- pM = pS + memWdSz; // get cgroup memory directory
- }
- break; // break of for
- }
- }
- if ((0 != pC) && (0 != pM)) {
- ICO_DBG("CicoSCAulItems::getPidCgroupInfo m=%s, c=%s", pM, pC);
- m = pM;
- c = pC;
- bR = true;
- break; // break of while
- }
- }
- ifs.close();
- ICO_TRA("CicoSCAulItems::getPidCgroupInfo %s", bR? "true": "false");
- return bR;
-}
-
-/**
- * @brief appid update
- */
-void CicoSCAulItems::update_appid()
-{
- if (AUL_R_OK == m_aulstt) {
- return;
- }
- ICO_TRA("update start %d, %s", m_aulstt, m_appid.c_str());
- char buf[255];
- buf[0] = '\0'; // STOP CODE
- m_aulstt = aul_app_get_appid_bypid(m_pid, buf, sizeof(buf));
- if (AUL_R_OK == m_aulstt) {
- m_appid = buf;
- }
- ICO_TRA("update end %d, %s", m_aulstt, m_appid.c_str());
- return ;
-}
+++ /dev/null
-/*
- * Copyright (c) 2013, TOYOTA MOTOR CORPORATION.
- *
- * This program is licensed under the terms and conditions of the
- * Apache License, version 2.0. The full text of the Apache License is at
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- */
-#ifndef CICOSCAULITEMS_H
-#define CICOSCAULITEMS_H
-
-#include <string>
-#include <vector>
-
-#ifndef __CICO_SC_WINDOW_H__
-class CicoSCWindow;
-#endif
-
-
-/**
- * @brief System controller unit
- * application life cycle information data
- *
- */
-
-class CicoSCAulItems {
-public: // member method
- CicoSCAulItems();
- CicoSCAulItems(const char* appid, int pid, int aulstt,
- const CicoSCWindow* obj=NULL);
- CicoSCAulItems(const CicoSCAulItems& raul);
- ~CicoSCAulItems();
-
- const CicoSCAulItems* p() const;
- void enterWindow(const CicoSCWindow* obj);
- void rmWindow(const CicoSCWindow* obj);
- void update_appid();
-protected: // member method
- bool getPidCgroupInfo(int pid, std::string& m, std::string& c);
-private: // member method
-
-public: // member aria
- std::string m_appid; // appid
- int m_pid; // pid
- std::vector<const CicoSCWindow*> m_CSCWptrs;
-
-protected: // member aria
- std::string m_defCgrpCpu;
- std::string m_defCgrpMem;
- int m_aulstt;
-};
-
-inline const CicoSCAulItems* CicoSCAulItems::p() const
-{
- return this;
-}
-
-#endif // CICOSCAULITEMS_H
+++ /dev/null
-/*
- * Copyright (c) 2013, TOYOTA MOTOR CORPORATION.
- *
- * This program is licensed under the terms and conditions of the
- * Apache License, version 2.0. The full text of the Apache License is at
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- */
-
-//==========================================================================
-/**
- * @file CicoSCCommonDef.h
- *
- * @brief This file is definition of common value
- */
-//==========================================================================
-#ifndef __CICO_SC_COMMON_DEF_H__
-#define __CICO_SC_COMMON_DEF_H__
-
-//--------------------------------------------------------------------------
-// definition of layer type
-//--------------------------------------------------------------------------
-#define ICO_LAYER_TYPE_BACKGROUND (1) ///! layer type of background
-#define ICO_LAYER_TYPE_APPLICATION (2) ///! layer type of application
-#define ICO_LAYER_TYPE_HOMESCREEN (3) ///! layer type of homescreen
-#define ICO_LAYER_TYPE_INTERRPUTAPP (4) ///! layer type of homescreen
-#define ICO_LAYER_TYPE_ONSCREEN (5) ///! layer type of homescreen
-#define ICO_LAYER_TYPE_INPUT (101) ///! layer type of input panel(soft keyboard)
-#define ICO_LAYER_TYPE_TOUCH (102) ///! layer type of touch panel input
-#define ICO_LAYER_TYPE_CURSOR (103) ///! layer type of cursor
-
-//--------------------------------------------------------------------------
-// range of zone id
-//--------------------------------------------------------------------------
-// center display
-#define ICO_DISPLAY0_ZONEID_MIN (1) ///! display0 zone id min
-#define ICO_DISPLAY0_ZONEID_MAX (20) ///! display0 zone id max
-
-// second display
-#define ICO_DISPLAY1_ZONEID_MIN (21) ///! display1 zone id min
-#define ICO_DISPLAY1_ZONEID_MAX (40) ///! display1 zone id max
-
-#endif // __CICO_SC_COMMON_DEF_H__
-// vim:set expandtab ts=4 sw=4:
+++ /dev/null
-/*
- * Copyright (c) 2013, TOYOTA MOTOR CORPORATION.
- *
- * This program is licensed under the terms and conditions of the
- * Apache License, version 2.0. The full text of the Apache License is at
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- */
-
-//==========================================================================
-/**
- * @file CicoSCConf.h
- *
- * @brief This file is definition of SystemConfigs
- */
-//==========================================================================
-#ifndef __CICO_SC_CONF_H__
-#define __CICO_SC_CONF_H__
-
-#include <string>
-#include <vector>
-#include <sstream>
-
-#include <ico_log.h>
-#include "CicoSCCommonDef.h"
-
-//==========================================================================
-/**
- * @brief enumeration of node type
- */
-//==========================================================================
-typedef enum _node_type {
- ICO_NODETYPE_CENTER = 0, ///< Center display
- ICO_NODETYPE_METER = 1, ///< Meter display
- ICO_NODETYPE_REMOTE = 2, ///< Information device(mobile device)
- ICO_NODETYPE_PASSENGER = 3, ///< Passenger display
- ICO_NODETYPE_REAR = 4, ///< Rear-seat entertainment
- ICO_NODETYPE_REARLEFT = 5, ///< Rear-seat entertainment(Left)
- ICO_NODETYPE_REARRIGHT = 6, ///< Rear-seat entertainment(right)
-} ico_nodetype_e;
-
-//==========================================================================
-/**
- * @brief enumeration of display type
- */
-//==========================================================================
-typedef enum _display_type {
- ICO_DISPLAYTYPE_CENTER = 0, ///< Center display
- ICO_DISPLAYTYPE_METER = 1, ///< Meter display
- ICO_DISPLAYTYPE_REMOTE = 2, ///< Information device(mobile device)
- ICO_DISPLAYTYPE_PASSENGER = 3, ///< Passenger display
- ICO_DISPLAYTYPE_REAR = 4, ///< Rear-seat display
- ICO_DISPLAYTYPE_REARLEFT = 5, ///< Rear-seat display(left)
- ICO_DISPLAYTYPE_REARRIGHT = 6, ///< Rear-seat display(right)
-} ico_display_type_e;
-
-//==========================================================================
-/**
- * @brief enumeration of policy type
- */
-//==========================================================================
-typedef enum _policy {
- ICO_POLICY_ALWAYS = 0, ///< No control
- ICO_POLICY_RUNNING = 1, ///< Running only
- ICO_POLICY_PARKED = 2, ///< Parked only
- ICO_POLICY_SHIFT_PARKING = 3, ///< Shift-position is park
- ICO_POLICY_SHIFT_REVERSES = 4, ///< Shift-position is reverses
- ICO_POLICY_BLINKER_LEFT = 5, ///< Blinker is left
- ICO_POLICY_BLINKER_RIGHT = 6, ///< Blinker is right
-} ico_policy_e;
-
-//==========================================================================
-/**
- * @brief enumeration of application privilege
- */
-//==========================================================================
-typedef enum _privilege {
- ICO_PRIVILEGE_ALMIGHTY = 0, ///< almighty privilege
- ICO_PRIVILEGE_SYSTEM = 1, ///< system level
- ICO_PRIVILEGE_SYSTEM_AUDIO = 2, ///< system level(audio only)
- ICO_PRIVILEGE_SYSTEM_VISIBLE = 3, ///< system level(visible only)
- ICO_PRIVILEGE_MAKER = 4, ///< maker level
- ICO_PRIVILEGE_CERTIFICATE = 5, ///< certificated
- ICO_PRIVILEGE_NONE = 6, ///< no privilege
-} ico_privilege_e;
-
-#define ICO_SYC_CONFIG_APPATTR "app_attr.conf" //TODO
-
-//==========================================================================
-/**
- * @brief This class holds display information of system config
- */
-//==========================================================================
-class CicoSCNodeConf
-{
-public:
- /// default constructor
- CicoSCNodeConf()
- : id(-1), name(""), address(""), type(-1) {}
-
- /// destructor
- virtual ~CicoSCNodeConf() {}
-
- /// dump log this class member variables
- void dumpConf(void)
- {
- ICO_DBG("node: id=%d name=%s address=%s type=%d",
- id, name.c_str(), address.c_str(), type);
- }
-
-public:
- int id; ///< node id
- std::string name; ///< node name
- std::string address; ///< node ip address
- int type; ///< node type
-};
-
-//==========================================================================
-/**
- * @brief This class holds layer information of system config
- */
-//==========================================================================
-class CicoSCLayerConf
-{
-public:
- /// default constructor
- CicoSCLayerConf()
- : id(-1), name(""), type(-1), menuoverlap(false) {}
-
- /// destructor
- virtual ~CicoSCLayerConf() {}
-
- /// dump log this class member variables
- void dumpConf(void)
- {
- ICO_DBG(" layer: id=%d name=%s type=%d menuoverlap=%s",
- id, name.c_str(), type, menuoverlap ? "true" : "false");
- }
-
-public:
- int id; ///< layer id
- std::string name; ///< layer name
- int type; ///< layer type
- bool menuoverlap; ///< menu overlap flag
-};
-
-//==========================================================================
-/**
- * @brief This class holds display zone information of system config
- */
-//==========================================================================
-class CicoSCDisplayZoneConf
-{
-public:
- /// default constructor
- CicoSCDisplayZoneConf()
- : id(-1), name(""), fullname(""), x(-1), y(-1), w(-1), h(-1),
- aspectFixed(false), aspectAlignLeft(false),
- aspectAlignRight(false), aspectAlignTop(false),
- aspectAlignBottom(false) {}
-
- /// destructor
- virtual ~CicoSCDisplayZoneConf() {}
-
- /// dump log this class member variables
- void dumpConf(void)
- {
- ICO_DBG(" zone: id=%d name=%s fullname=%s x/y=%d/%d "
- "w/h=%d/%d aspect(fixed=%s l/r=%s/%s t/b=%s/%s",
- id, name.c_str(), fullname.c_str(), x, y, w, h,
- aspectFixed ? "true" : "false",
- aspectAlignLeft ? "true" : "false",
- aspectAlignRight ? "true" : "false",
- aspectAlignTop ? "true" : "false",
- aspectAlignBottom ? "true" : "false");
- }
-
-public:
- int id; ///< display zone id
- std::string name; ///< display zone name
- std::string fullname; ///< display zone fullname
- int x; ///< display zone x position
- int y; ///< display zone y position
- int w; ///< display zone width
- int h; ///< display zone height
-
- /// fixed asppect ratio flag
- bool aspectFixed;
- /// horizontal direction to aligned at the left
- bool aspectAlignLeft;
- /// horizontal direction to aligned at the right
- bool aspectAlignRight;
- /// vertical direction is aligned at the top
- bool aspectAlignTop;
- /// vertical direction is aligned at the bottom
- bool aspectAlignBottom;
-};
-
-//==========================================================================
-/**
- * @brief This class holds display information of system config
- */
-//==========================================================================
-class CicoSCDisplayConf
-{
-public:
- /// default constructor
- CicoSCDisplayConf()
- : id(-1), name(""), node(-1), no(-1),
- type(-1), width(-1), height(-1), inch(-1) {}
-
- /// destructor
- virtual ~CicoSCDisplayConf() {}
-
- /// dump log this class member variables
- void dumpConf(void)
- {
- ICO_DBG("display: id=%d name=%s node=%d no=%d "
- "type=%d width=%d height=%d inch=%d",
- id, name.c_str(), node, no, type, width, height, inch);
- }
-
-public:
- int id; ///< display id
- std::string name; ///< display name
- int node; ///< display node id
- int no; ///< display number
- int type; ///< display type
- int width; ///< display width resolution
- int height; ///< display height resolution
- int inch; ///< display inch size
-
- // layer config list
- std::vector<CicoSCLayerConf*> layerConfList;
-
- // zone config list
- std::vector<CicoSCDisplayZoneConf*> zoneConfList;
-};
-
-//==========================================================================
-/**
- * @brief This class holds sound zone information of system config
- */
-//==========================================================================
-class CicoSCSoundZoneConf
-{
-public:
- /// default constructor
- CicoSCSoundZoneConf()
- : id(-1), name(""), fullname("") {}
-
- /// destructor
- virtual ~CicoSCSoundZoneConf() {}
-
- /// dump log this class member variables
- void dumpConf(void)
- {
- ICO_DBG(" zone: id=%d name=%s fullname=%s",
- id, name.c_str(), fullname.c_str());
- }
-
-public:
- int id; ///< sound zone id
- std::string name; ///< sound zone name
- std::string fullname; ///< sound zone full name
-};
-
-//==========================================================================
-/**
- * @brief This class holds sound information of system config
- */
-//==========================================================================
-class CicoSCSoundConf
-{
-public:
- /// default constructor
- CicoSCSoundConf()
- : id(-1), name(""), no(-1) {}
-
- /// destructor
- virtual ~CicoSCSoundConf() {}
-
- /// dump log this class member variables
- void dumpConf(void)
- {
- ICO_DBG("sound: id=%d name=%s no=%d", id, name.c_str(), no);
- }
-
-public:
- int id; ///< sound id
- std::string name; ///< sound name
- int no; ///< sound number
- std::vector<CicoSCSoundZoneConf*> zoneConfList; ///< sound config list
-};
-
-//==========================================================================
-/**
- * @brief This class holds category information of system config
- */
-//==========================================================================
-class CicoSCCategoryConf
-{
-public:
- /// default constructor
- CicoSCCategoryConf()
- : id(-1), name(""), type(""),
- view(-1), sound(-1), input(-1), priority(0), rctrl(-1) {}
-
- /// destructor
- virtual ~CicoSCCategoryConf() {}
-
- /// dump log this class member variables
- void dumpConf(void)
- {
- ICO_DBG("category: id=%d name=%s type=%s "
- "view=%d sound=%d input=%d priority=%d",
- id, name.c_str(), type.c_str(),
- view, sound, input, priority);
- }
-
-public:
- int id; ///< category id
- std::string name; ///< category name
- std::string type; ///< category type
- int view; ///< category view
- int sound; ///< category sound
- int input; ///< category input
- int priority; ///< category priority
- int rctrl; ///< resource control information
-};
-
-//==========================================================================
-/**
- * @brief This class holds application kind information of system config
- */
-//==========================================================================
-class CicoSCAppKindConf
-{
-public:
- enum _privilege {
- PRIVILEGE_ALMIGHTY = 0, ///< almighty privilege
- PRIVILEGE_SYSTEM = 1, ///< system level
- PRIVILEGE_SYSTEM_AUDIO = 2, ///< system level(audio only)
- PRIVILEGE_SYSTEM_VISIBLE = 3, ///< system level(visible only)
- PRIVILEGE_MAKER = 4, ///< maker level
- PRIVILEGE_CERTIFICATE = 5, ///< certificated
- PRIVILEGE_NONE = 6, ///< no privilege
- };
-
- /// default constructor
- CicoSCAppKindConf()
- : id(-1), name(""), privilege(-1), priority(0){}
-
- /// destructor
- virtual ~CicoSCAppKindConf() {}
-
- /// dump log this class member variables
- void dumpConf(void)
- {
- ICO_DBG("appkind: id=%d name=%s priority=%d priority=%d",
- id, name.c_str(), privilege, priority);
- }
-
-public:
- int id; ///< application kind id
- std::string name; ///< application kind name
- int privilege; ///< application privilege
- int priority; ///< application priority
-};
-
-//==========================================================================
-/**
- * @brief This class holds input device switch information of system config
- */
-//==========================================================================
-class CicoSCSwitchConf
-{
-public:
- /// default constructor
- CicoSCSwitchConf()
- : id(-1), name(""), appid(""), keycode(0){}
-
- /// destructor
- virtual ~CicoSCSwitchConf() {}
-
- /// dump log this class member variables
- void dumpConf(void)
- {
- ICO_DBG(" switch: id=%d name=%s appid=%s",
- id, name.c_str(), appid.c_str());
- }
-
-public:
- int id; ///< input device switch id
- std::string name; ///< input device switch name
- std::string appid; ///< fixed assign apllication name
- int keycode; ///< keycode of input device switch
-};
-
-//==========================================================================
-/**
- * @brief This class holds input device information of system config
- */
-//==========================================================================
-class CicoSCInputDevConf
-{
-public:
- /// default constructor
- CicoSCInputDevConf()
- : id(-1), name("") {}
-
- /// destructor
- virtual ~CicoSCInputDevConf() {}
-
- /// dump log this class member variables
- void dumpConf(void)
- {
- ICO_DBG("inputdev: id=%d name=%s", id, name.c_str());
- }
-
-public:
- int id; ///< input device id
- std::string name; ///< input device name
- std::vector<CicoSCSwitchConf*> switchConfList; ///< switch list
-};
-
-//==========================================================================
-/**
- * @brief This class holds default information of system config
- */
-//==========================================================================
-class CicoSCDefaultConf
-{
-public:
- /// default constructor
- CicoSCDefaultConf()
- : topdir(""), confdir(""),
- node(-1), appkind(-1), category(-1), display(-1),
- layer(-1), displayzone(-1), sound(-1), soundzone(-1),
- inputdev(-1), inputsw(-1) {};
-
- /// destructor
- virtual ~CicoSCDefaultConf() {}
-
- /// dump log this class member variables
- void dumpConf(void)
- {
- ICO_DBG("default: topdir=%s confdir=%s "
- "node=%d appkind=%d category=%d "
- "display=%d layer=%d displayzone=%d "
- "sound=%d soundzone=%d inputdev=%d inputsw=%d",
- topdir.c_str(), confdir.c_str(),
- node, appkind, category, display, layer, displayzone,
- sound, soundzone, inputdev, inputsw);
- }
-
-public:
- std::string topdir; ///< top directory path
- std::string confdir; ///< config directory path
- int node; ///< default application node id
- int appkind; ///< default application kind
- int category; ///< default application category
- int display; ///< default application display
- int layer; ///< default application display layer
- int displayzone; ///< default application display zone
- int sound; ///< default application sound
- int soundzone; ///< default application sound zone
- int inputdev; ///< default input device
- int inputsw; ///< default input device switch
-};
-
-//==========================================================================
-/**
- * @brief This class holds cpu resource group information of system config
- */
-//==========================================================================
-class CicoSCCpuResourceGrp
-{
-public:
- /// default constructor
- CicoSCCpuResourceGrp()
- :m_id(-1), m_bDoIt(false), m_grpNm("") {}
-
- /// destructor
- virtual ~CicoSCCpuResourceGrp() {}
-
- /// dump log this class member variables
- void dumpConf(void)
- {
- std::stringstream hightlist;
- {
- std::vector<int>::iterator itr = m_hight.begin();
- for (; itr != m_hight.end(); ++itr) {
- hightlist << " " << *itr;
- }
-
- }
-
- std::stringstream lowlist;
- {
- std::vector<int>::iterator itr = m_low.begin();
- for (; itr != m_low.end(); ++itr) {
- lowlist << " " << *itr;
- }
-
- }
-
- ICO_DBG("cpu reousrce group; id=%d doIt=%s grpNm=%s, high=%d, low=%d",
- m_id, m_bDoIt? "true": "false", m_grpNm.c_str(),
- hightlist.str().c_str(), lowlist.str().c_str());
- };
-
-public:
- int m_id; ///< cpu resource group id
- bool m_bDoIt; ///< cpu resouce control enable flag
- std::string m_grpNm; ///< cpu resource group name
- std::vector<int> m_hight; ///< hight threshold list
- std::vector<int> m_low; ///< low threshold list
-};
-
-//==========================================================================
-/**
- * @brief This class holds system resource information of system config
- */
-//==========================================================================
-class CicoSCResourceConf
-{
-public:
- /// default constructor
- CicoSCResourceConf()
- :m_bDoIt(false), m_bLog(false), m_cpuCGRPPath(""), m_sampling(-1),
- m_retryCnt(5), m_lowLimitVal(25), m_highLimitVal(90) {}
-
- /// destructor
- virtual ~CicoSCResourceConf() {}
-
- /// dump log this class member variables
- void dumpConf(void)
- {
- ICO_DBG("do:%s, log:%s, dir:%s, smpl:%d r:%d l:%d h:%d sz:%d",
- m_bDoIt? "true": "false", m_bLog? "true": "false",
- m_cpuCGRPPath.c_str(), m_sampling, m_retryCnt, m_lowLimitVal,
- m_highLimitVal, m_cpuCtrl.size());
- }
-
-public:
- bool m_bDoIt; ///< resource control enable flag
- bool m_bLog; ///< resource control log enable flag
- std::string m_cpuCGRPPath; ///< cpu cgroup path
- int m_sampling; ///< sampling period
- int m_retryCnt; ///< retry count
- int m_lowLimitVal; ///< low limit value
- int m_highLimitVal; ///< high limit value
- std::vector<CicoSCCpuResourceGrp*> m_cpuCtrl; ///< cpu control config list
-};
-
-//==========================================================================
-/**
- * @brief This class holds user information of system config
- */
-//==========================================================================
-class CicoSCUserConf
-{
-public:
- /// default constructor
- CicoSCUserConf() :m_parent_dir("/home/app/ico") {}
- /// destructor
- virtual ~CicoSCUserConf() {}
-
- /// dump log this class member variables
- void dumpConf(void)
- {
- ICO_DBG("parent dir:%s", m_parent_dir.c_str());
- }
-
-public:
- std::string m_parent_dir; ///< parent dir
-};
-
-#endif // __CICO_SC_CONF_H__
-// vim:set expandtab ts=4 sw=4:
+++ /dev/null
-/*
- * Copyright (c) 2013, TOYOTA MOTOR CORPORATION.
- *
- * This program is licensed under the terms and conditions of the
- * Apache License, version 2.0. The full text of the Apache License is at
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- */
-
-/*========================================================================*/
-/**
- * @file CicoSCSystemConfig.cpp
- *
- * @brief This file implementation of CicoSCSystemConfig class
- */
-/*========================================================================*/
-
-#include "CicoSCSystemConfig.h"
-#include "CicoSCConf.h"
-
-//==========================================================================
-// private static variable
-//==========================================================================
-CicoSCSystemConfig* CicoSCSystemConfig::ms_myInstance = NULL;
-
-//--------------------------------------------------------------------------
-/**
- * @brief default constructor
- */
-//--------------------------------------------------------------------------
-CicoSCSystemConfig::CicoSCSystemConfig()
-{
- m_typeTable[""] = ICO_NODETYPE_CENTER;
- m_typeTable["center"] = ICO_NODETYPE_CENTER;
- m_typeTable["meter"] = ICO_NODETYPE_METER;
- m_typeTable["remote"] = ICO_NODETYPE_REMOTE;
- m_typeTable["passenger"] = ICO_NODETYPE_PASSENGER;
- m_typeTable["rear"] = ICO_NODETYPE_REAR;
- m_typeTable["rearleft"] = ICO_NODETYPE_REARLEFT;
- m_typeTable["rearright"] = ICO_NODETYPE_REARRIGHT;
-
- m_displayTypeTable[""] = ICO_DISPLAYTYPE_CENTER;
- m_displayTypeTable["center"] = ICO_DISPLAYTYPE_CENTER;
- m_displayTypeTable["meter"] = ICO_DISPLAYTYPE_METER;
- m_displayTypeTable["remote"] = ICO_DISPLAYTYPE_REMOTE;
- m_displayTypeTable["passenger"] = ICO_DISPLAYTYPE_PASSENGER;
- m_displayTypeTable["rear"] = ICO_DISPLAYTYPE_REAR;
- m_displayTypeTable["rearleft"] = ICO_DISPLAYTYPE_REARLEFT;
- m_displayTypeTable["rearright"] = ICO_DISPLAYTYPE_REARRIGHT;
-
- //
- m_categoryTalbe[""] = ICO_POLICY_ALWAYS;
- m_categoryTalbe["always"] = ICO_POLICY_ALWAYS;
- m_categoryTalbe["run"] = ICO_POLICY_RUNNING;
- m_categoryTalbe["park"] = ICO_POLICY_PARKED;
- m_categoryTalbe["shift_park"] = ICO_POLICY_SHIFT_PARKING;
- m_categoryTalbe["shift_back"] = ICO_POLICY_SHIFT_REVERSES;
- m_categoryTalbe["shift_rev"] = ICO_POLICY_SHIFT_REVERSES;
- m_categoryTalbe["blinker_left"] = ICO_POLICY_BLINKER_LEFT;
- m_categoryTalbe["blinker_right"] = ICO_POLICY_BLINKER_RIGHT;
-
- //
- m_privilegeTable["almighty"] = ICO_PRIVILEGE_ALMIGHTY;
- m_privilegeTable["system"] = ICO_PRIVILEGE_SYSTEM;
- m_privilegeTable["system.audio"] = ICO_PRIVILEGE_SYSTEM_AUDIO;
- m_privilegeTable["system.visible"] = ICO_PRIVILEGE_SYSTEM_VISIBLE;
- m_privilegeTable["maker"] = ICO_PRIVILEGE_MAKER;
- m_privilegeTable["certificate"] = ICO_PRIVILEGE_CERTIFICATE;
- m_privilegeTable["none"] = ICO_PRIVILEGE_NONE;
- m_privilegeTable[""] = ICO_PRIVILEGE_NONE;
- m_resourceConf = NULL;
- m_userConf = NULL;
-}
-
-//--------------------------------------------------------------------------
-/**
- * @brief destructor
- */
-//--------------------------------------------------------------------------
-CicoSCSystemConfig::~CicoSCSystemConfig()
-{
- // TODO
-}
-
-//--------------------------------------------------------------------------
-/**
- * @brief Get instance of CicoSCSystemConfig
- *
- * @return pointer of CicoSCSystemConfig object
- */
-//--------------------------------------------------------------------------
-CicoSCSystemConfig*
-CicoSCSystemConfig::getInstance(void)
-{
- if (NULL == ms_myInstance) {
- ms_myInstance = new CicoSCSystemConfig();
- }
- return ms_myInstance;
-}
-
-//--------------------------------------------------------------------------
-/**
- * @brief Get instance of CicoSCSystemConfig
- *
- * @param [in] confFile config file name
- * @return 0 on success, other on error
- */
-//--------------------------------------------------------------------------
-int
-CicoSCSystemConfig::load(const string & confFile)
-{
- ptree root;
- read_xml(confFile, root);
-
- createNodeConfList(root);
- createDisplayConfList(root);
- createSoundConfList(root);
- createPortConf(root);
- createCategoryConf(root);
- createAppKindConf(root);
- createInputDevList(root);
- createDefaultConf(root);
- createLogConf(root);
- createResourceConf(root);
- createUserConf(root);
-
- return 0; //TODO
-}
-
-//--------------------------------------------------------------------------
-/**
- * @brief
- *
- * @param [in]
- */
-//--------------------------------------------------------------------------
-const vector<CicoSCNodeConf*>&
-CicoSCSystemConfig::getNodeConfList(void) const
-{
- return m_nodeConfList;
-}
-
-//--------------------------------------------------------------------------
-/**
- * @brief
- *
- * @param [in]
- */
-//--------------------------------------------------------------------------
-const vector<CicoSCDisplayConf*>&
-CicoSCSystemConfig::getDisplayConfList(void) const
-{
- return m_displayConfList;
-}
-
-//--------------------------------------------------------------------------
-/**
- * @brief
- *
- * @param [in]
- */
-//--------------------------------------------------------------------------
-const vector<CicoSCSoundConf*>&
-CicoSCSystemConfig::getSoundConfList(void) const
-{
- return m_soundConfList;
-}
-
-//--------------------------------------------------------------------------
-/**
- * @brief
- *
- * @param [in]
- */
-//--------------------------------------------------------------------------
-const vector<CicoSCInputDevConf*> &
-CicoSCSystemConfig::getInputDevConfList(void) const
-{
- return m_inputDevConfList;
-}
-
-//--------------------------------------------------------------------------
-/**
- * @brief
- *
- * @param [in]
- */
-//--------------------------------------------------------------------------
-const vector<CicoSCCategoryConf*> &
-CicoSCSystemConfig::getCategoryConfList(void) const
-{
- return m_categoryConfList;
-}
-
-//--------------------------------------------------------------------------
-/**
- * @brief
- *
- * @param [in]
- */
-//--------------------------------------------------------------------------
-const vector<CicoSCAppKindConf*> &
-CicoSCSystemConfig::getAppKindConfList(void) const
-{
- return m_appKindConfList;
-}
-
-//--------------------------------------------------------------------------
-/**
- * @brief
- *
- * @param [in]
- */
-//--------------------------------------------------------------------------
-void
-CicoSCSystemConfig::createNodeConfList(const ptree & root)
-{
- //<nodes>
-// if (root.not_found() == root.find("systemconfig")) {
-// ICO_ERR("nodes element not found");
-// return;
-// }
- ptree nodes = root.get_child("systemconfig.nodes");
-
- BOOST_FOREACH (const ptree::value_type& child, nodes) {
- if (0 != strcmp(child.first.data(),"node")) {
- ICO_ERR("unknown element(%s)", child.first.data());
- }
- optional<int> id = optional<int>(-1);
- optional<string> name;
- optional<string> type;
- optional<string> address;
-
- id = child.second.get_optional<int>("<xmlattr>.id");
- if (false == id.is_initialized()) {
- ICO_ERR("node.id attr not found");
- continue;
- }
- name = child.second.get_optional<string>("<xmlattr>.name");
- if (false == name.is_initialized()) {
- ICO_ERR("node.name attr not found");
- continue;
- }
- type = child.second.get_optional<string>("type");
- if (false == type.is_initialized()) {
- ICO_ERR("node.type element not found");
- continue;
- }
- address = child.second.get_optional<string>("ipaddress");
- if (false == address.is_initialized()) {
- ICO_ERR("node.address element not found");
- continue;
- }
-
- CicoSCNodeConf* nodeConf = new CicoSCNodeConf;
- nodeConf->id = id.get();
- nodeConf->name = name.get();
- nodeConf->type = m_typeTable[type.get()];
- nodeConf->address = address.get();
- m_nodeConfList.push_back(nodeConf);
-
- nodeConf->dumpConf();
- }
-}
-
-//--------------------------------------------------------------------------
-/**
- * @brief
- *
- * @param [in]
- */
-//--------------------------------------------------------------------------
-void
-CicoSCSystemConfig::createDisplayConfList(const ptree & root)
-{
- //<displays>
-// if (root.not_found() != root.find("systemconfi.displays")) {
-// ICO_ERR("displays element not found");
-// return;
-// }
-
- ptree displays = root.get_child("systemconfig.displays");
- BOOST_FOREACH (const ptree::value_type& child, displays) {
- optional<int> id = optional<int>(-1);
- optional<string> name;
- optional<string> node;
- optional<int> no = optional<int>(-1);
- optional<string> type;
- optional<int> width = optional<int>(-1);
- optional<int> height = optional<int>(-1);
-
- id = child.second.get_optional<int>("<xmlattr>.id");
- if (false == id.is_initialized()) {
- ICO_ERR("display.id attr not found");
- continue;
- }
- name = child.second.get_optional<string>("<xmlattr>.name");
- if (false == name.is_initialized()) {
- ICO_ERR("display.name attr not found");
- continue;
- }
- node = child.second.get_optional<string>("node");
- if (false == node.is_initialized()) {
- ICO_ERR("display.node attr not found");
- continue;
- }
- no = child.second.get_optional<int>("no");
- if (false == no.is_initialized()) {
- ICO_ERR("display.no element not found");
- continue;
- }
- type = child.second.get_optional<string>("type");
- if (false == type.is_initialized()) {
- ICO_ERR("display.type element not found");
- continue;
- }
- width = child.second.get_optional<int>("width");
- if (false == width.is_initialized()) {
- ICO_ERR("display.width element not found");
- continue;
- }
- height = child.second.get_optional<int>("height");
- if (false == height.is_initialized()) {
- ICO_ERR("display.height element not found");
- continue;
- }
-
- CicoSCDisplayConf* displayConf = new CicoSCDisplayConf();
- displayConf->id = id.get();
- displayConf->name = name.get();
- displayConf->node = getNodeIdbyName(node.get());
- displayConf->no = no.get();
- displayConf->type = m_displayTypeTable[type.get()];
- displayConf->width = width.get();
- displayConf->height = height.get();
-
- displayConf->dumpConf();
-
- createLayerConf(child, displayConf);
- createDisplayZoneConf(child, displayConf);
-
- m_displayConfList.push_back(displayConf);
- }
-}
-
-//--------------------------------------------------------------------------
-/**
- * @brief
- *
- * @param [in]
- */
-//--------------------------------------------------------------------------
-void
-CicoSCSystemConfig::createLayerConf(const ptree::value_type & child,
- CicoSCDisplayConf* displayConf)
-{
- ptree layers = child.second.get_child("layers");
- BOOST_FOREACH (const ptree::value_type& layer, layers) {
- optional<int> id = optional<int>(-1);
- optional<string> name;
- optional<int> type = optional<int>(-1);
- optional<bool> overlap = optional<bool>(false);
-
- id = layer.second.get_optional<int>("<xmlattr>.id");
- if (false == id.is_initialized()) {
- ICO_ERR("disply.layer.id attr not found");
- continue;
- }
- name = layer.second.get_optional<string>("<xmlattr>.name");
- if (false == name.is_initialized()) {
- ICO_ERR("disply.layer.name attr not found");
- continue;
- }
- type = layer.second.get_optional<int>("type");
- if (false == type.is_initialized()) {
- ICO_ERR("disply.layer.type element not found");
- continue;
- }
- overlap = layer.second.get_optional<bool>("menuoverlap");
- if (false == overlap.is_initialized()) {
- ICO_ERR("disply.layer.overlap element not found");
- continue;
- }
-
- CicoSCLayerConf* layerConf = new CicoSCLayerConf();
- layerConf->id = id.get();
- layerConf->name = name.get();
- layerConf->type = type.get();
- layerConf->menuoverlap = overlap.get();
-
- displayConf->layerConfList.push_back(layerConf);
-
- layerConf->dumpConf();
- }
-}
-
-//--------------------------------------------------------------------------
-/**
- * @brief
- *
- * @param [in]
- */
-//--------------------------------------------------------------------------
-void
-CicoSCSystemConfig::createDisplayZoneConf(const ptree::value_type & child,
- CicoSCDisplayConf* displayConf)
-{
- ptree zones = child.second.get_child("zones");
- BOOST_FOREACH (const ptree::value_type& zone, zones) {
- optional<int> id = optional<int>(-1);
- optional<string> name;
- optional<string> x;
- optional<string> y;
- optional<string> w;
- optional<string> h;
- optional<bool> fixed;
- optional<bool> l;
- optional<bool> r;
- optional<bool> t;
- optional<bool> b;
-
- id = zone.second.get_optional<int>("<xmlattr>.id");
- if (false == id.is_initialized()) {
- ICO_WRN("zone.id.attr not found");
- continue;
- }
- name = zone.second.get_optional<string>("<xmlattr>.name");
- if (false == name.is_initialized()) {
- ICO_WRN("zone.name.attr not found");
- continue;
- }
- x = zone.second.get_optional<string>("geometry.<xmlattr>.x");
- if (false == x.is_initialized()) {
- ICO_WRN("zone.geometry.x attr not found");
- continue;
- }
- y = zone.second.get_optional<string>("geometry.<xmlattr>.y");
- if (false == y.is_initialized()) {
- ICO_WRN("zone.geometry.y attr not found");
- continue;
- }
- w = zone.second.get_optional<string>("geometry.<xmlattr>.w");
- if (false == w.is_initialized()) {
- ICO_WRN("zone.geometry.w attr not found");
- continue;
- }
- h = zone.second.get_optional<string>("geometry.<xmlattr>.h");
- if (false == h.is_initialized()) {
- ICO_WRN("zone.geometry.h attr not found");
- continue;
- }
- fixed = zone.second.get_optional<bool>("aspect.<xmlattr>.Fixed");
- if (false == fixed.is_initialized()) {
- fixed = optional<bool>(false);
- }
- l = zone.second.get_optional<bool>("aspect.<xmlattr>.AlignLeft");
- if (false == l.is_initialized()) {
- l = optional<bool>(false);
- }
- r = zone.second.get_optional<bool>("aspect.<xmlattr>.AlignRight");
- if (false == r.is_initialized()) {
- r = optional<bool>(false);
- }
- t = zone.second.get_optional<bool>("aspect.<xmlattr>.AlignTop");
- if (false == t.is_initialized()) {
- t = optional<bool>(false);
- }
- b = zone.second.get_optional<bool>("aspect.<xmlattr>.AlignBottom");
- if (false == b.is_initialized()) {
- b = optional<bool>(false);
- }
-
- CicoSCDisplayZoneConf* zoneConf = new CicoSCDisplayZoneConf();
- zoneConf->id = id.get();
- zoneConf->name = name.get();
- zoneConf->fullname = displayConf->name + "." + name.get();
- zoneConf->x = calcGeometryExpr(x.get(), displayConf);
- zoneConf->y = calcGeometryExpr(y.get(), displayConf);
- zoneConf->w = calcGeometryExpr(w.get(), displayConf);
- zoneConf->h = calcGeometryExpr(h.get(), displayConf);
- zoneConf->aspectFixed = fixed.get();
- zoneConf->aspectAlignLeft = l.get();
- zoneConf->aspectAlignRight = r.get();
- zoneConf->aspectAlignTop = t.get();
- zoneConf->aspectAlignBottom = b.get();
- displayConf->zoneConfList.push_back(zoneConf);
-
- zoneConf->dumpConf();
- }
-}
-
-//--------------------------------------------------------------------------
-/**
- * @brief
- *
- * @param [in]
- */
-//--------------------------------------------------------------------------
-void
-CicoSCSystemConfig::createSoundConfList(const ptree & root)
-{
- //<sound>
- ptree sounds = root.get_child("systemconfig.sounds");
- BOOST_FOREACH (const ptree::value_type& child, sounds) {
- optional<int> id = optional<int>(-1);
- optional<string> name;
- optional<int> no = optional<int>(-1);
-
- id = child.second.get_optional<int>("<xmlattr>.id");
- if (false == id.is_initialized()) {
- continue;
- }
-
- name = child.second.get_optional<string>("<xmlattr>.name");
- if (false == name.is_initialized()) {
- continue;
- }
-
- no = child.second.get_optional<int>("no");
- if (false == no.is_initialized()) {
- continue;
- }
-
- CicoSCSoundConf* soundConf = new CicoSCSoundConf();
- soundConf->id = id.get();
- soundConf->name = name.get();
- soundConf->no = no.get();
-
- soundConf->dumpConf();
-
- createSoundZoneConf(child, soundConf);
-
- m_soundConfList.push_back(soundConf);
- }
-}
-
-//--------------------------------------------------------------------------
-/**
- * @brief
- *
- * @param [in]
- */
-//--------------------------------------------------------------------------
-void
-CicoSCSystemConfig::createSoundZoneConf(const ptree::value_type & child,
- CicoSCSoundConf* soundConf)
-{
- //<sound>
- // <zone>
- // ...
- ptree zones = child.second.get_child("zones");
- BOOST_FOREACH (const ptree::value_type& zone, zones) {
- optional<int> id = optional<int>(-1);
- optional<string> name;
-
- id = zone.second.get_optional<int>("<xmlattr>.id");
- if (false == id.is_initialized()) {
- continue;
- }
- name = zone.second.get_optional<string>("<xmlattr>.name");
- if (false == name.is_initialized()) {
- continue;
- }
-
- CicoSCSoundZoneConf* zoneConf = new CicoSCSoundZoneConf();
- zoneConf->id = id.get();
- zoneConf->name = name.get();
- zoneConf->fullname = soundConf->name + "." + name.get();
- soundConf->zoneConfList.push_back(zoneConf);
-
- zoneConf->dumpConf();
- }
-}
-
-//--------------------------------------------------------------------------
-/**
- * @brief
- *
- * @param [in]
- */
-//--------------------------------------------------------------------------
-void
-CicoSCSystemConfig::createPortConf(const ptree & root)
-{
- // <ports>
- ptree ports = root.get_child("systemconfig.ports");
- BOOST_FOREACH (const ptree::value_type& child, ports) {
- optional<int> id = optional<int>(-1);
- optional<string> name;
-
- id = child.second.get_optional<int>("<xmlattr>.id");
- if (false == id.is_initialized()) {
- continue;
- }
- name = child.second.get_optional<string>("<xmlattr>.name");
- if (false == name.is_initialized()) {
- continue;
- }
-
- switch (id.get()) {
- case 0:
- // TODO
- m_sysconPort = atoi(child.second.data().c_str());
- break;
- case 1:
- m_soundPluginPort = atoi(child.second.data().c_str());
- break;
- default:
- break;
- }
- }
-}
-
-//--------------------------------------------------------------------------
-/**
- * @brief
- *
- * @param [in]
- */
-//--------------------------------------------------------------------------
-void
-CicoSCSystemConfig::createCategoryConf(const ptree & root)
-{
- //<category>
- ptree categorys = root.get_child("systemconfig.categorys");
- BOOST_FOREACH (const ptree::value_type& child, categorys) {
- optional<int> id = optional<int>(-1);
- optional<string> name;
- optional<string> type;
- optional<string> view;
- optional<string> sound;
- optional<string> input;
- optional<int> priority = optional<int>(-1);
- optional<int> r_ctrl = optional<int>(-1);
-
- id = child.second.get_optional<int>("<xmlattr>.id");
- if (false == id.is_initialized()) {
- continue;
- }
- name = child.second.get_optional<string>("<xmlattr>.name");
- if (false == name.is_initialized()) {
- continue;
- }
- type = child.second.get_optional<string>("type");
- if (false == type.is_initialized()) {
- continue;
- }
- view = child.second.get_optional<string>("view");
- if (false == view.is_initialized()) {
- continue;
- }
- sound = child.second.get_optional<string>("sound");
- if (false == sound.is_initialized()) {
- continue;
- }
- input= child.second.get_optional<string>("input");
- if (false == sound.is_initialized()) {
- continue;
- }
- priority = child.second.get_optional<int>("priority");
- if (false == priority.is_initialized()) {
- continue;
- }
- r_ctrl = child.second.get_optional<int>("r_ctrl");
- if (false == r_ctrl.is_initialized()) {
- continue;
- }
-
- CicoSCCategoryConf* categoryConf = new CicoSCCategoryConf();
- categoryConf->id = id.get();
- categoryConf->name = name.get();
- categoryConf->type = type.get();
- categoryConf->view = m_categoryTalbe[view.get()];
- categoryConf->sound = m_categoryTalbe[sound.get()];
- categoryConf->input = m_categoryTalbe[input.get()];
- categoryConf->priority = priority.get();
- categoryConf->rctrl = r_ctrl.get();
- m_categoryConfList.push_back(categoryConf);
- categoryConf->dumpConf();
- }
-}
-
-//--------------------------------------------------------------------------
-/**
- * @brief
- *
- * @param [in]
- */
-//--------------------------------------------------------------------------
-void
-CicoSCSystemConfig::createAppKindConf(const ptree & root)
-{
- // <appkinds>
- ptree appkinds = root.get_child("systemconfig.appkinds");
- BOOST_FOREACH (const ptree::value_type& child, appkinds) {
- optional<int> id = optional<int>(-1);
- optional<string> name;
- optional<string> privilege;
- optional<int> priority = optional<int>(-1);
-
- id = child.second.get_optional<int>("<xmlattr>.id");
- if (false == id.is_initialized()) {
- continue;
- }
-
- name = child.second.get_optional<string>("<xmlattr>.name");
- if (false == name.is_initialized()) {
- continue;
- }
-
- privilege = child.second.get_optional<string>("privilege");
- if (false == name.is_initialized()) {
- continue;
- }
-
- priority = child.second.get_optional<int>("priority");
- if (false == priority.is_initialized()) {
- continue;
- }
-
- CicoSCAppKindConf* appKindConf = new CicoSCAppKindConf();
- appKindConf->id = id.get();
- appKindConf->name = name.get();
- appKindConf->privilege = m_privilegeTable[privilege.get()];
- appKindConf->priority = priority.get();
- m_appKindConfList.push_back(appKindConf);
- appKindConf->dumpConf();
- }
-}
-
-//--------------------------------------------------------------------------
-/**
- * @brief
- *
- * @param [in]
- */
-//--------------------------------------------------------------------------
-void
-CicoSCSystemConfig::createInputDevList(const ptree & root)
-{
- //<inputs>
- ptree inputs = root.get_child("systemconfig.inputs");
- BOOST_FOREACH (const ptree::value_type& child, inputs) {
- optional<int> id = optional<int>(-1);
- optional<string> name;
-
- id = child.second.get_optional<int>("<xmlattr>.id");
- if (false == id.is_initialized()) {
- continue;
- }
-
- name = child.second.get_optional<string>("<xmlattr>.name");
- if (false == name.is_initialized()) {
- continue;
- }
-
- CicoSCInputDevConf* inputDevConf = new CicoSCInputDevConf();
- inputDevConf->id = id.get();
- inputDevConf->name = name.get();
- inputDevConf->dumpConf();
-
- createSwitchList(child, inputDevConf);
- m_inputDevConfList.push_back(inputDevConf);
- }
-}
-
-//--------------------------------------------------------------------------
-/**
- * @brief
- *
- * @param [in]
- */
-//--------------------------------------------------------------------------
-void
-CicoSCSystemConfig::createSwitchList(const ptree::value_type & child,
- CicoSCInputDevConf* inputDevConf)
-{
- ptree switchs = child.second.get_child("switchs");
- BOOST_FOREACH (const ptree::value_type& zone, switchs) {
- optional<int> id = optional<int>(-1);
- optional<string> name;
- optional<string> appid;
-
- id = zone.second.get_optional<int>("<xmlattr>.id");
- if (false == id.is_initialized()) {
- continue;
- }
-
- name = zone.second.get_optional<string>("<xmlattr>.name");
- if (false == name.is_initialized()) {
- continue;
- }
-
- appid = zone.second.get_optional<string>("<xmlattr>.appid");
- if (false == appid.is_initialized()) {
- continue;
- }
-
- CicoSCSwitchConf* switchConf = new CicoSCSwitchConf();
- switchConf->id = id.get();
- switchConf->name = name.get();
- switchConf->appid = appid.get();
- switchConf->dumpConf();
- inputDevConf->switchConfList.push_back(switchConf);
- }
-}
-
-//--------------------------------------------------------------------------
-/**
- * @brief
- *
- * @param [in]
- */
-//--------------------------------------------------------------------------
-void
-CicoSCSystemConfig::createDefaultConf(const ptree & root)
-{
- // <default>
- ptree defaults = root.get_child("systemconfig.default");
-
- optional<string> node;
- optional<string> appkind;
- optional<string> category;
- optional<string> display;
- optional<string> layer;
- optional<string> displayzone;
- optional<string> sound;
- optional<string> soundzone;
- optional<string> inputdev;
- optional<string> inputsw;
-
- node = defaults.get_optional<string>("node");
- if (false == node.is_initialized()) {
- ICO_WRN("default.node element not found");
- }
-
- appkind = defaults.get_optional<string>("appkind");
- if (false == appkind.is_initialized()) {
- ICO_WRN("default.appkind element not found");
- }
-
- category = defaults.get_optional<string>("category");
- if (false == category.is_initialized()) {
- ICO_WRN("default.category element not found");
- }
-
- display = defaults.get_optional<string>("display");
- if (false == display.is_initialized()) {
- ICO_WRN("default.display element not found");
- }
-
- layer = defaults.get_optional<string>("layer");
- if (false == layer.is_initialized()) {
- ICO_WRN("default.layer element not found");
- }
-
- displayzone = defaults.get_optional<string>("displayzone");
- if (false == displayzone.is_initialized()) {
- ICO_WRN("default.displayzone element not found");
- }
-
- sound = defaults.get_optional<string>("sound");
- if (false == sound.is_initialized()) {
- ICO_WRN("default.sound element not found");
- }
-
- soundzone = defaults.get_optional<string>("soundzone");
- if (false == soundzone.is_initialized()) {
- ICO_WRN("default.soundzone element not found");
- }
-
- inputdev = defaults.get_optional<string>("inputdev");
- if (false == inputdev.is_initialized()) {
- ICO_WRN("default.inputdev element not found");
- }
-
- inputsw = defaults.get_optional<string>("inputsw");
- if (false == inputsw.is_initialized()) {
- ICO_WRN("default.inputdsw element not found");
- }
-
- m_defaultConf = new CicoSCDefaultConf();
-
- m_defaultConf->node = getNodeIdbyName(node.get());
- m_defaultConf->appkind = getAppKindIdbyName(appkind.get());
- m_defaultConf->category = getCategoryIdbyName(category.get());
- m_defaultConf->display = getDisplayIdbyName(display.get());
- m_defaultConf->layer = getLayerIdfbyName(display.get(), layer.get());
- m_defaultConf->displayzone = getDizplayZoneIdbyName(display.get(),
- displayzone.get());
- m_defaultConf->sound = getSoundIdbyName(sound.get());
- m_defaultConf->soundzone = getSoundZoneIdbyName(sound.get(),
- soundzone.get());
- m_defaultConf->inputdev = getInputDevIdbyName(inputdev.get());
- m_defaultConf->inputsw = getSwitchIdbyName(inputdev.get(),
- inputsw.get());
-
-//TODO
-#define ICO_SYC_TOP_EVN (char*)"SYSCON_TOPDIR"
-#define ICO_SYC_TOP_DIR (char*)"/usr/apps/org.tizen.ico.system-controller"
- /* decide top directory in all configurations */
- char *topdir = getenv(ICO_SYC_TOP_EVN);
- if (NULL == topdir) {
- topdir = ICO_SYC_TOP_DIR;
- }
- m_defaultConf->topdir = topdir;
-
-//TODO
-#define ICO_SYC_CONFIG_ENV (char*)"SYSCON_CONFDIR"
-#define ICO_SYC_CONFIG_DIR (char*)"res/config"
- /* decide top directory in configuration file's */
- char *confdir = getenv(ICO_SYC_CONFIG_ENV);
- if (NULL != confdir) {
- m_defaultConf->confdir = confdir;
- }
- else {
- m_defaultConf->confdir = m_defaultConf->topdir;
- m_defaultConf->confdir.append("/");
- m_defaultConf->confdir.append(ICO_SYC_CONFIG_DIR);
- }
-
- m_defaultConf->dumpConf();
-}
-
-//--------------------------------------------------------------------------
-/**
- * @brief
- *
- * @param [in]
- */
-//--------------------------------------------------------------------------
-void
-CicoSCSystemConfig::createLogConf(const ptree & root)
-{
- // <log>
- // </log>
- ptree logNode = root.get_child("systemconfig.log");
- int loglevel = logNode.get<int>("loglevel");
- bool logflush = logNode.get<bool>("logflush");
-
- m_loglevel = loglevel;
- m_logflush = logflush;
-}
-
-//--------------------------------------------------------------------------
-/**
- * @brief resource config class object create
- *
- * @param [in]
- */
-//--------------------------------------------------------------------------
-void getArray(ptree& t, vector<int>& vec);
-static const char* g_resource_cpu = "systemconfig.resource_cpu_control";
-void
-CicoSCSystemConfig::createResourceConf(const ptree & root)
-{
- m_resourceConf = new CicoSCResourceConf;
- ptree rc = root.get_child(g_resource_cpu);
- bool b = false;
- optional<string> opts = rc.get_optional<string>("do_it");
- if (true == opts.is_initialized()) {
- string v = opts.get();
- if (0 == v.compare("yes")) {
- b = true;
- }
- }
- m_resourceConf->m_bDoIt = b;
- if (false == b) {
- return;
- }
-
- string dirnm;
- optional<string> opts2 = rc.get_optional<string>("ctrl_dir_path");
- if (true == opts2.is_initialized()) {
- dirnm = opts2.get();
- }
- else {
- dirnm = "/sys/fs/cgroup/cpu,cpuacct/SCprivate";
- }
- m_resourceConf->m_cpuCGRPPath = dirnm;
-
- opts = rc.get_optional<string>("sampling_wait");
- if (true == opts.is_initialized()) {
- m_resourceConf->m_sampling = atoi(opts.get().c_str());
- }
-
- opts = rc.get_optional<string>("log");
- if (true == opts.is_initialized()) {
- string v = opts.get();
- if (0 == v.compare("true")) {
- m_resourceConf->m_bLog = true;
- }
- }
-
- opts = rc.get_optional<string>("retry_cnt");
- if (true == opts.is_initialized()) {
- m_resourceConf->m_retryCnt = atoi(opts.get().c_str());
- }
-
- opts = rc.get_optional<string>("low_limit_value");
- if (true == opts.is_initialized()) {
- m_resourceConf->m_lowLimitVal = atoi(opts.get().c_str());
- }
-
- opts = rc.get_optional<string>("high_limit_value");
- if (true == opts.is_initialized()) {
- m_resourceConf->m_highLimitVal = atoi(opts.get().c_str());
- }
-
- BOOST_FOREACH(ptree::value_type& child, rc) {
- optional<int> id = optional<int>(-1);
- optional<string> name;
- id = child.second.get_optional<int>("<xmlattr>.id");
- if (false == id.is_initialized()) {
- continue;
- }
- name = child.second.get_optional<string>("<xmlattr>.name");
- if (false == name.is_initialized()) {
- continue;
- }
- ptree pth = child.second.get_child("hight_array");
- ptree ptl = child.second.get_child("low_array");
-
- CicoSCCpuResourceGrp* obj = new CicoSCCpuResourceGrp;
- obj->m_id = id.get();
- obj->m_bDoIt = b;
- obj->m_grpNm = name.get();
- getArray(pth, obj->m_hight);
- getArray(ptl, obj->m_low);
- m_resourceConf->m_cpuCtrl.push_back(obj);
- }
- m_resourceConf->dumpConf();
-}
-
-//--------------------------------------------------------------------------
-/**
- * @brief user config class object create
- *
- * @param [in]
- */
-//--------------------------------------------------------------------------
-static const char* g_login_user_conf = "systemconfig.login_user";
-void
-CicoSCSystemConfig::createUserConf(const ptree & root)
-{
- m_userConf = new CicoSCUserConf;
- ptree rc = root.get_child(g_login_user_conf);
- optional<string> opts = rc.get_optional<string>("parent_dir");
- if (true == opts.is_initialized()) {
- string v = opts.get();
- if (v.empty()) {
- m_userConf->m_parent_dir = v;
- }
- }
- m_userConf->dumpConf();
-}
-
-//--------------------------------------------------------------------------
-/**
- * @brief
- *
- * @param [in]
- */
-//--------------------------------------------------------------------------
-int
-CicoSCSystemConfig::calcGeometryExpr(const string & expr,
- CicoSCDisplayConf* conf)
-{
- int val = 0;
- int wval;
- int i, j, sign;
- char word[32];
-
- j = 0;
- sign = 0;
- for (i = 0; ; i++) {
- if (expr[i] == ' ') continue;
- if ((expr[i] == 0) || (expr[i] == '+') || (expr[i] == '-') ||
- (expr[i] == '*') || (expr[i] == '-') || (expr[i] == '/')) {
- if (j > 0) {
- word[j] = 0;
- if ((strcasecmp(word, "dispw") == 0) ||
- (strcasecmp(word, "width") == 0)) {
- wval = conf->width;
- }
- else if ((strcasecmp(word, "disph") == 0) ||
- (strcasecmp(word, "heigh") == 0)) {
- wval = conf->height;
- }
- else {
- wval = strtol(word, (char **)0, 0);
- }
- j = 0;
- if (sign >= 10) {
- wval = 0 - wval;
- }
- switch (sign % 10) {
- case 0: /* assign */
- val = wval;
- break;
- case 1: /* '+' */
- val += wval;
- break;
- case 2: /* '-' */
- val -= wval;
- break;
- case 3: /* '*' */
- val *= wval;
- break;
- case 4: /* '/' */
- val /= wval;
- break;
- default:
- break;
- }
- sign = 0;
- if (expr[i] == '+') sign = 1;
- else if (expr[i] == '-') sign = 2;
- else if (expr[i] == '*') sign = 3;
- else if (expr[i] == '/') sign = 4;
- else sign = 0;
- }
- else {
- if ((sign > 0) && (expr[i] == '-')) {
- sign += 10;
- }
- else {
- if (expr[i] == '+') sign = 1;
- else if (expr[i] == '-') sign = 2;
- else if (expr[i] == '*') sign = 3;
- else if (expr[i] == '/') sign = 4;
- else sign = 0;
- }
- }
- if (expr[i] == 0) break;
- }
- else {
- if (j < ((int)sizeof(word)-1)) {
- word[j++] = expr[i];
- }
- }
- }
- return val;
-}
-
-//--------------------------------------------------------------------------
-/**
- * @brief
- *
- * @param [in]
- */
-//--------------------------------------------------------------------------
-const CicoSCNodeConf*
-CicoSCSystemConfig::findNodeConfbyName(const string & name)
-{
- vector<CicoSCNodeConf*>::iterator itr;
- itr = m_nodeConfList.begin();
- for (; itr != m_nodeConfList.end(); ++itr) {
- const CicoSCNodeConf* conf = const_cast<CicoSCNodeConf*>(*itr);
- if (name == conf->name) {
- return conf;
- }
- }
-
- return NULL;
-}
-
-//--------------------------------------------------------------------------
-/**
- * @brief
- *
- * @param [in]
- */
-//--------------------------------------------------------------------------
-const CicoSCDisplayConf*
-CicoSCSystemConfig::findDisplayConfbyName(const string & name)
-{
- vector<CicoSCDisplayConf*>::iterator itr;
- itr = m_displayConfList.begin();
- for (; itr != m_displayConfList.end(); ++itr) {
- const CicoSCDisplayConf* conf = NULL;
- conf = const_cast<CicoSCDisplayConf*>(*itr);
- if (name == conf->name) {
- return conf;
- }
- }
-
- return NULL;
-}
-
-//--------------------------------------------------------------------------
-/**
- * @brief
- *
- * @param [in]
- */
-//--------------------------------------------------------------------------
-const CicoSCLayerConf*
-CicoSCSystemConfig::findLayerConfbyName(const string & displayName,
- const string & layerName)
-{
- const CicoSCDisplayConf* displayConf = NULL;
- displayConf = findDisplayConfbyName(displayName);
- if (NULL == displayConf) {
- return NULL;
- }
-
- vector<CicoSCLayerConf*>::const_iterator itr;
- itr = displayConf->layerConfList.begin();
- for (; itr != displayConf->layerConfList.end(); ++itr) {
- const CicoSCLayerConf* conf = NULL;
- conf = const_cast<CicoSCLayerConf*>(*itr);
- if (layerName == conf->name) {
- return conf;
- }
- }
-
- return NULL;
-}
-
-//--------------------------------------------------------------------------
-/**
- * @brief
- *
- * @param [in]
- */
-//--------------------------------------------------------------------------
-const CicoSCDisplayZoneConf*
-CicoSCSystemConfig::findDisplayZoneConfbyName(const string & displayName,
- const string & zoneName)
-{
-// ICO_DBG("CicoSCSystemConfig::findDisplayZoneConfbyName Enter"
-// "(displayName=%s zoneNmae=%s)",
-// displayName.c_str(), zoneName.c_str());
-
- const CicoSCDisplayConf* displayConf = NULL;
- displayConf = findDisplayConfbyName(displayName);
- if (NULL == displayConf) {
-// ICO_DBG("CicoSCSystemConfig::findDisplayZoneConfbyName Leave(NULL)");
- return NULL;
- }
-
- vector<CicoSCDisplayZoneConf*>::const_iterator itr;
- itr = displayConf->zoneConfList.begin();
- for (; itr != displayConf->zoneConfList.end(); ++itr) {
- const CicoSCDisplayZoneConf* conf = NULL;
- conf = const_cast<CicoSCDisplayZoneConf*>(*itr);
- if (zoneName == conf->name) {
-// ICO_DBG("CicoSCSystemConfig::findDisplayZoneConfbyName Leave"
-// "(0x%08x)", conf);
- return conf;
- }
- }
-
-// ICO_DBG("CicoSCSystemConfig::findDisplayZoneConfbyName Leave(NULL)");
- return NULL;
-}
-
-//--------------------------------------------------------------------------
-/**
- * @brief
- *
- * @param [in]
- */
-//--------------------------------------------------------------------------
-const CicoSCSoundConf*
-CicoSCSystemConfig::findSoundConfbyName(const string & name)
-{
- vector<CicoSCSoundConf*>::iterator itr;
- itr = m_soundConfList.begin();
- for (; itr != m_soundConfList.end(); ++itr) {
- const CicoSCSoundConf* conf = NULL;
- conf = const_cast<CicoSCSoundConf*>(*itr);
- if (name == conf->name) {
- return conf;
- }
- }
-
- return NULL;
-}
-
-//--------------------------------------------------------------------------
-/**
- * @brief
- *
- * @param [in]
- */
-//--------------------------------------------------------------------------
-const CicoSCSoundZoneConf*
-CicoSCSystemConfig::findSoundZoneConfbyName(const string & soundName,
- const string & zoneName)
-{
-// ICO_DBG("CicoSCSystemConfig::findSoundZoneConfbyName Enter"
-// "(soundName=%s zoneNmae=%s)",
-// soundName.c_str(), zoneName.c_str());
-
- const CicoSCSoundConf* soundConf = NULL;
- soundConf = findSoundConfbyName(soundName);
- if (NULL == soundConf) {
- return NULL;
- }
-
- vector<CicoSCSoundZoneConf*>::const_iterator itr;
- itr = soundConf->zoneConfList.begin();
- for (; itr != soundConf->zoneConfList.end(); ++itr) {
- const CicoSCSoundZoneConf* conf = NULL;
- conf = const_cast<CicoSCSoundZoneConf*>(*itr);
- if (zoneName == conf->name) {
- return conf;
- }
- }
-
- return NULL;
-}
-
-//--------------------------------------------------------------------------
-/**
- * @brief
- *
- * @param [in]
- */
-//--------------------------------------------------------------------------
-const CicoSCInputDevConf*
-CicoSCSystemConfig::findInputDevConfbyName(const string & name)
-{
- vector<CicoSCInputDevConf*>::iterator itr;
- itr = m_inputDevConfList.begin();
- for (; itr != m_inputDevConfList.end(); ++itr) {
- const CicoSCInputDevConf* conf = NULL;
- conf = const_cast<CicoSCInputDevConf*>(*itr);
- if (name == conf->name) {
- return conf;
- }
- }
-
- return NULL;
-}
-
-//--------------------------------------------------------------------------
-/**
- * @brief
- *
- * @param [in]
- */
-//--------------------------------------------------------------------------
-const CicoSCSwitchConf*
-CicoSCSystemConfig::findSwitchConfbyName(const string & inputDevName,
- const string & switchName)
-{
- const CicoSCInputDevConf* inputDevConf = NULL;
- inputDevConf = findInputDevConfbyName(inputDevName);
- if (NULL == inputDevConf) {
- ICO_WRN("name(%s) input device config not found.",
- inputDevName.c_str());
- return NULL;
- }
-
- vector<CicoSCSwitchConf*>::const_iterator itr;
- itr = inputDevConf->switchConfList.begin();
- for (; itr != inputDevConf->switchConfList.end(); ++itr) {
- const CicoSCSwitchConf* conf = NULL;
- conf = const_cast<CicoSCSwitchConf*>(*itr);
- if (switchName == conf->name) {
- return conf;
- }
- }
-
- ICO_WRN("name(%s) switch config not found.", switchName.c_str());
- return NULL;
-}
-
-//--------------------------------------------------------------------------
-/**
- * @brief
- *
- * @param [in]
- */
-//--------------------------------------------------------------------------
-const CicoSCAppKindConf*
-CicoSCSystemConfig::findAppKindConfbyName(const string & name)
-{
- vector<CicoSCAppKindConf*>::iterator itr;
- itr = m_appKindConfList.begin();
- for (; itr != m_appKindConfList.end(); ++itr) {
- const CicoSCAppKindConf* conf = NULL;
- conf = const_cast<CicoSCAppKindConf*>(*itr);
- if (name == conf->name) {
- return conf;
- }
- }
-
- return NULL;
-}
-
-//--------------------------------------------------------------------------
-/**
- * @brief
- *
- * @param [in]
- */
-//--------------------------------------------------------------------------
-const CicoSCDisplayZoneConf*
-CicoSCSystemConfig::findDisplayZoneConfbyId(int id)
-{
- vector<CicoSCDisplayConf*>::iterator itr;
- itr = m_displayConfList.begin();
- for (; itr != m_displayConfList.end(); ++itr) {
- vector<CicoSCDisplayZoneConf*>::iterator itr2;
- itr2 = (*itr)->zoneConfList.begin();
- for (; itr2 != (*itr)->zoneConfList.end(); ++itr2) {
- if (id == (*itr2)->id) {
- return *itr2;
- }
- }
- }
-
- return NULL;
-}
-
-//--------------------------------------------------------------------------
-/**
- * @brief
- *
- * @param [in]
- */
-//--------------------------------------------------------------------------
-const CicoSCSoundZoneConf*
-CicoSCSystemConfig::findSoundZoneConfbyId(int id)
-{
- vector<CicoSCSoundConf*>::iterator itr;
- itr = m_soundConfList.begin();
- for (; itr != m_soundConfList.end(); ++itr) {
- vector<CicoSCSoundZoneConf*>::iterator itr2;
- itr2 = (*itr)->zoneConfList.begin();
- for (; itr2 != (*itr)->zoneConfList.end(); ++itr2) {
- if (id == (*itr2)->id) {
- return *itr2;
- }
- }
- }
-
- return NULL;
-}
-
-//--------------------------------------------------------------------------
-/**
- * @brief
- *
- * @param [in]
- */
-//--------------------------------------------------------------------------
-const CicoSCCategoryConf*
-CicoSCSystemConfig::findCategoryConfbyName(const string & name)
-{
- vector<CicoSCCategoryConf*>::iterator itr;
- itr = m_categoryConfList.begin();
- for (; itr != m_categoryConfList.end(); ++itr) {
- const CicoSCCategoryConf* conf = NULL;
- conf = const_cast<CicoSCCategoryConf*>(*itr);
- if (name == conf->name) {
- //return const_cast<CicoSCCategoryConf*>(itr->pointer);
- return conf;
- }
- }
-
- return NULL;
-}
-
-//--------------------------------------------------------------------------
-/**
- * @brief
- *
- * @param [in]
- */
-//--------------------------------------------------------------------------
-const CicoSCCategoryConf*
-CicoSCSystemConfig::findCategoryConfbyId(int id)
-{
- vector<CicoSCCategoryConf*>::iterator itr;
- itr = m_categoryConfList.begin();
- for (; itr != m_categoryConfList.end(); ++itr) {
- const CicoSCCategoryConf* conf = NULL;
- conf = const_cast<CicoSCCategoryConf*>(*itr);
- if (id == conf->id) {
- return conf;
- }
- }
-
- return NULL;
-}
-
-//--------------------------------------------------------------------------
-/**
- * @brief
- *
- * @param [in]
- */
-//--------------------------------------------------------------------------
-const CicoSCAppKindConf *
-CicoSCSystemConfig::findAppKindConfbyId(int id)
-{
- vector<CicoSCAppKindConf*>::iterator itr;
- itr = m_appKindConfList.begin();
- for (; itr != m_appKindConfList.end(); ++itr) {
- if (id == (*itr)->id) {
- return *itr;
- }
- }
-
- return NULL;
-}
-
-//--------------------------------------------------------------------------
-/**
- * @brief
- *
- * @param [in]
- */
-//--------------------------------------------------------------------------
-const CicoSCDefaultConf*
-CicoSCSystemConfig::getDefaultConf(void)
-{
- return m_defaultConf;
-}
-
-//--------------------------------------------------------------------------
-/**
- * @brief
- *
- * @param [in]
- */
-//--------------------------------------------------------------------------
-int
-CicoSCSystemConfig::getNodeIdbyName(const string & name)
-{
- const CicoSCNodeConf* conf = NULL;
- conf = findNodeConfbyName(name);
- if (NULL == conf) {
- return -1;
- }
-
- return conf->id;
-}
-
-//--------------------------------------------------------------------------
-/**
- * @brief
- *
- * @param [in]
- */
-//--------------------------------------------------------------------------
-int
-CicoSCSystemConfig::getDisplayIdbyName(const string & name)
-{
- const CicoSCDisplayConf* conf = NULL;
- conf = findDisplayConfbyName(name);
- if (NULL == conf) {
- return -1;
- }
-
- return conf->id;
-}
-
-//--------------------------------------------------------------------------
-/**
- * @brief
- *
- * @param [in]
- */
-//--------------------------------------------------------------------------
-int
-CicoSCSystemConfig::getLayerIdfbyName(const string & displayName,
- const string & layerName)
-{
- const CicoSCLayerConf* conf = NULL;
- conf = findLayerConfbyName(displayName, layerName);
- if (NULL == conf) {
- return -1;
- }
-
- return conf->id;
-}
-
-//--------------------------------------------------------------------------
-/**
- * @brief
- *
- * @param [in]
- */
-//--------------------------------------------------------------------------
-int
-CicoSCSystemConfig::getDizplayZoneIdbyName(const string & displayName,
- const string & zoneName)
-{
- const CicoSCDisplayZoneConf* conf = NULL;
- conf = findDisplayZoneConfbyName(displayName, zoneName);
- if (NULL == conf) {
- return -1;
- }
-
- return conf->id;
-}
-
-//--------------------------------------------------------------------------
-/**
- * @brief
- *
- * @param [in]
- */
-//--------------------------------------------------------------------------
-int
-CicoSCSystemConfig::getDizplayZoneIdbyFullName(const string & zoneFullName)
-{
- string::size_type index = zoneFullName.find(".", 0);
- if (string::npos == index) {
- return -1;
- }
- string displayName = zoneFullName.substr(0, index);
- string zoneName = zoneFullName.substr(index+1);
-
- const CicoSCDisplayZoneConf* conf = NULL;
- conf = findDisplayZoneConfbyName(displayName, zoneName);
- if (NULL == conf) {
- return -1;
- }
-
- return conf->id;
-}
-
-//--------------------------------------------------------------------------
-/**
- * @brief
- *
- * @param [in]
- */
-//--------------------------------------------------------------------------
-int
-CicoSCSystemConfig::getSoundIdbyName(const string & name)
-{
- const CicoSCSoundConf* conf = NULL;
- conf = findSoundConfbyName(name);
- if (NULL == conf) {
- return -1;
- }
-
- return conf->id;
-}
-
-//--------------------------------------------------------------------------
-/**
- * @brief
- *
- * @param [in]
- */
-//--------------------------------------------------------------------------
-int
-CicoSCSystemConfig::getSoundZoneIdbyName(const string & soundName,
- const string & zoneName)
-{
- const CicoSCSoundZoneConf* conf = NULL;
- conf = findSoundZoneConfbyName(soundName, zoneName);
- if (NULL == conf) {
- return -1;
- }
-
- return conf->id;
-}
-
-//--------------------------------------------------------------------------
-/**
- * @brief
- *
- * @param [in]
- */
-//--------------------------------------------------------------------------
-int
-CicoSCSystemConfig::getSoundZoneIdbyFullName(const string & zoneFullName)
-{
- string::size_type index = zoneFullName.find(".", 0);
- if (string::npos == index) {
- return -1;
- }
- string soundName = zoneFullName.substr(0, index);
- string zoneName = zoneFullName.substr(index+1);
-
- const CicoSCSoundZoneConf* conf = NULL;
- conf = findSoundZoneConfbyName(soundName, zoneName);
- if (NULL == conf) {
- return -1;
- }
-
- return conf->id;
-}
-
-//--------------------------------------------------------------------------
-/**
- * @brief
- *
- * @param [in]
- */
-//--------------------------------------------------------------------------
-int
-CicoSCSystemConfig::getInputDevIdbyName(const string & name)
-{
- const CicoSCInputDevConf* conf = NULL;
- conf = findInputDevConfbyName(name);
- if (NULL == conf) {
- return -1;
- }
-
- return conf->id;
-}
-
-//--------------------------------------------------------------------------
-/**
- * @brief
- *
- * @param [in]
- */
-//--------------------------------------------------------------------------
-int
-CicoSCSystemConfig::getSwitchIdbyName(const string & inputDevName,
- const string & switchName)
-{
- const CicoSCSwitchConf* conf = NULL;
- conf = findSwitchConfbyName(inputDevName, switchName);
- if (NULL == conf) {
- return -1;
- }
-
- return conf->id;
-}
-
-//--------------------------------------------------------------------------
-/**
- * @brief
- *
- * @param [in]
- */
-//--------------------------------------------------------------------------
-int
-CicoSCSystemConfig::getAppKindIdbyName(const string & name)
-{
- const CicoSCAppKindConf* conf = NULL;
- conf = findAppKindConfbyName(name);
- if (NULL == conf) {
- return -1;
- }
-
- return conf->id;
-}
-
-//--------------------------------------------------------------------------
-/**
- * @brief
- *
- * @param [in]
- */
-//--------------------------------------------------------------------------
-int
-CicoSCSystemConfig::getCategoryIdbyName(const string & name)
-{
- const CicoSCCategoryConf* conf = NULL;
- conf = findCategoryConfbyName(name);
- if (NULL == conf) {
- return -1;
- }
-
- return conf->id;
-}
-
-//--------------------------------------------------------------------------
-/**
- * @brief get category config object class
- *
- * @param [in]
- */
-//--------------------------------------------------------------------------
-const CicoSCCategoryConf*
-CicoSCSystemConfig::getCategoryObjbyCaategoryID(int id)
-{
- if (-1 == id) {
- return NULL;
- }
- vector<CicoSCCategoryConf*>::iterator itr;
- itr = m_categoryConfList.begin();
- for (; itr != m_categoryConfList.end(); ++itr) {
- const CicoSCCategoryConf* conf = NULL;
- conf = const_cast<CicoSCCategoryConf*>(*itr);
- if (id == conf->id) {
- //return const_cast<CicoSCCategoryConf*>(itr->pointer);
- return conf;
- }
- }
- return NULL;
-}
-
-//--------------------------------------------------------------------------
-/**
- * @brief array xml tree to vector<int>
- *
- * @param [in]
- */
-//--------------------------------------------------------------------------
-void getArray(ptree& t, vector<int>& vec)
-{
- vec.clear();
- BOOST_FOREACH (const ptree::value_type& child, t) {
- const int value = lexical_cast<int>(child.second.data());
- vec.push_back(value);
- }
-}
-// vim:set expandtab ts=4 sw=4:
+++ /dev/null
-/*
- * Copyright (c) 2013, TOYOTA MOTOR CORPORATION.
- *
- * This program is licensed under the terms and conditions of the
- * Apache License, version 2.0. The full text of the Apache License is at
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- */
-
-//==========================================================================
-/**
- * @file CicoSCSystemConfig.h
- *
- * @brief This file is definition of CicoSCSystemConfig class
- */
-//==========================================================================
-#ifndef __CICO_SC_SYSTEM_CONFIG_H__
-#define __CICO_SC_SYSTEM_CONFIG_H__
-
-#include <boost/property_tree/ptree.hpp>
-#include <boost/property_tree/xml_parser.hpp>
-#include <boost/foreach.hpp>
-#include <boost/lexical_cast.hpp>
-
-#include <string>
-#include <map>
-#include <vector>
-using namespace std;
-using namespace boost;
-using namespace boost::property_tree;
-
-//==========================================================================
-// Forward declaration
-//==========================================================================
-#ifndef __CICO_SC_CONF_H__
-class CicoSCNodeConf;
-class CicoSCLayerConf;
-class CicoSCDisplayZoneConf;
-class CicoSCDisplayConf;
-class CicoSCSoundZoneConf;
-class CicoSCSoundConf;
-class CicoSCCategoryConf;
-class CicoSCAppKindConf;
-class CicoSCSwitchConf;
-class CicoSCInputDevConf;
-class CicoSCDefaultConf;
-class CicoSCResourceConf;
-class CicoSCUserConf;
-#endif
-
-//==========================================================================
-/**
- * @brief This class has function of access to system config information
- */
-//==========================================================================
-class CicoSCSystemConfig
-{
-public:
- static CicoSCSystemConfig* getInstance(void);
-
- int load(const string & confFile);
-
- const vector<CicoSCNodeConf*> & getNodeConfList(void) const;
- const vector<CicoSCDisplayConf*> & getDisplayConfList(void) const;
- const vector<CicoSCSoundConf*> & getSoundConfList(void) const;
- const vector<CicoSCInputDevConf*> & getInputDevConfList(void) const;
- const vector<CicoSCCategoryConf*> & getCategoryConfList(void) const;
- const vector<CicoSCAppKindConf*> & getAppKindConfList(void) const;
-
- const CicoSCNodeConf* findNodeConfbyName(const string & name);
- const CicoSCDisplayConf* findDisplayConfbyName(const string & name);
- const CicoSCLayerConf* findLayerConfbyName(const string & displayName,
- const string & layerName);
- const CicoSCDisplayZoneConf* findDisplayZoneConfbyName(const string & displayName,
- const string & zoneName);
- const CicoSCSoundConf* findSoundConfbyName(const string & name);
- const CicoSCSoundZoneConf* findSoundZoneConfbyName(const string & soundName,
- const string & zoneName);
- const CicoSCInputDevConf* findInputDevConfbyName(const string & name);
- const CicoSCSwitchConf* findSwitchConfbyName(const string & inputDevName,
- const string & switchName);
-
- const CicoSCAppKindConf* findAppKindConfbyName(const string & name);
- const CicoSCCategoryConf* findCategoryConfbyName(const string & name);
-
- const CicoSCDisplayZoneConf* findDisplayZoneConfbyId(int id);
-
- const CicoSCSoundZoneConf* findSoundZoneConfbyId(int id);
- const CicoSCCategoryConf* findCategoryConfbyId(int id);
- const CicoSCAppKindConf* findAppKindConfbyId(int id);
-
- const CicoSCDefaultConf* getDefaultConf(void);
-
-
- int getNodeIdbyName(const string & name);
- int getDisplayIdbyName(const string & name);
- int getLayerIdfbyName(const string & displayName,
- const string & layerName);
- int getDizplayZoneIdbyName(const string & displayName,
- const string & zoneName);
- int getDizplayZoneIdbyFullName(const string & zoneFullName);
- int getSoundIdbyName(const string & name);
-
- int getSoundZoneIdbyName(const string & soundName,
- const string & zoneName);
- int getSoundZoneIdbyFullName(const string & zoneFullName);
- int getInputDevIdbyName(const string & name);
- int getSwitchIdbyName(const string & inputDevName,
- const string & switchName);
- int getAppKindIdbyName(const string & name);
- int getCategoryIdbyName(const string & name);
- const CicoSCResourceConf* getResourceConf() const
- {
- return m_resourceConf;
- };
- const CicoSCCategoryConf* getCategoryObjbyCaategoryID(int id);
-
- const CicoSCUserConf* getUserConf() const
- {
- return m_userConf;
- };
-
-private:
- // default constructor
- CicoSCSystemConfig();
-
- // destructor
- ~CicoSCSystemConfig();
-
- // assignment operator
- CicoSCSystemConfig& operator=(const CicoSCSystemConfig &object);
-
- // copy constructor
- CicoSCSystemConfig(const CicoSCSystemConfig &object);
-
- void createNodeConfList(const ptree & root);
- void createDisplayConfList(const ptree & root);
- void createLayerConf(const ptree::value_type & child,
- CicoSCDisplayConf* displayConf);
- void createDisplayZoneConf(const ptree::value_type & child,
- CicoSCDisplayConf* displayConf);
-
- void createSoundConfList(const ptree & root);
- void createSoundZoneConf(const ptree::value_type & child,
- CicoSCSoundConf* soundConf);
- void createPortConf(const ptree & root);
- void createCategoryConf(const ptree & root);
- void createAppKindConf(const ptree & root);
- void createInputDevList(const ptree & root);
- void createSwitchList(const ptree::value_type & child,
- CicoSCInputDevConf* inputDevConf);
- void createDefaultConf(const ptree & root);
- void createLogConf(const ptree & root);
- void createResourceConf(const ptree & root);
- void createUserConf(const ptree & root);
-
- int calcGeometryExpr(const string & expr, CicoSCDisplayConf* conf);
-
-private:
- static CicoSCSystemConfig* ms_myInstance;
- string m_confFile;
- map<string,int> m_typeTable;
- map<string,int> m_displayTypeTable;
- map<string,int> m_categoryTalbe;
- map<string,int> m_privilegeTable;
- vector<CicoSCNodeConf*> m_nodeConfList;
- vector<CicoSCDisplayConf*> m_displayConfList;
- vector<CicoSCSoundConf*> m_soundConfList;
- vector<CicoSCInputDevConf*> m_inputDevConfList;
- vector<CicoSCCategoryConf*> m_categoryConfList;
- vector<CicoSCAppKindConf*> m_appKindConfList;
- int m_sysconPort;
- int m_soundPluginPort;
- int m_loglevel;
- bool m_logflush;
- CicoSCDefaultConf *m_defaultConf;
- CicoSCResourceConf *m_resourceConf;
- CicoSCUserConf *m_userConf;
-};
-#endif // __CICO_SC_SYSTEM_CONFIG_H__
-// vim:set expandtab ts=4 sw=4:
+++ /dev/null
-/*
- * Copyright (c) 2013, TOYOTA MOTOR CORPORATION.
- *
- * This program is licensed under the terms and conditions of the
- * Apache License, version 2.0. The full text of the Apache License is at
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- */
-/**
- * @brief Homescreen application aul handler multi support
- *
- * @date Sep-23-2013
- */
-#ifndef CICO_AUL_LISTEN_APP_H
-#define CICO_AUL_LISTEN_APP_H
-
-int aul_listen_app_launch_signal_add(int (*func) (int, void *), void *data);
-int aul_listen_app_dead_signal_add(int (*func) (int, void *), void *data);
-void initAulListenXSignal();
-
-#endif
COMMON_LIBS = -lm -lwebsockets -lico-uxf-weston-plugin -lsecurity-server-client
noinst_PROGRAMS = \
- HomeScreen \
- StatusBar
+ HomeScreen
-HomeScreen_SOURCES = \
- home_screen_main.cpp \
- CicoSCAilItems.cpp \
- CicoSCAulItems.cpp \
- CicoSCSystemConfig.cpp \
- CicoSCLifeCycleController.cpp \
- CicoHSWindow.cpp \
- CicoHSWindowController.cpp \
- CicoHSMenuTouch.cpp \
- CicoHomeScreen.cpp \
- CicoHSMenuTile.cpp \
- CicoHSBackWindow.cpp \
- CicoHSControlBarWindow.cpp \
- CicoHSControlBarTouch.cpp \
- CicoHSMenuWindow.cpp \
- CicoHSAppInfo.cpp \
- CicoHomeScreenConfig.cpp \
- CicoHomeScreenResourceConfig.cpp \
- CicoHomeScreenSound.cpp \
- CicoHomeScreenSoundConfig.cpp \
- CicoHSSystemState.cpp \
- CicoHSSwipeTouch.cpp \
- CicoHSSwipeInputWindow.cpp \
- CicoHSAppHistory.cpp \
- CicoHSAppHistoryExt.cpp \
- Cico_aul_listen_app.cpp \
- CicoSound.cpp
+HomeScreen_SOURCES = \
+ CicoHSEFLApp.cpp \
+ CicoHSCmdOpts.cpp \
+ home_screen_main.cpp \
+ CicoHSLifeCycleController.cpp \
+ CicoHSWindow.cpp \
+ CicoHSWindowController.cpp \
+ CicoHSMenuTouch.cpp \
+ CicoHomeScreen.cpp \
+ CicoHSMenuTile.cpp \
+ CicoHSBackWindow.cpp \
+ CicoHSControlBarWindow.cpp \
+ CicoHSControlBarTouch.cpp \
+ CicoHSMenuWindow.cpp \
+ CicoHSAppInfo.cpp \
+ CicoHSSystemState.cpp \
+ CicoHSSwipeTouch.cpp \
+ CicoHSSwipeInputWindow.cpp \
+ CicoHSAppHistory.cpp \
+ CicoHSAppHistoryExt.cpp \
+ CicoHSCommand.cpp \
+ CicoHSServer.cpp \
+ CicoHSMessage.cpp \
+ CicoHSAppControl.cpp \
+ CicoHSCommandArg.cpp
-HomeScreen_CFLAGS= \
- $(EFL_CFLAGS) \
- $(OPT_CFLAGS) \
- $(WL_CFLAGS) \
- $(AUL_CFLAGS) \
- $(AIL_CFLAGS) \
- $(UWS_CFLAGS) \
- $(PKGMGR_CFLAGS) \
- -I/usr/include/ico-uxf-weston-plugin \
- -I/usr/include/ico-util
-HomeScreen_CXXFLAGS= \
- $(EFL_CFLAGS) \
- $(OPT_CFLAGS) \
- $(WL_CFLAGS) \
- $(AUL_CFLAGS) \
- $(AIL_CFLAGS) \
- $(UWS_CFLAGS) \
- $(PKGMGR_CFLAGS) \
- -I/usr/include/ico-uxf-weston-plugin \
- -I/usr/include/ico-util \
- -I../../include
-HomeScreen_LDADD = \
- $(EFL_LIBS) \
- $(OPT_LIBS) \
- $(WL_LIBS) \
- $(COMMON_LIBS) \
- $(UWS_LIBS) \
- $(AUL_LIBS) \
- $(AIL_LIBS) \
- -lico-util \
- -lico-uxf-weston-plugin \
- /usr/lib/libpkgmgr-client.so \
- ../../lib/apps-framework/.libs/libico-appfw.so \
- -lwayland-egl -lEGL -lGLESv2
+HomeScreen_CFLAGS= \
+ @CAPIAPPFWAPPLICATION_CFLAGS@ \
+ $(EFL_CFLAGS) \
+ $(OPT_CFLAGS) \
+ $(WL_CFLAGS) \
+ $(AUL_CFLAGS) \
+ $(AIL_CFLAGS) \
+ $(UWS_CFLAGS) \
+ $(PKGMGR_CFLAGS) \
+ $(UWS_CFLAGS) \
+ $(WESTONPLUGIN_CFLAGS) \
+ -I../../include \
+ -I../../lib/common
-#OnScreen_SOURCES = \
-# on_screen.cpp \
-# CicoOnScreenAction.cpp \
-# CicoOnScreenAppList.cpp \
-# CicoOnScreenControlWindow.cpp \
-# CicoOnScreenContext.cpp \
-# CicoHomeScreenConfig.cpp \
-# CicoHomeScreenResourceConfig.cpp \
-# CicoHomeScreenSound.cpp \
-# CicoHomeScreenSoundConfig.cpp
-#OnScreen_CXXFLAGS = -I../include $(EFL_CFLAGS) $(OPT_CFLAGS) $(WL_CFLAGS) $(AUL_CFLAGS) $(UWS_CFLAGS) -I/usr/include/ico-uxf-weston-plugin -I/usr/include/ico-util
-#OnScreen_LDADD = $(EFL_LIBS) $(OPT_LIBS) $(WL_LIBS) $(COMMON_LIBS) $(AUL_LIBS) $(UWS_LIBS) ../apps_controller/libico_syc-apc.a ../ico-app-framework/.libs/libico-app-fw-efl.so ../ico-app-framework/.libs/libico-app-fw.so
+HomeScreen_CXXFLAGS= \
+ @CAPIAPPFWAPPLICATION_CFLAGS@ \
+ $(EFL_CFLAGS) \
+ $(OPT_CFLAGS) \
+ $(WL_CFLAGS) \
+ $(AUL_CFLAGS) \
+ $(AIL_CFLAGS) \
+ $(UWS_CFLAGS) \
+ $(PKGMGR_CFLAGS) \
+ $(UWS_CFLAGS) \
+ $(WESTONPLUGIN_CFLAGS) \
+ -I../../include \
+ -I../../lib/common
-StatusBar_SOURCES = \
- status_bar.cpp \
- CicoStatusBarControlWindow.cpp \
- CicoStatusBarTime.cpp \
- CicoHomeScreenConfig.cpp \
- CicoHomeScreenResourceConfig.cpp \
- CicoHomeScreenSound.cpp \
- CicoHomeScreenSoundConfig.cpp
-StatusBar_CFLAGS = \
- $(EFL_CFLAGS) \
- $(OPT_CFLAGS) \
- $(WL_CFLAGS) \
- $(AUL_CFLAGS) \
- $(UWS_CFLAGS) \
- -I/usr/include/ico-uxf-weston-plugin \
- -I/usr/include/ico-util
-StatusBar_CXXFLAGS = \
- $(EFL_CFLAGS) \
- $(OPT_CFLAGS) \
- $(WL_CFLAGS) \
- $(AUL_CFLAGS) \
- $(UWS_CFLAGS) \
- -I/usr/include/ico-uxf-weston-plugin \
- -I/usr/include/ico-util
-StatusBar_LDADD = \
- $(EFL_LIBS) \
- $(OPT_LIBS) \
- $(WL_LIBS) \
- $(COMMON_LIBS) \
- $(AUL_LIBS) \
- $(UWS_LIBS)
+HomeScreen_LDADD = \
+ ../../lib/common/.libs/libico-common.a \
+ @CAPIAPPFWAPPLICATION_LIBS@ \
+ @PKGMGR_LIBS@ \
+ $(EFL_LIBS) \
+ $(OPT_LIBS) \
+ $(WL_LIBS) \
+ $(COMMON_LIBS) \
+ $(UWS_LIBS) \
+ $(AUL_LIBS) \
+ $(AIL_LIBS) \
+ $(UWS_LIBS) \
+ ../../lib/apps-framework/.libs/libico-appfw.so \
+ -lwayland-egl -lEGL -lGLESv2
SUFFIXES = .edc .edj
uninstall:
rm -rf $(INSTALL_ROOT)/usr/apps/org.tizen.ico.homescreen
- rm -f $(INSTALL_ROOT)/usr/share/packages/org.tizen.ico.homescreen
+ rm -f $(INSTALL_ROOT)/usr/share/packages/org.tizen.ico.homescreen.xml
* http://www.apache.org/licenses/LICENSE-2.0
*
*/
+
+//==========================================================================
/**
- * @brief homescreen application main
+ * @file home_screen_main.cpp
*
- * @date Feb-15-2013
+ * @brief This file is implimantion of homescreen application main function
*/
+//==========================================================================
-#include <fstream>
-#include <string>
-#include <vector>
+#include <cstring>
#include <iostream>
-#include <cstdio>
-#include <bundle.h>
-#include <aul/aul.h>
-#include <home_screen_main.h>
-#include <cerrno>
-#include "CicoHomeScreenConfig.h"
-#include "ico_syc_public.h"
-#include "CicoSCConf.h"
-#include "CicoSCSystemConfig.h"
-#include "Cico_aul_listen_app.h"
-#include "CicoHomeScreen.h"
-#include "CicoSound.h"
-
-using namespace std;
-
-string g_login_user_name;
-
-static Eina_Bool launchApps(void* data);
-/**
- * ecore timer void data typedef
- */
-typedef struct t_launcApps_data {
- string filePath;
- string filePathD;
- CicoHomeScreen *hs;
-} launcApps_data_t;
-
-
-/*--------------------------------------------------------------------------*/
+#include <Eina.h>
+#include "ico_log.h"
+#include "CicoHSEFLApp.h"
+#include "CicoHSCmdOpts.h"
+#include "CicoGKeyFileConfig.h"
+
+#define ICO_CONFIG_LOG "log"
+#define ICO_CONFIG_LOG_NAME "filename"
+#define ICO_CONFIG_LOG_LEVEL "loglevel"
+#define ICO_CONFIG_LOG_FLUSH "logflush"
+#define ICO_CONFIG_LOG_ECORE "ecorelog"
+
+//--------------------------------------------------------------------------
/**
- * @brief main
- * homescreen main. initialize UXF, app manager, and ecore.
- *
- * @param[in] argc counts of argment
- * @param[in] argv argment
- * @return result
- * @retval >=0 success
- * @retval -1 error
+ * @brief setup log
*/
-/*--------------------------------------------------------------------------*/
-int
-main(int argc, char *argv[])
+//--------------------------------------------------------------------------
+void
+setupLog(void)
{
- int ret;
+ /* init configuration */
+ CicoGKeyFileConfig hsConfig;
+ hsConfig.Initialize(ICO_HOMESCREEN_CONFIG_FILE);
- eina_init();
- eina_log_level_set(EINA_LOG_LEVEL_DBG);
+ // ico log open
+ std::string name;
+ name = hsConfig.ConfigGetString(ICO_CONFIG_LOG,
+ ICO_CONFIG_LOG_NAME,
+ "HomeScreen");
+ ico_log_open(name.c_str());
- ico_log_open("HomeScreen");
- // load system config
- CicoSCSystemConfig::getInstance()->load(ICO_HS_LIFECYCLE_CONTROLLER_SETTING_PATH);
+ // ico log level
+ int log_level = 0;
+ std::string level = hsConfig.ConfigGetString(ICO_CONFIG_LOG,
+ ICO_CONFIG_LOG_LEVEL,
+ "all");
- /* init configuration */
- ICO_DBG("main: config initialize start");
- CicoHomeScreenConfig *config = new CicoHomeScreenConfig();
- config->Initialize(ICO_HOMESCREEN_CONFIG_FILE);
- ICO_DBG("main: config initialize end");
-
- /* get LOGIN-USER parameter */
- bundle *b = bundle_import_from_argv(argc, argv); // import from argc+argv
- const char* valusr = bundle_get_val(b, ICO_SYC_APP_BUNDLE_KEY1);
- const char* valpath = bundle_get_val(b, ICO_SYC_APP_BUNDLE_KEY2);
- const char* valpathD = bundle_get_val(b, ICO_SYC_APP_BUNDLE_KEY3);
- const char* valFlagPath = bundle_get_val(b, ICO_SYC_APP_BUNDLE_KEY4);
- if ((NULL != valusr) && (0 != valusr)) {
- g_login_user_name = valusr;
+ if (NULL != strstr(level.c_str(), "performance")) {
+ log_level |= ICO_LOG_LVL_PRF;
}
- else {
- g_login_user_name.clear();
+
+ if (NULL != strstr(level.c_str(), "trace")) {
+ log_level |= ICO_LOG_LVL_TRA;
}
- launcApps_data_t x;
- x.hs = NULL;
- if ((NULL != valpath) && (0 != valpath)) {
- x.filePath = valpath;
+ if (NULL != strstr(level.c_str(), "debug")) {
+ log_level |= ICO_LOG_LVL_DBG;
}
- else {
- x.filePath.clear();
+
+ if (NULL != strstr(level.c_str(), "info")) {
+ log_level |= ICO_LOG_LVL_INF;
}
- if ((NULL != valpathD) && (0 != valpathD)) {
- x.filePathD = valpathD;
+ if (NULL != strstr(level.c_str(), "warning")) {
+ log_level |= ICO_LOG_LVL_WRN;
}
- else {
- x.filePathD.clear();
+
+ if (NULL != strstr(level.c_str(), "critical")) {
+ log_level |= ICO_LOG_LVL_CRI;
}
- string flagPath;
- if ((NULL != valFlagPath) && (0 != valFlagPath)) {
- flagPath = valFlagPath;
+
+ if (NULL != strstr(level.c_str(), "error")) {
+ log_level |= ICO_LOG_LVL_ERR;
+ }
+
+ std::string flush = hsConfig.ConfigGetString(ICO_CONFIG_LOG,
+ ICO_CONFIG_LOG_FLUSH,
+ "on");
+ if (NULL != strstr(flush.c_str(), "on")) {
+ log_level |= ICO_LOG_FLUSH;
}
else {
- flagPath.clear();
+ log_level |= ICO_LOG_NOFLUSH;
}
- ICO_DBG("PARAM=\"%s\", \"%s\", \"%s\", \"%s\"", g_login_user_name.c_str(),
- x.filePath.c_str(), x.filePathD.c_str(), flagPath.c_str());
- bundle_free(b);
- valusr = valpath = valpathD = valFlagPath = NULL;
-
- /* init home screen soud */
- ICO_DBG("main: sound initialize start");
- CicoHomeScreenSound *sound = new CicoHomeScreenSound();
- sound->Initialize(config);
- ICO_DBG("main: sound initialize end");
-
- CicoSound::GetInstance()->Initialize(config);
-
- /*AUL Listen Signal set(launch/dead)*/
- initAulListenXSignal();
- /*create homescreen*/
- ICO_DBG("main: homescreen initialize start");
- CicoHomeScreen *home_screen = new CicoHomeScreen();
-
- ret = home_screen->Initialize(ICO_ORIENTATION_VERTICAL, config);
- if(ret != ICO_OK){
- ICO_ERR("main: homescreen initialize failed");
- /*clear all classes*/
- delete home_screen;
- delete sound;
- delete config;
- exit(8);
+ if (NULL != strstr(level.c_str(), "none")) {
+ ico_log_set_level(0);
+ }
+ else if (NULL == strstr(level.c_str(), "all")) {
+ ico_log_set_level(log_level);
}
- ICO_DBG("main: homescreen initialize end");
-
- ICO_DBG("main: create homescreen ");
- /* application history class init. before call launchApps */
- home_screen->InitializeAppHistory(g_login_user_name, x.filePath,
- x.filePathD, flagPath);
- /* application history launch */
- x.hs = home_screen;
- ecore_timer_add(0.01, launchApps, &x);
-
- /*home screen start and go into main loop*/
- home_screen->StartHomeScreen();
-
- ICO_DBG("main: end homescreen");
-
- /* when loop is terminated */
- /* delete homescreen */
- home_screen->Finalize();
-
- /*clear all classes*/
- delete home_screen;
-
- delete sound;
-
- delete config;
- return 0;
+ // eocre log print
+ std::string ecore = hsConfig.ConfigGetString(ICO_CONFIG_LOG,
+ ICO_CONFIG_LOG_ECORE,
+ "on");
+ if (NULL != strstr(ecore.c_str(), "on")) {
+ eina_init();
+ eina_log_level_set(EINA_LOG_LEVEL_DBG);
+ }
}
-/*--------------------------------------------------------------------------*/
+//--------------------------------------------------------------------------
/**
- * @brief launch applications
+ * @brief homescreen main
+ * homescreen main. initialize UXF, app manager, and ecore.
*
- * @param filepath start applications list file path
- * @param filepathD defalt start applications list file path
- * @return bool
- * @retval true success
- * @retval false fail
+ * @param [in] argc counts of argment
+ * @param [in] argv argment
+ * @return result
+ * @retval 0 success
+ * @retval -1 error
*/
-/*--------------------------------------------------------------------------*/
-static Eina_Bool launchApps(void* data)
+//--------------------------------------------------------------------------
+int
+main(int argc, char *argv[])
{
- ICO_DBG("start");
- launcApps_data_t* x = (launcApps_data_t*) data;
- if ((NULL == x) || (NULL == x->hs)) {
- ICO_DBG("end");
- return ECORE_CALLBACK_CANCEL;
- }
-
- vector<pairAppidSubd> apps;
- x->hs->readStartupApp(apps);
-
- int sz = apps.size();
- for (int i =sz; i > 0; i--) {
- string appid = apps[i-1].first;
- bool bFLAG = apps[i-1].second;
- int pid = aul_launch_app(appid.c_str(), NULL);
- ICO_DBG("aul_launch_app[%d]%d:%s:%d", i, pid, appid.c_str(), (int)bFLAG);
- if ((0 < pid) && (NULL != x->hs)) {
- x->hs->startupCheckAdd(pid, appid, bFLAG);
- }
- }
- ICO_DBG("end");
- return ECORE_CALLBACK_CANCEL;
+ try {
+ printf("=== start HomeScreen main entry\n");
+
+ // setupLog
+ setupLog();
+ ICO_INF( "START_MODULE HomeScreen" );
+
+ // perse command options
+ CicoHSCmdOpts::getInstance()->parse(argc, argv);
+
+ // start homescreen
+ CicoHSEFLApp hsEFLApp;
+ int ret = hsEFLApp.start(argc, argv);
+
+ ICO_DBG("ret = %d error=%s", ret, hsEFLApp.appfwErrorToString(ret));
+ }
+ catch (const std::exception& e) {
+ std::cerr << e.what() << std::endl;
+ ICO_ERR("main: catch exception [%s]", e.what());
+ return -1;
+ }
+ catch (const std::string& str) {
+ std::cerr << str << std::endl;
+ ICO_ERR("main: catch exception [%s]", str.c_str());
+ return -1;
+ }
+ catch (...) {
+ ICO_ERR("main: catch exception unknown");
+ return -1;
+ }
+ ICO_INF( "END_MODULE HomeScreen" );
+
+ return 0;
}
+// vim: set expandtab ts=4 sw=4:
+++ /dev/null
-#ifndef __HOME_SCREEN_MAIN_H__
-#define __HOME_SCREEN_MAIN_H__
-/*
- * Copyright (c) 2013, TOYOTA MOTOR CORPORATION.
- *
- * This program is licensed under the terms and conditions of the
- * Apache License, version 2.0. The full text of the Apache License is at
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- */
-/**
- * @brief homescreen application main
- *
- * @date Feb-15-2013
- */
-
-#include <stdio.h>
-#include <pthread.h>
-#include <libwebsockets.h>
-
-#include "CicoHomeScreen.h"
-#include "CicoHomeScreenConfig.h"
-#include "CicoHomeScreenSound.h"
-
-#endif
-
#ifndef HOME_SCREEN_RES_H
#define HOME_SCREEN_RES_H
+#if 0
/* file_path */
-#define default_path "./"
+//#define default_path "./"
#define edj_path "/usr/apps/%s/res/edj/"
#define image_path "/usr/apps/%s/res/images/"
#define sound_path "/usr/apps/%s/res/sounds/"
#define local_image_path "%s/res/images/"
#define local_sound_path "%s/res/sounds/"
#define local_manifest_path "%s/res/apps/org.tizen.ico.homescreen/"
+#endif
#define fname_api_all_off "api_all_off.png"
#define fname_api_all_on "api_all_on.png"
#define fname_colon "time_ten.png"
#endif /* HOME_SCREEN_RES_H */
+// vim:set expandtab ts=4 sw=4:
/* get name from userdata */
if (data != NULL) {
- ICO_DBG("CicoOnScreenAction::TouchUpEdje: user data is %s",
- static_cast<const char *>(data));
+ ICO_PRF("TOUCH_EVENT Edje Up date=%s",
+ static_cast<const char *>(data));
}
else {
- ICO_DBG("CicoOnScreenAction::TouchUpEdje: user data is NULL");
+ ICO_PRF("TOUCH_EVENT Edje Up date=(NIL)");
}
context->EventMessage(const_cast<char*>("%s TOUCH %s %s"), ICO_HS_MSG_HEAD_OS, edje_str, data);
/* get name from userdata */
if (data != NULL) {
- ICO_DBG("CicoOnScreenAction::TouchUpNext: user data is %s",
+ ICO_PRF("TOUCH_EVENT Next Up date=%s",
static_cast<const char *>(data));
}
else {
- ICO_DBG("OCicoOnScreenAction::TouchUpNext: user data is NULL");
+ ICO_PRF("TOUCH_EVENT Next Up date=(NIL)");
}
context->EventMessage(static_cast<char*>("%s TOUCH %s %s"), ICO_HS_MSG_HEAD_OS, edje_str, data);
int appcnt;
int appidx, idx, cnt;
- ICO_DBG("CicoOnScreenAppList::LoadConfig: Enter");
+ ICO_TRA("CicoOnScreenAppList::LoadConfig: Enter");
appconf = const_cast<Ico_Uxf_App_Config *>(ico_uxf_getAppConfig());
appcnt = appconf->applicationNum;
app_cnt = appcnt;
applist_idx = 0;
- ICO_DBG("CicoOnScreenAppList::LoadConfig: Leave(appcnt=%d)", appcnt);
+ ICO_TRA("CicoOnScreenAppList::LoadConfig: Leave(appcnt=%d)", appcnt);
return;
}
void
CicoOnScreenAppList::ConfigEvent(const char *appid, int type)
{
- ICO_DBG("CicoOnScreenAppList::LoadConfig: Enter(appid=%s, type=%d)",
+ ICO_TRA("CicoOnScreenAppList::LoadConfig: Enter(appid=%s, type=%d)",
appid, type);
LoadConfig();
- ICO_DBG("CicoOnScreenAppList::LoadConfig: Leave");
+ ICO_TRA("CicoOnScreenAppList::LoadConfig: Leave");
return;
}
--- /dev/null
+AM_CFLAGS = $(GCC_CFLAGS)
+AM_CPPFLAGS = $(GCC_CXXFLAGS)
+AM_CXXFLAGS = $(GCC_CXXFLAGS)
+
+COMMON_LIBS = -lm -lwebsockets -lico-uxf-weston-plugin -lsecurity-server-client
+
+noinst_PROGRAMS = \
+ OnScreen
+
+OnScreen_SOURCES = \
+ on_screen.cpp \
+ CicoOnScreenAction.cpp \
+ CicoOnScreenAppList.cpp \
+ CicoOnScreenControlWindow.cpp \
+ CicoOnScreenContext.cpp
+
+OnScreen_CFLAGS= \
+ @CAPIAPPFWAPPLICATION_CFLAGS@ \
+ $(EFL_CFLAGS) \
+ $(OPT_CFLAGS) \
+ $(WL_CFLAGS) \
+ $(AUL_CFLAGS) \
+ $(AIL_CFLAGS) \
+ $(UWS_CFLAGS) \
+ $(PKGMGR_CFLAGS) \
+ $(UWS_CFLAGS) \
+ $(WESTONPLUGIN_CFLAGS) \
+ -I../../include \
+ -I../../lib/common
+
+OnScreen_CXXFLAGS= \
+ @CAPIAPPFWAPPLICATION_CFLAGS@ \
+ $(EFL_CFLAGS) \
+ $(OPT_CFLAGS) \
+ $(WL_CFLAGS) \
+ $(AUL_CFLAGS) \
+ $(AIL_CFLAGS) \
+ $(UWS_CFLAGS) \
+ $(PKGMGR_CFLAGS) \
+ $(UWS_CFLAGS) \
+ $(WESTONPLUGIN_CFLAGS) \
+ -I../../include \
+ -I../../lib/common
+
+OnScreen_LDADD = \
+ ../../lib/common/.libs/libico-common.a \
+ @CAPIAPPFWAPPLICATION_LIBS@ \
+ @PKGMGR_LIBS@ \
+ $(EFL_LIBS) \
+ $(OPT_LIBS) \
+ $(WL_LIBS) \
+ $(COMMON_LIBS) \
+ $(UWS_LIBS) \
+ $(AUL_LIBS) \
+ $(AIL_LIBS) \
+ $(UWS_LIBS) \
+ ../../lib/apps-framework/.libs/libico-appfw.so \
+ -lwayland-egl -lEGL -lGLESv2
+
+CLEANFILES = $(BUILT_SOURCES)
+
+install-exec-hook:
+ mkdir -p $(INSTALL_ROOT)/usr/apps/org.tizen.ico.onscreen/bin
+ mkdir -p $(INSTALL_ROOT)/usr/apps/org.tizen.ico.onscreen/res/config
+ mkdir -p $(INSTALL_ROOT)/usr/share/packages
+ install -m 0755 OnScreen $(INSTALL_ROOT)/usr/apps/org.tizen.ico.onscreen/bin
+ install -m 0644 $(top_srcdir)/data/share/packages/org.tizen.ico.onscreen.xml $(INSTALL_ROOT)/usr/share/packages
+ install -m 0644 $(top_srcdir)/res/org.tizen.ico.onscreen/res/config/* $(INSTALL_ROOT)/usr/apps/org.tizen.ico.onscreen/res/config
+
+uninstall:
+ rm -rf $(INSTALL_ROOT)/usr/apps/org.tizen.ico.onscreen
+ rm -f $(INSTALL_ROOT)/usr/share/packages/org.tizen.ico.onscreen.xml
--- /dev/null
+/*
+ * Copyright (c) 2013, TOYOTA MOTOR CORPORATION.
+ *
+ * This program is licensed under the terms and conditions of the
+ * Apache License, version 2.0. The full text of the Apache License is at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ */
+/**
+ * @brief header file of homescreen resource
+ *
+ * @date Feb-15-2013
+ */
+
+#ifndef __CICO_SB_CONFIG_DEF_H__
+#define __CICO_SB_CONFIG_DEF_H__
+
+#define ICO_SB_CONFIG_STATUSBAR "statusbar"
+#define ICO_SB_CONFIG_ORIENTATION "orientation"
+#define ICO_SB_CONFIG_SOUND "sound"
+
+#endif // __CICO_SB_CONFIG_DEF_H__
+// vim:set expandtab ts=4 sw=4:
+
--- /dev/null
+/*
+ * Copyright (c) 2013, TOYOTA MOTOR CORPORATION.
+ *
+ * This program is licensed under the terms and conditions of the
+ * Apache License, version 2.0. The full text of the Apache License is at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ */
+/**
+ * @brief header file of homescreen resource
+ *
+ * @date Feb-15-2013
+ */
+
+#ifndef __CICO_SB_RESOURCE_DEF_H__
+#define __CICO_SB_RESOURCE_DEF_H__
+
+// file name (status bar)
+#define fname_logo_off "st_logo_off.png"
+#define fname_logo_on "st_logo_on.png"
+#define fname_am "time_am.png"
+#define fname_pm "time_pm.png"
+#define fname_num1 "time_1.png"
+#define fname_num2 "time_2.png"
+#define fname_num3 "time_3.png"
+#define fname_num4 "time_4.png"
+#define fname_num5 "time_5.png"
+#define fname_num6 "time_6.png"
+#define fname_num7 "time_7.png"
+#define fname_num8 "time_8.png"
+#define fname_num9 "time_9.png"
+#define fname_num0 "time_0.png"
+#define fname_colon "time_ten.png"
+
+#endif // __CICO_SB_RESOURCE_DEF_H__
+// vim:set expandtab ts=4 sw=4:
+
*
* @date Feb-15-2013
*/
+
+#include <ico_log.h>
+#include "CicoResourceConfig.h"
#include "CicoStatusBarControlWindow.h"
+#include "CicoSBResourceDef.h"
+#include "CicoSBConfigDef.h"
/*============================================================================*/
/* Declare static values */
* @brief CicoStatusBarControlWindow::Initialize
* Initialize
*
- * @param[in] homescreen_config_tmp pointer to instance of CicoHomeScreenConfig
+ * @param[in] homescreen_config_tmp pointer to instance of CicoGKeyFileConfig
* @return none
*/
/*--------------------------------------------------------------------------*/
void
-CicoStatusBarControlWindow::Initialize(CicoHomeScreenConfig *homescreen_config_tmp)
+CicoStatusBarControlWindow::Initialize(CicoGKeyFileConfig *homescreen_config_tmp)
{
homescreen_config = homescreen_config_tmp;
/* get image path*/
- CicoHomeScreenResourceConfig::GetImagePath(respath, sizeof(respath));
+ CicoResourceConfig::GetImagePath(respath, sizeof(respath));
/*create instances*/
time_data[0] = new CicoStatusBarTime(fname_num0);
void
CicoStatusBarControlWindow::QuitEcoreLoop(Ecore_Evas *ee)
{
- ICO_DBG("CicoStatusBarControlWindow::QuitEcoreLoop: Enter");
+ ICO_TRA("CicoStatusBarControlWindow::QuitEcoreLoop: Enter");
ecore_main_loop_quit();
}
/* load configuration */
if (homescreen_config != NULL) {
- orientation = homescreen_config->ConfigGetInteger(ICO_HS_CONFIG_STATUBAR,
- ICO_HS_CONFIG_ORIENTAION,
+ orientation = homescreen_config->ConfigGetInteger(ICO_SB_CONFIG_STATUSBAR,
+ ICO_SB_CONFIG_ORIENTATION,
orientation);
}
void
CicoStatusBarControlWindow::EvasObjectImageFileSetAndShow(Evas_Object *obj,char *icon)
{
- char img[ICO_HS_TEMP_BUF_SIZE];
+ char img[256];
sprintf(img, icon, respath);
evas_object_image_file_set(obj, img, NULL);
evas_object_show(obj);
}
+// vim: set expandtab ts=4 sw=4:
#include <Ecore_Evas.h>
-#include "home_screen_res.h"
-#include "CicoHomeScreenCommon.h"
-#include "CicoHomeScreenConfig.h"
-#include "CicoHomeScreenSound.h"
+//#include "CicoHomeScreenCommon.h"
+#include "CicoGKeyFileConfig.h"
#include "CicoStatusBarTime.h"
#define ICO_HS_CONFIG_ORIENTAION "orientation"
CicoStatusBarControlWindow();
~CicoStatusBarControlWindow();
- void Initialize(CicoHomeScreenConfig *homescreen_config_tmp);
+ void Initialize(CicoGKeyFileConfig *homescreen_config_tmp);
void Finalize(void);
int CreateEcoreEvas(void);
static void StartEcoreLoop(void);
Evas_Object *min2;
char respath[ICO_SB_BUF_SIZE];
struct tm latest_time;
- CicoHomeScreenConfig *homescreen_config;
+ CicoGKeyFileConfig *homescreen_config;
protected:
CicoStatusBarControlWindow operator = (const CicoStatusBarControlWindow&);
CicoStatusBarControlWindow(const CicoStatusBarControlWindow&);
};
#endif
-
+// vim: set expandtab ts=4 sw=4:
{
return fname;
}
-
+// vim: set expandtab ts=4 sw=4:
CicoStatusBarTime operator = (const CicoStatusBarTime&);
CicoStatusBarTime(const CicoStatusBarTime&);
};
-
#endif
-
+// vim: set expandtab ts=4 sw=4:
--- /dev/null
+AM_CFLAGS = $(GCC_CFLAGS)
+AM_CPPFLAGS = $(GCC_CXXFLAGS)
+AM_CXXFLAGS = $(GCC_CXXFLAGS)
+
+COMMON_LIBS = -lm -lwebsockets -lico-uxf-weston-plugin -lsecurity-server-client
+
+noinst_PROGRAMS = \
+ StatusBar
+
+StatusBar_SOURCES = \
+ status_bar.cpp \
+ CicoStatusBarControlWindow.cpp \
+ CicoStatusBarTime.cpp
+
+StatusBar_CFLAGS = \
+ $(EFL_CFLAGS) \
+ $(OPT_CFLAGS) \
+ $(WL_CFLAGS) \
+ $(AUL_CFLAGS) \
+ $(UWS_CFLAGS) \
+ -I/usr/include/ico-uxf-weston-plugin \
+ -I/usr/include/ico-util \
+ -I../../include \
+ -I../../lib/common
+
+StatusBar_CXXFLAGS = \
+ $(EFL_CFLAGS) \
+ $(OPT_CFLAGS) \
+ $(WL_CFLAGS) \
+ $(AUL_CFLAGS) \
+ $(UWS_CFLAGS) \
+ -I/usr/include/ico-uxf-weston-plugin \
+ -I/usr/include/ico-util \
+ -I../../include \
+ -I../../lib/common
+
+StatusBar_LDADD = \
+ ../../lib/common/.libs/libico-common.a \
+ $(EFL_LIBS) \
+ $(OPT_LIBS) \
+ $(WL_LIBS) \
+ $(COMMON_LIBS) \
+ $(AUL_LIBS) \
+ $(UWS_LIBS)
+
+CLEANFILES = $(BUILT_SOURCES)
+
+install-exec-hook:
+ mkdir -p $(INSTALL_ROOT)/usr/apps/org.tizen.ico.statusbar/bin
+ mkdir -p $(INSTALL_ROOT)/usr/apps/org.tizen.ico.statusbar/res/config
+ mkdir -p $(INSTALL_ROOT)/usr/apps/org.tizen.ico.statusbar/res/images
+ mkdir -p $(INSTALL_ROOT)/usr/share/packages
+ install -m 0755 StatusBar $(INSTALL_ROOT)/usr/apps/org.tizen.ico.statusbar/bin
+ install -m 0644 $(top_srcdir)/res/org.tizen.ico.statusbar/res/images/time*.png $(INSTALL_ROOT)/usr/apps/org.tizen.ico.statusbar/res/images
+ install -m 0644 $(top_srcdir)/data/share/packages/org.tizen.ico.statusbar.xml $(INSTALL_ROOT)/usr/share/packages
+ install -m 0644 $(top_srcdir)/res/org.tizen.ico.statusbar/res/config/* $(INSTALL_ROOT)/usr/apps/org.tizen.ico.statusbar/res/config
+
+uninstall:
+ rm -rf $(INSTALL_ROOT)/usr/apps/org.tizen.ico.statusbar
+ rm -f $(INSTALL_ROOT)/usr/share/packages/org.tizen.ico.statusbar.xml
*
* @date Feb-15-2013
*/
-#include "status_bar.h"
+
+#include <stdio.h>
+#include <time.h>
+#include <pthread.h>
+
+#include <bundle.h>
+
+#include <ico_log.h>
+
+//#include "CicoHomeScreenCommon.h"
+#include "CicoGKeyFileConfig.h"
+#include "CicoStatusBarControlWindow.h"
+
+
+//#include "status_bar.h"
+
+#define ICO_SB_APPID_DEFAULT "org.tizen.ico.statusbar"
/*--------------------------------------------------------------------------*/
/*
ico_log_open(getenv("PKG_NAME"));
}
else {
- ico_log_open(ICO_HS_APPID_DEFAULT_SB);
+ ico_log_open(ICO_SB_APPID_DEFAULT);
}
+ ICO_INF("START_MODULE Status Bar");
/* get argment */
b = bundle_import_from_argv(argc, argv);
orientation = ICO_SB_VERTICAL;
/*HomeScreenConfig*/
- CicoHomeScreenConfig *homescreen_config = new CicoHomeScreenConfig();
+ CicoGKeyFileConfig *homescreen_config = new CicoGKeyFileConfig();
homescreen_config->Initialize(ICO_STATUSBAR_CONFIG_FILE);
- /* init home screen soud */
- CicoHomeScreenSound *sound = new CicoHomeScreenSound();
- sound->Initialize(homescreen_config);
-
/* controlWindow instance */
CicoStatusBarControlWindow* control_window =
new CicoStatusBarControlWindow();
control_window->Finalize();
delete control_window;
- /*delete homescreen sound*/
- delete sound;
-
/*delete homescreen config*/
delete homescreen_config;
+ ICO_INF("END_MODULE Status Bar");
return 0;
}
-
+// vim: set expandtab ts=4 sw=4:
#include <bundle.h>
+#include <ico_log.h>
-#include "home_screen_res.h"
-#include "CicoLog.h"
-#include "CicoHomeScreenCommon.h"
-#include "CicoHomeScreenConfig.h"
-#include "CicoHomeScreenSound.h"
+//#include "CicoHomeScreenCommon.h"
+#include "CicoGKeyFileConfig.h"
#include "CicoStatusBarControlWindow.h"
#endif
-
+// vim: set expandtab ts=4 sw=4:
+++ /dev/null
-/*
- * Copyright (c) 2013, TOYOTA MOTOR CORPORATION.
- *
- * This program is licensed under the terms and conditions of the
- * Apache License, version 2.0. The full text of the Apache License is at
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- */
-
-/*========================================================================*/
-/**
- * @file CicoEFLApp.cpp
- *
- * @brief
- */
-/*========================================================================*/
-
-#include <exception>
-#include <string>
-#include "Ecore.h"
-#include "CicoEFLApp.h"
-#include "CicoLog.h"
-
-/*========================================================================*/
-app_event_callback_s CicoEFLApp::m_appEventCB = {
- .create = CicoEFLApp::app_create,
- .terminate = CicoEFLApp::app_terminate,
- .pause = CicoEFLApp::app_pause,
- .resume = CicoEFLApp::app_resume,
- .service = CicoEFLApp::app_service,
- .low_memory = CicoEFLApp::app_low_memory,
- .low_battery = CicoEFLApp::app_low_battery,
- .device_orientation = CicoEFLApp::app_device_orientation,
- .language_changed = CicoEFLApp::app_language_changed,
- .region_format_changed = CicoEFLApp::app_region_format_changed
-};
-
-/*========================================================================*/
-/**
- * Default Constructor
- */
-CicoEFLApp::CicoEFLApp()
-{
-// ICO_DBG("CicoEFLApp::CicoEFLApp Enter");
-// ICO_DBG("CicoEFLApp::CicoEFLApp Leave");
-}
-
-/**
- * Destructor
- */
-CicoEFLApp::~CicoEFLApp()
-{
-// ICO_DBG("CicoEFLApp::~CicoEFLApp Enter");
-// ICO_DBG("CicoEFLApp::~CicoEFLApp Leave");
-}
-
-/**
- * Start Main Loop
- */
-int
-CicoEFLApp::start(int argc, char **argv)
-{
- ICO_DBG("CicoEFLApp::start Enter");
- return app_efl_main(&argc, &argv, &m_appEventCB, this);
-}
-
-/**
- * Stop Main Loop
- */
-int
-CicoEFLApp::stop(void)
-{
- return 0;
-}
-
-const char*
-CicoEFLApp::app_error_to_string(int error)
-{
- switch(error) {
- case APP_ERROR_NONE:
- return (const char*)"APP_ERROR_NONE";
- break;
- case APP_ERROR_INVALID_PARAMETER:
- return (const char*)"APP_ERROR_INVALID_PARAMETER";
- break;
- case APP_ERROR_OUT_OF_MEMORY:
- return (const char*)"APP_ERROR_OUT_OF_MEMORY";
- break;
- case APP_ERROR_INVALID_CONTEXT:
- return (const char*)"APP_ERROR_INVALID_CONTEXT";
- break;
- case APP_ERROR_NO_SUCH_FILE:
- return (const char*)"APP_ERROR_NO_SUCH_FILE";
- break;
- case APP_ERROR_ALREADY_RUNNING:
- return (const char*)"APP_ERROR_ALREADY_RUNNING";
- break;
- default:
- break;
- }
-
- return (const char*)"TIZEN_ERROR_UNKNOWN";
-}
-
-bool
-CicoEFLApp::onCreate(void *user_data)
-{
- ICO_WRN("CicoEFLApp::onCreate called.");
- return false;
-}
-
-void
-CicoEFLApp::onTerminate(void *user_data)
-{
- ICO_WRN("CicoEFLApp::onTerminate called.");
-}
-
-void
-CicoEFLApp::onPause(void *user_data)
-{
- ICO_WRN("CicoEFLApp::onPause called.");
-}
-
-void
-CicoEFLApp::onResume(void *user_data)
-{
- ICO_WRN("CicoEFLApp::onResume called.");
-}
-
-void
-CicoEFLApp::onService(service_h service, void *user_data)
-{
- ICO_WRN("CicoEFLApp::onService called.");
-}
-
-void
-CicoEFLApp::onLowMemory(void *user_data)
-{
- ICO_WRN("CicoEFLApp::onLowMemory called.");
-}
-
-void
-CicoEFLApp::onLowBattery(void *user_data)
-{
- ICO_WRN("CicoEFLApp::onLowBattery called.");
-}
-
-void
-CicoEFLApp::onDeviceOrientation(app_device_orientation_e orientation,
- void *user_data)
-{
- ICO_WRN("CicoEFLApp::onDeviceOrientation called.");
-}
-
-void
-CicoEFLApp::onLanguageChanged(void *user_data)
-{
- ICO_WRN("CicoEFLApp::onLanguageChanged called.");
-}
-
-void
-CicoEFLApp::onRegionFormatChanged(void *user_data)
-{
- ICO_WRN("CicoEFLApp::onRegionFormatChanged called.");
-}
-
-bool
-CicoEFLApp::app_create(void *user_data)
-{
- ICO_DBG("CicoEFLApp::app_create Enter");
-
- if (NULL == user_data) {
- ICO_DBG("CicoEFLApp::app_create Leave");
- return false;
- }
-
- int ret = static_cast<CicoEFLApp*>(user_data)->onCreate(user_data);
-
- ICO_DBG("CicoEFLApp::app_create Leave(%d)", ret);
-
- return ret;
-}
-
-void
-CicoEFLApp::app_terminate(void *user_data)
-{
- ICO_DBG("CicoEFLApp::app_terminate Enter");
-
- if (NULL == user_data) {
- ICO_DBG("CicoEFLApp::app_terminate Leave");
- return;
- }
-
- static_cast<CicoEFLApp*>(user_data)->onTerminate(user_data);
-
- ICO_DBG("CicoEFLApp::app_terminate Leave");
-}
-
-void
-CicoEFLApp::app_pause(void *user_data)
-{
- ICO_DBG("CicoEFLApp::app_pause Enter");
-
- if (NULL == user_data) {
- ICO_DBG("CicoEFLApp::app_pause Leave");
- return;
- }
-
- static_cast<CicoEFLApp*>(user_data)->onPause(user_data);
-
- ICO_DBG("CicoEFLApp::app_pause Leave");
-}
-
-void
-CicoEFLApp::app_resume(void *user_data)
-{
- ICO_DBG("CicoEFLApp::app_resume Enter");
-
- if (NULL == user_data) {
- ICO_DBG("CicoEFLApp::app_resume Leave");
- return;
- }
-
- static_cast<CicoEFLApp*>(user_data)->onResume(user_data);
-
- ICO_DBG("CicoEFLApp::app_resume Leave");
-}
-
-void
-CicoEFLApp::app_service(service_h service, void *user_data)
-{
- ICO_DBG("CicoEFLApp::app_service Enter");
-
- if (NULL == user_data) {
- ICO_DBG("CicoEFLApp::app_service Leave");
- return;
- }
-
- static_cast<CicoEFLApp*>(user_data)->onService(service, user_data);
-
- ICO_DBG("CicoEFLApp::app_service Leave");
-}
-
-void
-CicoEFLApp::app_low_memory(void *user_data)
-{
- ICO_DBG("CicoEFLApp::app_low_memory Enter");
-
- if (NULL == user_data) {
- ICO_DBG("CicoEFLApp::app_low_memory Leave");
- return;
- }
-
- static_cast<CicoEFLApp*>(user_data)->onLowMemory(user_data);
-
- ICO_DBG("CicoEFLApp::app_low_memory Leave");
-}
-
-void
-CicoEFLApp::app_low_battery(void *user_data)
-{
- ICO_DBG("CicoEFLApp::app_low_battery Enter");
-
- if (NULL == user_data) {
- ICO_DBG("CicoEFLApp::app_low_battery Leave");
- return;
- }
-
- static_cast<CicoEFLApp*>(user_data)->onLowBattery(user_data);
-
- ICO_DBG("CicoEFLApp::app_low_battery Leave");
-}
-
-void
-CicoEFLApp::app_device_orientation(app_device_orientation_e orientation,
- void *user_data)
-{
- ICO_DBG("CicoEFLApp::app_device_orientation Enter");
-
- if (NULL == user_data) {
- ICO_DBG("CicoEFLApp::app_device_orientation Leave");
- return;
- }
-
- static_cast<CicoEFLApp*>(user_data)->onDeviceOrientation(orientation,
- user_data);
-
- ICO_DBG("CicoEFLApp::app_device_orientation Leave");
-}
-
-void
-CicoEFLApp::app_language_changed(void *user_data)
-{
- ICO_DBG("CicoEFLApp::app_language_changed Enter");
-
- if (NULL == user_data) {
- ICO_DBG("CicoEFLApp::app_device_orientation Leave");
- return;
- }
-
- static_cast<CicoEFLApp*>(user_data)->onLanguageChanged(user_data);
-
- ICO_DBG("CicoEFLApp::app_language_changed Leave");
-}
-
-void
-CicoEFLApp::app_region_format_changed(void *user_data)
-{
- ICO_DBG("CicoEFLApp::app_region_format_changed Enter");
-
- if (NULL == user_data) {
- ICO_DBG("CicoEFLApp::app_device_orientation Leave");
- return;
- }
-
- static_cast<CicoEFLApp*>(user_data)->onRegionFormatChanged(user_data);
-
- ICO_DBG("CicoEFLApp::app_region_format_changed Leave");
-}
-/* vim: set expandtab ts=4 sw=4: */
+++ /dev/null
-/*
- * Copyright (c) 2013, TOYOTA MOTOR CORPORATION.
- *
- * This program is licensed under the terms and conditions of the
- * Apache License, version 2.0. The full text of the Apache License is at
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- */
-
-/*========================================================================*/
-/**
- * @file CicoEFLApp.h
- *
- * @brief
- */
-/*========================================================================*/
-#ifndef __CICO_EFL_APP_H__
-#define __CICO_EFL_APP_H__
-
-#include <app.h>
-
-class CicoEFLApp {
-public:
- // default constructor
- CicoEFLApp();
-
- /**
- * Destructor
- */
- virtual ~CicoEFLApp();
-
- /**
- * Start Main Loop
- */ int start(int argc, char **argv);
-
- /**
- * Stop Main Loop
- */
- int stop(void);
-
- /**
- * Convert application error to string
- */
- const char* app_error_to_string(int error);
-
- virtual bool onCreate(void *user_data);
- virtual void onTerminate(void *user_data);
- virtual void onPause(void *user_data);
- virtual void onResume(void *user_data);
- virtual void onService(service_h service, void *user_data);
- virtual void onLowMemory(void *user_data);
- virtual void onLowBattery(void *user_data);
- virtual void onDeviceOrientation(app_device_orientation_e orientation,
- void *user_data);
- virtual void onLanguageChanged(void *user_data);
- virtual void onRegionFormatChanged(void *user_data);
-
-protected:
- // assignment operator
- CicoEFLApp& operator=(const CicoEFLApp &object);
-
- // copy constructor
- CicoEFLApp(const CicoEFLApp &object);
-
-private:
- static bool app_create(void *user_data);
- static void app_terminate(void *user_data);
- static void app_pause(void *user_data);
- static void app_resume(void *user_data);
- static void app_service(service_h service, void *user_data);
- static void app_low_memory(void *user_data);
- static void app_low_battery(void *user_data);
- static void app_device_orientation(app_device_orientation_e orientation,
- void *user_data);
- static void app_language_changed(void *user_data);
- static void app_region_format_changed(void *user_data);
-
-private:
- // application callbacks
- static app_event_callback_s m_appEventCB;
-};
-#endif /* __CICO_EFL_APP_H__ */
-/* vim:set expandtab ts=4 sw=4: */
*
*/
-/*========================================================================*/
+//==========================================================================
/**
* @file CicoSysConDaemon.cpp
*
- * @brief
+ * @brief This file is implimention of CicoSysConDaemon class
*/
-/*========================================================================*/
+//==========================================================================
#include <exception>
#include <iostream>
#include "CicoSysConDaemon.h"
#include "ico_syc_error.h"
#include "CicoLog.h"
-#include "CicoSCSystemConfig.h"
+#include "CicoSystemConfig.h"
#include "CicoSCServer.h"
#include "CicoSCWayland.h"
#include "CicoSCWindowController.h"
#include "CicoSCInputController.h"
#include "CicoSCLifeCycleController.h"
+#include "CicoSCUser.h"
#include "CicoSCUserManager.h"
#include "CicoSCResourceManager.h"
#include "Cico_aul_listen_app.h"
+#include "CicoSCVInfoManager.h"
+//--------------------------------------------------------------------------
/**
- * Default Constructor
+ * @brief default constructor
*/
+//--------------------------------------------------------------------------
CicoSysConDaemon::CicoSysConDaemon()
+ : m_winctrl(NULL), m_inputctrl(NULL), m_resourcemgr(NULL)
{
-// ICO_DBG("CicoSysConDaemon::CicoSysConDaemon Enter");
-// ICO_DBG("CicoSysConDaemon::CicoSysConDaemon Leave");
+// ICO_TRA("CicoSysConDaemon::CicoSysConDaemon Enter");
+// ICO_TRA("CicoSysConDaemon::CicoSysConDaemon Leave");
}
+//--------------------------------------------------------------------------
/**
- * Destructor
+ * @brief callback function on create
+ *
+ * @param [in] user_data The user data passed from the callback
+ * registration function
+ *
+ * @return true on success, false on error
*/
+//--------------------------------------------------------------------------
CicoSysConDaemon::~CicoSysConDaemon()
{
-// ICO_DBG("CicoSysConDaemon::~CicoSysConDaemon Enter");
-// ICO_DBG("CicoSysConDaemon::~CicoSysConDaemon Leave");
+// ICO_TRA("CicoSysConDaemon::~CicoSysConDaemon Enter");
+// ICO_TRA("CicoSysConDaemon::~CicoSysConDaemon Leave");
}
+//--------------------------------------------------------------------------
+/**
+ * @brief callback function on terminate
+ *
+ * @param [in] user_data The user data passed from the callback
+ * registration function
+ */
+//--------------------------------------------------------------------------
bool
CicoSysConDaemon::onCreate(void *user_data)
{
- ICO_DBG("CicoSysConDaemon::onCreate Enter");
+ ICO_TRA("CicoSysConDaemon::onCreate Enter");
try {
int ret = ICO_SYC_EOK;
- CicoSCSystemConfig::getInstance()->load("/usr/apps/org.tizen.ico.system-controller/res/config/system.xml");
+ CicoSystemConfig::getInstance()->load("/usr/apps/org.tizen.ico.system-controller/res/config/system.xml");
initAulListenXSignal();
+ CicoSCVInfoManager::getInstance()->startup();
+
CicoSCLifeCycleController *lifecycle =
CicoSCLifeCycleController::getInstance();
- CicoSCWindowController *winctrl = new CicoSCWindowController();
- CicoSCInputController *inputctrl = new CicoSCInputController();
+ m_winctrl = new CicoSCWindowController();
+ m_inputctrl = new CicoSCInputController();
- CicoSCResourceManager *resourcemgr = new CicoSCResourceManager();
- resourcemgr->setWindowController(winctrl);
- resourcemgr->setInputController(inputctrl);
- ret = resourcemgr->initialize();
+ m_resourcemgr = new CicoSCResourceManager();
+ m_resourcemgr->setWindowController(m_winctrl);
+ m_resourcemgr->setInputController(m_inputctrl);
+ ret = m_resourcemgr->initialize();
if (ICO_SYC_EOK != ret) {
return false;
}
- winctrl->setResourceManager(resourcemgr);
+ m_winctrl->setResourceManager(m_resourcemgr);
CicoSCUserManager *usermgr = CicoSCUserManager::getInstance();
usermgr->load("/usr/apps/org.tizen.ico.system-controller/res/config/user.xml");
CicoSCServer *server = CicoSCServer::getInstance();
- server->setWindowCtrl(winctrl);
- server->setInputCtrl(inputctrl);
+ server->setWindowCtrl(m_winctrl);
+ server->setInputCtrl(m_inputctrl);
server->setUserMgr(usermgr);
- server->setResourceMgr(resourcemgr);
- server->setPolicyMgr(resourcemgr->getPolicyManager());
+ server->setResourceMgr(m_resourcemgr);
+ server->setPolicyMgr(m_resourcemgr->getPolicyManager());
server->startup(18081, (const char*)"ico_syc_protocol");
- ret = CicoSCWayland::getInstance()->intialize();
+ ret = CicoSCWayland::getInstance()->initialize();
if (ICO_SYC_EOK != ret) {
return false;
}
CicoSCWayland::getInstance()->addEcoreMainWlFdHandler();
-
+
usermgr->initialize();
+ if (true == lifecycle->isAppResource()) {
+ const CicoSCUser* user = usermgr->getLoginUser();
+ if (NULL != user) {
+ if (false == lifecycle->startAppResource(user->name)) {
+ lifecycle->createAppResourceFile(user->name);
+ }
+ }
+ }
}
catch (const std::exception& e) {
std::cerr << e.what() << std::endl;
return false;
}
- ICO_DBG("CicoSysConDaemon::onCreate Leave(true)");
+ ICO_TRA("CicoSysConDaemon::onCreate Leave(true)");
+ ICO_PRF("SYS_STARTED Initialization is complete");
return true;
}
-#if 0
+//--------------------------------------------------------------------------
+/**
+ * @brief callback function on terminate
+ *
+ * @param [in] user_data The user data passed from the callback
+ * registration function
+ */
+//--------------------------------------------------------------------------
void
CicoSysConDaemon::onTerminate(void *user_data)
{
- _DBG("CicoSysConDaemon::onTerminate entry");
+ ICO_TRA("CicoSysConDaemon::onTerminate Enter");
+ CicoSCUserManager *usermgr = CicoSCUserManager::getInstance();
+ usermgr->cloaseUser();
+ stop();
+ CicoSCServer::getInstance()->teardown();
+ CicoSCVInfoManager::getInstance()->teardown();
+ ICO_TRA("CicoSysConDaemon::onTerminate Leave");
}
+//--------------------------------------------------------------------------
+/**
+ * @brief callback function on pause
+ *
+ * @param [in] user_data The user data passed from the callback
+ * registration function
+ */
+//--------------------------------------------------------------------------
void
CicoSysConDaemon::onPause(void *user_data)
{
- _DBG("CicoSysConDaemon::onPause entry");
+ ICO_TRA("CicoSysConDaemon::onPause Enter");
+ ICO_TRA("CicoSysConDaemon::onPause Leave");
}
+//--------------------------------------------------------------------------
+/**
+ * @brief callback function on resume
+ *
+ * @param [in] user_data The user data passed from the callback
+ * registration function
+ */
+//--------------------------------------------------------------------------
void
CicoSysConDaemon::onResume(void *user_data)
{
- _DBG("CicoSysConDaemon::onResume entry");
+ ICO_TRA("CicoSysConDaemon::onResume Enter");
+ ICO_TRA("CicoSysConDaemon::onResume Leave");
}
+//--------------------------------------------------------------------------
+/**
+ * @brief callback function on service
+ *
+ * @param [in] service The handle to the service
+ * @param [in] user_data The user data passed from the callback
+ * registration function
+ */
+//--------------------------------------------------------------------------
void
CicoSysConDaemon::onService(service_h service, void *user_data)
{
- _DBG("CicoSysConDaemon::onService entry");
+ ICO_TRA("CicoSysConDaemon::onService Enter");
+ ICO_TRA("CicoSysConDaemon::onService Leave");
}
-#endif
-/* vim: set expandtab ts=4 sw=4: */
+// vim: set expandtab ts=4 sw=4:
*
*/
-/*========================================================================*/
+//==========================================================================
/**
* @file CicoSysConDaemon.h
*
- * @brief
+ * @brief This file is definition of CicoSysConDaemon class
*/
-/*========================================================================*/
+//==========================================================================
+#ifndef __CICO_SYS_CON_DAEMON_H__
+#define __CICO_SYS_CON_DAEMON_H__
-//#include <app.h>
#include <stdio.h>
#include "CicoEFLApp.h"
-#ifndef __CICO_UI_SAMPLE_APP_H__
-#define __CICO_UI_SAMPLE_APP_H__
-
-#ifdef __cplusplus
-extern "C" {
-#endif
+//==========================================================================
+// Forward declaration
+//==========================================================================
+class CicoSCWindowController;
+class CicoSCInputController;
+class CicoSCResourceManager;
+//==========================================================================
+/**
+ * @brief ELF Application functions for SystemController
+ */
+//==========================================================================
class CicoSysConDaemon : public CicoEFLApp {
public:
- /**
- * Default Constructor
- */
+ // default constructor
CicoSysConDaemon();
-
- /**
- * Destructor
- */
+
+ // destructor
virtual ~CicoSysConDaemon();
- /**
- *
- */
+ // callback function on create
virtual bool onCreate(void *user_data);
-#if 0
- void onTerminate(void *user_data);
- void onPause(void *user_data);
- void onResume(void *user_data);
- void onService(service_h service, void *user_data);
-#endif
+
+ // callback function on terminate
+ virtual void onTerminate(void *user_data);
+
+ // callback function on pause
+ virtual void onPause(void *user_data);
+
+ // callback function on resume
+ virtual void onResume(void *user_data);
+
+ // callback function on service
+ virtual void onService(service_h service, void *user_data);
protected:
- /**
- * Assignment Operator
- */
+ // assignment operator
CicoSysConDaemon& operator=(const CicoSysConDaemon &object);
- /**
- * Copy Constructor
- */
+ // copy constructor
CicoSysConDaemon(const CicoSysConDaemon &object);
-};
-#ifdef __cplusplus
-}
-#endif
+private:
+ // CicoSCWindowController instance
+ CicoSCWindowController* m_winctrl;
-#endif /* __CICO_UI_SAMPLE_APP_H__ */
-/* vim:set expandtab ts=4 sw=4: */
+ // CicoSCInputController instance
+ CicoSCInputController* m_inputctrl;
+
+ // CicoSCResourceManager instance
+ CicoSCResourceManager* m_resourcemgr;
+};
+#endif // __CICO_SYS_CON_DAEMON_H__
+// vim:set expandtab ts=4 sw=4:
--- /dev/null
+/*
+ * Copyright (c) 2013, TOYOTA MOTOR CORPORATION.
+ *
+ * This program is licensed under the terms and conditions of the
+ * Apache License, version 2.0. The full text of the Apache License is at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ */
+
+/*========================================================================*/
+/**
+ * @file CicoSysConLogConfig.cpp
+ *
+ * @brief This file implementation of CicoSysConLogConfig class
+ */
+/*========================================================================*/
+
+#include <boost/property_tree/ptree.hpp>
+#include <boost/property_tree/xml_parser.hpp>
+#include <boost/foreach.hpp>
+#include <boost/lexical_cast.hpp>
+
+using namespace boost;
+using namespace boost::property_tree;
+
+#include "CicoSysConLogConfig.h"
+
+//==========================================================================
+// private static variable
+//==========================================================================
+CicoSysConLogConfig* CicoSysConLogConfig::ms_myInstance = NULL;
+
+//--------------------------------------------------------------------------
+/**
+ * @brief default constructor
+ */
+//--------------------------------------------------------------------------
+CicoSysConLogConfig::CicoSysConLogConfig()
+ : m_confFile(""), m_name("IcoSysConDaemon"),
+ m_levelPRF(false), m_levelTRA(false), m_levelDBG(false),
+ m_levelINF(false), m_levelWRN(false), m_levelCRI(false),
+ m_levelERR(false), m_flush(false), m_ecore(false)
+{
+}
+
+//--------------------------------------------------------------------------
+/**
+ * @brief destructor
+ */
+//--------------------------------------------------------------------------
+CicoSysConLogConfig::~CicoSysConLogConfig()
+{
+}
+
+//--------------------------------------------------------------------------
+/**
+ * @brief Get instance of CicoSysConLogConfig
+ *
+ * @return pointer of CicoSysConLogConfig object
+ */
+//--------------------------------------------------------------------------
+CicoSysConLogConfig*
+CicoSysConLogConfig::getInstance(void)
+{
+ if (NULL == ms_myInstance) {
+ ms_myInstance = new CicoSysConLogConfig();
+ }
+ return ms_myInstance;
+}
+
+//--------------------------------------------------------------------------
+/**
+ * @brief Get instance of CicoSysConLogConfig
+ *
+ * @param [in] confFile config file name
+ * @return 0 on success, other on error
+ */
+//--------------------------------------------------------------------------
+int
+CicoSysConLogConfig::load(const std::string & confFile)
+{
+ // load xml config file
+ ptree root;
+ read_xml(confFile, root);
+
+ //<log>
+ if (root.not_found() != root.find("system-controller.log")) {
+ printf("log element not found");
+ return -1;
+ }
+
+ ptree log = root.get_child("system-controller.log");
+
+ ptree child;
+ optional<std::string> sValue;
+ optional<bool> bValue;
+
+ // read <performance eneble="xxx"/>
+ sValue = log.get_optional<std::string>("name");
+ if (true == sValue.is_initialized()) {
+ m_name = sValue.get();
+ }
+
+ // read <performance eneble="xxx"/>
+ child = log.get_child("level.performance");
+ bValue = child.get_optional<bool>("<xmlattr>.enable");
+ if (true == bValue.is_initialized()) {
+ m_levelPRF = bValue.get();
+ }
+
+ // read <trace eneble="xxx"/>
+ child = log.get_child("level.trace");
+ bValue = child.get_optional<bool>("<xmlattr>.enable");
+ if (true == bValue.is_initialized()) {
+ m_levelTRA = bValue.get();
+ }
+
+ // read <debug eneble="xxx"/>
+ child = log.get_child("level.debug");
+ bValue = child.get_optional<bool>("<xmlattr>.enable");
+ if (true == bValue.is_initialized()) {
+ m_levelDBG = bValue.get();
+ }
+
+ // read <info eneble="xxx"/>
+ child = log.get_child("level.info");
+ bValue = child.get_optional<bool>("<xmlattr>.enable");
+ if (true == bValue.is_initialized()) {
+ m_levelINF = bValue.get();
+ }
+
+ // read <warning eneble="xxx"/>
+ child = log.get_child("level.warning");
+ bValue = child.get_optional<bool>("<xmlattr>.enable");
+ if (true == bValue.is_initialized()) {
+ m_levelWRN = bValue.get();
+ }
+
+ // read <critical eneble="xxx"/>
+ child = log.get_child("level.critical");
+ bValue = child.get_optional<bool>("<xmlattr>.enable");
+ if (true == bValue.is_initialized()) {
+ m_levelCRI = bValue.get();
+ }
+
+ // read <error eneble="xxx"/>
+ child = log.get_child("level.error");
+ bValue = child.get_optional<bool>("<xmlattr>.enable");
+ if (true == bValue.is_initialized()) {
+ m_levelERR = bValue.get();
+ }
+
+ // read <flush eneble="xxx"/>
+ child = log.get_child("flush");
+ bValue = child.get_optional<bool>("<xmlattr>.enable");
+ if (true == bValue.is_initialized()) {
+ m_flush = bValue.get();
+ }
+
+ // read <ecore eneble="xxx"/>
+ child = log.get_child("ecore");
+ bValue = child.get_optional<bool>("<xmlattr>.enable");
+ if (true == bValue.is_initialized()) {
+ m_ecore = bValue.get();
+ }
+
+ return 0;
+}
+
+
+//--------------------------------------------------------------------------
+/**
+ * @brief get log name
+ */
+//--------------------------------------------------------------------------
+std::string &
+CicoSysConLogConfig::getLogName(void)
+{
+ return m_name;
+}
+
+//--------------------------------------------------------------------------
+/**
+ * @brief get performance level enable state
+ */
+//--------------------------------------------------------------------------
+bool
+CicoSysConLogConfig::isPRF(void)
+{
+ return m_levelPRF;
+}
+
+//--------------------------------------------------------------------------
+/**
+ * @brief get trace level enable state
+ */
+//--------------------------------------------------------------------------
+bool
+CicoSysConLogConfig::isTRA(void)
+{
+ return m_levelTRA;
+}
+
+//--------------------------------------------------------------------------
+/**
+ * @brief get debug level enable state
+ */
+//--------------------------------------------------------------------------
+bool
+CicoSysConLogConfig::isDBG(void)
+{
+ return m_levelDBG;
+}
+
+//--------------------------------------------------------------------------
+/**
+ * @brief get info level enable state
+ */
+//--------------------------------------------------------------------------
+bool
+CicoSysConLogConfig::isINF(void)
+{
+ return m_levelINF;
+}
+
+//--------------------------------------------------------------------------
+/**
+ * @brief get warning level enable state
+ */
+//--------------------------------------------------------------------------
+bool
+CicoSysConLogConfig::isWRN(void)
+{
+ return m_levelWRN;
+}
+
+//--------------------------------------------------------------------------
+/**
+ * @brief get critical level enable state
+ */
+//--------------------------------------------------------------------------
+bool
+CicoSysConLogConfig::isCRI(void)
+{
+ return m_levelCRI;
+}
+
+//--------------------------------------------------------------------------
+/**
+ * @brief get error level enable state
+ */
+//--------------------------------------------------------------------------
+bool
+CicoSysConLogConfig::isERR(void)
+{
+ return m_levelERR;
+}
+
+//--------------------------------------------------------------------------
+/**
+ * @brief get flush log enable state
+ */
+//--------------------------------------------------------------------------
+bool
+CicoSysConLogConfig::isFlush(void)
+{
+ return m_flush;
+}
+
+//--------------------------------------------------------------------------
+/**
+ * @brief get ecore log print enalbe state
+ */
+//--------------------------------------------------------------------------
+bool
+CicoSysConLogConfig::isEcore(void)
+{
+ return m_ecore;
+}
+// vim:set expandtab ts=4 sw=4:
--- /dev/null
+/*
+ * Copyright (c) 2013, TOYOTA MOTOR CORPORATION.
+ *
+ * This program is licensed under the terms and conditions of the
+ * Apache License, version 2.0. The full text of the Apache License is at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ */
+
+//==========================================================================
+/**
+ * @file CicoLogConfig.h
+ *
+ * @brief This file is definition of CicoSysConLogConfig class
+ */
+//==========================================================================
+#ifndef __CICO_SYS_CON_LOG_CONFIG_H__
+#define __CICO_SYS_CON_LOG_CONFIG_H__
+
+#include <string>
+
+//==========================================================================
+/**
+ * @brief This class has function of access to my appliction log
+ * configuration information
+ */
+//==========================================================================
+class CicoSysConLogConfig
+{
+public:
+ // get my install
+ static CicoSysConLogConfig* getInstance(void);
+
+ // load configuration file
+ int load(const std::string & confFile);
+
+ // get log name
+ std::string & getLogName(void);
+
+ // get performance level enable state
+ bool isPRF(void);
+
+ // get trace level enable state
+ bool isTRA(void);
+
+ // get debug level enable state
+ bool isDBG(void);
+
+ // get info level enable state
+ bool isINF(void);
+
+ // get warning level enable state
+ bool isWRN(void);
+
+ // get critical level enable state
+ bool isCRI(void);
+
+ // get error level enable state
+ bool isERR(void);
+
+ // get flush log enable state
+ bool isFlush(void);
+
+ // get ecore log print enalbe state
+ bool isEcore(void);
+
+private:
+ // default constructor
+ CicoSysConLogConfig();
+
+ // destructor
+ ~CicoSysConLogConfig();
+
+ // assignment operator
+ CicoSysConLogConfig& operator=(const CicoSysConLogConfig &object);
+
+ // copy constructor
+ CicoSysConLogConfig(const CicoSysConLogConfig &object);
+
+private:
+ // this class instance
+ static CicoSysConLogConfig* ms_myInstance;
+
+ // log file path
+ std::string m_confFile;
+
+ // log name
+ std::string m_name;
+
+ // performance log enable
+ bool m_levelPRF;
+
+ // trace log enable
+ bool m_levelTRA;
+
+ // debug log enable
+ bool m_levelDBG;
+
+ // info log enable
+ bool m_levelINF;
+
+ // warning log enable
+ bool m_levelWRN;
+
+ // critical log enable
+ bool m_levelCRI;
+
+ // error log enable
+ bool m_levelERR;
+
+ // flush enable
+ bool m_flush;
+
+ // ecore log print eneble
+ bool m_ecore;
+};
+#endif // __CICO_SYSysConON_LOG_CONFIG_H__
+// vim:set expandtab ts=4 sw=4:
IcoSysconDaemon
IcoSysconDaemon_SOURCES = \
- CicoEFLApp.cpp \
+ CicoSysConLogConfig.cpp \
CicoSysConDaemon.cpp \
main.cpp
$(UWS_CFLAGS) \
$(WESTONPLUGIN_CFLAGS) \
-I../../include \
- -I../../lib/system-controller
-
+ -I../../lib/system-controller \
+ -I../../lib/common
IcoSysconDaemon_LDADD = \
../../lib/system-controller/.libs/libico-system-controller.a \
+ ../../lib/common/.libs/libico-common.a \
../../lib/misc/state-machine/.libs/libico-state-machine.a \
@ECORE_LIBS@ \
@EINA_LIBS@ \
@MURPHYRESOURCE_LIBS@ \
@EDBUS_LIBS@ \
$(UWS_LIBS) \
- $(WESTONPLUGIN_LIBS) \
- ../../lib/misc/state-machine/.libs/libico-state-machine.so
-
-# -lmurphy-resolver
+ $(WESTONPLUGIN_LIBS)
CLEANFILES = $(BUILT_SOURCES)
*
*/
-/*========================================================================*/
+//==========================================================================
/**
* @file main.cpp
*
- * @brief
+ * @brief This file is implimantion of system-controller
+ * application main function
*/
-/*========================================================================*/
+//==========================================================================
+#include <stdio.h>
+#include <unistd.h>
+#include <sys/types.h>
#include <exception>
#include <iostream>
#include <string>
#include "CicoEFLApp.h"
+#include "CicoSysConLogConfig.h"
#include "CicoSysConDaemon.h"
#include "CicoLog.h"
#include <Eina.h>
+//--------------------------------------------------------------------------
+/**
+ * @brief get log level
+ *
+ * @praram [in] logConf CicoSysConLogConfig instance
+ */
+//--------------------------------------------------------------------------
+int
+getLogLevel(CicoSysConLogConfig* logConf)
+{
+ int level = 0;
+ if (true == logConf->isPRF()) {
+ level |= ICO_LOG_LVL_PRF;
+ }
+ if (true == logConf->isTRA()) {
+ level |= ICO_LOG_LVL_TRA;
+ }
+ if (true == logConf->isDBG()) {
+ level |= ICO_LOG_LVL_DBG;
+ }
+ if (true == logConf->isINF()) {
+ level |= ICO_LOG_LVL_INF;
+ }
+ if (true == logConf->isWRN()) {
+ level |= ICO_LOG_LVL_WRN;
+ }
+ if (true == logConf->isCRI()) {
+ level |= ICO_LOG_LVL_CRI;
+ }
+ if (true == logConf->isERR()) {
+ level |= ICO_LOG_LVL_ERR;
+ }
+ if (true == logConf->isFlush()) {
+ level |= ICO_LOG_FLUSH;
+ }
+ else {
+ level |= ICO_LOG_NOFLUSH;
+ }
+
+ return level;
+}
+
+//--------------------------------------------------------------------------
+/**
+ * @brief system-controller main
+ *
+ * @param [in] argc counts of argment
+ * @param [in] argv argment
+ * @return result
+ * @retval 0 success
+ * @retval -1 error
+ */
+//--------------------------------------------------------------------------
int
main(int argc, char **argv)
{
- eina_init();
- eina_log_level_set(EINA_LOG_LEVEL_DBG);
+ int i;
+
+ // check '--user' option
+ for (i = 1; i < argc; i++) {
+ if (strcmp(argv[i], "--user") == 0) {
+ i ++;
+ if (i < argc) {
+ if (strcmp(argv[i], cuserid(NULL)) != 0) {
+ printf("=== start IcoSysConDaemon main entry(user=%s)\n", argv[i]);
+ printf("=== abort IcoSysConDaemon main exit(cannot run in a '%s')\n",
+ cuserid(NULL));
+ return 0;
+ }
+ }
+ }
+ }
try {
- printf("=== start IcoSysConDaemon\n");
- ico_log_open("IcoSysConDaemon"/*TOOD*/);
+ printf("=== start IcoSysConDaemon main entry(uid=%d)\n", getuid());
+
+ CicoSysConLogConfig* logConf = CicoSysConLogConfig::getInstance();
+ logConf->load("/usr/apps/org.tizen.ico.system-controller/res/config/system-controller.xml");
+
+ // setup ecore log print
+ if (logConf->isEcore()) {
+ eina_init();
+ eina_log_level_set(EINA_LOG_LEVEL_DBG);
+ }
+
+ // setup ico_log print
+ ico_log_open(logConf->getLogName().c_str());
+ ico_log_set_level(getLogLevel(logConf));
+ ICO_INF("START_MODULE SystemController");
int ret = 0;
CicoSysConDaemon daemon;
ret = daemon.start(argc, argv);
- ICO_DBG("ret = %d error=%s\n", ret, daemon.app_error_to_string(ret));
+ ICO_DBG("ret = %d error=%s", ret, daemon.appfwErrorToString(ret));
+
+ daemon.stop();
}
catch (const std::exception& e) {
std::cerr << e.what() << std::endl;
ICO_ERR("main: catch exception [%s]", e.what());
+ return -1;
}
catch (const std::string& str) {
std::cerr << str << std::endl;
ICO_ERR("main: catch exception [%s]", str.c_str());
+ return -1;
}
catch (...) {
ICO_ERR("main: catch exception unknown");
+ return -1;
}
+ ICO_INF("END_MODULE SystemController");
return 0;
}
-/* vim: set expandtab ts=4 sw=4: */
+// vim: set expandtab ts=4 sw=4:
stamp-h1 \
./lib/Makefile \
./lib/Makefile.in \
+./lib/common/.deps \
+./lib/common/Makefile \
+./lib/common/Makefile.in \
./lib/system-controller/.deps \
./lib/system-controller/Makefile \
./lib/system-controller/Makefile.in \
./src/homescreen/.deps \
./src/homescreen/Makefile \
./src/homescreen/Makefile.in \
+./src/statusbar/.deps \
+./src/statusbar/Makefile \
+./src/statusbar/Makefile.in \
./src/syscond/.deps \
./src/syscond/Makefile \
./src/syscond/Makefile.in \