messagingapp/msgui/msguiutils/inc/msgsendutil.h
changeset 67 fc91263aee62
parent 25 84d9eb65b26f
child 73 ecf6a73a9186
--- a/messagingapp/msgui/msguiutils/inc/msgsendutil.h	Tue Sep 14 22:54:56 2010 +0530
+++ b/messagingapp/msgui/msguiutils/inc/msgsendutil.h	Fri Sep 17 20:01:45 2010 +0530
@@ -22,10 +22,14 @@
 #include <QObject>
 #include "convergedmessage.h"
 
+#ifdef MSGUI_UNIT_TEST
+ #define MSGUI_UTILS_DLL_EXPORT
+#else
 #ifdef BUILD_MSGUI_UTILS_DLL
-#define MSGUI_UTILS_DLL_EXPORT Q_DECL_EXPORT
+ #define MSGUI_UTILS_DLL_EXPORT Q_DECL_EXPORT
 #else
-#define MSGUI_UTILS_DLL_EXPORT Q_DECL_IMPORT
+ #define MSGUI_UTILS_DLL_EXPORT Q_DECL_IMPORT
+#endif
 #endif
 
 
@@ -68,6 +72,13 @@
      */
     int send(ConvergedMessage& msg);
 
+    /**
+     * Checks for valid phone number and email address.
+     * @param address Address to be checked.
+     * @return true if valid address else false.
+     */
+    bool isValidAddress(const QString &address);
+
 private:
     /**
      * Check if email over sms is supported and change msgtype appropriately.
@@ -133,6 +144,13 @@
      * Own
      */
     UniEditorGenUtils* mUniEditorGenUtils;
+
+#ifdef MSGUI_UNIT_TEST
+    /**
+     * Unit Testing
+     */
+    friend class TestMsgSendUtil;
+#endif    
 };
 
 #endif // MSG_SEND_UTIL_H