

Press release says:
Developers can program in C++ or Java to create powerful professional and personal productivity tools for the P990. The smartphone is based on Sony Ericsson's Java Platform 3 (JP-3) and supports four new JSRs including Web Services (JSR 172). It is the twentieth phone from Sony Ericsson to support Mobile Java 3D with JSR 184. The P990 supports both CDLC and CDC Java environments, and standard Java applications can run in both flip-open and flip-closed modes.
void ForAllMatchingFiles(RFs& aSession, const TDesC& aWildName, const TDesC& aScanDir)
{
TFindFile file_finder(aSession);
CDir* file_list;
TInt err = file_finder.FindWildByDir(aWildName,aScanDir, file_list);
while (err==KErrNone)
{
TInt i;
for (i=0; i < Count(); i++)
{
TParse fullentry;
fullentry.Set((*file_list)[i].iName, &file_finder.File(),NULL);
// Do something with the full Symbian OS filename
DoOneFile(aSession, fullentry.FullName());
}
delete file_list;
err=file_finder.FindWild(file_list);
}
}
class TAmrEncParams
{
public:
inline TAmrEncParams();
public:
TInt iMode; // encoding mode 0-7 (0=MR475,1=MR515,...,7=MR122,
default 7)
TInt iDTX; // DTX flag (TRUE or default FALSE)
};
TAmrEncParams::TAmrEncParams() :
iMode(7), iDTX(0) {}
And we will also declare UIDs of AMR codecs:
#define KAdvancedUidCodecPCM16ToAMR 0x101FAF68
#define KAdvancedUidCodecAMRToPCM16 0x101FAF67
This is the function that convers PCM data to AMR-NB (note that CMMFPtrBuffer class you can use only on Series 60 2.0 FP2 SDK, on earlier SDKs you have to use CMMFDescriptorBuffer). Size of aDes parameter is supposed to be equal to 320 bytes.
HBufC8* ConvertFromPCMToAMRNBL( const TPtr8& aDes, TInt aMode )
{
TAmrEncParams taepParams;
taepParams.iMode = aMode;
cmmfcCodec = CMMFCodec::NewL(TUid::Uid(KAdvancedUidCodecPCM16ToAMR ));
CleanupStack::PushL( cmmfcCodec );
cmmfcCodec->ConfigureL( TUid::Uid(KAdvancedUidCodecPCM16ToAMR), ( const TDesC8& ) taepParams );
ptrbPCM16 = CMMFPtrBuffer::NewL();
CleanupStack::PushL( ptrbPCM16 );
ptrbPCM16->SetPtr( aDes );
desbAMRNB = CMMFDescriptorBuffer::NewL( 32 );
CleanupStack::PushL( desbAMRNB );
TCodecProcessResult result = cmmfcCodec->ProcessL( * ptrbPCM16, * desbAMRNB );
if ( ( result.iStatus != TCodecProcessResult::EProcessComplete )
( result.iSrcBytesProcessed != ( TUint ) aDes.Length() ) )
return NULL;
CleanupStack::Pop( 2 ); // cmmfcCodec, ptrbPCM16
HBufC8* pAMRData = desbAMRNB->Data().AllocL();
CleanupStack::Pop( 1 ); // desbAMRNB
return pAMRData;
}