Hi all,
it is my first program in symbian and I am working in a project which requires monitoring the incoming MMS & checks if it is an audio MMs or not but when i begin to define the class I have errors and I do not know how to treat them ;plz help me
here the class :
#ifndef CRECIEVE_H_
#define CRECIEVE_H_
#include <e32base.h>
#include <msvapi.h> // MMsvSessionObserver
#include <msvids.h>
#include <msvapi.h>
#include <msventry.h>
#include <e32cmn.h>
#include <mmsconst.h>
class Crecieve : public CActive, public MMsvSessionObserver
{
public:
CMsvSession* iSession;
CMsvEntry *iMsvEntry;
TMsvId iNewMessageId;
virtual ~Crecieve();
void HandleSessionEventL(TMsvSessionEvent, TAny*, TAny*, TAny*);
void ProcessMMS();
static Crecieve* NewL();
static Crecieve* NewLC();
protected:
void ConstructL();
Crecieve();
virtual void DoCancel();
};
Crecieve::Crecieve()
: CActive(EPriorityStandard) { CActiveScheduler::Add(this); }
Crecieve* Crecieve::NewLC()
{
Crecieve* me = new (ELeave) Crecieve(); // First phase construction
CleanupStack::PushL(me);
me->ConstructL(); // Second phase construction
return (me);
};
Crecieve* Crecieve::NewL()
{
Crecieve* me = Crecieve::NewLC();
CleanupStack::Pop(me);
return (me);
};
void Crecieve::ConstructL()
{
// Create CMsvSession asynchronously
iSession = CMsvSession::OpenAsyncL(*this);
}
void Crecieve::HandleSessionEventL(TMsvSessionEvent aEvent, TAny* aArg1, TAny* aArg2, TAny* aArg3)
{
switch (aEvent)
{
case EMsvEntriesChanged:
//reading the SMS here into a rich text object , after its entry has been finally created
if (*(static_cast<TMsvId*>(aArg2)) == KMsvGlobalInBoxIndexEntryId)
{
CMsvEntrySelection* entries = static_cast<CMsvEntrySelection*>(aArg1);
if (iNewMessageId == entries->At(0))
{
// Set entry context to the new message
iMsvEntry=iSession->GetEntryL(iNewMessageId);
if(iMsvEntry->Entry().iMtm == KUidMsgTypeMultimedia)
Crecieve::ProcessMMS();
iSession->RemoveEntry(iNewMessageId);
}
}
break;
default:
// do nothing
break;
}
};
void Crecieve::ProcessMMS()
(
)
void Crecieve:oCancel()
{
iSession.Close()
}
}
#endif /*CRECIEVE_H_*/

oCancel()


