diff options
author | pescuma <pescuma@c086bb3d-8645-0410-b8da-73a8550f86e7> | 2009-12-29 19:21:19 +0000 |
---|---|---|
committer | pescuma <pescuma@c086bb3d-8645-0410-b8da-73a8550f86e7> | 2009-12-29 19:21:19 +0000 |
commit | 18653f6aeb1ee4007df4402f78bbb82b6f915ba7 (patch) | |
tree | 99f3173247eb377533ab1d791cef35bc771ecd4f /Protocols/SIP/commons.h | |
parent | 236bbc334ca84ca88470cfced8b768f4fd5f591c (diff) |
sip: start of buddy management
git-svn-id: http://pescuma.googlecode.com/svn/trunk/Miranda@197 c086bb3d-8645-0410-b8da-73a8550f86e7
Diffstat (limited to 'Protocols/SIP/commons.h')
-rw-r--r-- | Protocols/SIP/commons.h | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/Protocols/SIP/commons.h b/Protocols/SIP/commons.h index a310667..e881107 100644 --- a/Protocols/SIP/commons.h +++ b/Protocols/SIP/commons.h @@ -72,6 +72,7 @@ Boston, MA 02111-1307, USA. #include "../../plugins/utils/mir_options.h"
#include "../../plugins/utils/mir_icons.h"
#include "../../plugins/utils/mir_log.h"
+#include "../../plugins/utils/mir_dbutils.h"
#include "../../plugins/utils/utf8_helpers.h"
#include "../../plugins/utils/scope.h"
#include "../../plugins/voiceservice/m_voice.h"
@@ -131,5 +132,66 @@ static BOOL IsEmptyW(const WCHAR *str) # define IsEmpty IsEmptyA
#endif
+static char * FirstNotEmptyA(char *str1, char *str2)
+{
+ if (!IsEmptyA(str1))
+ return str1;
+ return str2;
+}
+
+static char * FirstNotEmptyA(char *str1, char *str2, char *str3)
+{
+ if (!IsEmptyA(str1))
+ return str1;
+ if (!IsEmptyA(str2))
+ return str2;
+ return str3;
+}
+
+static char * FirstNotEmptyA(char *str1, char *str2, char *str3, char *str4)
+{
+ if (!IsEmptyA(str1))
+ return str1;
+ if (!IsEmptyA(str2))
+ return str2;
+ if (!IsEmptyA(str3))
+ return str3;
+ return str4;
+}
+
+
+static WCHAR * FirstNotEmptyW(WCHAR *str1, WCHAR *str2)
+{
+ if (!IsEmptyW(str1))
+ return str1;
+ return str2;
+}
+
+static WCHAR * FirstNotEmptyW(WCHAR *str1, WCHAR *str2, WCHAR *str3)
+{
+ if (!IsEmptyW(str1))
+ return str1;
+ if (!IsEmptyW(str2))
+ return str2;
+ return str3;
+}
+
+static WCHAR * FirstNotEmptyW(WCHAR *str1, WCHAR *str2, WCHAR *str3, WCHAR *str4)
+{
+ if (!IsEmptyW(str1))
+ return str1;
+ if (!IsEmptyW(str2))
+ return str2;
+ if (!IsEmptyW(str3))
+ return str3;
+ return str4;
+}
+
+#ifdef UNICODE
+# define FirstNotEmpty FirstNotEmptyW
+#else
+# define FirstNotEmpty FirstNotEmptyA
+#endif
+
#endif // __COMMONS_H__
|