diff options
Diffstat (limited to 'Protocols/IAX/commons.h')
-rw-r--r-- | Protocols/IAX/commons.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/Protocols/IAX/commons.h b/Protocols/IAX/commons.h index b501be1..3f5e762 100644 --- a/Protocols/IAX/commons.h +++ b/Protocols/IAX/commons.h @@ -64,6 +64,8 @@ Boston, MA 02111-1307, USA. #include "../../plugins/utils/mir_icons.h"
#include "../../plugins/utils/mir_log.h"
#include "../../plugins/utils/utf8_helpers.h"
+#include "../../plugins/voiceservice/m_voice.h"
+#include "../../plugins/voiceservice/m_voiceservice.h"
#include <iaxclient.h>
@@ -87,5 +89,25 @@ extern OBJLIST<IAXProto> instances; +static TCHAR *lstrtrim(TCHAR *str)
+{
+ int len = lstrlen(str);
+
+ int i;
+ for(i = len - 1; i >= 0 && (str[i] == ' ' || str[i] == '\t'); --i) ;
+ if (i < len - 1)
+ {
+ ++i;
+ str[i] = _T('\0');
+ len = i;
+ }
+
+ for(i = 0; i < len && (str[i] == ' ' || str[i] == '\t'); ++i) ;
+ if (i > 0)
+ memmove(str, &str[i], (len - i + 1) * sizeof(TCHAR));
+
+ return str;
+}
+
#endif // __COMMONS_H__
|