systemswstubs/examplecommonisc/IscApi/inc/IscDefinitions.h
changeset 0 0ce1b5ce9557
equal deleted inserted replaced
-1:000000000000 0:0ce1b5ce9557
       
     1 /*
       
     2 * Copyright (c) 2002-2004 Nokia Corporation and/or its subsidiary(-ies). 
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:  ?Description
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef ISCDEFINITIONS_H
       
    21 #define ISCDEFINITIONS_H
       
    22 
       
    23 //  INCLUDES
       
    24 #ifndef __KERNEL_MODE__
       
    25 #include <e32std.h>
       
    26 #else
       
    27 #include <kernel.h>
       
    28 #endif // __KERNEL_MODE__
       
    29 
       
    30 // CONSTANTS
       
    31 const TInt KIscNumberOfUnits = 64;
       
    32 
       
    33 // uncomment definition to support channel sharing
       
    34 //#define ISC_CHANNEL_SHARING_IN_USE
       
    35 
       
    36 #ifdef ISC_CHANNEL_SHARING_IN_USE
       
    37 // amount of how many users one channel can have
       
    38 const TInt KIscMaxNumberOfChannelSharers = 3;
       
    39 #else
       
    40 const TInt KIscMaxNumberOfChannelSharers = 1;
       
    41 #endif // ISC_CHANNEL_SHARING_IN_USE
       
    42 
       
    43 const TInt KIscIniLineLength = 256;
       
    44 
       
    45 // constant used by DIscMultiplexerBase::GetFrameInfo, 
       
    46 // TIscFrameInfo.DataMode
       
    47 enum TIscFrameType
       
    48     {
       
    49     EIscNonDataFrame,
       
    50     EIscDataFrame
       
    51     };
       
    52 
       
    53 // frame concatenation enumeration
       
    54 enum TIscFrameConcatenation
       
    55     {
       
    56     EIscNoConcatenation,
       
    57     EIscConcatenationDataStart,
       
    58     EIscConcatenationData,
       
    59     EIscConcatenationDataEnd
       
    60     };
       
    61 
       
    62 /** Connection status enumeration. 
       
    63 @see RIscApi::NotifyConnectionStatus
       
    64 @see RIscApi::ConnectionStatus
       
    65 @publishedPartner
       
    66 @released
       
    67 */
       
    68 enum TIscConnectionStatus
       
    69     {
       
    70     /**
       
    71     The connection is functional.
       
    72     */
       
    73     EIscConnectionOk=0,
       
    74     /**
       
    75     The connection to baseband modem is not functional.
       
    76     */
       
    77     EIscConnectionNotOk
       
    78     };
       
    79 
       
    80 /** Flow control status enumeration. 
       
    81 @see RIscApi::FlowControlStatus
       
    82 @see RIscApi::NotifyFlowControl
       
    83 @publishedPartner
       
    84 @released
       
    85 */
       
    86 enum TIscFlowControlStatus
       
    87     {
       
    88     /**
       
    89     Flow control is not active; i.e. the client can operate normally.
       
    90     */
       
    91     EIscFlowControlOff=0,
       
    92     /**
       
    93     Flow control is invoked, meaning that the user may no longer send data until the status is back to EIscFlowControlOff.
       
    94     */
       
    95     EIscFlowControlOn,
       
    96     /**
       
    97     Indicates that other end has finished sending data or the data connection has been removed.
       
    98     */
       
    99     EIscTransmissionEnd
       
   100     };
       
   101 
       
   102 const TUint16 KIscControlChannel = 0x00;
       
   103 const TUint16 KIscFirstChannel = 0x01;
       
   104 const TUint16 KIscLastChannel = KIscNumberOfUnits-1;   // Maximun number of channels in ISC driver framework
       
   105 
       
   106 const TUint16 KIscMaxChannelsInLdd = 0x20; // 32
       
   107 
       
   108 const TUint16 KIscFrameReceiverNotFound = 0x500;
       
   109 
       
   110 const TUint16 KIscAllChannels = 0x100;
       
   111 
       
   112 
       
   113 // MACROS
       
   114 
       
   115 // DATA TYPES
       
   116 
       
   117 // enumerations for asynchronous requests in ISC
       
   118 enum TIscAsyncRequest
       
   119     {
       
   120     EIscAsyncInitializeModemInterface,
       
   121     EIscAsyncOpen,
       
   122     EIscAsyncLastKernelServerContext, // last kernel server context call
       
   123     EIscAsyncSend,
       
   124     EIscAsyncReceive,
       
   125     EIscAsyncDataSend,
       
   126     EIscAsyncDataReceive,
       
   127     EIscAsyncNotifyConnectionStatus,
       
   128     EIscAsyncNotifyFlowControlStatus,
       
   129     EIscAsyncCustomOperation1,
       
   130     EIscAsyncCustomOperation2,
       
   131     EIscAsyncCustomOperation3,
       
   132     EIscAsyncCustomOperation4,
       
   133     EIscAsyncCustomOperation5,
       
   134     EIscAsyncClose,
       
   135     EIscAsyncLast
       
   136     }; 
       
   137 
       
   138 // enumerations for synchronous requests in ISC
       
   139 enum TIscSyncRequest
       
   140     {
       
   141     EIscSyncClose = EIscAsyncLast,  // 15
       
   142     EIscSyncLastKernelServerContext,// last kernel server context call
       
   143     EIscSyncSend,
       
   144     EIscSyncDataSend,
       
   145     EIscSyncGetConnectionStatus,
       
   146     EIscSyncGetFlowControlStatus,
       
   147     EIscSyncGetChannelInfo,
       
   148     EIscSyncGetMaximunDataSize,
       
   149     EIscSyncCustomOperation1,
       
   150     EIscSyncCustomOperation2,
       
   151     EIscSyncCustomOperation3,
       
   152     EIscSyncCustomOperation4,
       
   153     EIscSyncCustomOperation5,
       
   154     EIscSyncResetBuffers,
       
   155     EIscSyncLast
       
   156     };
       
   157 
       
   158 // enumerations for canceling asynchronous requests in ISC
       
   159 enum TIscCancelRequest
       
   160     {
       
   161     EIscCancelAsyncInitialize = EIscSyncLast,
       
   162     EIscCancelAsyncOpen,
       
   163     EIscCancelAsyncSend,
       
   164     EIscCancelAsyncDataSend,
       
   165     EIscCancelAsyncReceive,
       
   166     EIscCancelAsyncDataReceive,
       
   167     EIscCancelAsyncNotifyConnection,
       
   168     EIscCancelAsyncNotifyFlowControl,
       
   169     EIscCancelAsyncCustomOperation1,
       
   170     EIscCancelAsyncCustomOperation2,
       
   171     EIscCancelAsyncCustomOperation3,
       
   172     EIscCancelAsyncCustomOperation4,
       
   173     EIscCancelAsyncCustomOperation5,
       
   174     EIscCancelAsyncClose,
       
   175     EIscCancelLast
       
   176     };
       
   177 
       
   178 // Panic values used in ASSERT_RESET macro
       
   179 // Can be seen as "FAULT [component] [TIscIfFault]" in trace or crash debugger
       
   180 // e.g "FAULT IscDriver: 0x1"
       
   181 enum TIscIfFault
       
   182     {
       
   183     EIscPanicSetChannel=1,              // 1
       
   184     EIscPanicCreateLogicalDevice,       // 2
       
   185     EIscMainRcvBufferOverflow,          // 3
       
   186     EIscNotAllowedCallToDoRequest,      // 4
       
   187     EIscNotAllowedCallToDoCancel,       // 5
       
   188     EIscUnknownCommand,                 // 6
       
   189     EIscNullIscDriverPointer,           // 7
       
   190     EIscMemoryAllocationFailure,        // 8
       
   191     EIscRequestAlreadyActive,           // 9    
       
   192     EIscDriverNotFound,                 // 10
       
   193     EIscLogicalDevicesNotFound,         // 11
       
   194     EIscMultiplexerNotFound,            // 12
       
   195     EIscDataTransmissionDriverNotFound, // 13
       
   196     EIscMainRcvBufferInitialize,        // 14
       
   197     EIscBufferAllocationFailure,        // 15
       
   198     EIscControlBufferOverflow,          // 16
       
   199     EIscInvalidChannelPtr               // 17 only in debug mode
       
   200     }; 
       
   201 
       
   202 // FUNCTION PROTOTYPES
       
   203 
       
   204 // FORWARD DECLARATIONS
       
   205 
       
   206 // CLASS DECLARATION
       
   207 
       
   208 #endif      // ISCDEFINITIONS_H
       
   209             
       
   210 // End of File