#ifndef AEEQOSFLOW_H
#define AEEQOSFLOW_H
/*===========================================================================

FILE: AEEQoSFlow.h

SERVICES: AEE Quality of Service Flow definitions


DESCRIPTION: Base level definitions, typedefs, etc. for AEE QoS Flow

        Copyright © 1999-2004 QUALCOMM Incorporated.
               All Rights Reserved.
            QUALCOMM Proprietary/GTDR
===========================================================================*/

#include "AEECLSID_QOSFLOW.bid"
#include "AEEWebOpts.h"

//**********************************************************************
//
// IQOSFLOW Interface
//
//**********************************************************************
typedef          WebOpt AEEQoSFlowOpt;
typedef struct IQoSFlow IQoSFlow;


//
// IP Traffic Class   
//
typedef uint32 AEEQOSFLOW_IPTrafficClass;

// IP Traffic Class values:
#define  AEEQOSFLOW_TRAFFIC_CLASS_CONVERSATIONAL   0
#define  AEEQOSFLOW_TRAFFIC_CLASS_STREAMING        1
#define  AEEQOSFLOW_TRAFFIC_CLASS_INTERACTIVE      2
#define  AEEQOSFLOW_TRAFFIC_CLASS_BACKGROUND       3

//
// Latency   
//
typedef uint32 AEEQOSFLOW_Latency;

//
// Latency Variance   
//
typedef uint32 AEEQOSFLOW_LatencyVariance;

//
// Min Policed Packet Size , not applicable to UMTS
//
typedef uint32 AEEQOSFLOW_MinPolicedPacketSize;

//
// Max Allowed Packet Size , not applicable to UMTS
//
typedef uint32 AEEQOSFLOW_MaxAllowedPacketSize;

//
// UMTS Residual Bit Error Rate , only applicable to UMTS
//
typedef uint32 AEEQOSFLOW_UMTSResidualBitErrorRate;

// UMTS Residual Bit Error Rate values:
#define AEEQOSFLOW_UMTS_RES_BIT_ERR_RATE1      1        // 5*10-2
#define AEEQOSFLOW_UMTS_RES_BIT_ERR_RATE2      2        // 1*10-2
#define AEEQOSFLOW_UMTS_RES_BIT_ERR_RATE3      3        // 5*10-3
#define AEEQOSFLOW_UMTS_RES_BIT_ERR_RATE4      4        // 4*10-3
#define AEEQOSFLOW_UMTS_RES_BIT_ERR_RATE5      5        // 1*10-3
#define AEEQOSFLOW_UMTS_RES_BIT_ERR_RATE6      6        // 1*10-4
#define AEEQOSFLOW_UMTS_RES_BIT_ERR_RATE7      7        // 1*10-5
#define AEEQOSFLOW_UMTS_RES_BIT_ERR_RATE8      8        // 1*10-6
#define AEEQOSFLOW_UMTS_RES_BIT_ERR_RATE9      9        // 6*10-8
#define AEEQOSFLOW_UMTS_RES_BIT_ERR_RATE10     10       // Reserved

//
// UMTS Traffic Priority , only applicable to UMTS
//
typedef uint32 AEEQOSFLOW_UMTSTrafficPriority;

// UMTS Traffic Priority values:
#define AEEQOSFLOW_UMTS_TRAFFIC_HANDLING_PRI1        1      // Priority Level 1
#define AEEQOSFLOW_UMTS_TRAFFIC_HANDLING_PRI2        2      // Priority Level 2
#define AEEQOSFLOW_UMTS_TRAFFIC_HANDLING_PRI3        3      // Priority Level 3

//
// CDMA Profile Id , only applicable to UMTS
//
typedef uint32 AEEQOSFLOW_CDMAProfileId;

// CDMA Profile Id values:
#define AEEQOSFLOW_CDMA_QOS_PROFILE_1        0x01       // Profile 1

//
// Data Rate MIN MAX 
//
typedef struct
{
   uint32 max_rate;           // bps, Rmax
   uint32 guaranteed_rate;    // bps, Rg
} AEEQOSFLOW_DataRateMinMax;


