summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSung-jae Park <nicesj.park@samsung.com>2013-01-27 12:32:20 +0000
committerSung-jae Park <nicesj.park@samsung.com>2013-01-27 12:32:20 +0000
commit716f2669118fd879b79e1521bd1cf2878e79e37a (patch)
tree06eacce42bd23a1e505d85b85dcf6c808fc0850c
parentf43431a61395f04dde2cbfa328ac33a6409c0282 (diff)
downloadlivebox-service-716f2669118fd879b79e1521bd1cf2878e79e37a.tar.gz
livebox-service-716f2669118fd879b79e1521bd1cf2878e79e37a.tar.bz2
livebox-service-716f2669118fd879b79e1521bd1cf2878e79e37a.zip
Add new size type
1x1 = 207x207 3x1 = 645x207 3x3 = 645x645 Change-Id: I36dfc1abf3486aa639f7617ebc821a01baaa7bdd
-rw-r--r--include/livebox-service.h21
-rw-r--r--packaging/liblivebox-service.spec10
-rw-r--r--src/livebox-service.c27
3 files changed, 44 insertions, 14 deletions
diff --git a/include/livebox-service.h b/include/livebox-service.h
index 7fdd3f0..ada9b53 100644
--- a/include/livebox-service.h
+++ b/include/livebox-service.h
@@ -21,17 +21,20 @@
extern "C" {
#endif
-#define NR_OF_SIZE_LIST 7
+#define NR_OF_SIZE_LIST 10
enum livebox_size_type {
- LB_SIZE_TYPE_1x1 = 0x01,
- LB_SIZE_TYPE_2x1 = 0x02,
- LB_SIZE_TYPE_2x2 = 0x04,
- LB_SIZE_TYPE_4x1 = 0x08,
- LB_SIZE_TYPE_4x2 = 0x10,
- LB_SIZE_TYPE_4x3 = 0x20,
- LB_SIZE_TYPE_4x4 = 0x40,
- LB_SIZE_TYPE_UNKNOWN = 0xFF,
+ LB_SIZE_TYPE_1x1 = 0x0001,
+ LB_SIZE_TYPE_2x1 = 0x0002,
+ LB_SIZE_TYPE_2x2 = 0x0004,
+ LB_SIZE_TYPE_4x1 = 0x0008,
+ LB_SIZE_TYPE_4x2 = 0x0010,
+ LB_SIZE_TYPE_4x3 = 0x0020,
+ LB_SIZE_TYPE_4x4 = 0x0040,
+ LB_SIZE_TYPE_EASY_1x1 = 0x0100,
+ LB_SIZE_TYPE_EASY_3x1 = 0x0200,
+ LB_SIZE_TYPE_EASY_3x3 = 0x0400,
+ LB_SIZE_TYPE_UNKNOWN = 0xFFFF,
};
/*!
diff --git a/packaging/liblivebox-service.spec b/packaging/liblivebox-service.spec
index b87430a..0b01175 100644
--- a/packaging/liblivebox-service.spec
+++ b/packaging/liblivebox-service.spec
@@ -1,8 +1,8 @@
Name: liblivebox-service
-Summary: Library for the development of a livebox service
-Version: 0.2.13
+Summary: Service API for gathering installed livebox information.
+Version: 0.3.0
Release: 1
-Group: main/app
+Group: framework/livebox
License: Flora License
Source0: %{name}-%{version}.tar.gz
BuildRequires: cmake, gettext-tools, coreutils
@@ -17,7 +17,7 @@ BuildRequires: pkgconfig(x11)
BuildRequires: pkgconfig(vconf)
%description
-Livebox service library
+Service API for gathering installed livebox information
%package devel
Summary: Files for livebox service.
@@ -25,7 +25,7 @@ Group: Development/Libraries
Requires: %{name} = %{version}-%{release}
%description devel
-Livebox service library (dev)
+Gathering the installed livebox information.
%prep
%setup -q
diff --git a/src/livebox-service.c b/src/livebox-service.c
index 6d3477e..5f638d0 100644
--- a/src/livebox-service.c
+++ b/src/livebox-service.c
@@ -54,6 +54,9 @@ static struct supported_size_list {
{ 700, 348 }, /*!< 4x2 */
{ 700, 520 }, /*!< 4x3 */
{ 700, 700 }, /*!< 4x4 */
+ { 207, 207 }, /*!< 21x21 */
+ { 645, 207 }, /*!< 23x21 */
+ { 645, 645 }, /*!< 23x23 */
};
static struct info {
@@ -95,6 +98,15 @@ static inline int update_info(int width_type, int height_type, int width, int he
} else if (width_type == 4 && height_type == 4) {
DbgPrint("4x4 Updated to %dx%d\n", width, height);
idx = 6;
+ } else if (width_type == 21 && height_type == 21) {
+ DbgPrint("Easy 1x1 Updated to %dx%d\n", width, height);
+ idx = 7;
+ } else if (width_type == 23 && height_type == 21) {
+ DbgPrint("Easy 3x1 Updated to %dx%d\n", width, height);
+ idx = 8;
+ } else if (width_type == 23 && height_type == 23) {
+ DbgPrint("Easy 3x3 Updated to %dx%d\n", width, height);
+ idx = 9;
} else {
ErrPrint("Unknown size type: %dx%d (%dx%d)\n", width_type, height_type, width, height);
return 0;
@@ -324,6 +336,15 @@ static inline int convert_size_from_type(enum livebox_size_type type, int *width
case LB_SIZE_TYPE_4x4: /*!< 700x700 */
idx = 6;
break;
+ case LB_SIZE_TYPE_EASY_1x1: /*< 207x207 */
+ idx = 7;
+ break;
+ case LB_SIZE_TYPE_EASY_3x1: /*!< 645x207 */
+ idx = 8;
+ break;
+ case LB_SIZE_TYPE_EASY_3x3: /*!< 645x645 */
+ idx = 9;
+ break;
default:
return -EINVAL;
}
@@ -1694,6 +1715,12 @@ EAPI int livebox_service_size_type(int width, int height)
return LB_SIZE_TYPE_4x3;
case 6:
return LB_SIZE_TYPE_4x4;
+ case 7:
+ return LB_SIZE_TYPE_EASY_1x1;
+ case 8:
+ return LB_SIZE_TYPE_EASY_3x1;
+ case 9:
+ return LB_SIZE_TYPE_EASY_3x3;
default:
break;
}