tizen 2.4 release accepted/tizen/2.4/mobile/20151029.033830 submit/tizen_2.4/20151028.063927 tizen_2.4_mobile_release
authorjk7744.park <jk7744.park@samsung.com>
Sat, 24 Oct 2015 07:32:53 +0000 (16:32 +0900)
committerjk7744.park <jk7744.park@samsung.com>
Sat, 24 Oct 2015 07:32:53 +0000 (16:32 +0900)
12 files changed:
arm/bin/push_tool
arm/bin/pushd
arm/lib/libpush.so.0.2.12
doc/push_doc.h
include/push.h
include/pushlog.h [new file with mode: 0755]
packaging/push.spec
packaging/pushd.service [changed mode: 0755->0644]
push-bin.manifest
x86/bin/push_tool
x86/bin/pushd
x86/lib/libpush.so.0.2.12

index 5307718..b010360 100755 (executable)
Binary files a/arm/bin/push_tool and b/arm/bin/push_tool differ
index f89d03c..f8252c1 100755 (executable)
Binary files a/arm/bin/pushd and b/arm/bin/pushd differ
index d6052a6..02784e4 100644 (file)
Binary files a/arm/lib/libpush.so.0.2.12 and b/arm/lib/libpush.so.0.2.12 differ
index 4abc75a..b77f773 100755 (executable)
@@ -67,7 +67,7 @@
  *
  * To ensure your application is only running on the device with specific features, please define the features in your manifest file using the manifest editor in the SDK.
  *
- * More details on featuring your application can be found from <a href="../org.tizen.mobile.native.appprogramming/html/ide_sdk_tools/feature_element.htm"><b>Feature Element</b>.</a>
+ * More details on featuring your application can be found from <a href="https://developer.tizen.org/development/tools/native-tools/manifest-text-editor#feature"><b>Feature Element</b>.</a>
  *
  */
 
