|
Original Symbian headers
Selected EUSER, Window Server, networking, graphics and device declarations
|
Object specifying which security checks to perform on each request number and what action to take if the check fails. More...
#include <e32base.h>
Public Attributes | |
| TUint8 | iOnConnect |
| The index into iElements, or an allowed value of TSpecialCase, that is used to check a connection attempt . | |
| TUint16 | iRangeCount |
| Number of ranges in the iRanges array. | |
| const TInt * | iRanges |
| A pointer to an array of ordered ranges of request numbers. | |
| const TUint8 * | iElementsIndex |
| A pointer to an array of TUint8 values specifying the appropriate action to take for each range in iRanges. | |
| const TPolicyElement * | iElements |
| A pointer to an array of distinct policy elements. | |
Object specifying which security checks to perform on each request number and what action to take if the check fails.
Explanations of each of the members of this class are detailed below.
As explained in CPolicyServer::CPolicyServer, it is important that the instance of this class (CPolicyServer::TPolicy) given to the policy server constructor, exists for the lifetime of the server. For this reason, as well as code size considerations, it is recommended that the TPolicy instance is const static data. The following code segment shows the recommended way of doing this. Further detail on what each of these statements means is given below.
| const TPolicyElement* CPolicyServer::TPolicy::iElements |
A pointer to an array of distinct policy elements.
Continuing with the previous examples:
The instantiation of iElements specifies that:
| const TUint8* CPolicyServer::TPolicy::iElementsIndex |
A pointer to an array of TUint8 values specifying the appropriate action to take for each range in iRanges.
For example, the 0th element of iElementsIndex specifies the appropriate action to take for the 0th range in iRanges. As such, iElementsIndex must have precisely the same number of elements as iRanges.
The following rules apply to the value of each element in iElementsIndex:
Continuing the example from iRanges:
This means that:
| TUint8 CPolicyServer::TPolicy::iOnConnect |
| TUint16 CPolicyServer::TPolicy::iRangeCount |
| const TInt* CPolicyServer::TPolicy::iRanges |
A pointer to an array of ordered ranges of request numbers.
Each element in this array refers to the starting request number of a range. The range of the previous element is up to and including the current element minus 1. Thus an array like:
means that:
Note that the all possible request numbers must be accounted for. This implies that the first element must be 0. It also implies that the last range goes from the that element to KMaxTint. Finally, each element must be strictly greater than the previous element. As the first element is 0, this clearly implies that iRanges must not contain negative elements.