#include <connpref.h>
class TConnPrefList : public TConnPref |
Public Member Functions | |
---|---|
TConnPrefList() | |
~TConnPrefList() | |
IMPORT_C void | AppendL(SMetaDataECom *) |
IMPORT_C TInt | Count() |
IMPORT_C TInt | Length() |
IMPORT_C TInt | Load(TDesC8 &) |
IMPORT_C TConnPrefList * | LoadL(TDesC8 &) |
IMPORT_C TConnPrefList * | NewL() |
IMPORT_C void | Remove(TInt) |
IMPORT_C TInt | Store(TDes8 &) |
IMPORT_C SMetaData * | operator[](TInt) |
Inherited Attributes | |
---|---|
TBuf8< KMaxConnPrefSize >::iBuf | |
TDes8::__DECLARE_TEST | |
TDes8::iMaxLength |
Inherited Enumerations | |
---|---|
TConnPref:@30 | |
TConnPref:@33 |
This class is used to send a collection of connection preferences expressed as SMetaData objects between RConnection and Comms server which uses them to construct it stack.
Each tier will look up the preferences it understands, act of them, consume them if applicable (see individual preferences) and pass the rest down to the next tier.
RConnection conn; User::LeaveIfError(conn.Open(sockSvr)); CleanupClosePushL(conn); TConnPrefList* prefs = TConnPrefList::NewL(); CleanupStack::PushL(prefs); TConnAPPref* APPref = TConnAPPref::NewL(aPara->iAp); CleanupStack::PushL(APPref); prefs->AppendL(APPref); error = conn.Start(pref);
See also: TConnAPPref TConnAutoStartPref TConnSnapPref RConnection::Start
IMPORT_C | ~TConnPrefList | ( | ) |
Destrcutor - closes iPrefs deleting the pointers but not the objects they point at. These should be deleted explicitly.
IMPORT_C void | AppendL | ( | SMetaDataECom * | aFamily | ) |
This adds the pointer supplied to the list. Also see TConnAPPref Only one instance of TConnAPPref can be appended to the list and passed to RConnection::Start. More than one will force RConnection::Start to return KErrArgument
IMPORT_C TInt | Count | ( | ) |
This returns an integer value representing the number of objects in the list
Returns: - integer representing the number of objects in the list
IMPORT_C TInt | Length | ( | ) |
Returns the size of the desciptor needed to store the object using the store function
Returns: Integer representing the length of descriptor need to store the object
This function loads an instance of TConnPrefList from the given descriptor into the object its called on. It returns an integer error on failiure
Returns: - KErrNone if successful otherwise KErrArgument
IMPORT_C TConnPrefList * | LoadL | ( | TDesC8 & | aDes | ) | [static] |
This function loads an instance of TConnPrefList from the given descriptor and returns a pointer to that oject in memory is possible, otherwise leaves
Parameter | Description |
---|---|
aDes | - a descriptor containing a serialized form of TConnPrefList |
Returns: TConnPrefList* to the instance of the object in memory
IMPORT_C void | Remove | ( | TInt | aIndex | ) |
This removes the objet at the given index from the list
Reimplemented from TDes8::operator[](TInt)
This retrieves a pointer to the object at the given index
Returns: a pointer to the object in memory