er_errors_cxx.cpp

Go to the documentation of this file.
00001 #include "er_errors.h"
00002 
00003 #if defined(__SYMBIAN32__)
00004 
00005 /*
00006 
00007   Documentation about resolving and displaying errors can be found from:
00008 
00009   http://wiki.forum.nokia.com/index.php/CS000966_-_Using_class_CTextResolver_to_resolve_error_texts
00010 
00011   http://wiki.forum.nokia.com/index.php/CS000965_-_Using_class_CErrorUI_to_display_error_notes
00012 
00013 */
00014 
00015 #include "utils_cl2.h"
00016 
00017 #include <aknglobalnote.h>
00018 #include <errorui.h>
00019 
00020 extern "C" void ex_show_error(int errCode)
00021 {
00022   TRAP_IGNORE(
00023   CErrorUI* ui = CErrorUI::NewLC();
00024   ui->ShowGlobalErrorNoteL(errCode);
00025   CleanupStack::PopAndDestroy();
00026   );
00027 }
00028 
00029 extern "C" void ex_show_nomem_error()
00030 {
00031   ex_show_error(KErrNoMemory);
00032 }
00033 
00034 extern "C" void ex_show_error_msg(const char* text)
00035 {
00036   HBufC* buf = ConvFromUtf8CStringL(text);
00037   CleanupStack::PushL(buf);
00038   CAknGlobalNote* note = CAknGlobalNote::NewLC();
00039   note->ShowNoteL(EAknGlobalErrorNote, *buf);
00040   CleanupStack::PopAndDestroy(2); // note, buf
00041 }
00042 
00043 #endif /* __SYMBIAN32__ */
00044 
00045 /**
00046 
00047 er_errors_cxx.cpp
00048 
00049 Copyright 2009 Helsinki Institute for Information Technology (HIIT)
00050 and the authors. All rights reserved.
00051 
00052 Authors: Tero Hasu <tero.hasu@hut.fi>
00053 
00054 Permission is hereby granted, free of charge, to any person
00055 obtaining a copy of this software and associated documentation files
00056 (the "Software"), to deal in the Software without restriction,
00057 including without limitation the rights to use, copy, modify, merge,
00058 publish, distribute, sublicense, and/or sell copies of the Software,
00059 and to permit persons to whom the Software is furnished to do so,
00060 subject to the following conditions:
00061 
00062 The above copyright notice and this permission notice shall be
00063 included in all copies or substantial portions of the Software.
00064 
00065 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
00066 EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
00067 MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
00068 NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
00069 BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
00070 ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
00071 CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
00072 SOFTWARE.
00073 
00074  **/

ContextLogger2—ContextLogger2 Logger Daemon Internals—Generated on Mon May 2 13:49:52 2011 by Doxygen 1.6.1