Symbian3/SDK/Source/GUID-6590B534-D976-5305-BE95-48DD05120DFB.dita
changeset 2 ebc84c812384
parent 0 89d6a7a84779
equal deleted inserted replaced
1:25a17d01db0c 2:ebc84c812384
    16 <li id="GUID-7E0FA15B-8AFB-59DD-B577-34905989D316"><p><xref href="GUID-6590B534-D976-5305-BE95-48DD05120DFB.dita#GUID-6590B534-D976-5305-BE95-48DD05120DFB/GUID-6B8931EB-7AB9-588C-B419-0CD4BA048397">Monitoring two pipes using select()</xref>  </p> </li>
    16 <li id="GUID-7E0FA15B-8AFB-59DD-B577-34905989D316"><p><xref href="GUID-6590B534-D976-5305-BE95-48DD05120DFB.dita#GUID-6590B534-D976-5305-BE95-48DD05120DFB/GUID-6B8931EB-7AB9-588C-B419-0CD4BA048397">Monitoring two pipes using select()</xref>  </p> </li>
    17 </ul> </li>
    17 </ul> </li>
    18 <li id="GUID-245A31A4-4C38-54F4-9ACC-92285C12966E"><p><xref href="GUID-6590B534-D976-5305-BE95-48DD05120DFB.dita#GUID-6590B534-D976-5305-BE95-48DD05120DFB/GUID-7582B2CB-AAC8-5E41-ADE1-76C12B691E10">Socket IOCtl options</xref>  </p> </li>
    18 <li id="GUID-245A31A4-4C38-54F4-9ACC-92285C12966E"><p><xref href="GUID-6590B534-D976-5305-BE95-48DD05120DFB.dita#GUID-6590B534-D976-5305-BE95-48DD05120DFB/GUID-7582B2CB-AAC8-5E41-ADE1-76C12B691E10">Socket IOCtl options</xref>  </p> </li>
    19 <li id="GUID-1A2BDA7D-2DE4-52AE-ACD3-12D1A6311A88"><p><xref href="GUID-6590B534-D976-5305-BE95-48DD05120DFB.dita#GUID-6590B534-D976-5305-BE95-48DD05120DFB/GUID-9BF9562E-5831-5A7F-90A1-87BDE1CFBA54">Mathematical functions</xref>  </p> </li>
    19 <li id="GUID-1A2BDA7D-2DE4-52AE-ACD3-12D1A6311A88"><p><xref href="GUID-6590B534-D976-5305-BE95-48DD05120DFB.dita#GUID-6590B534-D976-5305-BE95-48DD05120DFB/GUID-9BF9562E-5831-5A7F-90A1-87BDE1CFBA54">Mathematical functions</xref>  </p> </li>
    20 <li id="GUID-A6183A50-BFBA-573B-B2BC-68BE637D7DF5"><p><xref href="GUID-6590B534-D976-5305-BE95-48DD05120DFB.dita#GUID-6590B534-D976-5305-BE95-48DD05120DFB/GUID-DA65E8FA-E20B-5572-AEC9-20AB140DF33A">Error handling and cleanup</xref>  </p> <ul>
    20 <li id="GUID-A6183A50-BFBA-573B-B2BC-68BE637D7DF5"><p><xref href="GUID-6590B534-D976-5305-BE95-48DD05120DFB.dita#GUID-6590B534-D976-5305-BE95-48DD05120DFB/GUID-DA65E8FA-E20B-5572-AEC9-20AB140DF33A">Error handling and cleanup</xref>  </p> <ul>
    21 <li id="GUID-ADB0AC3E-FB59-52DC-B151-A4551467CBA0"><p><xref href="GUID-6590B534-D976-5305-BE95-48DD05120DFB.dita#GUID-6590B534-D976-5305-BE95-48DD05120DFB/GUID-D8DB43BD-9D19-5A78-8E37-6699653D047A">Mapping P.I.P.S. error codes to Symbian platform error codes</xref>  </p> </li>
    21 <li id="GUID-ADB0AC3E-FB59-52DC-B151-A4551467CBA0"><p><xref href="GUID-6590B534-D976-5305-BE95-48DD05120DFB.dita#GUID-6590B534-D976-5305-BE95-48DD05120DFB/GUID-D8DB43BD-9D19-5A78-8E37-6699653D047A">Mapping P.I.P.S. error codes to the Symbian platform error codes</xref>  </p> </li>
    22 </ul> </li>
    22 </ul> </li>
    23 <li id="GUID-EA748131-29ED-5D32-B1C2-F948ABEA6584"><p><xref href="GUID-6590B534-D976-5305-BE95-48DD05120DFB.dita#GUID-6590B534-D976-5305-BE95-48DD05120DFB/GUID-CF52A59F-FD04-5043-A526-05545E11F0F5">System logger</xref>  </p> </li>
    23 <li id="GUID-EA748131-29ED-5D32-B1C2-F948ABEA6584"><p><xref href="GUID-6590B534-D976-5305-BE95-48DD05120DFB.dita#GUID-6590B534-D976-5305-BE95-48DD05120DFB/GUID-CF52A59F-FD04-5043-A526-05545E11F0F5">System logger</xref>  </p> </li>
    24 <li id="GUID-1C98EDF4-C7BD-5CC8-90EB-D35B759280CD"><p><xref href="GUID-6590B534-D976-5305-BE95-48DD05120DFB.dita#GUID-6590B534-D976-5305-BE95-48DD05120DFB/GUID-8C951D9F-DE32-5201-90F2-45EB442F9FFC">Pthread barriers, rwlocks and spinlocks</xref>  </p> </li>
    24 <li id="GUID-1C98EDF4-C7BD-5CC8-90EB-D35B759280CD"><p><xref href="GUID-6590B534-D976-5305-BE95-48DD05120DFB.dita#GUID-6590B534-D976-5305-BE95-48DD05120DFB/GUID-8C951D9F-DE32-5201-90F2-45EB442F9FFC">Pthread barriers, rwlocks and spinlocks</xref>  </p> </li>
    25 <li id="GUID-AFB6D3DE-B1ED-51CF-B02D-BBF1958F6357"><p><xref href="GUID-6590B534-D976-5305-BE95-48DD05120DFB.dita#GUID-6590B534-D976-5305-BE95-48DD05120DFB/GUID-777FDBF9-4B80-5B58-88F3-E78DBDB89021">Command line shell</xref>  </p> </li>
    25 <li id="GUID-AFB6D3DE-B1ED-51CF-B02D-BBF1958F6357"><p><xref href="GUID-6590B534-D976-5305-BE95-48DD05120DFB.dita#GUID-6590B534-D976-5305-BE95-48DD05120DFB/GUID-777FDBF9-4B80-5B58-88F3-E78DBDB89021">Command line shell</xref>  </p> </li>
    26 <li id="GUID-2357315B-21A6-5A9D-8D8D-B72043376F41"><p><xref href="GUID-6590B534-D976-5305-BE95-48DD05120DFB.dita#GUID-6590B534-D976-5305-BE95-48DD05120DFB/GUID-98FE0A61-A9F6-5216-A01F-A213F33D3173">User interfaces</xref>  </p> </li>
    26 <li id="GUID-2357315B-21A6-5A9D-8D8D-B72043376F41"><p><xref href="GUID-6590B534-D976-5305-BE95-48DD05120DFB.dita#GUID-6590B534-D976-5305-BE95-48DD05120DFB/GUID-98FE0A61-A9F6-5216-A01F-A213F33D3173">User interfaces</xref>  </p> </li>
   120    pclose(ChildProcessStream2);
   120    pclose(ChildProcessStream2);
   121 
   121 
   122    return EXIT_SUCCESS;
   122    return EXIT_SUCCESS;
   123 }</codeblock> </section>
   123 }</codeblock> </section>
   124 <section id="GUID-7582B2CB-AAC8-5E41-ADE1-76C12B691E10"><title>Socket IOCtl
   124 <section id="GUID-7582B2CB-AAC8-5E41-ADE1-76C12B691E10"><title>Socket IOCtl
   125 options</title> <p>The underlying implementation of sockets on Symbian platform
   125 options</title> <p>The underlying implementation of sockets on the Symbian
   126 imposes some restrictions on the socket options available in P.I.P.S. and
   126 platform imposes some restrictions on the socket options available in P.I.P.S.
   127 has also resulted in some new non-standard options to be created. </p> <p>The
   127 and has also resulted in some new non-standard options to be created. </p> <p>The
   128 introduction of multi-homing (single link, multiple IP addresses) on Symbian
   128 introduction of multi-homing (single link, multiple IP addresses) on Symbian
   129 phones and the various methods of connecting to networks, such as Wi-Fi and
   129 phones and the various methods of connecting to networks, such as Wi-Fi and
   130 3G, with their varying degrees of cost to the user have made it important
   130 3G, with their varying degrees of cost to the user have made it important
   131 to be able to choose which interface or access point is used to route socket
   131 to be able to choose which interface or access point is used to route socket
   132 traffic. The Symbian <xref href="GUID-BED8A733-2ED7-31AD-A911-C1F4707C67FD.dita"><apiname>RConnection</apiname></xref> class provides this functionality,
   132 traffic. The Symbian <xref href="GUID-BED8A733-2ED7-31AD-A911-C1F4707C67FD.dita"><apiname>RConnection</apiname></xref> class provides this functionality,
   250 
   250 
   251   //Return the opened socket
   251   //Return the opened socket
   252   return Sock;
   252   return Sock;
   253 }</codeblock> </section>
   253 }</codeblock> </section>
   254 <section id="GUID-9BF9562E-5831-5A7F-90A1-87BDE1CFBA54"><title>Mathematical
   254 <section id="GUID-9BF9562E-5831-5A7F-90A1-87BDE1CFBA54"><title>Mathematical
   255 functions</title> <p>Symbian platform does not have any support for long doubles
   255 functions</title> <p>The Symbian platform does not have any support for long
   256 so any P.I.P.S. programs which call long double versions of APIs will actually
   256 doubles so any P.I.P.S. programs which call long double versions of APIs will
   257 invoke the double version of the API. </p> <p>Symbian platform supports the
   257 actually invoke the double version of the API. </p> <p>The Symbian platform
   258 use of a hardware floating point co-processor, however not all phones incorporate
   258 supports the use of a hardware floating point co-processor, however not all
   259 an FPU (Floating Point Unit) and rely on software emulation of floating point
   259 phones incorporate an FPU (Floating Point Unit) and rely on software emulation
   260 operations. Phones and computers equipped with an FPU provide faster and more
   260 of floating point operations. Phones and computers equipped with an FPU provide
   261 accurate floating point operations. </p> <p>Symbian platform does not support
   261 faster and more accurate floating point operations. </p> <p>The Symbian platform
   262 complex numbers so the P.I.P.S. libraries are not able to offer the POSIX
   262 does not support complex numbers so the P.I.P.S. libraries are not able to
   263 complex number APIs. </p> <p> <b>Note:</b> The mathematical functions are
   263 offer the POSIX complex number APIs. </p> <p> <b>Note:</b> The mathematical
   264 included in the <filepath>libm.dll</filepath> file. </p> </section>
   264 functions are included in the <filepath>libm.dll</filepath> file. </p> </section>
   265 <section id="GUID-DA65E8FA-E20B-5572-AEC9-20AB140DF33A"><title> Error handling
   265 <section id="GUID-DA65E8FA-E20B-5572-AEC9-20AB140DF33A"><title> Error handling
   266 and cleanup</title> <p>It is important that Symbian platform error codes do
   266 and cleanup</title> <p>It is important that the Symbian platform error codes
   267 not reach any ported application code. P.I.P.S. logically maps the native
   267 do not reach any ported application code. P.I.P.S. logically maps the native
   268 OS error codes with the corresponding POSIX <codeph>errno</codeph> values
   268 OS error codes with the corresponding POSIX <codeph>errno</codeph> values
   269 as per the standard. So, ported programs will not usually have to alter their
   269 as per the standard. So, ported programs will not usually have to alter their
   270 error checking/handling. </p> <p id="GUID-D8DB43BD-9D19-5A78-8E37-6699653D047A"><b>Mapping
   270 error checking/handling. </p> <p id="GUID-D8DB43BD-9D19-5A78-8E37-6699653D047A"><b>Mapping
   271 P.I.P.S. error codes to Symbian platform error codes</b> </p> <p>Porting your
   271 P.I.P.S. error codes to the Symbian platform error codes</b> </p> <p>Porting
   272 application to Symbian platform requires 'translating' Symbian platform error
   272 your application to the Symbian platform requires 'translating' the Symbian
   273 codes to POSIX error codes. <xref href="GUID-C197C9A7-EA05-3F24-9854-542E984C612D.dita#GUID-C197C9A7-EA05-3F24-9854-542E984C612D/GUID-B00F7659-9C31-36CD-896A-40887DECEA4B"><apiname>User::Leaves()</apiname></xref> from native
   273 platform error codes to POSIX error codes. <xref href="GUID-C197C9A7-EA05-3F24-9854-542E984C612D.dita#GUID-C197C9A7-EA05-3F24-9854-542E984C612D/GUID-B00F7659-9C31-36CD-896A-40887DECEA4B"><apiname>User::Leaves()</apiname></xref> from
   274 Symbian APIs are trapped in P.I.P.S.. Calls to P.I.P.S. APIs from user code
   274 native Symbian APIs are trapped in P.I.P.S.. Calls to P.I.P.S. APIs from user
   275 need not be wrapped in <xref href="GUID-3AD20E0C-F364-533F-9FBC-227478CA9982.dita">TRAP</xref> s. </p> <p>Occasionally
   275 code need not be wrapped in <xref href="GUID-3AD20E0C-F364-533F-9FBC-227478CA9982.dita">TRAP</xref> s. </p> <p>Occasionally
   276 errors may be generated by the underlying Symbian platform that cannot be
   276 errors may be generated by the underlying Symbian platform that cannot be
   277 translated to POSIX error codes, in which case the error variable <codeph>errno</codeph> will
   277 translated to POSIX error codes, in which case the error variable <codeph>errno</codeph> will
   278 be out of the usual range of values, above the maximum value of <codeph>__EMAXERRNO</codeph> or <codeph>124</codeph>. </p> <p>The
   278 be out of the usual range of values, above the maximum value of <codeph>__EMAXERRNO</codeph> or <codeph>124</codeph>. </p> <p>The
   279 Symbian platform error code can be calculated using the following formula: </p> <codeblock id="GUID-A2F7B744-4B73-56AB-BA06-7C83333ADC5D" xml:space="preserve">Symbian Error Code = -(errno - __EMAXERRNO)</codeblock> <p>Error
   279 Symbian platform error code can be calculated using the following formula: </p> <codeblock id="GUID-A2F7B744-4B73-56AB-BA06-7C83333ADC5D" xml:space="preserve">Symbian Error Code = -(errno - __EMAXERRNO)</codeblock> <p>Error
   280 codes are defined in the <filepath>errno.h</filepath> file. </p> </section>
   280 codes are defined in the <filepath>errno.h</filepath> file. </p> </section>
   651   return result;
   651   return result;
   652 }
   652 }
   653 
   653 
   654 /**</codeblock> </section>
   654 /**</codeblock> </section>
   655 <section id="GUID-777FDBF9-4B80-5B58-88F3-E78DBDB89021"><title>Command line
   655 <section id="GUID-777FDBF9-4B80-5B58-88F3-E78DBDB89021"><title>Command line
   656 shell</title> <p>Symbian platform phones do not have a command line shell
   656 shell</title> <p>The Symbian platform phones do not have a command line shell
   657 as standard. P.I.P.S. does however support the <xref href="GUID-C0C1D22B-298F-3E8D-A1E9-6F5EFA81F9E8.dita"><apiname>stdin()</apiname></xref>, <xref href="GUID-85797574-E2A2-3C0C-9670-C178078DE199.dita"><apiname>stdout()</apiname></xref> and <xref href="GUID-4FF97B50-2C1E-37EC-888B-FB8D3F14B5B8.dita"><apiname>stderr()</apiname></xref> standard
   657 as standard. P.I.P.S. does however support the <xref href="GUID-C0C1D22B-298F-3E8D-A1E9-6F5EFA81F9E8.dita"><apiname>stdin()</apiname></xref>, <xref href="GUID-85797574-E2A2-3C0C-9670-C178078DE199.dita"><apiname>stdout()</apiname></xref> and <xref href="GUID-4FF97B50-2C1E-37EC-888B-FB8D3F14B5B8.dita"><apiname>stderr()</apiname></xref> standard
   658 streams, enabling parent processes to redirect a child's standard streams
   658 streams, enabling parent processes to redirect a child's standard streams
   659 for the exchange of data. Without explicitly redirecting the standard streams,
   659 for the exchange of data. Without explicitly redirecting the standard streams,
   660 the default is for each to be redirected to the <filepath>/dev/null</filepath> directory.
   660 the default is for each to be redirected to the <filepath>/dev/null</filepath> directory.
   661 The P.I.P.S. <xref href="GUID-3D9040E5-F6FB-3DEA-9800-A55F0CEE7B08.dita"><apiname>system()</apiname></xref> function does not create a shell
   661 The P.I.P.S. <xref href="GUID-3D9040E5-F6FB-3DEA-9800-A55F0CEE7B08.dita"><apiname>system()</apiname></xref> function does not create a shell
   664 <section id="GUID-98FE0A61-A9F6-5216-A01F-A213F33D3173"><title>User interfaces</title> <p>Most
   664 <section id="GUID-98FE0A61-A9F6-5216-A01F-A213F33D3173"><title>User interfaces</title> <p>Most
   665 POSIX based systems interact with a windowing system such as X Windows and
   665 POSIX based systems interact with a windowing system such as X Windows and
   666 libraries such as GTK. P.I.P.S., however, does not have its own UI libraries,
   666 libraries such as GTK. P.I.P.S., however, does not have its own UI libraries,
   667 so any P.I.P.S. based applications that require UI functionality must rely
   667 so any P.I.P.S. based applications that require UI functionality must rely
   668 on the UI from the device manufacturer. As a consequence, for any UI program
   668 on the UI from the device manufacturer. As a consequence, for any UI program
   669 that uses P.I.P.S., there must be an interaction between Symbian platform
   669 that uses P.I.P.S., there must be an interaction between the Symbian platform
   670 native C++ and P.I.P.S. C code. </p> </section>
   670 native C++ and P.I.P.S. C code. </p> </section>
   671 <section id="GUID-3CA8FF29-79B4-5D43-8A23-EDB136BF7A8F"><title>One Definition
   671 <section id="GUID-3CA8FF29-79B4-5D43-8A23-EDB136BF7A8F"><title>One Definition
   672 Rule - warning</title> <p>Standard C++ states that the <keyword>One Definition
   672 Rule - warning</title> <p>Standard C++ states that the <keyword>One Definition
   673 Rule</keyword> (ODR) must be maintained within a program. </p> <p>Symbian
   673 Rule</keyword> (ODR) must be maintained within a program. </p> <p>The Symbian
   674 platform can neither check (without significant modifications) that the ODR
   674 platform can neither check (without significant modifications) that the ODR
   675 is violated nor use the technique called symbol pre-emption to ensure that
   675 is violated nor use the technique called symbol pre-emption to ensure that
   676 the ODR is enforced. </p> <p>Therefore, you must take care and must not assume
   676 the ODR is enforced. </p> <p>Therefore, you must take care and must not assume
   677 that there is only one copy of the symbol (that is, all instances of the same
   677 that there is only one copy of the symbol (that is, all instances of the same
   678 symbol will have the same address) across all DLLs within a program. </p> </section>
   678 symbol will have the same address) across all DLLs within a program. </p> </section>