//
// Data Rate Token Bucket 
//
typedef struct
{
   uint32 peak_rate;          // bps, Rp
   uint32 token_rate;         // bps, Rb
   uint32 size;               // bytes, B
} AEEQOSFLOW_DataRateTokenBucket;

//
// Packet Error Rate  
//
typedef struct
{
   uint16      multiplier;    // Multiplication factor, m
   uint16      exponent;      // -ve of Base 10 exponent, p

} AEEQOSFLOW_PacketErrorRate;


//
// Defines to set various Quality of Service Flow Options
//

// Define for selecting a unique WEBOPT_VARIABLE value, based on id.
#define WEBOPT_VARIABLE_UNIQUE(id)                 (WEBOPT_VARIABLE + (id << 12))

// pVals are 32-bit quantities, no need to copy
#define AEEQOSFLOWOPT_IP_TRAFFIC_CLASS             (WEBOPT_32BIT + 0)
#define AEEQOSFLOWOPT_LATENCY                      (WEBOPT_32BIT + 1)
#define AEEQOSFLOWOPT_LATENCY_VARIANCE             (WEBOPT_32BIT + 2)
#define AEEQOSFLOWOPT_MIN_POLICED_PACKET_SIZE      (WEBOPT_32BIT + 3)
#define AEEQOSFLOWOPT_MAX_ALLOWED_PACKET_SIZE      (WEBOPT_32BIT + 4)
#define AEEQOSFLOWOPT_UMTS_RESIDUAL_BIT_ERROR_RATE (WEBOPT_32BIT + 5)
#define AEEQOSFLOWOPT_UMTS_TRAFFIC_PRIORITY        (WEBOPT_32BIT + 6)
#define AEEQOSFLOWOPT_CDMA_PROFILE_ID              (WEBOPT_32BIT + 7)

// pVals are pointers to opaque, copyable structures, 
// the low 12 bits of the id specify length of the option, in bytes.

#define AEEQOSFLOWOPT_DATA_RATE_MIN_MAX            (WEBOPT_VARIABLE_UNIQUE(0) \
                                                    + sizeof(AEEQOSFLOW_DataRateMinMax))

#define AEEQOSFLOWOPT_DATA_RATE_TOKEN_BUCKET       (WEBOPT_VARIABLE_UNIQUE(1) \
                                                    + sizeof(AEEQOSFLOW_DataRateTokenBucket))

#define AEEQOSFLOWOPT_PACKET_ERROR_RATE            (WEBOPT_VARIABLE_UNIQUE(2) \
                                                    + sizeof(AEEQOSFLOW_PacketErrorRate))

#define AEEQOSFLOWOPT_END                          WEBOPT_END
#define AEEQOSFLOWOPT_ANY                          WEBOPT_ANY
#define AEEQOSFLOWOPT_COPYOPTS                     WEBOPT_COPYOPTS


// Define IQoSFlow interface methods
AEEINTERFACE(IQoSFlow)
{
   INHERIT_IWebOpts(IQoSFlow);
   int      (*ExtFunc)(IQoSFlow* po, int nOption, uint32 dwVal);
};

