11 PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd"> |
11 PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd"> |
12 <concept id="GUID-C45FFBDD-37D4-5892-8D13-CFE292264268" xml:lang="en"><title>Using |
12 <concept id="GUID-C45FFBDD-37D4-5892-8D13-CFE292264268" xml:lang="en"><title>Using |
13 the Class 0 Plug-in for Class 0 SMS</title><prolog><metadata><keywords/></metadata></prolog><conbody> |
13 the Class 0 Plug-in for Class 0 SMS</title><prolog><metadata><keywords/></metadata></prolog><conbody> |
14 <p>This section describes an ECom plug-in called <b>Class 0 </b> plug-in for |
14 <p>This section describes an ECom plug-in called <b>Class 0 </b> plug-in for |
15 the messaging subsystem which handles <b>Class 0</b> SMS. </p> |
15 the messaging subsystem which handles <b>Class 0</b> SMS. </p> |
16 <section><title>Overview</title> <p>Class 0 SMS is a type of SMS message that |
16 <section id="GUID-49B6DF2D-121B-49BA-B34D-A3680247BF70"><title>Overview</title> <p>Class |
17 is displayed on the mobile screen without being saved in the message store |
17 0 SMS is a type of SMS message that is displayed on the mobile screen without |
18 or on the SIM card; unless explicitly saved by the mobile user. The Class |
18 being saved in the message store or on the SIM card; unless explicitly saved |
19 0 plug-in handles and displays Class 0 SMS. </p> <p>Using this plug-in, the |
19 by the mobile user. The Class 0 plug-in handles and displays Class 0 SMS. </p> <p>Using |
20 Symbian Messaging subsystem does not store Class 0 SMS in the message store |
20 this plug-in, the Symbian Messaging subsystem does not store Class 0 SMS in |
21 (SMS service Inbox), but immediately displays them on the mobile screen; even |
21 the message store (SMS service Inbox), but immediately displays them on the |
22 if there is no memory available on the SIM or device. For more detailed information |
22 mobile screen; even if there is no memory available on the SIM or device. |
23 on how Class 0 messages are handled by the Symbian Messaging subsystem, see |
23 For more detailed information on how Class 0 messages are handled by the Symbian |
24 the <xref href="GUID-C45FFBDD-37D4-5892-8D13-CFE292264268.dita#GUID-C45FFBDD-37D4-5892-8D13-CFE292264268/GUID-42CA3291-7C12-52F3-9F1E-7A16E740FB89">Architecture</xref> section. </p> <p><b>SMS stack configuration</b> </p> <p>The SMS stack must be configured to |
24 Messaging subsystem, see the <xref href="GUID-C45FFBDD-37D4-5892-8D13-CFE292264268.dita#GUID-C45FFBDD-37D4-5892-8D13-CFE292264268/GUID-42CA3291-7C12-52F3-9F1E-7A16E740FB89">Architecture</xref> section. </p> <p><b>SMS |
25 handle Class 0 SMS. This is done in accordance with the SMS stack licence. |
25 stack configuration</b> </p> <p>The SMS stack must be configured to handle |
26 If the SMS stack is not configured to handle Class 0 messages they will be |
26 Class 0 SMS. This is done in accordance with the SMS stack licence. If the |
27 treated as non Class 0 SMS. They will be stored in the message store and are |
27 SMS stack is not configured to handle Class 0 messages they will be treated |
28 notified to the UI framework. For more information on configuration of the |
28 as non Class 0 SMS. They will be stored in the message store and are notified |
29 SMS stack to handle Class 0 messages, see <xref href="GUID-266B3FD6-A414-599D-BF31-FF67ADDD4E70.dita">Configuring |
29 to the UI framework. For more information on configuration of the SMS stack |
|
30 to handle Class 0 messages, see <xref href="GUID-266B3FD6-A414-599D-BF31-FF67ADDD4E70.dita">Configuring |
30 SMS Stack To Handle Class 0 Messages</xref>. </p><note> WAP messages that |
31 SMS Stack To Handle Class 0 Messages</xref>. </p><note> WAP messages that |
31 use Class 0 SMS are treated as non Class 0 SMS.</note><p>Symbian provides |
32 use Class 0 SMS are treated as non Class 0 SMS.</note><p>Symbian provides |
32 a default plug-in as part of the Symbian Messaging subsystem. However, licensees |
33 a default plug-in as part of the Symbian Messaging subsystem. However, licensees |
33 can override it by writing a new ECom plug-in using the <xref href="GUID-93BFA177-A165-3955-A5BC-D7D35C5EFE49.dita"><apiname>CSmsClass0Base</apiname></xref> class. |
34 can override it by writing a new ECom plug-in using the <xref href="GUID-93BFA177-A165-3955-A5BC-D7D35C5EFE49.dita"><apiname>CSmsClass0Base</apiname></xref> class. |
34 For more information on <xref href="GUID-93BFA177-A165-3955-A5BC-D7D35C5EFE49.dita"><apiname>CSmsClass0Base</apiname></xref>, see <xref href="GUID-C45FFBDD-37D4-5892-8D13-CFE292264268.dita#GUID-C45FFBDD-37D4-5892-8D13-CFE292264268/GUID-B6EECACA-77D1-57AF-A7F9-4ECE7E911C38">Writing a new plug-in using CSmsClass0Base class</xref>.</p> </section> |
35 For more information on <xref href="GUID-93BFA177-A165-3955-A5BC-D7D35C5EFE49.dita"><apiname>CSmsClass0Base</apiname></xref>, see <xref href="GUID-C45FFBDD-37D4-5892-8D13-CFE292264268.dita#GUID-C45FFBDD-37D4-5892-8D13-CFE292264268/GUID-B6EECACA-77D1-57AF-A7F9-4ECE7E911C38">Writing a new plug-in using CSmsClass0Base class</xref>.</p> </section> |
39 of SMS message. If it is a Class 0 SMS message, the NBS watcher passes the |
40 of SMS message. If it is a Class 0 SMS message, the NBS watcher passes the |
40 message to the Class 0 plug-in. The Class 0 plug-in immediately notifies a |
41 message to the Class 0 plug-in. The Class 0 plug-in immediately notifies a |
41 UI notifier plug-in which displays the content of the Class 0 SMS message |
42 UI notifier plug-in which displays the content of the Class 0 SMS message |
42 on the UI without storing it in the message store (SMS service Inbox). </p> <fig id="GUID-9768EB50-2605-5181-AB53-7376A4B82272"> |
43 on the UI without storing it in the message store (SMS service Inbox). </p> <fig id="GUID-9768EB50-2605-5181-AB53-7376A4B82272"> |
43 <title> Architecture of the Class 0 plug-in </title> |
44 <title> Architecture of the Class 0 plug-in </title> |
44 <image href="GUID-EC6C21FB-16E1-57FA-B995-8B0F34B6588A_d0e498958_href.png" placement="inline"/> |
45 <image href="GUID-EC6C21FB-16E1-57FA-B995-8B0F34B6588A_d0e489112_href.png" placement="inline"/> |
45 </fig> <dl> |
46 </fig> <dl> |
46 <dlentry> |
47 <dlentry> |
47 <dt>SMS stack</dt> |
48 <dt>SMS stack</dt> |
48 <dd><p>SMS Stack sends and receives SMS on GSM networks. </p> </dd> |
49 <dd><p>SMS Stack sends and receives SMS on GSM networks. </p> </dd> |
49 </dlentry> |
50 </dlentry> |
62 includes a default implementation of the <codeph>CSmsClass0Base</codeph> plug-in |
63 includes a default implementation of the <codeph>CSmsClass0Base</codeph> plug-in |
63 which can be found in the <filepath>class0sms.dll</filepath> file. </p> <p>However, |
64 which can be found in the <filepath>class0sms.dll</filepath> file. </p> <p>However, |
64 licensees can override it by writing a new ECom plug-in using the <xref href="GUID-93BFA177-A165-3955-A5BC-D7D35C5EFE49.dita"><apiname>CSmsClass0Base</apiname></xref> exported |
65 licensees can override it by writing a new ECom plug-in using the <xref href="GUID-93BFA177-A165-3955-A5BC-D7D35C5EFE49.dita"><apiname>CSmsClass0Base</apiname></xref> exported |
65 class. For instructions on writing a new ECom plug-in, see the <xref href="GUID-9E92EE30-F2E2-5F28-BB2A-391C09EC69D2.dita">ECom</xref> guide. </p> <fig id="GUID-89F37A8E-78B2-5BEE-A066-90A186687FCA"> |
66 class. For instructions on writing a new ECom plug-in, see the <xref href="GUID-9E92EE30-F2E2-5F28-BB2A-391C09EC69D2.dita">ECom</xref> guide. </p> <fig id="GUID-89F37A8E-78B2-5BEE-A066-90A186687FCA"> |
66 <title> Class diagram </title> |
67 <title> Class diagram </title> |
67 <image href="GUID-B479BE8B-5CAD-57C2-9E21-DEB9E64E25EE_d0e499033_href.png" placement="inline"/> |
68 <image href="GUID-B479BE8B-5CAD-57C2-9E21-DEB9E64E25EE_d0e489187_href.png" placement="inline"/> |
68 </fig> <p> <codeph>void CClass0Sms::DisplayMessageHandler(TDesC8& aSmsMessage, |
69 </fig> <p> <codeph>void CClass0Sms::DisplayMessageHandler(TDesC8& aSmsMessage, |
69 TBool aIsCompleteMsg)</codeph> </p> <table id="GUID-F3506200-AB0D-56EB-9C18-70E83B818ABA"> |
70 TBool aIsCompleteMsg)</codeph> </p> <table id="GUID-F3506200-AB0D-56EB-9C18-70E83B818ABA"> |
70 <tgroup cols="2"><colspec colname="col0"/><colspec colname="col1"/> |
71 <tgroup cols="2"><colspec colname="col0"/><colspec colname="col1"/> |
71 <tbody> |
72 <tbody> |
72 <row> |
73 <row> |
73 <entry><p> <xref href="GUID-E6FE50CD-CA6D-3377-8936-F2053330FF80.dita"><apiname>CClass0Sms</apiname></xref> </p> </entry> |
74 <entry><p> <xref href="GUID-E6FE50CD-CA6D-3377-8936-F2053330FF80.dita"><apiname>CClass0Sms</apiname></xref> </p> </entry> |
74 <entry><p>Derived from the <xref href="GUID-93BFA177-A165-3955-A5BC-D7D35C5EFE49.dita"><apiname>CSmsClass0Base</apiname></xref> class </p> </entry> |
75 <entry><p>Derived from the <codeph>CSmsClass0Base</codeph> class </p> </entry> |
75 </row> |
76 </row> |
76 <row> |
77 <row> |
77 <entry><p> <xref href="GUID-50DE662C-DB6E-3149-B0F3-6740BF7989E9.dita"><apiname>DisplayMessageHandler</apiname></xref> </p> </entry> |
78 <entry><p> <codeph>CClass0Sms::DisplayMessageHandler()</codeph> </p> </entry> |
78 <entry><p>This method calls <xref href="GUID-C6382C9D-1AE1-3B11-9B51-9D29D902254B.dita"><apiname>StartNotifier()</apiname></xref> or <xref href="GUID-9475FFE9-37AC-3B6C-9312-577D951DE191.dita"><apiname>UpdateNotifier()</apiname></xref> according |
79 <entry><p>This method calls <codeph>StartNotifier()</codeph> or <codeph>UpdateNotifier()</codeph> according |
79 to the value set in the aIsCompleteMsg flag. </p> </entry> |
80 to the value set in the aIsCompleteMsg flag. </p> </entry> |
80 </row> |
81 </row> |
81 <row> |
82 <row> |
82 <entry><p> <xref href="GUID-FB97E0A3-352A-316F-97C6-69E4741A8120.dita"><apiname>TDesC8</apiname></xref> <codeph>& aSmsMessage</codeph> </p> </entry> |
83 <entry><p> <xref href="GUID-FB97E0A3-352A-316F-97C6-69E4741A8120.dita"><apiname>TDesC8</apiname></xref> <codeph>& aSmsMessage</codeph> </p> </entry> |
83 <entry><p>Contains the following data: </p> <ul> |
84 <entry><p>Contains the following data: </p> <ul> |
113 { |
114 { |
114 //The UID of KUidClass0SmsNotifier should to be used in UI Notifier. |
115 //The UID of KUidClass0SmsNotifier should to be used in UI Notifier. |
115 iNotifier.UpdateNotifier(KUidClass0SmsNotifier, aSmsMessage, response); |
116 iNotifier.UpdateNotifier(KUidClass0SmsNotifier, aSmsMessage, response); |
116 } |
117 } |
117 }</codeblock> <p>For more details on writing a UI Notifier, see <xref href="GUID-C45FFBDD-37D4-5892-8D13-CFE292264268.dita#GUID-C45FFBDD-37D4-5892-8D13-CFE292264268/GUID-EBBDB3ED-B5BD-580C-8869-BA35DBA64F1F">Example</xref>. </p> </section> |
118 }</codeblock> <p>For more details on writing a UI Notifier, see <xref href="GUID-C45FFBDD-37D4-5892-8D13-CFE292264268.dita#GUID-C45FFBDD-37D4-5892-8D13-CFE292264268/GUID-EBBDB3ED-B5BD-580C-8869-BA35DBA64F1F">Example</xref>. </p> </section> |
118 <section><title>Understanding types of Class 0 SMS</title> <p>The SMS stack |
119 <section id="GUID-0ADF3F87-1C91-4380-9A92-448C6B62E14E"><title>Understanding |
119 can send a complete or partial messages to the Messaging client. When it sends |
120 types of Class 0 SMS</title> <p>The SMS stack can send a complete or partial |
120 a partial message to the Messaging client, such as in an out-of-disk condition, |
121 messages to the Messaging client. When it sends a partial message to the Messaging |
121 it provides additional information about the partial message. </p> <p>The |
122 client, such as in an out-of-disk condition, it provides additional information |
122 following are the type of Class 0 SMS message displayed on the UI framework. </p><table id="GUID-31075134-4116-45C7-9905-D06A0F73C759"> |
123 about the partial message. </p> <p>The following are the type of Class 0 SMS |
|
124 message displayed on the UI framework. </p><table id="GUID-31075134-4116-45C7-9905-D06A0F73C759"> |
123 <tgroup cols="2"><colspec colname="col1"/><colspec colname="col2"/> |
125 <tgroup cols="2"><colspec colname="col1"/><colspec colname="col2"/> |
124 <tbody> |
126 <tbody> |
125 <row> |
127 <row> |
126 <entry><p><b>Type of Class 0 SMS message </b></p></entry> |
128 <entry><p><b>Type of Class 0 SMS message </b></p></entry> |
127 <entry><p><b>Displayed on the UI framework</b></p></entry> |
129 <entry><p><b>Displayed on the UI framework</b></p></entry> |
133 </row> |
135 </row> |
134 <row> |
136 <row> |
135 <entry><p>Partial </p></entry> |
137 <entry><p>Partial </p></entry> |
136 <entry><p>If the received message is incomplete, it contains information about |
138 <entry><p>If the received message is incomplete, it contains information about |
137 the starting and ending PDU positions of the decoded message, and the <codeph>isCompleteMessageFlag</codeph> flag |
139 the starting and ending PDU positions of the decoded message, and the <codeph>isCompleteMessageFlag</codeph> flag |
138 is set to <codeph>EFalse</codeph>. </p><codeblock xml:space="preserve">StartPos: StartingPDUpositionEndPos: EndingPDUpositionisLastMessage: ETrue</codeblock><p>If it is the last part of the partial message, then <codeph>IsCompleteMessageFlag</codeph> will |
140 is set to <codeph>EFalse</codeph>. </p><codeblock xml:space="preserve">StartPos: StartingPDUpositionEndPos: EndingPDUpositionisLastMessage: ETrue</codeblock><p>If |
|
141 it is the last part of the partial message, then <codeph>IsCompleteMessageFlag</codeph> will |
139 be set to <codeph>EFalse</codeph>. </p></entry> |
142 be set to <codeph>EFalse</codeph>. </p></entry> |
140 </row> |
143 </row> |
141 </tbody> |
144 </tbody> |
142 </tgroup> |
145 </tgroup> |
143 </table> </section> |
146 </table> </section> |
144 <section><title>Extracting the serial buffer</title> <p>The Symbian Messaging |
147 <section id="GUID-C6CD8D8C-76FF-4EA8-8980-61E127502332"><title>Extracting |
145 subsystem passes the serial buffer, which contains starting and ending PDU, |
148 the serial buffer</title> <p>The Symbian Messaging subsystem passes the serial |
146 and the Class 0 SMS message in the <xref href="GUID-FB97E0A3-352A-316F-97C6-69E4741A8120.dita"><apiname>TDesC8</apiname></xref> descriptor to |
149 buffer, which contains starting and ending PDU, and the Class 0 SMS message |
147 the UI. The <xref href="GUID-FB97E0A3-352A-316F-97C6-69E4741A8120.dita"><apiname>TDesC8</apiname></xref> descriptor must be read at the UI side |
150 in the <xref href="GUID-FB97E0A3-352A-316F-97C6-69E4741A8120.dita"><apiname>TDesC8</apiname></xref> descriptor to the UI. The <xref href="GUID-FB97E0A3-352A-316F-97C6-69E4741A8120.dita"><apiname>TDesC8</apiname></xref> descriptor |
148 in the same order; that is, <codeph>TInt aStartPos</codeph>, <codeph>TInt |
151 must be read at the UI side in the same order; that is, <codeph>TInt aStartPos</codeph>, <codeph>TInt |
149 endPos</codeph>, <xref href="GUID-4B942C06-1BAC-3A21-B3B1-89FB5C51ADA0.dita"><apiname>TBool</apiname></xref> <codeph> aIsLastMessage</codeph>, |
152 endPos</codeph>, <xref href="GUID-4B942C06-1BAC-3A21-B3B1-89FB5C51ADA0.dita"><apiname>TBool</apiname></xref> <codeph> aIsLastMessage</codeph>, |
150 and <xref href="GUID-EA7DEFA4-D4D9-3B2B-86A3-C3FB1A682E61.dita"><apiname>TPtr</apiname></xref> <codeph> aSmsData</codeph>. </p> </section> |
153 and <xref href="GUID-EA7DEFA4-D4D9-3B2B-86A3-C3FB1A682E61.dita"><apiname>TPtr</apiname></xref> <codeph> aSmsData</codeph>. </p> </section> |
151 <section id="GUID-EBBDB3ED-B5BD-580C-8869-BA35DBA64F1F-GENID-1-10-1-18-1-1-6-1-6-1-4-1-2-7"><title>Example</title> <p>The |
154 <section id="GUID-EBBDB3ED-B5BD-580C-8869-BA35DBA64F1F-GENID-1-12-1-20-1-1-6-1-6-1-4-1-2-7"><title>Example</title> <p>The |
152 following example code shows how to write a UI notifier and extract the Class |
155 following example code shows how to write a UI notifier and extract the Class |
153 0 SMS message: </p> <p><b>class0smsUInotifier.h</b> </p> <codeblock id="GUID-88CC9E44-3C8C-522B-83D3-658EEEEE928D" xml:space="preserve">// class0smsUInotifier.h |
156 0 SMS message: </p> <p><b>class0smsUInotifier.h</b> </p> <codeblock id="GUID-88CC9E44-3C8C-522B-83D3-658EEEEE928D" xml:space="preserve">// class0smsUInotifier.h |
154 // |
157 // |
155 // Copyright ©) Symbian Software Ltd 2007. All rights reserved. |
158 // Copyright ©) Symbian Software Ltd 2007. All rights reserved. |
156 // |
159 // |