Modify flora license version.
[platform/core/messaging/msg-service.git] / include / common / MsgPluginInterface.h
1 /*
2 * Copyright 2012-2013  Samsung Electronics Co., Ltd
3 *
4 * Licensed under the Flora License, Version 1.1 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 *    http://floralicense.org/license/
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17  /**
18  *      @file           MsgPluginInterface.h
19  *      @brief          Defines plug-ins API of messaging framework
20  *      @version        1.0
21  */
22
23 #ifndef MSG_PLUGIN_INTERFACE_H
24 #define MSG_PLUGIN_INTERFACE_H
25
26 /**
27  *      @section                Introduction
28  *      - Introduction : Overview on Messaging Plug-in API
29  *      @section                Program
30  *      - Program : Messaging Plug-in API Reference
31  */
32
33 /*==================================================================================================
34                                          INCLUDE FILES
35 ==================================================================================================*/
36 #include "MsgTransportTypes.h"
37 #include "MsgStorageTypes.h"
38 #include "MsgSettingTypes.h"
39 #include "MsgInternalTypes.h"
40
41
42 #ifdef __cplusplus
43 extern "C"
44 {
45 #endif
46
47 /**
48  *      @ingroup        MESSAGING_FRAMEWORK
49  *      @defgroup       MESSAGING_PLUGIN_API    Messaging Plug-in API
50  *      @{
51  */
52
53 /*==================================================================================================
54                                          TYPE DEFINES
55 ==================================================================================================*/
56 typedef struct _MSG_PLUGIN_HANDLER_S MSG_PLUGIN_HANDLER_S;
57
58 typedef struct _MSG_PLUGIN_LISTENER_S MSG_PLUGIN_LISTENER_S;
59
60
61 /*==================================================================================================
62                                      FUNCTION PROTOTYPES
63 ==================================================================================================*/
64
65  /**
66
67  * \par Description:
68  * A Prototype of the function which will be called when the plug-in is loaded at Message Framework.
69  * ALL Plug-in SHOULD implement this function.
70  *
71  * \par Purpose:
72  * Create plug-in handle for Message Framework.
73  * Message Framework will able to reach plugin functions by handle.
74  *
75  * \par Typical use case:
76  * Create plug-in handle.
77  *
78  * \par Method of function operation:
79  * Set handle information by plug-in.
80  *
81  * \par Sync (or) Async:
82  * This is a Synchronous API.
83  *
84  * \par Important notes:
85  *      This function MUST be implement by plug-ins..
86  *
87  * \param input - handle is Message handle.
88  *
89  * \return Return Type (int(msg_error_t)) \n
90  * - MSG_SUCCESS                                        Success in operation.
91  * - MSG_ERR_NULL_POINTER               Plug-in handle is invalid.
92  *
93  * \par Prospective clients:
94  * Internal/Plug-ins.
95  *
96  * \par Related functions:
97  * None
98  *
99  * \par Known issues/bugs:
100  * None
101  *
102  */
103 /*================================================================================================*/
104 msg_error_t MsgPlgCreateHandle(MSG_PLUGIN_HANDLER_S *pPluginHandle);
105
106
107  /**
108
109  * \par Description:
110  * A Prototype of the function which will be called when the plug-in is finalized at Message Framework.
111  * ALL Plug-in SHOULD implement this function.
112  *
113  * \par Purpose:
114  * Destroy plug-in handle for Message Framework.
115  *
116  * \par Typical use case:
117  * Destroy plug-in handle.
118  *
119  * \par Method of function operation:
120  * Remove handle information by plug-in.
121  *
122  * \par Sync (or) Async:
123  * This is a Synchronous API.
124  *
125  * \par Important notes:
126  *      This function MUST be implement by plug-ins..
127  *
128  * \param input - handle is Message handle.
129  *
130  * \return Return Type (int(msg_error_t)) \n
131  * - MSG_SUCCESS                                        Success in operation.
132  * - MSG_ERR_NULL_POINTER               Plug-in handle is invalid.
133  *
134  * \par Prospective clients:
135  * Internal/Plug-ins.
136  *
137  * \par Related functions:
138  * None
139  *
140  * \par Known issues/bugs:
141  * None
142  *
143  */
144 /*================================================================================================*/
145 msg_error_t MsgPlgDestroyHandle(MSG_PLUGIN_HANDLER_S *pPluginHandle);
146
147
148
149
150 // Control API
151  /**
152
153  * \par Description:
154  * A Prototype of the function which will be called when the plug-in is loaded at Message Framework.
155  * ALL Plug-in SHOULD implement this function.
156  *
157  * \par Purpose:
158  * Initializing plug-in.
159  * Precede jobs must done in this function.
160  *
161  * \par Typical use case:
162  * Initializing plug-in.
163  *
164  * \par Method of function operation:
165  * Make up pre-works for plug-in.
166  *
167  * \par Sync (or) Async:
168  * This is a Synchronous API.
169  *
170  * \par Important notes:
171  *      This function MUST be implement by plug-ins..
172  *
173  * \return Return Type (int(msg_error_t)) \n
174  * - MSG_SUCCESS                                        Success in operation.
175  * - MSG_ERR_PLUGIN_REGEVENT    Plug-in's error during operations.
176  *
177  * \par Prospective clients:
178  * Internal/Plug-ins.
179  *
180  * \par Related functions:
181  * None
182  *
183  * \par Known issues/bugs:
184  * None
185  *
186  */
187 /*================================================================================================*/
188 typedef msg_error_t (*MsgPlgInitialize)();
189
190
191  /**
192
193  * \par Description:
194  * A Prototype of the function which will be called when the plug-in is loaded at Message Framework.
195  * ALL Plug-in SHOULD implement this function.
196  *
197  * \par Purpose:
198  * Create plug-in handle for Message Framework.
199  * Message Framework will able to reach plugin functions by handle.
200  *
201  * \par Typical use case:
202  * Create plug-in handle.
203  *
204  * \par Method of function operation:
205  * Set handle information by plug-in.
206  *
207  * \par Sync (or) Async:
208  * This is a Synchronous API.
209  *
210  * \par Important notes:
211  *      This function MUST be implement by plug-ins..
212  *
213  * \param input - handle is Message handle.
214  *
215  * \return Return Type (int(msg_error_t)) \n
216  * - MSG_SUCCESS                                        Success in operation.
217  * - MSG_ERR_NULL_POINTER               Plug-in handle is invalid.
218  *
219  * \par Prospective clients:
220  * Internal/Plug-ins.
221  *
222  * \par Related functions:
223  * None
224  *
225  * \par Known issues/bugs:
226  * None
227  *
228  */
229 /*================================================================================================*/
230 typedef msg_error_t (*MsgPlgFinalize)();
231
232
233  /**
234
235  * \par Description:
236  * A Prototype of the function which will be called when the plug-in is loaded at Message Framework.
237  * ALL Plug-in SHOULD implement this function.
238  *
239  * \par Purpose:
240  * Regist listeners to handle incomming messages..
241  * .
242  *
243  * \par Typical use case:
244  * Regist listeners.
245  *
246  * \par Method of function operation:
247  * Set listener informations in plug-in.
248  *
249  * \par Sync (or) Async:
250  * This is a Synchronous API.
251  *
252  * \par Important notes:
253  *      This function MUST be implement by plug-ins..
254  *
255  * \param input - listener is callback listeners.
256  *
257  * \return Return Type (int(msg_error_t)) \n
258  * - MSG_SUCCESS                                        Success in operation.
259  *
260  * \par Prospective clients:
261  * Internal/Plug-ins.
262  *
263  * \par Related functions:
264  * None
265  *
266  * \par Known issues/bugs:
267  * None
268  *
269  */
270 /*================================================================================================*/
271 typedef msg_error_t (*MsgPlgRegisterListener)(MSG_PLUGIN_LISTENER_S *pListener);
272
273
274  /**
275
276  * \par Description:
277  * A Prototype of the function which will be called when Message Framework has to check sim card status.
278  * SMS Plug-in SHOULD implement this function.
279  *
280  * \par Purpose:
281  * Checking sim card status  for Message Framework.
282  *
283  * \par Typical use case:
284  * To check sim card status.
285  *
286  * \par Method of function operation:
287  * Check SIM card status and return result of sim card is changed or not.
288  *
289  * \par Sync (or) Async:
290  * This is a Synchronous API.
291  *
292  * \par Important notes:
293  *      This function MUST be implement by plug-ins..
294  *
295  * \param output - bChanged is a boolean type value which shows sim card status.
296  *
297  * \return Return Type (int(msg_error_t)) \n
298  * - MSG_SUCCESS                                        Success in operation.
299  *
300  * \par Prospective clients:
301  * Internal/Plug-ins.
302  *
303  * \par Related functions:
304  * None
305  *
306  * \par Known issues/bugs:
307  * None
308  *
309  */
310 /*================================================================================================*/
311 typedef msg_error_t (*MsgPlgCheckSimStatus)(MSG_SIM_STATUS_T *pStatus);
312
313
314  /**
315
316  * \par Description:
317  * A Prototype of the function which will be called when Message Framework has to check device status.
318  * SMS Plug-in SHOULD implement this function.
319  *
320  * \par Purpose:
321  * Create plug-in handle for Message Framework.
322  * Message Framework will able to reach plugin functions by handle.
323  *
324  * \par Typical use case:
325  * Create plug-in handle.
326  *
327  * \par Method of function operation:
328  * Set handle information by plug-in.
329  *
330  * \par Sync (or) Async:
331  * This is a Synchronous API.
332  *
333  * \par Important notes:
334  *      This function MUST be implement by plug-ins..
335  *
336  * \param input - handle is Message handle.
337  *
338  * \return Return Type (int(msg_error_t)) \n
339  * - MSG_SUCCESS                                        Success in operation.
340  * - MSG_ERR_NULL_POINTER               Plug-in handle is invalid.
341  *
342  * \par Prospective clients:
343  * Internal/Plug-ins.
344  *
345  * \par Related functions:
346  * None
347  *
348  * \par Known issues/bugs:
349  * None
350  *
351  */
352 /*================================================================================================*/
353 typedef msg_error_t (*MsgPlgCheckDeviceStatus)();
354
355
356 // Transport API
357  /**
358
359  * \par Description:
360  * A Prototype of the function which will be called when Message Framework has to submit a message to send.
361  * ALL Plug-in SHOULD implement this function.
362  *
363  * \par Purpose:
364  * Send message..
365  *
366  * \par Typical use case:
367  * To send messages.
368  *
369  * \par Method of function operation:
370  * Convert message data to raw message data.
371  * Send raw message data to selected network.
372  *
373  * \par Sync (or) Async:
374  * This is a Synchronous API.
375  *
376  * \par Important notes:
377  *      This function MUST be implement by plug-ins.
378  *
379  * \param input - pReqInfo is message data to send.
380  *
381  * \return Return Type (int(msg_error_t)) \n
382  * - MSG_SUCCESS                                        Success in operation.
383  * - MSG_ERR_PLUGIN_TRANSPORT   Exception is occured in plug-in.
384  *
385  * \par Prospective clients:
386  * Internal/Plug-ins.
387  *
388  * \par Related functions:
389  * None
390  *
391  * \par Known issues/bugs:
392  * None
393  *
394  */
395 /*================================================================================================*/
396 typedef msg_error_t (*MsgPlgSubmitRequest)(MSG_REQUEST_INFO_S *pReqInfo);
397
398
399 // Storage API
400  /**
401
402  * \par Description:
403  * A Prototype of the function which will be called when Message Framework has to save a message to SIM card.
404  * SMS Plug-in SHOULD implement this function.
405  *
406  * \par Purpose:
407  * Save a message to SIM card.
408  *
409  * \par Typical use case:
410  * To save a message to SIM card..
411  *
412  * \par Method of function operation:
413  * Convert message data to raw message data.
414  * Save the raw message data to SIM card.
415  *
416  * \par Sync (or) Async:
417  * This is a Synchronous API.
418  *
419  * \par Important notes:
420  *      This function MUST be implement by plug-ins.
421  *
422  * \param input - pMsgInfo is the information of message.
423  * \param output - pSimIdList is the list of messages saved in SIM card.
424  *
425  * \return Return Type (int(msg_error_t)) \n
426  * - MSG_SUCCESS                                                Success in operation.
427  * - MSG_ERR_PLUGIN_SIM_MSG_FULL        SIM card's capacity for SMS message is full.
428  * - MSG_ERR_PLUGIN_STORAGE             Exception is occured in plug-in.
429  *
430  * \par Prospective clients:
431  * Internal/Plug-ins.
432  *
433  * \par Related functions:
434  * None
435  *
436  * \par Known issues/bugs:
437  * None
438  *
439  */
440 /*================================================================================================*/
441 typedef msg_error_t (*MsgPlgInitSimMessage)();
442
443
444 // Storage API
445  /**
446
447  * \par Description:
448  * A Prototype of the function which will be called when Message Framework has to save a message to SIM card.
449  * SMS Plug-in SHOULD implement this function.
450  *
451  * \par Purpose:
452  * Save a message to SIM card.
453  *
454  * \par Typical use case:
455  * To save a message to SIM card..
456  *
457  * \par Method of function operation:
458  * Convert message data to raw message data.
459  * Save the raw message data to SIM card.
460  *
461  * \par Sync (or) Async:
462  * This is a Synchronous API.
463  *
464  * \par Important notes:
465  *      This function MUST be implement by plug-ins.
466  *
467  * \param input - pMsgInfo is the information of message.
468  * \param output - pSimIdList is the list of messages saved in SIM card.
469  *
470  * \return Return Type (int(msg_error_t)) \n
471  * - MSG_SUCCESS                                                Success in operation.
472  * - MSG_ERR_PLUGIN_SIM_MSG_FULL        SIM card's capacity for SMS message is full.
473  * - MSG_ERR_PLUGIN_STORAGE             Exception is occured in plug-in.
474  *
475  * \par Prospective clients:
476  * Internal/Plug-ins.
477  *
478  * \par Related functions:
479  * None
480  *
481  * \par Known issues/bugs:
482  * None
483  *
484  */
485 /*================================================================================================*/
486 typedef msg_error_t (*MsgPlgSaveSimMessage)(const MSG_MESSAGE_INFO_S *pMsgInfo, SMS_SIM_ID_LIST_S *pSimIdList);
487
488
489  /**
490
491  * \par Description:
492  * A Prototype of the function which will be called when Message Framework has to delete a message in SIM card.
493  * SMS Plug-in SHOULD implement this function.
494  *
495  * \par Purpose:
496  * delete a message in SIM card.
497  *
498  * \par Typical use case:
499  * To save a message to SIM card..
500  *
501  * \par Method of function operation:
502  * delete a message data in SIM card which is indexed by ID.
503  *
504  * \par Sync (or) Async:
505  * This is a Synchronous API.
506  *
507  * \par Important notes:
508  *      This function MUST be implement by plug-ins.
509  *
510  * \param input - SimMsgId is the index of the message to delete.
511  *
512  * \return Return Type (int(msg_error_t)) \n
513  * - MSG_SUCCESS                                                Success in operation.
514  * - MSG_ERR_PLUGIN_STORAGE             Exception is occured in plug-in.
515  *
516  * \par Prospective clients:
517  * Internal/Plug-ins.
518  *
519  * \par Related functions:
520  * None
521  *
522  * \par Known issues/bugs:
523  * None
524  *
525  */
526 /*================================================================================================*/
527 typedef msg_error_t (*MsgPlgDeleteSimMessage)(msg_sim_id_t SimMsgId);
528
529
530  /**
531
532  * \par Description:
533  * A Prototype of the function which will be called when Message Framework has to set read status of  message in SIM card.
534  * SMS Plug-in SHOULD implement this function.
535  *
536  * \par Purpose:
537  * Set read status of SIM cad message.
538  *
539  * \par Typical use case:
540  * To set read status of SIM card message.
541  *
542  * \par Method of function operation:
543  * Save the given read status to SIM card message.
544  *
545  * \par Sync (or) Async:
546  * This is a Synchronous API.
547  *
548  * \par Important notes:
549  *      This function MUST be implement by plug-ins.
550  *
551  * \param input - SimMsgId is the index of the message to set read status.
552  *
553  * \return Return Type (int(msg_error_t)) \n
554  * - MSG_SUCCESS                                                Success in operation.
555  * - MSG_ERR_PLUGIN_STORAGE             Exception is occured in plug-in.
556  *
557  * \par Prospective clients:
558  * Internal/Plug-ins.
559  *
560  * \par Related functions:
561  * None
562  *
563  * \par Known issues/bugs:
564  * None
565  *
566  */
567 /*================================================================================================*/
568 typedef msg_error_t (*MsgPlgSetReadStatus)(msg_sim_id_t SimMsgId);
569
570
571  /**
572
573  * \par Description:
574  * A Prototype of the function which will be called when Message Framework has to set read status of  message in SIM card.
575  * SMS Plug-in SHOULD implement this function.
576  *
577  * \par Purpose:
578  * Set read status of SIM cad message.
579  *
580  * \par Typical use case:
581  * To set read status of SIM card message.
582  *
583  * \par Method of function operation:
584  * Save the given read status to SIM card message.
585  *
586  * \par Sync (or) Async:
587  * This is a Synchronous API.
588  *
589  * \par Important notes:
590  *      This function MUST be implement by plug-ins.
591  *
592  * \param input - SimMsgId is the index of the message to set read status.
593  *
594  * \return Return Type (int(msg_error_t)) \n
595  * - MSG_SUCCESS                                                Success in operation.
596  * - MSG_ERR_PLUGIN_STORAGE             Exception is occured in plug-in.
597  *
598  * \par Prospective clients:
599  * Internal/Plug-ins.
600  *
601  * \par Related functions:
602  * None
603  *
604  * \par Known issues/bugs:
605  * None
606  *
607  */
608 /*================================================================================================*/
609 typedef msg_error_t (*MsgPlgSetMemoryStatus)(msg_error_t Error);
610
611
612 // Setting API
613  /**
614
615  * \par Description:
616  * A Prototype of the function which will be called when Message Framework has to save configuration of network to SIM card.
617  * SMS Plug-in SHOULD implement this function.
618  *
619  * \par Purpose:
620  * Save configuration information to SIM card.
621  *
622  * \par Typical use case:
623  * To save configuration information to SIM card.
624  *
625  * \par Method of function operation:
626  * Convert information data to raw data.
627  * Save raw data to SIM card.
628  *
629  * \par Sync (or) Async:
630  * This is a Synchronous API.
631  *
632  * \par Important notes:
633  *      This function MUST be implement by plug-ins.
634  *
635  * \param input - pSetting is information of configuration.
636  *
637  * \return Return Type (int(msg_error_t)) \n
638  * - MSG_SUCCESS                                        Success in operation.
639  * - MSG_ERR_PLUGIN_SETTING             Exception is occured in plug-in.
640  *
641  * \par Prospective clients:
642  * Internal/Plug-ins.
643  *
644  * \par Related functions:
645  * None
646  *
647  * \par Known issues/bugs:
648  * None
649  *
650  */
651 /*================================================================================================*/
652 typedef msg_error_t (*MsgPlgInitConfigData)(MSG_SIM_STATUS_T SimStatus);
653
654
655 // Setting API
656  /**
657
658  * \par Description:
659  * A Prototype of the function which will be called when Message Framework has to save configuration of network to SIM card.
660  * SMS Plug-in SHOULD implement this function.
661  *
662  * \par Purpose:
663  * Save configuration information to SIM card.
664  *
665  * \par Typical use case:
666  * To save configuration information to SIM card.
667  *
668  * \par Method of function operation:
669  * Convert information data to raw data.
670  * Save raw data to SIM card.
671  *
672  * \par Sync (or) Async:
673  * This is a Synchronous API.
674  *
675  * \par Important notes:
676  *      This function MUST be implement by plug-ins.
677  *
678  * \param input - pSetting is information of configuration.
679  *
680  * \return Return Type (int(msg_error_t)) \n
681  * - MSG_SUCCESS                                        Success in operation.
682  * - MSG_ERR_PLUGIN_SETTING             Exception is occured in plug-in.
683  *
684  * \par Prospective clients:
685  * Internal/Plug-ins.
686  *
687  * \par Related functions:
688  * None
689  *
690  * \par Known issues/bugs:
691  * None
692  *
693  */
694 /*================================================================================================*/
695 typedef msg_error_t (*MsgPlgSetConfigData)(const MSG_SETTING_S *pSetting);
696
697
698  /**
699
700  * \par Description:
701  * A Prototype of the function which will be called when Message Framework has to get configuration of network from SIM card.
702  * SMS Plug-in SHOULD implement this function.
703  *
704  * \par Purpose:
705  * Get configuration information from SIM card.
706  *
707  * \par Typical use case:
708  * To get configuration information from SIM card.
709  *
710  * \par Method of function operation:
711  * Convert raw data to information data.
712  * Get configuration data from SIM card.
713  *
714  * \par Sync (or) Async:
715  * This is a Synchronous API.
716  *
717  * \par Important notes:
718  *      This function MUST be implement by plug-ins.
719  *
720  * \param input - pSetting is information of configuration.
721  *
722  * \return Return Type (int(msg_error_t)) \n
723  * - MSG_SUCCESS                                        Success in operation.
724  * - MSG_ERR_PLUGIN_SETTING             Exception is occured in plug-in.
725  *
726  * \par Prospective clients:
727  * Internal/Plug-ins.
728  *
729  * \par Related functions:
730  * None
731  *
732  * \par Known issues/bugs:
733  * None
734  *
735  */
736 /*================================================================================================*/
737 typedef msg_error_t (*MsgPlgGetConfigData)(MSG_SETTING_S *pSetting);
738
739 // MMS API
740 /**
741
742 * \par Description:
743 * A Prototype of the function which will be called when Message Framework has to store MMS message.
744 * MMS Plug-in SHOULD implement this function.
745 *
746 * \par Purpose:
747 * Save MMS message to plug-in defined DB.
748 *
749 * \par Typical use case:
750 * To save MMS message to plug-in defined DB.
751 *
752 * \par Method of function operation:
753 * Convert MMS Message data to cetain format for plug-in.
754 * Save the certain format MMS message information to DB.
755 *
756 * \par Sync (or) Async:
757 * This is a Synchronous API.
758 *
759 * \par Important notes:
760 *  This function MUST be implement by plug-ins.
761 *
762 * \param input - pMsgInfo is information of MMS message.
763 * \param input - pSendOptInfo is information of sending option.
764 * \param output - pFileData is the file path of saved MMS message.
765 *
766 * \return Return Type (int(msg_error_t)) \n
767 * - MSG_SUCCESS                                   Success in operation.
768 * - MSG_ERR_PLUGIN_TRANSPORT   Exception is occured in plug-in.
769 *
770 * \par Prospective clients:
771 * Internal/Plug-ins.
772 *
773 * \par Related functions:
774 * None
775 *
776 * \par Known issues/bugs:
777 * None
778 *
779 */
780 /*================================================================================================*/
781 typedef msg_error_t (*MsgPlgAddMessage)(MSG_MESSAGE_INFO_S *pMsgInfo,  MSG_SENDINGOPT_INFO_S* pSendOptInfo, char* pFileData);
782
783
784 /**
785
786 * \par Description:
787 * A Prototype of the function which will be called when Message Framework has to process received MMS message indicator.
788 * MMS Plug-in SHOULD implement this function.
789 *
790 * \par Purpose:
791 * Process MMS message indicator.
792 *
793 * \par Typical use case:
794 * To process MMS message indicator.
795 *
796 * \par Method of function operation:
797 * Procces MMS Message indicator in options.
798 *
799 * \par Sync (or) Async:
800 * This is a Synchronous API.
801 *
802 * \par Important notes:
803 *  This function MUST be implement by plug-ins.
804 *
805 * \param input - pMsgInfo is information of MMS message.
806 * \param input - pRequest is information of request options.
807 * \param output - bRejects shows the reject status.
808 *
809 * \return Return Type (int(msg_error_t)) \n
810 * - MSG_SUCCESS                                   Success in operation.
811 * - MSG_ERR_PLUGIN_TRANSPORT   Exception is occured in plug-in.
812 *
813 * \par Prospective clients:
814 * Internal/Plug-ins.
815 *
816 * \par Related functions:
817 * None
818 *
819 * \par Known issues/bugs:
820 * None
821 *
822 */
823 /*================================================================================================*/
824 typedef msg_error_t (*MsgPlgProcessReceivedInd)(MSG_MESSAGE_INFO_S *pMsgInfo, MSG_REQUEST_INFO_S* pRequest, bool* bReject);
825
826
827 /**
828
829 * \par Description:
830 * A Prototype of the function which will be called when Message Framework has to update MMS message.
831 * MMS Plug-in SHOULD implement this function.
832 *
833 * \par Purpose:
834 * Update MMS message to plug-in defined DB.
835 *
836 * \par Typical use case:
837 * To update MMS message to plug-in defined DB.
838 *
839 * \par Method of function operation:
840 * Convert MMS Message data to cetain format for plug-in.
841 * Update the certain format MMS message information to DB.
842 *
843 * \par Sync (or) Async:
844 * This is a Synchronous API.
845 *
846 * \par Important notes:
847 *  This function MUST be implement by plug-ins.
848 *
849 * \param input - pMsgInfo is information of MMS message.
850 * \param input - pSendOptInfo is information of sending option.
851 * \param output - pFileData is the file path of saved MMS message.
852 *
853 * \return Return Type (int(msg_error_t)) \n
854 * - MSG_SUCCESS                                   Success in operation.
855 * - MSG_ERR_PLUGIN_TRANSPORT   Exception is occured in plug-in.
856 *
857 * \par Prospective clients:
858 * Internal/Plug-ins.
859 *
860 * \par Related functions:
861 * None
862 *
863 * \par Known issues/bugs:
864 * None
865 *
866 */
867 /*================================================================================================*/
868 typedef msg_error_t (*MsgPlgUpdateMessage)(MSG_MESSAGE_INFO_S *pMsgInfo, MSG_SENDINGOPT_INFO_S* pSendOptInfo, char* pFileData);
869
870
871 /**
872
873 * \par Description:
874 * A Prototype of the function which will be called when Message Framework has to get MMS message.
875 * MMS Plug-in SHOULD implement this function.
876 *
877 * \par Purpose:
878 * Get MMS message.
879 *
880 * \par Typical use case:
881 * To get MMS message.
882 *
883 * \par Method of function operation:
884 * Get MMS Message from certian plug-in defined DB.
885 *
886 * \par Sync (or) Async:
887 * This is a Synchronous API.
888 *
889 * \par Important notes:
890 *  This function MUST be implement by plug-ins.
891 *
892 * \param output - pMsg is information of MMS message.
893 * \param output - pSendOptInfo is information of sending options.
894 * \param output - pMmsMsg is information of MMS messages detail data.
895 * \param output - pDestMsg is file path of MMS message.
896 *
897 * \return Return Type (int(msg_error_t)) \n
898 * - MSG_SUCCESS                                   Success in operation.
899 * - MSG_ERR_PLUGIN_TRANSPORT   Exception is occured in plug-in.
900 *
901 * \par Prospective clients:
902 * Internal/Plug-ins.
903 *
904 * \par Related functions:
905 * None
906 *
907 * \par Known issues/bugs:
908 * None
909 *
910 */
911 /*================================================================================================*/
912 typedef msg_error_t (*MsgPlgGetMmsMessage)(MSG_MESSAGE_INFO_S* pMsg,    MSG_SENDINGOPT_INFO_S* pSendOptInfo, MMS_MESSAGE_DATA_S* pMmsMsg, char** pDestMsg);
913
914
915 /**
916
917 * \par Description:
918 * A Prototype of the function which will be called when Message Framework has to update reject status of MMS message.
919 * MMS Plug-in SHOULD implement this function.
920 *
921 * \par Purpose:
922 * Update reject status of MMS message.
923 *
924 * \par Typical use case:
925 * To update reject status of MMS message.
926 *
927 * \par Method of function operation:
928 * Update reject status of MMS Message from certian plug-in defined DB.
929 *
930 * \par Sync (or) Async:
931 * This is a Synchronous API.
932 *
933 * \par Important notes:
934 *  This function MUST be implement by plug-ins.
935 *
936 * \param input - pMsgInfo is information of MMS message.
937 *
938 * \return Return Type (int(msg_error_t)) \n
939 * - MSG_SUCCESS                                   Success in operation.
940 * - MSG_ERR_PLUGIN_TRANSPORT   Exception is occured in plug-in.
941 *
942 * \par Prospective clients:
943 * Internal/Plug-ins.
944 *
945 * \par Related functions:
946 * None
947 *
948 * \par Known issues/bugs:
949 * None
950 *
951 */
952 /*================================================================================================*/
953 typedef msg_error_t (*MsgPlgUpdateRejectStatus)(MSG_MESSAGE_INFO_S *pMsgInfo);
954
955
956 /**
957
958 * \par Description:
959 * A Prototype of the function which will be called when Message Framework has to compose read report for MMS message.
960 * MMS Plug-in SHOULD implement this function.
961 *
962 * \par Purpose:
963 * Compose read report for MMS message.
964 *
965 * \par Typical use case:
966 * To compose read report for MMS message.
967 *
968 * \par Method of function operation:
969 * Compose read report for MMS message.
970 * Send read report.
971 *
972 * \par Sync (or) Async:
973 * This is a Synchronous API.
974 *
975 * \par Important notes:
976 *  This function MUST be implement by plug-ins.
977 *
978 * \param input - pMsgInfo is information of MMS message.
979 *
980 * \return Return Type (int(msg_error_t)) \n
981 * - MSG_SUCCESS                                   Success in operation.
982 * - MSG_ERR_PLUGIN_TRANSPORT   Exception is occured in plug-in.
983 *
984 * \par Prospective clients:
985 * Internal/Plug-ins.
986 *
987 * \par Related functions:
988 * None
989 *
990 * \par Known issues/bugs:
991 * None
992 *
993 */
994 /*================================================================================================*/
995 typedef msg_error_t (*MsgPlgComposeReadReport)(MSG_MESSAGE_INFO_S *pMsgInfo);
996
997  /**
998
999  * \par Description:
1000  * A Prototype of the function which will be called when Message Framework has to compose read report for MMS message.
1001  * MMS Plug-in SHOULD implement this function.
1002  *
1003  * \par Purpose:
1004  * Compose read report for MMS message.
1005  *
1006  * \par Typical use case:
1007  * To compose read report for MMS message.
1008  *
1009  * \par Method of function operation:
1010  * Compose read report for MMS message.
1011  * Send read report.
1012  *
1013  * \par Sync (or) Async:
1014  * This is a Synchronous API.
1015  *
1016  * \par Important notes:
1017  *      This function MUST be implement by plug-ins.
1018  *
1019  * \param input - pMsgInfo is information of MMS message.
1020  *
1021  * \return Return Type (int(msg_error_t)) \n
1022  * - MSG_SUCCESS                                        Success in operation.
1023  * - MSG_ERR_PLUGIN_TRANSPORT   Exception is occured in plug-in.
1024  *
1025  * \par Prospective clients:
1026  * Internal/Plug-ins.
1027  *
1028  * \par Related functions:
1029  * None
1030  *
1031  * \par Known issues/bugs:
1032  * None
1033  *
1034  */
1035 /*================================================================================================*/
1036 typedef msg_error_t (*MsgPlgRestoreMsg)(MSG_MESSAGE_INFO_S *pMsg, char* pRcvdBody, int rcvdBodyLen, char* filePath);
1037
1038
1039 // framework defined callbacks.
1040 typedef void (*MsgPlgOnSentStatus)(MSG_SENT_STATUS_S *pSentStatus);
1041 typedef void (*MsgPlgOnStorageChange)(msg_storage_change_type_t storageChangeType, MSG_MESSAGE_INFO_S *pMsgInfo);
1042 typedef msg_error_t (*MsgPlgOnMsgIncoming)(MSG_MESSAGE_INFO_S *pMsgInfo);
1043 typedef msg_error_t (*MsgPlgOnInitSimBySat)(void);
1044 typedef msg_error_t (*MsgPlgOnSyncMLMsgIncoming)(MSG_SYNCML_MESSAGE_DATA_S *pSyncMLData);
1045 typedef msg_error_t (*MsgPlgOnLBSMsgIncoming)(MSG_LBS_MESSAGE_DATA_S *pLBSData);
1046 typedef msg_error_t (*MsgPlgOnPushMsgIncoming)(MSG_PUSH_MESSAGE_DATA_S *pPushData);
1047 typedef msg_error_t (*MsgPlgOnCBMsgIncoming)(MSG_CB_MSG_S *pCbMsg);
1048 typedef msg_error_t (*MsgPlgOnMmsConfIncoming)(MSG_MESSAGE_INFO_S *pMsgInfo, msg_request_id_t *pRequest);
1049
1050
1051 /*==================================================================================================
1052                                          STRUCTURES
1053 ==================================================================================================*/
1054 struct _MSG_PLUGIN_LISTENER_S
1055 {
1056         MsgPlgOnSentStatus                      pfSentStatusCb;                 /** The function pointer of sent status callback. */
1057         MsgPlgOnStorageChange           pfStorageChangeCb;              /** The function pointer of storage change callback. */
1058         MsgPlgOnMsgIncoming                     pfMsgIncomingCb;                        /** The function pointer of receive message callback. */
1059         MsgPlgOnInitSimBySat                    pfInitSimBySatCb;                       /** The function pointer of init SIM callback. */
1060         MsgPlgOnSyncMLMsgIncoming       pfSyncMLMsgIncomingCb;  /** The function pointer of receive syncML message callback. */
1061         MsgPlgOnLBSMsgIncoming          pfLBSMsgIncomingCb;             /** The function pointer of receive LBS message callback. */
1062         MsgPlgOnPushMsgIncoming         pfPushMsgIncomingCb;            /** The function pointer of receive Push message callback. */
1063         MsgPlgOnCBMsgIncoming           pfCBMsgIncomingCb;                      /** The function pointer of receive cb message callback. */
1064         MsgPlgOnMmsConfIncoming         pfMmsConfIncomingCb;    /** The function pointer of receive MMS conf */
1065 };
1066
1067
1068 struct _MSG_PLUGIN_HANDLER_S
1069 {
1070         MsgPlgInitialize                                pfInitialize;                           /**< The function pointer of initialize. */
1071         MsgPlgFinalize                                  pfFinalize;                             /**< The function pointer of finalize. */
1072         MsgPlgRegisterListener                  pfRegisterListener;                     /**< The function pointer of register listener. */
1073         MsgPlgCheckSimStatus                    pfCheckSimStatus;               /**< The function pointer of check SIM status. */
1074         MsgPlgCheckDeviceStatus         pfCheckDeviceStatus;            /**< The function pointer of check device status. */
1075         MsgPlgSubmitRequest                     pfSubmitRequest;                /**< The function pointer of submit request. */
1076         MsgPlgInitSimMessage                    pfInitSimMessage;                       /**< The function pointer of initialize SIM msg. */
1077         MsgPlgSaveSimMessage                    pfSaveSimMessage;               /**< The function pointer of save SIM msg. */
1078         MsgPlgDeleteSimMessage          pfDeleteSimMessage;             /**< The function pointer of delete SIM msg. */
1079         MsgPlgSetReadStatus                     pfSetReadStatus;                        /**< The function pointer of set read status. */
1080         MsgPlgSetMemoryStatus           pfSetMemoryStatus;              /**< The function pointer of set memory status. */
1081         MsgPlgInitConfigData                    pfInitConfigData;                       /**< The function pointer of initialize of setting. */
1082         MsgPlgSetConfigData                     pfSetConfigData;                        /**< The function pointer of save setting. */
1083         MsgPlgGetConfigData                     pfGetConfigData;                        /**< The function pointer of get setting. */
1084         MsgPlgRestoreMsg                                pfRestoreMsg;
1085         MsgPlgAddMessage                                pfAddMessage;                   /**< The function pointer of  add Message. */
1086         MsgPlgProcessReceivedInd                pfProcessReceivedInd;   /**< The function pointer of  Process Notification Ind. */
1087         MsgPlgUpdateMessage                     pfUpdateMessage;                /**< The function pointer of Update MMS Message */
1088         MsgPlgGetMmsMessage                     pfGetMmsMessage;
1089         MsgPlgUpdateRejectStatus                pfUpdateRejectStatus;
1090         MsgPlgComposeReadReport                 pfComposeReadReport;
1091 };
1092
1093 #ifdef __cplusplus
1094 }
1095 #endif
1096
1097 #endif