epoc32/include/c32comm.h
branchSymbian3
changeset 4 837f303aceeb
parent 2 2fe1408b6811
equal deleted inserted replaced
3:e1b950c65cb4 4:837f303aceeb
     1 // Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies).
     1 // Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies).
     2 // All rights reserved.
     2 // All rights reserved.
     3 // This component and the accompanying materials are made available
     3 // This component and the accompanying materials are made available
     4 // under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
     4 // under the terms of "Eclipse Public License v1.0"
     5 // which accompanies this distribution, and is available
     5 // which accompanies this distribution, and is available
     6 // at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
     7 //
     7 //
     8 // Initial Contributors:
     8 // Initial Contributors:
     9 // Nokia Corporation - initial contribution.
     9 // Nokia Corporation - initial contribution.
    10 //
    10 //
    11 // Contributors:
    11 // Contributors:
    12 //
    12 //
    13 // Description:
    13 // Description:
    14 //
    14 //
    15 
    15 
    16 #ifndef SYMBIAN_C32_SERCOMMS_V2
       
    17 // PLEASE NOTE: This file is part of Version 2 of C32 - that is, the multi-threaded version.
       
    18 // The single-threaded C32 version of this file is in c32\Version1\SCOMM
       
    19 // All defect fixes should be applied to both versions where appropriate.
       
    20 // PLEASE NOTE: This comment is applicable to SercommsV2 but is surrounded by an "#ifndef"
       
    21 // to enable the automatic removal of this comment once non-C32 V2 code is removed.
       
    22 #endif
       
    23 
    16 
    24 
    17 
    25 #ifndef C32COMM_H
    18 #ifndef C32COMM_H
    26 #define C32COMM_H
    19 #define C32COMM_H
    27 
    20 
    39 @released	
    32 @released	
    40 */
    33 */
    41 IMPORT_C TInt StartC32();
    34 IMPORT_C TInt StartC32();
    42 IMPORT_C TInt StartC32WithCMISuppressions(const TDesC& aCMISuppressionList);
    35 IMPORT_C TInt StartC32WithCMISuppressions(const TDesC& aCMISuppressionList);
    43 
    36 
    44 /**
       
    45 C32 major version number.
       
    46 @internalAll
       
    47 */
       
    48 const TUint KEC32MajorVersionNumber = 1;  
       
    49 /**
       
    50 C32 minor version number.
       
    51 @internalAll
       
    52 */
       
    53 const TUint KEC32MinorVersionNumber = 0;  
       
    54 /**
       
    55 C32 build version number.
       
    56 @internalAll
       
    57 */
       
    58 const TUint KEC32BuildVersionNumber = 605;
       
    59 
       
    60 /**
       
    61 @internalComponent
       
    62 */
       
    63 const TDesC& KCommServerName(void);
       
    64 
    37 
    65 /** Specifies the mode in which a port is opened.
    38 /** Specifies the mode in which a port is opened.
    66 
    39 
    67 We specify the mode when it is opened, and the mode cannot thereafter be
    40 We specify the mode when it is opened, and the mode cannot thereafter be
    68 changed. If we open the port in Shared mode, other clients of the comms
    41 changed. If we open the port in Shared mode, other clients of the comms
   107 const TUint KCommBufferPartial = 0x0001;  
    80 const TUint KCommBufferPartial = 0x0001;  
   108 
    81 
   109 
    82 
   110 /**
    83 /**
   111 trace flags for debugging purposes
    84 trace flags for debugging purposes
   112 @internalComponent
    85 @publishedAll
   113 */
    86 */
   114 enum TC32Trace 
    87 enum TC32Trace 
   115 	{
    88 	{
   116 	ETraceC32Startup = 0x00000001,
    89 	ETraceC32Startup = 0x00000001,
   117 	ETraceC32Panic   = 0x00000002,
    90 	ETraceC32Panic   = 0x00000002,
   137 @released
   110 @released
   138 */
   111 */
   139 struct TCommServerConfigV01
   112 struct TCommServerConfigV01
   140 	{
   113 	{
   141 	/** Buffering option: either KCommBufferFull or KCommBufferPartial */
   114 	/** Buffering option: either KCommBufferFull or KCommBufferPartial */
   142 	TUint iBufFlags; ///< contains buffer flags e.g for partial read/write
   115 	TUint iBufFlags; //< contains buffer flags e.g for partial read/write
   143 	/** Size of server buffer if partial buffering is being used */
   116 	/** Size of server buffer if partial buffering is being used */
   144 	TUint iBufSize;  ///< size of the Tx/Rx buffer
   117 	TUint iBufSize;  //< size of the Tx/Rx buffer
   145 	};
   118 	};
   146 
   119 
   147 /** Package buffer for a server configuration object. TCommServerConfig is used 
   120 /** Package buffer for a server configuration object. TCommServerConfig is used 
   148 as an argument to RComm::Mode() and RComm::SetMode(). 
   121 as an argument to RComm::Mode() and RComm::SetMode(). 
   149 
   122 
   168 /** Reset the receive buffer 
   141 /** Reset the receive buffer 
   169 
   142 
   170 @publishedAll	
   143 @publishedAll	
   171 @released
   144 @released
   172 */
   145 */
   173 const TUint KCommResetRx = 0x00000001;  ///< to by used as flag by RComm::ResetBuffers
   146 const TUint KCommResetRx = 0x00000001;  //< to by used as flag by RComm::ResetBuffers
   174 /** Reset the transmit buffer 
   147 /** Reset the transmit buffer 
   175 
   148 
   176 @publishedAll	
   149 @publishedAll	
   177 @released
   150 @released
   178 */
   151 */
   179 const TUint KCommResetTx = 0x00000002;  ///< to by used as flag by RComm::ResetBuffers
   152 const TUint KCommResetTx = 0x00000002;  //< to by used as flag by RComm::ResetBuffers
   180 /** Port name. Used by TSerialInfo::iName. 
   153 /** Port name. Used by TSerialInfo::iName. 
   181 
   154 
   182 @publishedAll	
   155 @publishedAll	
   183 @released
   156 @released
   184 */
   157 */
   212 */
   185 */
   213 	{
   186 	{
   214 public:
   187 public:
   215 	/** Description of the CSY meant only for human reading. It
   188 	/** Description of the CSY meant only for human reading. It
   216 	can be up to KMaxPortDescription (48) characters long. */
   189 	can be up to KMaxPortDescription (48) characters long. */
   217 	TPortDescription iDescription; ///< description of the port (CSY)
   190 	TPortDescription iDescription; //< description of the port (CSY)
   218 	/** The short name of the port (Port Prefix). This is used in calls to RComm::Open(). It can be up to 
   191 	/** The short name of the port (Port Prefix). This is used in calls to RComm::Open(). It can be up to 
   219 	KMaxPortName (i.e. 16) characters long. */
   192 	KMaxPortName (i.e. 16) characters long. */
   220 	TPortName iName;               ///< name of the port
   193 	TPortName iName;               //< name of the port
   221 	TUint iLowUnit;                ///< The lowest port number supported by the serial module
   194 	TUint iLowUnit;                //< The lowest port number supported by the serial module
   222 	TUint iHighUnit;               ///< the highest port number supported by the serial module
   195 	TUint iHighUnit;               //< the highest port number supported by the serial module
   223 	};
   196 	};
   224 
   197 
   225 /**
   198 /**
   226 Specifies the DTE/DCE role in which a port is opened.
   199 Specifies the DTE/DCE role in which a port is opened.
   227 
   200 
   355 
   328 
   356 #ifdef _DEBUG_DEVCOMM
   329 #ifdef _DEBUG_DEVCOMM
   357 	IMPORT_C TInt RComm::DebugInfo(TDes8& aDes);
   330 	IMPORT_C TInt RComm::DebugInfo(TDes8& aDes);
   358 #endif
   331 #endif
   359 private:
   332 private:
   360 	TPtr8 iSignalsNotification; ///< pointer to the signals to be changed during notification
   333 	TPtr8 iSignalsNotification; //< pointer to the signals to be changed during notification
   361 	TPtr8 iFlowNotification;    ///< pointer to the flow control to be changed during notification
   334 	TPtr8 iFlowNotification;    //< pointer to the flow control to be changed during notification
   362 	};
   335 	};
   363 	
   336 	
       
   337 
       
   338 #ifndef SYMBIAN_ENABLE_SPLIT_HEADERS
       
   339 #include <c32comm_internal.h>
       
   340 #endif
       
   341 
   364 #include <c32comm.inl>
   342 #include <c32comm.inl>
   365 
   343 
   366 #endif // C32COMM_H
   344 #endif // C32COMM_H