index e2d4ae8..c07c696 100755 (executable)
@@ -46,6 +46,7 @@ typedef enum {
        PUSH_ERROR_NO_DATA = TIZEN_ERROR_NO_DATA,  /**< No data available */
        PUSH_ERROR_OPERATION_FAILED = TIZEN_ERROR_UNKNOWN, /**< Internal operation failed */
        PUSH_ERROR_PERMISSION_DENIED = TIZEN_ERROR_PERMISSION_DENIED, /**< No privilege to access the push service */
+       PUSH_ERROR_NOT_SUPPORTED = TIZEN_ERROR_NOT_SUPPORTED, /**< Push not supported */
 } push_error_e;
 
 /**
diff --git a/include/pushlog.h b/include/pushlog.h
new file mode 100755 (executable)
index 0000000..ef64d20
--- /dev/null
@@ -0,0 +1,218 @@
+/*
+ * Copyright (c) 2000 - 2012 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/*
+ * pushlog.h
+ *
+ *  Created on: Dec 17, 2012
+ *      Author: sampath
+ */
+
+#ifndef PUSHLOG_H_
+#define PUSHLOG_H_
+
+
+#include <errno.h>
+#include <app.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * @brief Enumerations of error codes for push log service
+ */
+
+typedef enum
+{
+       PUSHLOG_ERROR_NONE = 1000,
+
+       // Server reply error code. This should be synchronized with local_msg.h
+       PUSHLOG_ERROR_SUCCESS=1000,
+       PUSHLOG_ERROR_SUCCESS_AND_NO_UPDATE=1010,       //this is not neccessary in client side. this rc will be replaced to 1000
+       PUSHLOG_ERROR_WRONG_REQUEST_FORMAT=2001,
+       PUSHLOG_ERROR_BLOCKED_DEVICE_TOKEN=2002,
+       PUSHLOG_ERROR_TOO_LONG_REQUEST_MSG=2003,
+       PUSHLOG_ERROR_EXCEEDED_DAILY_QUOTA=2004,
+       PUSHLOG_ERROR_FAIL_TO_AUTHENTICATE = 3001,
+
+       PUSHLOG_ERROR_WRONG_APP_ID = 4010,
+       PUSHLOG_ERROR_EMPTY_SERVICE = 4013,
+       PUSHLOG_ERROR_EMPTY_MESSAGES = 4014,
+
+       PUSHLOG_ERROR_NETWORK_NOT_AVAILABLE = -2,
+       PUSHLOG_ERROR_INVALID_REQUEST = -200,
+       PUSHLOG_ERROR_LOG_SIZE_OVER = -202,
+       PUSHLOG_ERROR_INVALID_LOG_STATUS = -204,
+       PUSHLOG_ERROR_ALREADY_REQUESTED = -205,
+       PUSHLOG_ERROR_LOGGING_FAIL = -206,
+       PUSHLOG_ERROR_REQUEST_TURN_OVER = -207,
+       PUSHLOG_ERROR_LOG_NOT_ACTIVATION = -208,
+
+       PUSHLOG_ERROR_INVALID_PARAMETER = -1000,
+       PUSHLOG_ERROR_OUT_OF_MEMORY,
+       PUSHLOG_ERROR_OPERATION_FAILED,
+       PUSHLOG_ERROR_CONNECT_FAIL,
+       PUSHLOG_ERROR_INTERNAL_SERVER_ERROR=8002,
+       PUSHLOG_ERROR_PANIC=9999
+} pushlog_error_e;
+
+
+/**
+ * @brief Enumerations of registration state
+ */
+typedef enum {
+       PUSHLOG_STATE_CONNECTED,   /**< Connected to SPPCD */
+       PUSHLOG_STATE_DISCONNECTED, /**< Disconnected from SPPCD */
+       PUSHLOG_STATE_READY,
+       PUSHLOG_STATE_ERROR,       /**< Error */
+} pushlog_state_e;
+
+
+/**
+ * @brief Push log service handle
+ */
+typedef struct pushlog_connection_s *pushlog_connection_h;
+
+
+/**
+ * @brief Push log data handle
+ */
+typedef void *pushlog_data;
+
+/**
+ * @brief Notification callback for logging service status
+ * @param[in] log_req_type status of logging service
+ * @param[in] result error code if any.
+ * PUSHLOG_ERROR_NONE indicates success.
+ * @param[in] user_data User data set with pushlog_connect()
+ * @see pushlog_connect()
+ */
+typedef void (*pushlog_state_cb)(
+               pushlog_state_e state, pushlog_error_e err,
+               void *user_data);
+
+/**
+ * @brief Notification callback invoked for pushlog_send_data() api response
+ * @param[in] log_id log id set while sending the data
+ * @param[in] result  error code if any.
+ * PUSHLOG_ERROR_NONE indicates success.
+ * @param[in] user_data User data set with pushlog_connect()
+ * @see pushlog_connect()
+ */
+typedef void (*pushlog_send_cb)(
+               const char *log_id, pushlog_error_e err,
+               void *user_data);
+
+/**
+ * @brief Connects to the push log service and sets callback functions
+ * @remarks The status of connection between an application and the push log service,
+ * is indicated with the callback push_log_status_cb.
+ * Connection should be freed with @ref pushlog_disconnect() by you.
+ * @param[in] status_cb connection status callback
+ * @param[in] send_cb callback to receive pushlog_send_data() response
+ * @param[in] user_data User data to pass to <I>state_cb</I> and <I>notify_cb</I>
+ * @param[in] service A @ref Service handle to launch an application by
+ * an posted UI notification
+ * @param[out] log_h  Handle of a connection to the push log service
+ * @return PUSHLOG_ERROR_NONE on success, otherwise a indicated by push_log_error_e.
+ * @see push_disconnect()
+ */
+pushlog_error_e pushlog_connect(const char *service_name,
+               pushlog_state_cb status_cb,
+               pushlog_send_cb send_cb,
+               void *cb_data, app_control_h service,
+               pushlog_connection_h *log_h);
+
+/**
+ * @brief Disconnect push log service
+ * @remarks If there is a connection between an application and the push service,
+ * the notify callback passes the notification upon its arrival.
+ * Otherwise, the push service posts a UI notification to alert users.
+ * Connection should be freed with @ref push_disconnect() by you.
+ * @param[in] log_h  Handle of a connection to the push log service
+ * @return PUSHLOG_ERROR_NONE on success, otherwise a indicated by push_log_error_e.
+ * @see pushlog_connect()
+ */
+pushlog_error_e pushlog_disconnect(pushlog_connection_h log_h);
+
+/**
+ * @brief Send log data to server
+ * @remarks
+ * @param[in] log_h  Handle of a connection to the push log service
+ * @param[in] log_prefix Data setting for prefix of log.
+ * @param[in] log_id log id
+ * @param[in] data_h Data to be sent
+ * @return PUSHLOG_ERROR_NONE on success, otherwise a indicated by push_log_error_e.
+ */
+pushlog_error_e pushlog_send(pushlog_connection_h log_h,
+               const char *log_prefix,
+               const char *log_id, pushlog_data data_h);
+
+
+/**
+ * @brief Get push log service's configurations
+ * @remarks
+ * @param[in] log_h Handle of a connection to the push log service
+ * @param[in] item_size
+ * @param[out] unlimited_sending
+ * @return PUSHLOG_ERROR_NONE on success, otherwise a indicated by push_log_error_e.
+ */
+pushlog_error_e pushlog_get_config(pushlog_connection_h log_h,
+               int *item_size, bool *unlimited_sending);
+
+/**
+ * @brief
+ * @remarks
+ * @param[in] log_h Handle of a connection to the push log service
+ * @param[in] state
+ * @return PUSHLOG_ERROR_NONE on success, otherwise a indicated by push_log_error_e.
+ */
+pushlog_error_e pushlog_get_state(pushlog_connection_h log_h,
+                               pushlog_state_e *state);
+
+/**
+ * @brief
+ * @remarks
+ * @param[in] data
+ * @return PUSHLOG_ERROR_NONE on success, otherwise a indicated by push_log_error_e.
+ */
+pushlog_error_e pushlog_create_data(pushlog_data *data);
+
+/**
+ * @brief
+ * @remarks
+ * @param[in] data
+ * @param[in] value
+ * @param[in] len
+ * @return PUSHLOG_ERROR_NONE on success, otherwise a indicated by push_log_error_e.
+ */
+pushlog_error_e pushlog_add_data(pushlog_data data, char *value, int len);
+
+/**
+ * @brief
+ * @remarks
+ * @param[in] data
+ * @return PUSHLOG_ERROR_NONE on success, otherwise a indicated by push_log_error_e.
+ */
+pushlog_error_e pushlog_free_data(pushlog_data data);
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* PUSHLOG_H_ */
index 4a393ab..eea6680 100644 (file)
@@ -2,7 +2,7 @@
 
 Name:       push
 Summary:    Push services and client library..
