Propagate the reason of box deletion 83/12783/1
authorSung-jae Park <nicesj.park@samsung.com>
Fri, 22 Nov 2013 12:28:32 +0000 (21:28 +0900)
committerSung-jae Park <nicesj.park@samsung.com>
Fri, 22 Nov 2013 12:28:32 +0000 (21:28 +0900)
Change-Id: I236ecba2312ada0972a99ca4c8e4f2639d43e578

packaging/liblivebox-viewer.spec
src/client.c

index 081ec1a..8c8143a 100644 (file)
@@ -1,10 +1,11 @@
 Name: liblivebox-viewer
-Summary: Library for developing the application.
-Version: 0.14.6
+Summary: Library for developing the application
+Version: 0.14.7
 Release: 1
 Group: HomeTF/Livebox
-License: Flora License
+License: Flora
 Source0: %{name}-%{version}.tar.gz
+Source1001: %{name}.manifest
 BuildRequires: cmake, gettext-tools, coreutils
 BuildRequires: pkgconfig(dlog)
 BuildRequires: pkgconfig(aul)
@@ -22,7 +23,7 @@ BuildRequires: pkgconfig(vconf)
 API for creating a new instance of the livebox and managing its life-cycle.
 
 %package devel
-Summary: Header and package configuration files for the livebox viewer development.
+Summary: Header and package configuration files for the livebox viewer development
 Group: Development/Libraries
 Requires: %{name} = %{version}-%{release}
 
@@ -31,6 +32,7 @@ Livebox viewer development library (dev)
 
 %prep
 %setup -q
+cp %{SOURCE1001} .
 
 %build
 %if 0%{?tizen_build_binary_release_type_eng}
@@ -49,12 +51,13 @@ mkdir -p %{buildroot}/%{_datarootdir}/license
 %post
 
 %files -n liblivebox-viewer
-%manifest liblivebox-viewer.manifest
+%manifest %{name}.manifest
 %defattr(-,root,root,-)
 %{_libdir}/*.so*
 %{_datarootdir}/license/*
 
 %files devel
+%manifest %{name}.manifest
 %defattr(-,root,root,-)
 %{_includedir}/livebox-viewer/livebox.h
 %{_libdir}/pkgconfig/*.pc
index eb0f471..8866148 100644 (file)
@@ -161,8 +161,9 @@ static struct packet *master_deleted(pid_t pid, int handle, const struct packet
        const char *id;
        double timestamp;
        struct livebox *handler;
+       int reason;
 
-       if (packet_get(packet, "ssd", &pkgname, &id, &timestamp) != 3) {
+       if (packet_get(packet, "ssdi", &pkgname, &id, &timestamp, &reason) != 4) {
                ErrPrint("Invalid arguemnt\n");
                goto out;
        }
@@ -219,7 +220,7 @@ static struct packet *master_deleted(pid_t pid, int handle, const struct packet
                handler->created_cb = NULL;
                handler->created_cbdata = NULL;
 
-               cb(handler, LB_STATUS_ERROR_CANCEL, cbdata);
+               cb(handler, reason, cbdata);
        } else if (handler->id) {
                if (handler->deleted_cb) {
                        ret_cb_t cb;
@@ -231,7 +232,7 @@ static struct packet *master_deleted(pid_t pid, int handle, const struct packet
                        handler->deleted_cb = NULL;
                        handler->deleted_cbdata = NULL;
 
-                       cb(handler, LB_STATUS_SUCCESS, cbdata);
+                       cb(handler, reason, cbdata);
                } else {
                        lb_invoke_event_handler(handler, LB_EVENT_DELETED);
                }