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