messagingapp/msgui/msguiutils/inc/msgsendutil.h
changeset 72 6f657153cbc5
parent 31 ebfee66fde93
--- a/messagingapp/msgui/msguiutils/inc/msgsendutil.h	Fri Sep 17 08:28:39 2010 +0300
+++ b/messagingapp/msgui/msguiutils/inc/msgsendutil.h	Mon Oct 04 00:13:15 2010 +0300
@@ -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