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