--- a/telutils/dialpad/src/dialpadsymbianwrapper_p.cpp Fri May 14 16:24:46 2010 +0300
+++ b/telutils/dialpad/src/dialpadsymbianwrapper_p.cpp Thu May 27 13:23:05 2010 +0300
@@ -38,10 +38,8 @@
int errValue(KErrNone);
CVoiceMailboxEntry* vmbxEntry = NULL;
TVoiceMailboxParams vmbxParams;
- errValue = mVmbx->QueryVmbxType( vmbxParams );
- if ((KErrNone == errValue) &&
- (KErrNone == mVmbx->GetStoredEntry(vmbxParams, vmbxEntry))) {
+ if (KErrNone == mVmbx->GetStoredEntry(vmbxParams, vmbxEntry)) {
// Number retrieved succesfully:
vmbxNumber = getVmbxNumber(*vmbxEntry);
}
@@ -51,6 +49,22 @@
return errValue;
}
+int DialpadSymbianWrapperPrivate::getVideoMailboxNumber(QString &vmbxNumber)
+{
+ int errValue(KErrNone);
+ CVoiceMailboxEntry* vmbxEntry = NULL;
+ TVoiceMailboxParams vmbxParams;
+ vmbxParams.iType = EVmbxVideo;
+
+ if (KErrNone == mVmbx->GetStoredEntry(vmbxParams, vmbxEntry)) {
+ // Number retrieved succesfully:
+ vmbxNumber = getVmbxNumber(*vmbxEntry);
+ }
+ // Entry ownership was transferred.
+ delete vmbxEntry;
+ vmbxEntry = NULL;
+ return errValue;
+}
int DialpadSymbianWrapperPrivate::defineMailboxNumber(QString &vmbxNumber)
{
@@ -69,6 +83,24 @@
return errValue;
}
+int DialpadSymbianWrapperPrivate::defineVideoMailboxNumber(QString &vmbxNumber)
+{
+ CVoiceMailboxEntry* vmbxEntry = NULL;
+ TVoiceMailboxParams vmbxParams;
+ vmbxParams.iType = EVmbxVideo;
+ int errValue = mVmbx->QueryVmbxType( vmbxParams );
+
+ if ((KErrNotFound == errValue)) {
+ errValue = mVmbx->QueryNewEntry(vmbxParams, vmbxEntry);
+ if (KErrNone == errValue) {
+ mVmbx->SaveEntry(*vmbxEntry);
+ // Do appropriate tasks, e.g. save number.
+ vmbxNumber = getVmbxNumber(*vmbxEntry);
+ }
+ }
+ return errValue;
+}
+
QString DialpadSymbianWrapperPrivate::getVmbxNumber(CVoiceMailboxEntry &vmbxEntry)
{
TPtrC ptrNumber(KNullDesC);