Modification about smack label of db file belong to process.
[platform/core/messaging/msg-service.git] / packaging / msg-service.spec
1 Name:           msg-service
2 Version:        0.9.3
3 Release:        1
4 License:        Flora-1.1
5 Summary:        Messaging Framework Library
6 Group:          System/Libraries
7 Source0:        %{name}-%{version}.tar.gz
8 Source101:      msg-service.service
9 Source1001:     %{name}.manifest
10 Source1002:     %{name}-devel.manifest
11 Source1003:     %{name}-tools.manifest
12 Source1004:     sms-plugin.manifest
13 Source1005:     mms-plugin.manifest
14
15 Requires(post): /usr/bin/sqlite3
16 Requires(post): /usr/bin/vconftool
17 Requires(post): /sbin/ldconfig
18 Requires(postun): /sbin/ldconfig
19 Requires(post): systemd
20 Requires(postun): systemd
21 BuildRequires: cmake
22 BuildRequires: pkgconfig(alarm-service)
23 BuildRequires: pkgconfig(appsvc)
24 BuildRequires: pkgconfig(aul)
25 BuildRequires: pkgconfig(capi-appfw-application)
26 BuildRequires: pkgconfig(contacts-service2)
27 BuildRequires: pkgconfig(db-util)
28 BuildRequires: pkgconfig(dlog)
29 BuildRequires: pkgconfig(drm-client)
30 BuildRequires: pkgconfig(glib-2.0)
31 BuildRequires: pkgconfig(libcurl)
32 BuildRequires: pkgconfig(libsystemd-daemon)
33 BuildRequires: pkgconfig(libxml-2.0)
34 BuildRequires: pkgconfig(libwbxml2)
35 BuildRequires: pkgconfig(media-thumbnail)
36 BuildRequires: pkgconfig(mm-fileinfo)
37 BuildRequires: pkgconfig(mm-player)
38 BuildRequires: pkgconfig(mm-session)
39 BuildRequires: pkgconfig(mm-sound)
40 BuildRequires: pkgconfig(network)
41 BuildRequires: pkgconfig(notification)
42 BuildRequires: pkgconfig(pmapi)
43 BuildRequires: pkgconfig(mmutil-imgp)
44 BuildRequires: pkgconfig(mmutil-jpeg)
45 BuildRequires: pkgconfig(security-server)
46 BuildRequires: pkgconfig(sensor)
47 BuildRequires: pkgconfig(svi)
48 BuildRequires: pkgconfig(tapi)
49 BuildRequires: pkgconfig(vconf)
50 BuildRequires: pkgconfig(feedback)
51 BuildRequires: pkgconfig(capi-network-connection)
52
53 %description
54 Description: Messaging Framework Library
55
56
57 %package devel
58 License:        Flora License v1.1
59 Summary:        Messaging Framework Library (development)
60 Requires:       %{name} = %{version}-%{release}
61 Group:          Development/Libraries
62
63 %description devel
64 Description: Messaging Framework Library (development)
65
66
67 %package tools
68 License:        Flora License v1.1
69 Summary:        Messaging server application
70 Requires:       %{name} = %{version}-%{release}
71 Group:          TO_BU / FILL_IN
72 Requires(post): /usr/bin/sqlite3
73 Requires(post): /usr/bin/vconftool
74 Requires(post): /sbin/ldconfig
75 Requires(postun): /sbin/ldconfig
76
77 %description tools
78 Description:  Messaging server application
79
80
81 %package -n sms-plugin
82 License:        Flora License v1.1
83 Summary:        SMS plugin library
84 Requires:       %{name} = %{version}-%{release}
85 Group:          System/Libraries
86 Requires(post): /sbin/ldconfig
87 Requires(postun): /sbin/ldconfig
88
89 %description -n sms-plugin
90 Description: SMS plugin library
91
92 %package -n mms-plugin
93 License:        Flora License v1.1
94 Summary:        MMS plugin library
95 Requires:       %{name} = %{version}-%{release}
96 Group:          System/Libraries
97 Requires(post): /sbin/ldconfig
98 Requires(postun): /sbin/ldconfig
99
100 %description -n mms-plugin
101 Description: MMS plugin library
102
103 %prep
104 %setup -q
105 cp %{SOURCE1001} %{SOURCE1002} %{SOURCE1003} %{SOURCE1004} %{SOURCE1005} .
106
107
108 %build
109 %cmake .
110 make %{?jobs:-j%jobs}
111
112 %install
113 rm -rf %{buildroot}
114 mkdir -p %{buildroot}/usr/share/license
115 mkdir -p %{buildroot}/etc/config
116
117 mkdir -p %{buildroot}/var/log/msgfw
118
119 %make_install
120
121 mkdir -p %{buildroot}%{_unitdir_user}/tizen-middleware.target.wants
122 #install -m 0644 %SOURCE101 %{buildroot}%{_unitdir_user}/
123 ln -s ../msg-service.service %{buildroot}%{_unitdir_user}/tizen-middleware.target.wants/msg-service.service
124 ln -s ../msg-service-log.service %{buildroot}%{_unitdir_user}/tizen-middleware.target.wants/msg-service-log.service
125
126 mkdir -p  %{buildroot}%{_sysconfdir}/rc.d/rc3.d
127 ln -s %{_sysconfdir}/rc.d/init.d/msg-server  %{buildroot}%{_sysconfdir}/rc.d/rc3.d/S70msg-server
128 mkdir -p  %{buildroot}%{_sysconfdir}/rc.d/rc5.d
129 ln -s %{_sysconfdir}/rc.d/init.d/msg-server  %{buildroot}%{_sysconfdir}/rc.d/rc5.d/S70msg-server
130
131 mkdir -p %{buildroot}/opt/usr/data/msg-service
132
133 %if 0%{?simulator}
134 rm %{buildroot}/etc/config/sysinfo-message.xml
135 mv %{buildroot}/etc/config/sysinfo-message.emul.xml %{buildroot}/etc/config/sysinfo-message.xml
136 %else
137 rm %{buildroot}/etc/config/sysinfo-message.emul.xml
138 %endif
139
140
141 %post tools -p /sbin/ldconfig
142 %post -n sms-plugin -p /sbin/ldconfig
143 %post -n mms-plugin -p /sbin/ldconfig
144
145 %post
146 /sbin/ldconfig
147
148 if [ ! -f /opt/usr/dbspace/.msg_service.db ]
149 then
150     mkdir -p /opt/usr/dbspace/
151     sqlite3 /opt/usr/dbspace/.msg_service.db "PRAGMA journal_mode = PERSIST;
152
153     CREATE TABLE MSG_CONVERSATION_TABLE (
154         CONV_ID INTEGER PRIMARY KEY ,
155         UNREAD_CNT INTEGER DEFAULT 0 ,
156         SMS_CNT INTEGER DEFAULT 0 ,
157         MMS_CNT INTEGER DEFAULT 0 ,
158         MAIN_TYPE INTEGER DEFAULT 0 ,
159         SUB_TYPE INTEGER DEFAULT 0 ,
160         MSG_DIRECTION INTEGER DEFAULT 0 ,
161         DISPLAY_TIME DATETIME ,
162         DISPLAY_NAME TEXT ,
163         MSG_TEXT TEXT );
164
165     CREATE TABLE MSG_ADDRESS_TABLE (
166         ADDRESS_ID INTEGER PRIMARY KEY ,
167         CONV_ID INTEGER  NOT NULL ,
168         ADDRESS_TYPE INTEGER ,
169         RECIPIENT_TYPE INTEGER ,
170         ADDRESS_VAL TEXT ,
171         CONTACT_ID INTEGER ,
172         DISPLAY_NAME TEXT ,
173         FIRST_NAME TEXT ,
174         LAST_NAME TEXT ,
175         IMAGE_PATH TEXT ,
176         SYNC_TIME DATETIME ,
177         FOREIGN KEY (CONV_ID) REFERENCES MSG_CONVERSATION_TABLE (CONV_ID) );
178
179     CREATE TABLE MSG_FOLDER_TABLE (
180         FOLDER_ID INTEGER PRIMARY KEY ,
181         FOLDER_NAME TEXT NOT NULL ,
182         FOLDER_TYPE INTEGER DEFAULT 0 );
183
184     CREATE TABLE MSG_MESSAGE_TABLE (
185         MSG_ID INTEGER PRIMARY KEY ,
186         CONV_ID INTEGER NOT NULL ,
187         FOLDER_ID INTEGER NOT NULL ,
188         STORAGE_ID INTEGER NOT NULL ,
189         MAIN_TYPE INTEGER NOT NULL ,
190         SUB_TYPE INTEGER NOT NULL ,
191         DISPLAY_TIME DATETIME ,
192         DATA_SIZE INTEGER DEFAULT 0 ,
193         NETWORK_STATUS INTEGER DEFAULT 0 ,
194         READ_STATUS INTEGER DEFAULT 0 ,
195         PROTECTED INTEGER DEFAULT 0 ,
196         PRIORITY INTEGER DEFAULT 0 ,
197         MSG_DIRECTION INTEGER NOT NULL ,
198         SCHEDULED_TIME DATETIME ,
199         BACKUP INTEGER DEFAULT 0 ,
200         SUBJECT TEXT ,
201         MSG_DATA TEXT ,
202         THUMB_PATH TEXT ,
203         MSG_TEXT TEXT ,
204         ATTACHMENT_COUNT INTEGER DEFAULT 0 ,
205         FOREIGN KEY (CONV_ID) REFERENCES MSG_CONVERSATION_TABLE (CONV_ID) ,
206         FOREIGN KEY (FOLDER_ID) REFERENCES MSG_FOLDER_TABLE (FOLDER_ID) );
207
208     CREATE TABLE MSG_SIM_TABLE (
209         MSG_ID INTEGER PRIMARY KEY ,
210         SIM_ID INTEGER NOT NULL ,
211         FOREIGN KEY(MSG_ID) REFERENCES MSG_MESSAGE_TABLE(MSG_ID) );
212
213     CREATE TABLE MSG_PUSH_TABLE (
214         MSG_ID INTEGER PRIMARY KEY ,
215         ACTION INTEGER ,
216         CREATED INTEGER ,
217         EXPIRES INTEGER ,
218         ID TEXT ,
219         HREF TEXT ,
220         CONTENT TEXT ,
221         FOREIGN KEY(MSG_ID) REFERENCES MSG_MESSAGE_TABLE(MSG_ID) );
222
223     CREATE TABLE MSG_CBMSG_TABLE (
224         MSG_ID INTEGER PRIMARY KEY ,
225         CB_MSG_ID INTEGER NOT NULL ,
226         FOREIGN KEY(MSG_ID) REFERENCES MSG_MESSAGE_TABLE(MSG_ID) );
227
228     CREATE TABLE MSG_SYNCML_TABLE (
229         MSG_ID INTEGER PRIMARY KEY ,
230         EXT_ID INTEGER NOT NULL ,
231         PINCODE INTEGER NOT NULL ,
232         FOREIGN KEY(MSG_ID) REFERENCES MSG_MESSAGE_TABLE(MSG_ID) );
233
234     CREATE TABLE MSG_SCHEDULED_TABLE (
235         MSG_ID INTEGER PRIMARY KEY ,
236         ALARM_ID INTEGER NOT NULL ,
237         FOREIGN KEY(MSG_ID) REFERENCES MSG_MESSAGE_TABLE(MSG_ID) );
238
239     CREATE TABLE MSG_SMS_SENDOPT_TABLE (
240         MSG_ID INTEGER PRIMARY KEY ,
241         DELREP_REQ INTEGER NOT NULL ,
242         KEEP_COPY INTEGER NOT NULL ,
243         REPLY_PATH INTEGER NOT NULL ,
244         FOREIGN KEY(MSG_ID) REFERENCES MSG_MESSAGE_TABLE(MSG_ID) );
245
246     CREATE TABLE MSG_FILTER_TABLE (
247         FILTER_ID INTEGER PRIMARY KEY ,
248         FILTER_TYPE INTEGER NOT NULL ,
249         FILTER_VALUE TEXT NOT NULL ,
250         FILTER_ACTIVE INTEGER DEFAULT 0 );
251
252     CREATE TABLE MSG_MMS_MESSAGE_TABLE (
253         MSG_ID INTEGER PRIMARY KEY ,
254         TRANSACTION_ID TEXT ,
255         MESSAGE_ID TEXT ,
256         FWD_MESSAGE_ID TEXT ,
257         CONTENTS_LOCATION TEXT ,
258         FILE_PATH TEXT ,
259         VERSION INTEGER NOT NULL ,
260         DATA_TYPE INTEGER DEFAULT -1 ,
261         DATE DATETIME ,
262         HIDE_ADDRESS INTEGER DEFAULT 0 ,
263         ASK_DELIVERY_REPORT INTEGER DEFAULT 0 ,
264         REPORT_ALLOWED INTEGER DEFAULT 0 ,
265         READ_REPORT_ALLOWED_TYPE INTEGER DEFAULT 0 ,
266         ASK_READ_REPLY INTEGER DEFAULT 0 ,
267         READ INTEGER DEFAULT 0 ,
268         READ_REPORT_SEND_STATUS INTEGER DEFAULT 0 ,
269         READ_REPORT_SENT INTEGER DEFAULT 0 ,
270         PRIORITY INTEGER DEFAULT 0 ,
271         KEEP_COPY INTEGER DEFAULT 0 ,
272         MSG_SIZE INTEGER NOT NULL ,
273         MSG_CLASS INTEGER DEFAULT -1 ,
274         EXPIRY_TIME DATETIME ,
275         CUSTOM_DELIVERY_TIME INTEGER DEFAULT 0 ,
276         DELIVERY_TIME DATETIME ,
277         MSG_STATUS INTEGER DEFAULT -1 ,
278         FOREIGN KEY(MSG_ID) REFERENCES MSG_MESSAGE_TABLE(MSG_ID) );
279
280     CREATE TABLE MSG_MMS_PREVIEW_INFO_TABLE (
281         MSG_ID INTEGER NOT NULL ,
282         TYPE INTEGER,
283         VALUE TEXT,
284         COUNT INTEGER,
285         FOREIGN KEY(MSG_ID) REFERENCES MSG_MESSAGE_TABLE(MSG_ID) );
286
287     CREATE TABLE MSG_REPORT_TABLE (
288         MSG_ID INTEGER NOT NULL ,
289         ADDRESS_VAL TEXT ,
290         STATUS_TYPE INTEGER ,
291         STATUS INTEGER DEFAULT 0 ,
292         TIME DATETIME );
293
294     CREATE TABLE MSG_PUSHCFG_TABLE (
295         PUSH_ID INTEGER PRIMARY KEY ,
296         CONTENT_TYPE TEXT,
297         APP_ID TEXT,
298         PKG_NAME TEXT,
299         LAUNCH INTEGER,
300         APPCODE INTEGER,
301         SECURE INTEGER );
302
303         CREATE TABLE MSG_TMP_MSGID_TABLE (
304         MSG_ID INTEGER );
305
306     CREATE INDEX MSG_CONVERSATION_INDEX ON MSG_CONVERSATION_TABLE(CONV_ID);
307     CREATE INDEX MSG_FOLDER_INDEX ON MSG_FOLDER_TABLE(FOLDER_ID);
308     CREATE INDEX MSG_MESSAGE_INDEX ON MSG_MESSAGE_TABLE(MSG_ID, CONV_ID, FOLDER_ID);
309
310     INSERT INTO MSG_FOLDER_TABLE VALUES (1, 'INBOX', 1);
311     INSERT INTO MSG_FOLDER_TABLE VALUES (2, 'OUTBOX', 2);
312     INSERT INTO MSG_FOLDER_TABLE VALUES (3, 'SENTBOX', 2);
313     INSERT INTO MSG_FOLDER_TABLE VALUES (4, 'DRAFT', 3);
314     INSERT INTO MSG_FOLDER_TABLE VALUES (5, 'CBMSGBOX', 1);
315     INSERT INTO MSG_FOLDER_TABLE VALUES (6, 'SPAMBOX', 4);
316     INSERT INTO MSG_FOLDER_TABLE VALUES (7, 'SMS TEMPLATE', 5);
317     INSERT INTO MSG_FOLDER_TABLE VALUES (8, 'MMS TEMPLATE', 5);
318
319     INSERT INTO MSG_PUSHCFG_TABLE VALUES (1, 'text/vnd.wap.si', 'X-Wap-Application-Id: x-wap-application:wml.ua', '', 0, 1, 0);
320     INSERT INTO MSG_PUSHCFG_TABLE VALUES (2, 'application/vnd.wap.sic', 'X-Wap-Application-Id: x-wap-application:wml.ua', '', 0, 2, 0);
321     INSERT INTO MSG_PUSHCFG_TABLE VALUES (3, 'text/vnd.wap.sl', 'X-Wap-Application-Id: x-wap-application:wml.ua', '', 0, 3, 0);
322         INSERT INTO MSG_PUSHCFG_TABLE VALUES (4, 'application/vnd.wap.slc', 'X-Wap-Application-Id: x-wap-application:wml.ua', '', 0, 4, 0);
323     INSERT INTO MSG_PUSHCFG_TABLE VALUES (5, 'text/vnd.wap.co', 'X-Wap-Application-Id: x-wap-application:wml.ua', '', 0, 5, 0);
324
325     INSERT INTO MSG_PUSHCFG_TABLE VALUES (6, 'application/vnd.wap.coc', 'X-Wap-Application-Id: x-wap-application:wml.ua', '', 0, 6, 0);
326     INSERT INTO MSG_PUSHCFG_TABLE VALUES (7, 'application/vnd.wap.mms-message', 'X-Wap-Application-Id: x-wap-application:mms.ua', '', 0, 7, 0);
327     INSERT INTO MSG_PUSHCFG_TABLE VALUES (8, 'application/vnd.wap.sia', 'X-Wap-Application-Id: x-wap-application:push.sia', '', 0, 8, 0);
328     INSERT INTO MSG_PUSHCFG_TABLE VALUES (9, 'application/vnd.syncml.dm+wbxml', 'X-Wap-Application-Id: x-wap-application:push.syncml.dm', '', 0, 9, 0);
329     INSERT INTO MSG_PUSHCFG_TABLE VALUES (10, 'application/vnd.syncml.dm+xml', 'X-Wap-Application-Id: x-wap-application:push.syncml.dm', '', 0, 10, 0);
330
331     INSERT INTO MSG_PUSHCFG_TABLE VALUES (11, 'application/vnd.syncml.notification', 'X-Wap-Application-Id: x-wap-application:push.syncml.dm', '', 0, 11, 0);
332     INSERT INTO MSG_PUSHCFG_TABLE VALUES (12, 'application/vnd.syncml.ds.notification', 'X-Wap-Application-Id: x-wap-application:push.syncml.ds', '', 0, 12, 0);
333     INSERT INTO MSG_PUSHCFG_TABLE VALUES (13, 'application/vnd.syncml+wbxml', 'X-Wap-Application-Id:x-wap-application:push.syncml', '', 0, 13, 0);
334     INSERT INTO MSG_PUSHCFG_TABLE VALUES (14, 'application/vnd.wap.locc+wbxml', 'X-Wap-Application-Id: x-wap-application:loc.ua', '', 0, 14, 0);
335     INSERT INTO MSG_PUSHCFG_TABLE VALUES (15, 'application/vnd.wap.loc+xml', 'X-Wap-Application-Id: x-wap-application:loc.ua', '', 0, 15, 0);
336
337     INSERT INTO MSG_PUSHCFG_TABLE VALUES (16, 'application/vnd.oma.dd+xml', 'X-Wap-Application-Id: x-wap-application:loc.ua', '', 0, 16, 0);
338     INSERT INTO MSG_PUSHCFG_TABLE VALUES (17, 'application/vnd.oma.drm.message', 'X-Wap-Application-Id: x-wap-application:drm.ua', '', 0, 17, 0);
339     INSERT INTO MSG_PUSHCFG_TABLE VALUES (18, 'application/vnd.oma.drm.content', 'X-Wap-Application-Id: x-wap-application:drm.ua', '', 0, 18, 0);
340     INSERT INTO MSG_PUSHCFG_TABLE VALUES (19, 'application/vnd.oma.drm.rights+xml', 'X-Wap-Application-Id: x-wap-application:drm.ua', '', 0, 19, 0);
341     INSERT INTO MSG_PUSHCFG_TABLE VALUES (20, 'application/vnd.oma.drm.rights+wbxml', 'X-Wap-Application-Id: x-wap-application:drm.ua', '', 0, 20, 0);
342
343     INSERT INTO MSG_PUSHCFG_TABLE VALUES (21, 'application/vnd.oma.drm.ro+xml', 'X-Wap-Application-Id: x-wap-application:drm.ua', '', 0, 21, 0);
344     INSERT INTO MSG_PUSHCFG_TABLE VALUES (22, 'application/vnd.oma.drm.roap-pdu+xml', 'X-Wap-Application-Id: x-wap-application:drm.ua', '', 0, 22, 0);
345     INSERT INTO MSG_PUSHCFG_TABLE VALUES (23, 'application/vnd.oma.drm.roap-trigger+xml', 'X-Wap-Application-Id: x-wap-application:drm.ua', '', 0, 23, 0);
346     INSERT INTO MSG_PUSHCFG_TABLE VALUES (24, 'application/vnd.oma.drm.roap-trigger+wbxml', 'X-Wap-Application-Id: x-wap-application:drm.ua', '', 0, 24, 0);
347         INSERT INTO MSG_PUSHCFG_TABLE VALUES (25, 'text/vnd.wap.connectivity-xml', 'X-Wap-Application-Id: x-wap-application:drm.ua', '', 0, 26, 0);
348
349         INSERT INTO MSG_PUSHCFG_TABLE VALUES (26, 'application/vnd.wap.connectivity-wbxml', 'X-Wap-Application-Id: x-wap-samsung:provisioning.ua', '', 0, 27, 0);
350         INSERT INTO MSG_PUSHCFG_TABLE VALUES (27, 'application/x-wap-prov.browser-settings', 'X-Wap-Application-Id: x-wap-samsung:provisioning.ua', '', 0, 28, 0);
351         INSERT INTO MSG_PUSHCFG_TABLE VALUES (28, 'application/x-wap-prov.browser-bookmarks', 'X-Wap-Application-Id: x-wap-samsung:provisioning.ua', '', 0, 29, 0);
352         INSERT INTO MSG_PUSHCFG_TABLE VALUES (29, 'application/x-wap-prov.syncset+xml', 'X-Wap-Application-Id: x-wap-samsung:provisioning.ua', '', 0, 30, 0);
353         INSERT INTO MSG_PUSHCFG_TABLE VALUES (30, 'application/x-wap-prov.syncset+wbxml', 'X-Wap-Application-Id: x-wap-samsung:provisioning.ua', '', 0, 31, 0);
354
355         INSERT INTO MSG_PUSHCFG_TABLE VALUES (31, 'text/vnd.wap.emn+xml', 'X-Wap-Application-Id: x-wap-application:emn.ua', '', 0, 32, 0);
356         INSERT INTO MSG_PUSHCFG_TABLE VALUES (32, 'application/vnd.wap.emn+wbxml', 'X-Wap-Application-Id: x-wap-application:emn.ua', '', 0, 33, 0);
357         INSERT INTO MSG_PUSHCFG_TABLE VALUES (33, 'application/vnd.wv.csp.cir', 'X-Wap-Application-Id: x-wap-application:wv.ua', '', 0, 34, 0);
358         INSERT INTO MSG_PUSHCFG_TABLE VALUES (34, 'application/vnd.omaloc-supl-init', 'X-Wap-Application-Id: x-oma-application:ulp.ua', '', 0, 44, 0);
359         INSERT INTO MSG_PUSHCFG_TABLE VALUES (35, 'application/vnd.wap.emn+wbxml', 'X-oma-docomo:xmd.mail.ua', '', 0, 45, 1);"
360 fi
361
362 chown :6011 /opt/usr/dbspace/.msg_service.db
363 chown :6011 /opt/usr/dbspace/.msg_service.db-journal
364 chmod 660 /opt/usr/dbspace/.msg_service.db
365 chmod 660 /opt/usr/dbspace/.msg_service.db-journal
366 chsmack -a 'User' /opt/usr/dbspace/.msg_service.db*
367 mkdir -p /opt/usr/data/msg-service
368 chgrp db_msg_service /opt/usr/data/msg-service
369
370 ########## Setting Config Value (Internal keys) ##########
371 vcuid=5000
372 # Message Server Status
373 vconftool set -t bool memory/msg/ready 0 -i -g 5000 -u $vcuid
374
375 # SMS Send Options
376 vconftool set -t int db/msg/network_mode 2 -u $vcuid
377
378 # New Message Count
379 vconftool set -t int db/msg/recv_sms 0 -u $vcuid
380 vconftool set -t int db/msg/recv_mms 0 -u $vcuid
381
382 ########## Setting Config Value (Private keys) ##########
383 # General Options
384 vconftool set -t bool db/private/msg-service/general/keep_copy 1 -u $vcuid
385 vconftool set -t bool db/private/msg-service/general/auto_erase 0 -u $vcuid
386 vconftool set -t bool db/private/msg-service/general/block_msg 0 -u $vcuid
387 vconftool set -t int db/private/msg-service/general/contact_sync_time 0 -u $vcuid
388
389 # SMS Send Options
390 vconftool set -t int db/private/msg-service/sms_send/dcs 3 -u $vcuid
391 vconftool set -t bool db/private/msg-service/sms_send/reply_path 0 -u $vcuid
392 vconftool set -t bool db/private/msg-service/sms_send/delivery_report 0 -u $vcuid
393 vconftool set -t int db/private/msg-service/sms_send/save_storage 1 -u $vcuid
394
395 # SMSC
396 vconftool set -t int db/private/msg-service/smsc/total_count 1 -u $vcuid
397 vconftool set -t int db/private/msg-service/smsc/selected 0 -u $vcuid
398
399 vconftool set -t int db/private/msg-service/smsc/pid/0 1 -u $vcuid
400 vconftool set -t int db/private/msg-service/smsc/val_period/0 255 -u $vcuid
401 vconftool set -t string db/private/msg-service/smsc/name/0 "" -u $vcuid
402 vconftool set -t int db/private/msg-service/smsc/ton/0 1 -u $vcuid
403 vconftool set -t int db/private/msg-service/smsc/npi/0 1 -u $vcuid
404 vconftool set -t string db/private/msg-service/smsc/address/0 "" -u $vcuid
405
406 vconftool set -t int db/private/msg-service/smsc/pid/1 0 -u $vcuid
407 vconftool set -t int db/private/msg-service/smsc/val_period/1 0 -u $vcuid
408 vconftool set -t string db/private/msg-service/smsc/name/1 "" -u $vcuid
409 vconftool set -t int db/private/msg-service/smsc/ton/1 0 -u $vcuid
410 vconftool set -t int db/private/msg-service/smsc/npi/1 0 -u $vcuid
411 vconftool set -t string db/private/msg-service/smsc/address/1 "" -u $vcuid
412
413 vconftool set -t int db/private/msg-service/smsc/pid/2 0 -u $vcuid
414 vconftool set -t int db/private/msg-service/smsc/val_period/2 0 -u $vcuid
415 vconftool set -t string db/private/msg-service/smsc/name/2 "" -u $vcuid
416 vconftool set -t int db/private/msg-service/smsc/ton/2 0 -u $vcuid
417 vconftool set -t int db/private/msg-service/smsc/npi/2 0 -u $vcuid
418 vconftool set -t string db/private/msg-service/smsc/address/2 "" -u $vcuid
419
420 # MMS Send Options
421 vconftool set -t int db/private/msg-service/mms_send/msg_class 0 -u $vcuid
422 vconftool set -t int db/private/msg-service/mms_send/priority 1 -u $vcuid
423 vconftool set -t int db/private/msg-service/mms_send/expiry_time 0 -u $vcuid
424 vconftool set -t int db/private/msg-service/mms_send/custom_delivery 0 -u $vcuid
425 vconftool set -t bool db/private/msg-service/mms_send/sender_visibility 0 -u $vcuid
426 vconftool set -t bool db/private/msg-service/mms_send/delivery_report 1 -u $vcuid
427 vconftool set -t bool db/private/msg-service/mms_send/read_reply 1 -u $vcuid
428 vconftool set -t bool db/private/msg-service/mms_send/keep_copy 0 -u $vcuid
429 vconftool set -t bool db/private/msg-service/mms_send/body_replying 0 -u $vcuid
430 vconftool set -t bool db/private/msg-service/mms_send/hide_recipients 0 -u $vcuid
431 vconftool set -t bool db/private/msg-service/mms_send/report_allowed 1 -u $vcuid
432 vconftool set -t int db/private/msg-service/mms_send/reply_charging 0 -u $vcuid
433 vconftool set -t int db/private/msg-service/mms_send/reply_charging_deadline 0 -u $vcuid
434 vconftool set -t int db/private/msg-service/mms_send/reply_charging_size 0 -u $vcuid
435 vconftool set -t int db/private/msg-service/mms_send/delivery_time 0 -u $vcuid
436 vconftool set -t int db/private/msg-service/mms_send/creation_mode 2 -u $vcuid
437
438 # MMS Receive Options
439 vconftool set -t int db/private/msg-service/mms_recv/home_network 0 -u $vcuid
440 vconftool set -t int db/private/msg-service/mms_recv/abroad_network 0 -u $vcuid
441 vconftool set -t bool db/private/msg-service/mms_recv/read_receipt 1 -u $vcuid
442 vconftool set -t bool db/private/msg-service/mms_recv/delivery_receipt 1 -u $vcuid
443 vconftool set -t bool db/private/msg-service/mms_recv/reject_unknown 0 -u $vcuid
444 vconftool set -t bool db/private/msg-service/mms_recv/reject_advertisement 0 -u $vcuid
445
446 # MMS Receive Options
447 vconftool set -t int db/private/msg-service/mms_style/font_size 30 -u $vcuid
448 vconftool set -t bool db/private/msg-service/mms_style/font_style/bold 0 -u $vcuid
449 vconftool set -t bool db/private/msg-service/mms_style/font_style/italic 0 -u $vcuid
450 vconftool set -t bool db/private/msg-service/mms_style/font_style/underline 0 -u $vcuid
451 vconftool set -t int db/private/msg-service/mms_style/font_color/red 255 -u $vcuid
452 vconftool set -t int db/private/msg-service/mms_style/font_color/green 255 -u $vcuid
453 vconftool set -t int db/private/msg-service/mms_style/font_color/blue 255 -u $vcuid
454 vconftool set -t int db/private/msg-service/mms_style/font_color/hue 255 -u $vcuid
455 vconftool set -t int db/private/msg-service/mms_style/bg_color/red 0 -u $vcuid
456 vconftool set -t int db/private/msg-service/mms_style/bg_color/green 0 -u $vcuid
457 vconftool set -t int db/private/msg-service/mms_style/bg_color/blue 0 -u $vcuid
458 vconftool set -t int db/private/msg-service/mms_style/bg_color/hue 255 -u $vcuid
459 vconftool set -t int db/private/msg-service/mms_style/page_dur 2 -u $vcuid
460 vconftool set -t int db/private/msg-service/mms_style/page_custom_dur 0 -u $vcuid
461 vconftool set -t int db/private/msg-service/mms_style/page_dur_manual 0 -u $vcuid
462
463 # Push Msg Options
464 vconftool set -t bool db/private/msg-service/push_msg/recv_option 1 -u $vcuid
465 vconftool set -t int db/private/msg-service/push_msg/service_load 1 -u $vcuid
466
467 # CB Msg Options
468 vconftool set -t bool db/private/msg-service/cb_msg/receive 1 -f -u $vcuid
469 vconftool set -t bool db/private/msg-service/cb_msg/save 1 -f -u $vcuid
470 vconftool set -t int db/private/msg-service/cb_msg/max_sim_count 0 -u $vcuid
471 vconftool set -t int db/private/msg-service/cb_msg/channel_count 0 -u $vcuid
472 vconftool set -t bool db/private/msg-service/cb_msg/language/0 1 -f -u $vcuid
473 vconftool set -t bool db/private/msg-service/cb_msg/language/1 0 -u $vcuid
474 vconftool set -t bool db/private/msg-service/cb_msg/language/2 0 -u $vcuid
475 vconftool set -t bool db/private/msg-service/cb_msg/language/3 0 -u $vcuid
476 vconftool set -t bool db/private/msg-service/cb_msg/language/4 0 -u $vcuid
477 vconftool set -t bool db/private/msg-service/cb_msg/language/5 0 -u $vcuid
478 vconftool set -t bool db/private/msg-service/cb_msg/language/6 0 -u $vcuid
479 vconftool set -t bool db/private/msg-service/cb_msg/language/7 0 -u $vcuid
480 vconftool set -t bool db/private/msg-service/cb_msg/language/8 0 -u $vcuid
481 vconftool set -t bool db/private/msg-service/cb_msg/language/9 0 -u $vcuid
482
483 # Voice Mail Options
484 vconftool set -t string db/private/msg-service/voice_mail/voice_mail_number "5500" -f -u $vcuid
485 vconftool set -t int db/private/msg-service/voice_mail/voice_mail_count 0 -u $vcuid
486
487 # MMS Size Options
488 vconftool set -t int db/private/msg-service/size_opt/msg_size 300 -u $vcuid
489
490 # SIM message count
491 vconftool set -t int db/private/msg-service/sim_count/used_cnt 0 -u $vcuid
492 vconftool set -t int db/private/msg-service/sim_count/total_cnt 0 -u $vcuid
493
494 # SIM information
495 vconftool set -t int memory/private/msg-service/sim_changed 0 -i -u $vcuid
496 vconftool set -t string memory/private/msg-service/sim_imsi "" -i -u $vcuid
497 vconftool set -t bool memory/private/msg-service/national_sim 0 -i -u $vcuid
498 vconftool set -t string memory/private/msg-service/msisdn "" -i -u $vcuid
499
500 vconftool set -t int db/private/msg-service/notification_priv_id 0 -u $vcuid
501
502 /sbin/ldconfig
503 /bin/systemctl daemon-reload
504 if [ "$1" = "1" ]; then
505     systemctl stop msg-service.service
506 fi
507
508 %postun -p /sbin/ldconfig
509
510 %postun tools -p /sbin/ldconfig
511 %postun -n sms-plugin -p /sbin/ldconfig
512 %postun -n mms-plugin -p /sbin/ldconfig
513
514 %files
515 %manifest %{name}.manifest
516 %defattr(-,root,root,-)
517 %dir %attr(775,root,db_msg_service) /opt/usr/data/msg-service
518 %{_libdir}/libmsg_plugin_manager.so
519 %{_libdir}/libmsg_mapi.so.*
520 %{_libdir}/libmsg_framework_handler.so
521 %{_libdir}/libmsg_transaction_manager.so
522 %{_libdir}/libmsg_utils.so
523 %{_libdir}/libmsg_transaction_proxy.so
524 %{_libdir}/libmsg_vobject.so
525 /usr/share/license/msg-service/LICENSE.Flora
526
527 %files devel
528 %manifest %{name}-devel.manifest
529 %defattr(-,root,root,-)
530 %{_libdir}/libmsg_mapi.so
531 %{_libdir}/pkgconfig/msg-service.pc
532 %{_includedir}/msg-service/*
533
534 %files tools
535 %manifest %{name}-tools.manifest
536 %defattr(-,root,root,-)
537 %{_bindir}/msg-helper
538 %{_bindir}/msg-server
539 %{_datadir}/media/Sherbet.wav
540 %attr(0644,root,root)/usr/share/msg-service/plugin.cfg
541 %{_sysconfdir}/rc.d/init.d/msg-server
542 %{_sysconfdir}/rc.d/rc3.d/S70msg-server
543 %{_sysconfdir}/rc.d/rc5.d/S70msg-server
544 %{_unitdir_user}/msg-service.service
545 %{_unitdir_user}/msg-service-log.service
546 %{_unitdir_user}/tizen-middleware.target.wants/msg-service.service
547 %{_unitdir_user}/tizen-middleware.target.wants/msg-service-log.service
548 /usr/share/license/msg-service/LICENSE.Flora
549 /etc/config/sysinfo-message.xml
550
551 %attr(0755,app,app)/var/log/msgfw
552
553
554 %files -n sms-plugin
555 %manifest sms-plugin.manifest
556 %defattr(-,root,root,-)
557 %{_libdir}/libmsg_sms_plugin.so
558 /usr/share/license/msg-service/LICENSE.Flora
559
560 %files -n mms-plugin
561 %manifest mms-plugin.manifest
562 %defattr(-,root,root,-)
563 %{_libdir}/libmsg_mms_plugin.so
564 /usr/share/license/msg-service/LICENSE.Flora
565
566 %changelog
567 * Wed Oct 25 2012 Sangkoo Kim <sangkoo.kim@samsung.com>
568 - New release version
569
570 * Wed Aug 8 2012 KeeBum Kim <keebum.kim@samsung.com>
571 - Apply New TAPI.
572 - Modify transaction data size of sos recipient list.
573
574 * Tue Aug 7 2012 KeeBum Kim <keebum.kim@samsung.com>
575 - Fix contact sync defect.
576 - New MessageFW API.
577
578 * Fri Jul 27 2012 KeeBum Kim <keebum.kim@samsung.com>
579 - Change devman_haptic.h to devman_managed.h.
580 - Modify to set MSG_SERVER_READY before sim status check.
581 - Fix bug in sim message save related operations.
582 - Limit sim related APIs not to work on sim not available status.
583 - Modify indicator icon image path & related.
584
585 * Tue Jul 17 2012 KeeBum Kim <keebum.kim@samsung.com>
586 - Modify MAX_SEGMENT_NUM to 15.
587 - Modify MMplayer related to support interrupted event.
588 - Fix bug in storage change callback which could cause on submit request.
589
590 * Fri Jun 29 2012 Sangkoo Kim <sangkoo.kim@samsung.com>
591 - Modify vconf key path for sos sending option.
592
593 * Mon Jun 18 2012 Seunghwan Lee <sh.cat.lee@samsung.com>
594 - Storage change callback for scheduled message
595 - code chage to support glib2-2.32
596 - Apply Backup && Restore of Mms Type
597
598 * Fri Jun 15 2012 Sangkoo Kim <sangkoo.kim@samsung.com>
599 - Update display time for scheduled message when it is sent.
600
601 * Thu Jun 14 2012 Seunghwan Lee <sh.cat.lee@samsung.com>
602 - Comment the test app in CMakefile.
603 - Modify MMS BG color of vconf value.
604 - Bug fixed wrong query in MsgStoCheckReadReportIsSent
605 - Add '-i' option for vconf keys of memory type
606 - Add smsc vconf keys(default value).
607 - To avoid msg incoming sound and notification on SOS
608
609 * Fri Jun 8 2012 Sangkoo Kim <sangkoo.kim@samsung.com>
610 - Add '-i' option for vconf keys of memory type.
611 - Add smsc vconf keys(default value).
612 - To avoid msg incoming sound and notification on SOS state.
613 - Change BGcolor to black && font colore to white.
614
615 * Wed May 31 2012 Keebum Kim <keebum.kim@samsung.com>
616 - Apply Mdm policy.
617 - SOS message.
618 - Fix horizontality development problem.
619 - Remove vconf key for new message count. (db/badge/com.samsung.message)
620 - Change vconf key path of "mms_send/msg_class" to private.
621
622 * Thu May 24 2012 Keebum Kim <keebum.kim@samsung.com>
623 - Add new MAPI.
624
625 * Fri May 18 2012 Sangkoo Kim <sangkoo.kim@samsung.com>
626 - Modify to support new DRM service.
627 - Rename private vconf keys.
628 - Modify .postinst and .spec file to pre-install used vconf keys.
629 - Remove compile warnings.
630 - Fix bug in manual retrieve operation.
631
632 * Fri May 11 2012 Jaeyun Jeong <jyjeong@samsung.com>
633 - Fix DB conflict which cause db lock.
634 - Fix bug in Find My Mobile function.
635 - Add '*' and '#' symbol as valid number.
636
637 * Wed May 9 2012 Keebum Kim <keebum.kim@samsung.com>
638 - Change mobile tracker related vconf key define values.
639 - Apply MDM policy for allowing text messaging.
640 - Fix bug for getting thumbnail path.
641 - Enable functionality of scheduled message.
642 - Change alarm setting of scheduled message from volatile type to non-volatile.
643 - Fix error in search query.
644
645 * Thu May 3 2012 Keebum Kim <keebum.kim@samsung.com>
646 - Change some thread list related APIs to support DB change.
647 - DB change to support multiple recipient.
648
649 * Thu Apr 19 2012 Keebum Kim <keebum.kim@samsung.com>
650 - Modify to manage contact sync time by vconf.
651 - Use g_idle_add() routine for updating unread message count(vconf values).
652 - apply try{}catch{} code for handling unexpected exception to avoid thread terminating.
653 - Fix bug for allocated size of replacing string.
654 - Resolve search problem for special characters.
655 - add xmlFree.
656
657 * Tue Apr 10 2012 Keebum Kim <keebum.kim@samsung.com>
658 - Remove unused vconf keys.
659 - Initialize SMSC selected_index.
660 - Remove systemd related.
661
662 * Thu Apr 05 2012 Jaeyun Jeong <jyjeong@samsung.com>
663 - Add notification property(NOTIFICATION_PROP_DISPLAY_ONLY_SIMMODE)
664 - Fix S1-2397/2417/2418/2419.
665 - Remove sent status callback check during submit request.
666 - Modify offset and limit operation on search.
667 - Remove invalid folder and file.
668 - Change browser launching API from aul to service-capi.
669 - Remove unused file.
670 - Invalid type checking is fixed.
671
672 * Fri Mar 16 2012 Jaeyun Jeong <jyjeong@samsung.com>
673 - Add #include <sys/stat.h> to support chmod related defines.
674 - Fix DRM content issue(unregistered mo content)
675
676 * Wed Mar 14 2012 Jaeyun Jeong <jyjeong@samsung.com>
677 - Modify plugin configuration file location for FOTA.
678 - Remove the db query which create sample data.
679
680 * Wed Feb 29 2012 Jaeyun Jeong <jyjeong@samsung.com>
681 - Update msg-service.spec for OBS.
682 - Fix TC execute failure.
683 - Fix S1-1419(Removed mms raw file issue after rebooting)