#define IQOSFLOW_AddRef(p)                       AEEGETPVTBL((p),IQoSFlow)->AddRef((p))
#define IQOSFLOW_Release(p)                      AEEGETPVTBL((p),IQoSFlow)->Release((p))
#define IQOSFLOW_QueryInterface(p,clsid,pp)      AEEGETPVTBL((p),IQoSFlow)->QueryInterface((p),(clsid),(pp))
#define IQOSFLOW_AddOpt(p,o)                     AEEGETPVTBL((p),IQoSFlow)->AddOpt((p),(o))
#define IQOSFLOW_RemoveOpt(p,i)                  AEEGETPVTBL((p),IQoSFlow)->RemoveOpt((p),(i),(0))
#define IQOSFLOW_RemoveOptAtIndex(p,n)           AEEGETPVTBL((p),IQoSFlow)->RemoveOpt((p),(WEBOPT_ANY),(n))
#define IQOSFLOW_GetOpt(p,i,o)                   AEEGETPVTBL((p),IQoSFlow)->GetOpt((p),(i),(0),(o))
#define IQOSFLOW_GetOptAtIndex(p,n,o)            AEEGETPVTBL((p),IQoSFlow)->GetOpt((p),(WEBOPT_ANY),(n),(o))

  
/*=====================================================================
  DATA STRUCTURE DOCUMENTATION
=======================================================================
AEEQOSFLOW_IPTrafficClass

Description:
  Specifies the overall class of traffic to which the IP flow belongs.
  This parameter provides hints to the network about traffic characteristics
  and helps it setup the physical channels appropriately.

Definition:

enum {
   AEEQOSFLOW_IP_TRAFFIC_CLASS_CONVERSATIONAL,  ~
   AEEQOSFLOW_IP_TRAFFIC_CLASS_STREAMING,       ~
   AEEQOSFLOW_IP_TRAFFIC_CLASS_INTERACTIVE,     ~
   AEEQOSFLOW_IP_TRAFFIC_CLASS_BACKGROUND       ~
};
typedef uint32 AEEQOSFLOW_TrafficClass;

Members:
   AEEQOSFLOW_IP_TRAFFIC_CLASS_CONVERSATIONAL: 
   Conversation traffic is characterized by a low transfer time because of the
   conversational nature of the traffic and limited delay variation of the
   end-to-end flow, to preserve the time relation (variation) between information
   entities of the stream.  ~
   An example of an application bearing such traffic is voice or video conferencing.  ~
   Fundamental characteristics for QOS:
   - Preserve time relation (variation) between information entities of the stream ie
   - Stringent and low delay

   AEEQOSFLOW_IP_TRAFFIC_CLASS_STREAMING:
   Streaming traffic is characterized by a limited delay variation of the
   end-to-end flow, to preserve the time relation (variation) between information
   entities of the stream.  ~
   The highest acceptable delay variation is application dependent.  ~ 
   An example of an application bearing such traffic is video streaming. ~
   Fundamental characteristics for QOS:
   - Preserve time relation (variation) between information entities of the stream 

   AEEQOSFLOW_IP_TRAFFIC_CLASS_INTERACTIVE:
   Interactive traffic is characterised by the request response pattern of the
   end-user and round trip delay time is therefore one of the key attributes.
   Another characteristic is that the content of the packets shall be transparently
   transferred. ~
   An example of an application bearing such traffic is web browsing. ~
   Fundamental characteristics for QoS: ~
   - Request response pattern
   - Low round trip delay
   - Preserve payload content

   AEEQOSFLOW_IP_TRAFFIC_CLASS_BACKGROUND:
   Background traffic is more or less delivery time insensitive although it requires
   that the content of the packets are transparently transferred. ~
   An example of an application bearing such traffic is background email download. ~
   Fundamental characteristics for QoS:
   - The destination is not expecting the data within a certain time 
   - Preserve payload content 

Comments:
   None

Version:
   Introduced BREW Client 3.1

See Also:
   None

=======================================================================
AEEQOSFLOW_DataRateMinMax

Description:
   Specifies the rate at which the data is transmitted over the network. ~
   Data rate can be specified in one of the two ways - a set of maximum rate
   and guaranteed rate values or in the token bucket parameter style.  ~
   This paramter is used for specifying the set of maximum rate and guaranteed
   rate values.

Definition:

typedef struct
{
   uint32 max_rate;           // bps, Rmax ~
   uint32 guaranteed_rate;    // bps, Rg   ~
} AEEQOSFLOW_DataRateMinMax;

Members:
   max_rate: Maximum required data rate (in bits per second).  ~
   guaranteed_rate: Minimum guaranteed data rate (in bits per second).

Comments:
   A QoS Flow can only contain a single Data Rate specification.   ~
   Either an AEEQOSFLOW_DataRateMinMax or an AEEQOSFLOW_DataRateTokenBucket
   can be specified.

Version:
   Introduced BREW Client 3.1

See Also:
   AEEQOSFLOW_DataRateTokenBucket

=======================================================================
AEEQOSFLOW_DataRateTokenBucket

Description:
   Specifies the rate at which the data is transmitted over the network, ~
   Data rate can be specified in one of the two ways - a set of maximum rate
   and guaranteed rate values or in the token bucket parameter style. ~
   This paramter is used for specifying the set of token bucket parameter values.

Definition:

typedef struct
{
   uint32 peak_rate;          // bps, Rp  ~
   uint32 token_rate;         // bps, Rb  ~
   uint32 size;               // bytes, B ~
} AEEQOSFLOW_DataRateTokenBucket;

Members:
   peak_rate: Maximum rate at which the data can be transmitted when token
              bucket is full (in bits per second) ~
   token_rate: Rate at which the tokens will be put in the token bucket (in 
               bits per second). A token is required to be present in the
               bucket to send a byte of data.  ~
   size: Maximum tokens that can be accumulated at any instance (in bytes).  
         This controls the size of the burst that is allowed at any given time.  ~

Comments:
   A QoS Flow can only contain a single Data Rate specification. 
   Either an AEEQOSFLOW_DataRateMinMax or an AEEQOSFLOW_DataRateTokenBucket
   can be specified.

Version:
   Introduced BREW Client 3.1

See Also:
   AEEQOSFLOW_DataRateMinMax

=======================================================================
AEEQOSFLOW_Latency

Description:
   Specifies the maximum delay (in milliseconds) that can be tolerated by an
   IP packet during the transfer through the RAN.  ~
   The delay is defined as the time from a request to transfer the packet on MS
   to the time when it is received by the IP node across RAN which is serving
   the data session (e.g. GGSN or PDSN)

Definition:

typedef uint32 AEEQOSFLOW_Latency;

Members:
   None

Comments:
   None

Version:
   Introduced BREW Client 3.1

See Also:
   None

=======================================================================
AEEQOSFLOW_LatencyVariance

Description:
   Specifies the difference between the maximum and minimum delay
   (in milliseconds) that can be tolerated by an IP packet during the transfer
   through the RAN. ~
   This is essentially the maximum tolerated delay jitter. ~
   This parameter is not supported by UMTS network and hence is ignored if the
   underlying network is UMTS.

Definition:

typedef uint32 AEEQOSFLOW_LatencyVariance;

Members:
   None

Comments:
   None

Version:
   Introduced BREW Client 3.1

See Also:
   None

=======================================================================
AEEQOSFLOW_PacketErrorRate

Description:
   Specifies the maximum packet error rate that can be tolerated by an IP flow.
   The error rate is defined as a ratio of packets received in error to total
   packets transmitted and is specified by two parameters - a multiplier and a
   negative base 10 exponent.  
   So the packet error rate is defined as,
	E = m * 10 ** (-p)
   The network technology may use an alternate packet error rate value that it
   is capable of supporting nearest to the one specified.

Definition:

typedef struct
{
   uint16      multiplier;  ~
   uint16      exponent;

} AEEQOSFLOW_PacketErrorRate;

Members:
   multiplier: Multiplication factor, m. ~
   exponent: -ve of Base 10 exponent, p. ~

Comments:
   None

Version:
   Introduced BREW Client 3.1

See Also:
   None

=======================================================================
AEEQOSFLOW_MinPolicedPacketSize

Description:
   Specifies defines the minimum packet size (in bytes) that will be policed
   for QOS guarantees. This option is not supported by UMTS network and hence
   is ignored if the underlying network is UMTS.

Definition:

typedef uint32 AEEQOSFLOW_MinPolicedPacketSize;

Members:
   None

Comments:
   None

Version:
   Introduced BREW Client 3.1

See Also:
   None

=======================================================================
AEEQOSFLOW_MaxAllowedPacketSize

Description:
   Specifies the maximum packet size (in bytes) allowed in the IP flow.

Definition:

typedef uint32 AEEQOSFLOW_MaxAllowedPacketSize;

Members:
   None

Comments:
   None

Version:
   Introduced BREW Client 3.1

See Also:
   None

=======================================================================
AEEQOSFLOW_UMTSResidualBitErrorRate

Description:
  Specifies the undetected bit error ratio for each IP flow in the delivered
  packets. For equal error protection, only one value is needed. ~
  If no error detection is requested for a subflow, residual bit error ratio
  indicates the bit error ratio in that subflow of the delivered SDUs.
  This parameter is only supported by UMTS network and is ignored by all other
  network technologies

Definition:

enum {
   AEEQOSFLOW_UMTS_RES_BIT_ERR_RATE1 = 1, ~
   AEEQOSFLOW_UMTS_RES_BIT_ERR_RATE2 = 2, ~
   AEEQOSFLOW_UMTS_RES_BIT_ERR_RATE3 = 3, ~
   AEEQOSFLOW_UMTS_RES_BIT_ERR_RATE4 = 4, ~
   AEEQOSFLOW_UMTS_RES_BIT_ERR_RATE5 = 5, ~
   AEEQOSFLOW_UMTS_RES_BIT_ERR_RATE6 = 6, ~
   AEEQOSFLOW_UMTS_RES_BIT_ERR_RATE7 = 7, ~
   AEEQOSFLOW_UMTS_RES_BIT_ERR_RATE8 = 8, ~
   AEEQOSFLOW_UMTS_RES_BIT_ERR_RATE9 = 9, ~
   AEEQOSFLOW_UMTS_RES_BIT_ERR_RATE10= 10 ~
};
typedef uint32 AEEQOSFLOW_UMTSResidualBitErrorRate;

Members:
   AEEQOSFLOW_UMTS_RES_BIT_ERR_RATE1:  5*10-2 ~
   AEEQOSFLOW_UMTS_RES_BIT_ERR_RATE2:  1*10-2 ~
   AEEQOSFLOW_UMTS_RES_BIT_ERR_RATE3:  5*10-3 ~
   AEEQOSFLOW_UMTS_RES_BIT_ERR_RATE4:  4*10-3 ~
   AEEQOSFLOW_UMTS_RES_BIT_ERR_RATE5:  1*10-3 ~
   AEEQOSFLOW_UMTS_RES_BIT_ERR_RATE6:  1*10-4 ~
   AEEQOSFLOW_UMTS_RES_BIT_ERR_RATE7:  1*10-5 ~
   AEEQOSFLOW_UMTS_RES_BIT_ERR_RATE8:  1*10-6 ~
   AEEQOSFLOW_UMTS_RES_BIT_ERR_RATE9:  6*10-8 ~
   AEEQOSFLOW_UMTS_RES_BIT_ERR_RATE10: Reserved ~

Comments:
   None

Version:
   Introduced BREW Client 3.1

See Also:
   None

=======================================================================
AEEQOSFLOW_UMTSTrafficPriority

Description:
  Specifies the relative priority between various subflows of an IP flow.
  The parameter is only supported by UMTS network and is ignored by all other
  network technologies. ~
  The Traffic handling priority value is ignored if the Traffic Class is
  Conversation class, Streaming class or Background class.  ~
  Within the interactive class, there is a definite need to differentiate
  between bearer qualities.	~
  This is handled by using the traffic handling priority attribute,
  to allow network to schedule traffic accordingly. ~
  By definition, priority is an alternative to absolute guarantees,
  and thus these two attribute types cannot be used together for a single bearer.

Definition:

enum {
   AEEQOSFLOW_UMTS_TRAFFIC_HANDLING_PRI1 = 1, ~
   AEEQOSFLOW_UMTS_TRAFFIC_HANDLING_PRI2 = 2, ~
   AEEQOSFLOW_UMTS_TRAFFIC_HANDLING_PRI3 = 3  ~

};
typedef uint32 AEEQOSFLOW_UMTSTrafficPriority;

Members:
   AEEQOSFLOW_UMTS_TRAFFIC_HANDLING_PRI1: Priority Level 1 ~
   AEEQOSFLOW_UMTS_TRAFFIC_HANDLING_PRI2: Priority Level 2 ~
   AEEQOSFLOW_UMTS_TRAFFIC_HANDLING_PRI3: Priority Level 3 ~

Comments:
   None

Version:
   Introduced BREW Client 3.1

See Also:
   None

=======================================================================
AEEQOSFLOW_CDMAProfileId

Description:
  3GPP defines a set of standard flow spec parameters for specific applications
  described by a profile id.  ~
  The parameter is only supported by CDMA network and is ignored by all other
  network technologies.  ~
  If this parameter is specified and the underlying network is CDMA, all other
  flow spec parameters are ignored and the profile id is sent to the network
  to request predefined flow spec. ~ 
  Applications willing to work seamlessly on different network technologies
  including CDMA should also specify other flow spec parameters in addition
  to profile id. ~
  Otherwise if only profile id is specified and the underlying
  network technology is something other than CDMA, then it may not be able to
  request any specific QOS. ~
  For best results the flow spec parameter values specify should correspond to
  the values defined by CDMA standard for the profile id. ~
  This can be obtained using API dss_get_flow_spec_params_by_profile() passing
  it the profile id and the rule id for 3GPP.

Definition:

enum {
   AEEQOSFLOW_CDMA_QOS_PROFILE_1 = 1
};
typedef uint32 AEEQOSFLOW_CDMAProfileId;

Members:
   AEEQOSFLOW_CDMA_QOS_PROFILE_1: Profile 1

Comments:
   None

Version:
   Introduced BREW Client 3.1

See Also:
   None

=======================================================================

=======================================================================
AEEQoSFlowOpt

Description:
   Holds an id, value pair for AEEQoSFlow.

Definition:
   typedef WebOpt AEEQoSFlowOpt;

Members:
   int32  nId: option id, chosen from one of the QoS Flow options
   void *pVal: option value, depends on nId

Comments:
   AEEQoSFlowOpt structures indicate various parameters of an AEEQoSFlow.
   The structures, when passed to AddOpt, are not themselves copied,
   the contents are copied out.

Version:
   Introduced BREW Client 3.1

See Also:
   None

=======================================================================
AEEQOSFLOWOPT_

The prefix AEEQOSFLOWOPT_ is used for QoS Flow options.
=======================================================================

QoS Flow options

Description:
   QoS Flow options specifies the paramters of the QoS Flow, and hence 
   define the QoS flow requirements.

Definition:
   #define AEEQOSFLOWOPT_IP_TRAFFIC_CLASS             (WEBOPT_32BIT + 0)

   #define AEEQOSFLOWOPT_LATENCY                      (WEBOPT_32BIT + 1)

   #define AEEQOSFLOWOPT_LATENCY_VARIANCE             (WEBOPT_32BIT + 2)

   #define AEEQOSFLOWOPT_MIN_POLICED_PACKET_SIZE      (WEBOPT_32BIT + 3)

   #define AEEQOSFLOWOPT_MAX_ALLOWED_PACKET_SIZE      (WEBOPT_32BIT + 4)

   #define AEEQOSFLOWOPT_UMTS_RESIDUAL_BIT_ERROR_RATE (WEBOPT_32BIT + 5)

   #define AEEQOSFLOWOPT_UMTS_TRAFFIC_PRIORITY        (WEBOPT_32BIT + 6)

   #define AEEQOSFLOWOPT_CDMA_PROFILE_ID              (WEBOPT_32BIT + 7)

   #define AEEQOSFLOWOPT_DATA_RATE_MIN_MAX            (WEBOPT_VARIABLE_UNIQUE(0) 
                                                       + sizeof(AEEQOSFLOW_DataRateMinMax))

   #define AEEQOSFLOWOPT_DATA_RATE_TOKEN_BUCKET       (WWEBOPT_VARIABLE_UNIQUE(1) 
                                                       + sizeof(AEEQOSFLOW_DataRateTokenBucket))

   #define AEEQOSFLOWOPT_PACKET_ERROR_RATE            (WEBOPT_VARIABLE_UNIQUE(2) 
                                                       + sizeof(AEEQOSFLOW_PacketErrorRate))

   #define AEEQOSFLOWOPT_END                          WEBOPT_END

   #define AEEQOSFLOWOPT_ANY                          WEBOPT_ANY

   #define AEEQOSFLOWOPT_COPYOPTS                     WEBOPT_COPYOPTS

Members:
   AEEQOSFLOWOPT_IP_TRAFFIC_CLASS: 
   Traffic class value (see AEEQOSFLOW_IPTrafficClass)

   AEEQOSFLOWOPT_LATENCY: 
   Latency value (see AEEQOSFLOW_Latency)

   AEEQOSFLOWOPT_LATENCY_VARIANCE: 
   Latency Variance option (see AEEQOSFLOW_LatencyVariance)

   AEEQOSFLOWOPT_MIN_POLICED_PACKET_SIZE: 
   Min Packet size option (see AEEQOSFLOW_MinPolicedPacketSize)

   AEEQOSFLOWOPT_MAX_ALLOWED_PACKET_SIZE: 
   Max Packet size option (see AEEQOSFLOW_MaxAllowedPacketSize)

   AEEQOSFLOWOPT_UMTS_RESIDUAL_BIT_ERROR_RATE: 
   Bit Error rate option (see AEEQOSFLOW_UMTSResidualBitErrorRate)

   AEEQOSFLOWOPT_UMTS_TRAFFIC_PRIORITY: 
   Traffic priority option (see AEEQOSFLOW_UMTSTrafficPriority)

   AEEQOSFLOWOPT_CDMA_PROFILE_ID: 
   CDMA profile id option (see AEEQOSFLOW_CDMAProfileId)

   AEEQOSFLOWOPT_DATA_RATE_MIN_MAX: 
   Date Rate option (see AEEQOSFLOW_DataRateMinMax )

   AEEQOSFLOWOPT_DATA_RATE_TOKEN_BUCKET: 
   Date Rate option (see AEEQOSFLOW_DataRateTokenBucket)

   AEEQOSFLOWOPT_PACKET_ERROR_RATE: 
   Packet Error Rate option (see AEEQOSFLOW_UMTSResidualBitErrorRate)

Comments:
   1. Applications must specify only one of AEEQOSFLOWOPT_DATA_RATE_MIN_MAX and 
      AEEQOSFLOWOPT_DATA_RATE_TOKEN_BUCKET options.
      AddOpt() for one of theese options will fail if the other one already exists
      in the IQoSFlow.

      Specifying both will result in the second one's AddOpt failing

   2. Applications must specify not more the one of each option.
      AddOpt() will fail for an option that already exists in the IQoSFlow.

Version:
   Introduced BREW Client 3.1

See Also:
   None

=======================================================================

=======================================================================
  INTERFACES   DOCUMENTATION
=======================================================================

Interface Name: IQoSFlow

Description:
   IQoSFlow interface encapsulates a Quality of Service Flow specification
   where the flow spec defines the treatment required for an IP flow, i.e.
   QoS paramteres such as required bit rate etc. ~
   An IQoSFlow interface instance is obtained via the ISHELL_CreateInstance()
   mechanism.

=============================================================================

IQOSFLOW_AddRef()

Description:
   This method increments the reference count of the IQoSFlow Interface object.
   This allows the object to be shared by multiple callers. The object is freed when
   the reference count reaches 0 (zero).

Prototype:
   uint32 IQOSFLOW_AddRef(IQoSFlow * po)

Parameters:
   po [in]: Pointer to the IQoSFlow Interface object

Return Value:
   Incremented reference count for the object

Comments:
   A valid object returns a positive reference count.

Side Effects:
   None

Version:
   Introduced BREW Client 3.1

See Also:
   IQOSFLOW_Release()

=============================================================================

IQOSFLOW_Release()

Description:
   This method decrements the reference count of an object. The object is freed
   from memory and is no longer valid once the reference count reaches 0 (zero).

Prototype:
   uint32 IQOSFLOW_Release(IQoSFlow * po)

Parameters:
   po [in]: Pointer to the IQoSFlow Interface object

Return Value:
   Decremented reference count for the object. The object has been freed and is no
   longer valid if 0 (zero) is returned.

Comments:
   None

Side Effects:
   None

See Also:
   IQOSFLOW_AddRef()

==============================================================================

Function: IQOSFLOW_QueryInterface()

Description:

   This method retrieves a pointer to an interface conforming to the
   definition of the specified class ID.  This can be used to query for
   extended functionality, like future versions or proprietary extensions.

   Upon a successful query, the interace is returned AddRef'ed.  The caller is
   responsible for calling Release() at some point in the future.  One
   exception is when the pointer returned is not an interface pointer.  In
   that case, the memory will share the lifetime of the object being queried,
   and the returned pointer will not be used to free or release the object.

Prototype:

   int IQOSFLOW_QueryInterface(IQoSFlow *po, AEECLSID id, void **p)

Parameters:
   po [in]: Pointer to IQoSFlow interface
   id [in]: A globally unique id to identify the entity (interface or data) that we
            are trying to query.
   p [out]: Pointer to the data or interface that we want to retrieve.  If the interface
            is not available, this is set to NULL.

Return Value:

   Return SUCCESS on success,

   ECLASSNOTSUPPORT if class ID not supported

Comments:

   On failure, QueryInterface() must set *po to NULL.

Side Effects:
   None

Version:
   Introduced BREW Client 3.1

See Also:
   None

=======================================================================

Function: IQOSFLOW_AddOpt()

Description:
   Append the list of AEEQoSFlowOpts to the current QoS Flow option set

Prototype:

  int IQOSFLOW_AddOpt(IQoSFlow *po, AEEQoSFlowOpt *apwoz)

Parameters:
  po: the interface pointer
  apwoz: array of AEEQoSFlowOpt structs, terminated by a AEEQoSFlowOpt with
         nId set to AEEQOSFLOWOPT_END

Return Value:
   SUCCESS if the options could be added successfully

   ENOMEMORY if enough memory couldn't be allocated

   EBADPARAM if the option is already a part of the current QoS Flow option set
             or if a mutually exclusive option was already added to the current
             QoS Flow option set.

Comments:
   The AEEQOSFLOW_DataRateMinMax and AEEQOSFLOW_DataRateTokenBucket options are
   mutually exclusive.
   
 Side Effects:
   None

Version:
   Introduced BREW Client 3.1

See Also:
   None

=======================================================================

Function: IQOSFLOW_RemoveOpt()

Description:
   Removes the AEEQoSFlowOpt matching nOptId

Prototype:

   int IQOSFLOW_RemoveOpt(IQoSFlow *po, int32 nOptId)

Parameters:
   po:  the interface pointer
   nOptId: id of the option to remove from the options list

Return Value:
   SUCCESS if the option was removed successfully

   EFAILED if the specified AEEQoSFlowOpt couldn't be found

Comments:
   None

Side Effects:
   None

Version:
   Introduced BREW Client 3.1

See Also:
   None

=======================================================================

Function: IQOSFLOW_RemoveOptAtIndex()

Description:
   Removes the AEEQoSFlowOpt at nIndex

Prototype:

   int IQOSFLOW_RemoveOpt(IQoSFlow *po, int32 nIndex)

Parameters:
   po:  the interface pointer
   nOptId: id of the option to remove from the options list

Return Value:
   SUCCESS if the option was removed successfully

   EFAILED if the specified index couldn't be found

Comments:
   None

Side Effects:
   None

Version:
   Introduced BREW Client 3.1

See Also:
   None

=======================================================================

Function: IQOSFLOW_GetOpt()

Description:

   Find an AEEQoSFlowOpt, in the list of AEEQoSFlowOpts in po, matching nOptId.
   pwo is filled in with a the matching AEEQoSFlowOpt contents.

Prototype:

   int IQOSFLOW_GetOpt(IQoSFlow *po, int32 nOptId, AEEQoSFlowOpt *pwo)

Parameters:
   po :  the interface pointer
   nOptId: id of the option to find in the options list
   pwo: where to stick the found AEEQoSFlowOpt

Return Value:
   SUCCESS if the option was retrieved successfully

   EFAILED if the specified AEEQoSFlowOpt couldn't be retrieved

Comments:
   None

Side Effects:
   None

Version:
   Introduced BREW Client 3.1

See Also:
   None

=============================================================================

Function: IQOSFLOW_GetOptAtIndex()

Description: 
    
   Find the AEEQoSFlowOpt, in the list of AEEQoSFlowOpts in po, at nIndex.
   pwo is filled in with a the matching AEEQoSFlowOpt contents.

Prototype:

   int IQOSFLOW_GetOptWithIndex(IQoSFlow *po, int32 nIndex, AEEQoSFlowOpt *pwo)

Parameters:
   po :  the interface pointer
   nIndex: Option Index.
   pwo: where to stick the found AEEQoSFlowOpt

Return Value:  
   SUCCESS if the option was retrieved successfully

   EFAILED if the specified index couldn't be found
    
Comments:
   None

Side Effects:
   None

Version:
   Introduced BREW Client 3.1

See Also:
   None

=======================================================================*/

#endif  // AEEQOSFLOW_H


