hxsym_leaveutil.cpp
上传用户:dangjiwu
上传日期:2013-07-19
资源大小:42019k
文件大小:1k
- /************************************************************************
- * hxsym_leaveutil.cpp.cpp
- * -------------
- *
- * Synopsis:
- * helpers to simplify working with helix api interfaces
- *
- *
- * (c) 1995-2003 RealNetworks, Inc. Patents pending. All rights reserved.
- *
- ************************************************************************/
- #include "hxtypes.h"
- #include <eikenv.h>
- #include "chxavmisc.h"
- #include "hxsym_debug.h"
- #include "chxavcleanupstack.h"
- #include "chxavcleanstring.h"
- #include "chxavfileutil.h"
- #include "chxavstringutils.h"
- #include "hxsym_leaveutil.h"
- //XXXLCM shouldn't be included for final realease
- namespace
- {
- //
- // Allocate text message to show when we leave (indicates location where we leave from)
- //
- HBufC* AllocLeaveErrorTextL(TInt err, const char* pszFile, int line)
- {
- _LIT(KLeaveFormat, "Error: %S(%d): code = %d");
- CHXAvCleanString file(pszFile);
- // strip of path from filename
- TPtrC ptrFile = CHXAvFile::GetNakedPathNode(file());
- TUint cchText = ptrFile.Length() + 50;
- HBufC* pText = HBufC::NewL(cchText);
- TPtr ptrText = pText->Des();
- ptrText.Format(KLeaveFormat, &ptrFile, line, err);
- return pText;
- }
- } // locals
- void hxsym::DoLeaveErrorMsgL(const char* pszFile, int line, TInt err)
- {
- HBufC* pText = AllocLeaveErrorTextL(err, pszFile, line);
- AUTO_PUSH_POP_DEL(pText);
- CHXAvMessageDialog::DoAlertErrorL(*pText);
- }