IrDA IAS database registration is handled on the client side through
the RNetDatabase
and TIASDatabaseEntry
classes.
After instantiating and opening an RNetDatabase
object,
a TIASDatabaseEntry
is set up using SetClassName()
,
SetAttributeName()
and SetToInteger()
etc. as
required. RNetDatabase::Add()
is then invoked on the
TIASDatabaseEntry
.
The following example code illustrates the correct registration of 9Wire “cooked” IrCOMM:
// Registration of IrCOMM with the IAS Register.
RNetDatabase n;
TIASDatabaseEntry entry;
// #### Registering IrCOMM TinyTP Port Number as integer ####
_LIT8(KTxtIrDAIrCOMM,"IrDA:IrCOMM");
_LIT8(KTxtIrDATinyTP,"IrDA:TinyTP:LsapSel");
_LIT8(KTxtParameters,"Parameters");
entry.SetClassName(KTxtIrDAIrCOMM);
entry.SetAttributeName(KTxtIrDATinyTP);
entry.SetToInteger(4);
n.Add(entry);
// #### Registering IrCOMM Parameters as octet sequence ####
TBuf8<6> b;
b.SetMax();
b[0]=0;
b[1]=1;
b[2]=0x04; // Set to be set to 9-wire cooked only
b[3]=0x01;
b[4]=1;
b[5]=0x01; // No Centronics support
entry.SetAttributeName(KTxtParameters);
entry.SetToOctetSeq(b);
n.Add(entry)
n.Close();