-Version:    0.4.06
+Version:    0.4.30
 Release:    1
 Group:      Application Framwork/Service
 License:    Apache-2.0
@@ -10,7 +10,6 @@ Source0:    %{name}-%{version}.tar.gz
 Source1:    pushd.service
 Requires(post): /sbin/ldconfig
 Requires(post): /usr/bin/sqlite3
-Requires(post): /usr/bin/vconftool
 Requires(postun): /sbin/ldconfig
 
 %if %{_support_weblog}
@@ -122,8 +121,8 @@ cp -a x86/share/push/*.cer %{buildroot}/usr/share/push/
 %post bin
 mkdir -p /opt/usr/dbspace
 sqlite3 /opt/usr/dbspace/.push.db "PRAGMA journal_mode = PERSIST; create table a(a); drop table a;" > /dev/null
-chown root:5000 /opt/usr/dbspace/.push.db
-chown root:5000 /opt/usr/dbspace/.push.db-journal
+chown system:5000 /opt/usr/dbspace/.push.db
+chown system:5000 /opt/usr/dbspace/.push.db-journal
 chmod 660 /opt/usr/dbspace/.push.db
 chmod 660 /opt/usr/dbspace/.push.db-journal
 
@@ -137,7 +136,7 @@ chsmack -a 'push-service::db' /opt/usr/dbspace/.push.db-journal
 
 %files -n libpush
 %manifest libpush.manifest
-%attr(644,-,-) %{_libdir}/libpush.so.*
+%attr(644,system,system)%{_libdir}/libpush.so.*
 
 %files -n libpush-devel
 %{_includedir}/*.h
@@ -146,20 +145,20 @@ chsmack -a 'push-service::db' /opt/usr/dbspace/.push.db-journal
 
 %files bin
 %manifest push-bin.manifest
-%{_bindir}/pushd
-/usr/share/push/*.cer
-/usr/share/license/%{name}
+%attr(755,system,system)%{_bindir}/pushd
+%attr(644,system,system)/usr/share/push/*.cer
+%attr(644,system,system)/usr/share/license/%{name}
 
 # This is a certificate file to access to logging server by HTTPS.
 %if %{_support_weblog}
-/usr/share/push/push_sslkey.pem
-/usr/share/push/prd-dl-key.pem
+%attr(644,system,system)/usr/share/push/push_sslkey.pem
+%attr(644,system,system)/usr/share/push/prd-dl-key.pem
 %endif
 
-/usr/lib/systemd/user/pushd.service
-/usr/lib/systemd/user/tizen-middleware.target.wants/pushd.service
-%{_libdir}/systemd/system/multi-user.target.wants/pushd.service
-%{_libdir}/systemd/system/pushd.service
+%attr(755,system,system)/usr/lib/systemd/user/pushd.service
+%attr(755,system,system)/usr/lib/systemd/user/tizen-middleware.target.wants/pushd.service
+%attr(755,system,system)%{_libdir}/systemd/system/multi-user.target.wants/pushd.service
+%attr(755,system,system)%{_libdir}/systemd/system/pushd.service
 
 %files tool
 %manifest push-tool.manifest
old mode 100755 (executable)
new mode 100644 (file)
index 442ca3c..b130092
@@ -7,6 +7,9 @@ Type=forking
 ExecStart=/usr/bin/pushd
 Restart=always
 MemoryLimit=10M
+User=system
+Group=system
+SmackProcessLabel=push-service
 
 [Install]
 WantedBy=multi-user.target
index 768b76d..0000a98 100644 (file)
@@ -7,24 +7,38 @@
                        <smack request="telephony_framework::api_modem" type="r"/>
                        <smack request="telephony_framework::api_sim" type="r"/>
                        <smack request="telephony_framework::api_network" type="r"/>
+                       <smack request="telephony_framework::api_ps_public" type="r"/>
+                       <smack request="telephony_framework::properties" type="rw"/>
                        <smack request="pkgmgr::info" type = "r"/>
                        <smack request="pkgmgr::db" type = "rlx"/>
-                       <smack request="ail::db" type = "rlx"/>
                        <smack request="data-provider-master::notification" type="rw"/>
                        <smack request="data-provider-master::notification.client" type="w"/>
                        <smack request="data-provider-master::badge" type="rw"/>
                        <smack request="data-provider-master::badge.client" type="w"/>
                        <smack request="connman" type="rw" />
-                       <smack request="net-config" type="rw" />
                        <smack request="connman::get" type="rw" />
-                       <smack request="telephony_framework::api_ps_public" type="rw" />
+                       <smack request="connman::profile" type="rw" />
+                       <smack request="net-config" type="rw" />
                        <smack request="deviced::display" type="rw" />
                        <smack request="secure-storage" type="rw" />
                        <smack request="security-server::api-privilege-by-pid" type="w"/>
                        <smack request="alarm-server::alarm" type = "w"/>
+                       <smack request="device::app_logging" type = "rw"/>
+                       <smack request="device::sys_logging" type = "rw"/>
+                       <smack request="push-service::db" type = "rw"/>
+                       <smack request="badge::db" type = "rl"/>
+                       <smack request="aul::launch" type = "x"/>
+                       <smack request="sdbd" type = "r"/>
+                       <smack request="privilege::tizen::packagemanager.info" type="rw"/>
+                       <smack request="tizen::vconf::setting::admin" type = "rl"/>
+                       <smack request="tizen::vconf::public::r" type = "rl"/>
+                       <smack request="tizen::vconf::public::r::platform::rw" type = "rl"/>
                </request>
                <permit>
                        <smack permit="system::use_internet" type="w"/>
+                       <smack permit="telephony_framework" type="rw"/>
+                       <smack permit="secure-storage" type="w"/>
+                       <smack permit="data-provider-master::bin" type="w"/>
                        <smack permit="dbus" type="rx"/>
                </permit>
                <provide>
index 0149c22..f3e55d7 100755 (executable)
Binary files a/x86/bin/push_tool and b/x86/bin/push_tool differ
index 9ce03ef..eb7c6bd 100755 (executable)
Binary files a/x86/bin/pushd and b/x86/bin/pushd differ
index 864056b..a9aa11b 100644 (file)
Binary files a/x86/lib/libpush.so.0.2.12 and b/x86/lib/libpush.so.0.2.12 differ