#include <string.h>
#include "common.h"
-#define WEUA_UNKNOWN 0
-#define WEUA_IE 1
-#define WEUA_Netscape 2
-#define WEUA_Lynx 3
-#define WEUA_Opera 4
-#define WEUA_Amaya 5
-#define WEUA_Emacs 6
-#define WEUA_Wget 7
-#define WEUA_WebFolder 8
-#define WEUA_Mozilla 9
-#define WEUA_OmniWeb 10
-#define WEUA_iCab 11
-#define WEUA_Konqueror 12
-#define WEUA_Links 13
-#define WEUA_DAVFS 14
-#define WEUA_CADAVER 15
-#define WEUA_GOLIVE 16
-#define WEUA_MACOSX_DAVFS 17
-#define WEUA_Dillo 18
-#define WEUA_JavaSDK 19
-#define WEUA_PythonURLLIB 20
-#define WEUA_AppleDAVAccess 21
-#define WEUA_MSWebPublisher 22
-#define WEUA_CURL 23
-#define WEUA_Evolution 24
-#define WEUA_MSOutlook 25
-#define WEUA_MSOutlookExpress 26
-#define WEUA_GNOMEVFS 27
-#define WEUA_ZideLook 28
-#define WEUA_Safari 29
-#define WEUA_SOUP 30
-#define WEUA_Entourage 31
-#define WEUA_NetNewsWire 32
-#define WEUA_xmlrpclib_py 33
-#define WEUA_Morgul 34
-#define WEUA_CFNetwork 35
-#define WEUA_KungLog 36
-#define WEUA_SOPE 37
-#define WEUA_Ecto 38
-#define WEUA_NewsFire 39
-#define WEUA_Goliath 40
-#define WEUA_PerlHTTPDAV 41
-#define WEUA_Google 42
-#define WEUA_WebDrive 43
-#define WEUA_Sunbird 44
-#define WEUA_PEAR_XMLRPC 45
+#define WEUA_UNKNOWN 0
+#define WEUA_IE 1
+#define WEUA_Netscape 2
+#define WEUA_Lynx 3
+#define WEUA_Opera 4
+#define WEUA_Amaya 5
+#define WEUA_Emacs 6
+#define WEUA_Wget 7
+#define WEUA_WebFolder 8
+#define WEUA_Mozilla 9
+#define WEUA_OmniWeb 10
+#define WEUA_iCab 11
+#define WEUA_Konqueror 12
+#define WEUA_Links 13
+#define WEUA_DAVFS 14
+#define WEUA_CADAVER 15
+#define WEUA_GOLIVE 16
+#define WEUA_MACOSX_DAVFS 17
+#define WEUA_Dillo 18
+#define WEUA_JavaSDK 19
+#define WEUA_PythonURLLIB 20
+#define WEUA_AppleDAVAccess 21
+#define WEUA_MSWebPublisher 22
+#define WEUA_CURL 23
+#define WEUA_Evolution 24
+#define WEUA_MSOutlook 25
+#define WEUA_MSOutlookExpress 26
+#define WEUA_GNOMEVFS 27
+#define WEUA_ZideLook 28
+#define WEUA_Safari 29
+#define WEUA_SOUP 30
+#define WEUA_Entourage 31
+#define WEUA_NetNewsWire 32
+#define WEUA_xmlrpclib_py 33
+#define WEUA_Morgul 34
+#define WEUA_CFNetwork 35
+#define WEUA_KungLog 36
+#define WEUA_SOPE 37
+#define WEUA_Ecto 38
+#define WEUA_NewsFire 39
+#define WEUA_Goliath 40
+#define WEUA_PerlHTTPDAV 41
+#define WEUA_Google 42
+#define WEUA_WebDrive 43
+#define WEUA_Sunbird 44
+#define WEUA_PEAR_XMLRPC 45
+#define WEUA_Cook_XMLRPCdotNET 46
#define WEOS_UNKNOWN 0
#define WEOS_WINDOWS 1
else if (strstr(ua, "PEAR XML_RPC")) {
self->browser = WEUA_PEAR_XMLRPC;
}
+ else if (strstr(ua, "XML-RPC.NET")) {
+ self->browser = WEUA_Cook_XMLRPCdotNET;
+ }
else {
/* unknown browser */
self->browser = WEUA_UNKNOWN;
- (NSString *)userAgentType {
switch (self->browser) {
- case WEUA_IE: return @"IE";
- case WEUA_Netscape: return @"Netscape";
- case WEUA_Lynx: return @"Lynx";
- case WEUA_Links: return @"Links";
- case WEUA_Opera: return @"Opera";
- case WEUA_Amaya: return @"Amaya";
- case WEUA_Emacs: return @"Emacs";
- case WEUA_Wget: return @"Wget";
- case WEUA_WebFolder: return @"WebFolder";
- case WEUA_DAVFS: return @"DAVFS";
- case WEUA_MACOSX_DAVFS: return @"MacOSXDAVFS";
- case WEUA_CADAVER: return @"Cadaver";
- case WEUA_GOLIVE: return @"GoLive";
- case WEUA_Mozilla: return @"Mozilla";
- case WEUA_OmniWeb: return @"OmniWeb";
- case WEUA_iCab: return @"iCab";
- case WEUA_Konqueror: return @"Konqueror";
- case WEUA_Dillo: return @"Dillo";
- case WEUA_JavaSDK: return @"Java";
- case WEUA_PythonURLLIB: return @"Python-urllib";
- case WEUA_AppleDAVAccess: return @"AppleDAVAccess";
- case WEUA_MSWebPublisher: return @"MSWebPublisher";
- case WEUA_CURL: return @"CURL";
- case WEUA_Evolution: return @"Evolution";
- case WEUA_SOUP: return @"SOUP";
- case WEUA_MSOutlook: return @"MSOutlook";
- case WEUA_MSOutlookExpress: return @"MSOutlookExpress";
- case WEUA_GNOMEVFS: return @"GNOME-VFS";
- case WEUA_ZideLook: return @"ZideLook";
- case WEUA_Safari: return @"Safari";
- case WEUA_Entourage: return @"Entourage";
- case WEUA_NetNewsWire: return @"NetNewsWire";
- case WEUA_xmlrpclib_py: return @"xmlrpclib.py";
- case WEUA_Morgul: return @"Morgul";
- case WEUA_KungLog: return @"KungLog";
- case WEUA_Ecto: return @"Ecto";
- case WEUA_NewsFire: return @"NewsFire";
- case WEUA_Goliath: return @"Goliath";
- case WEUA_PerlHTTPDAV: return @"PerlHTTPDAV";
- case WEUA_Google: return @"Google";
- case WEUA_WebDrive: return @"WebDrive";
- case WEUA_Sunbird: return @"Sunbird";
- case WEUA_PEAR_XMLRPC: return @"PHP PEAR XMLRPC";
- default: return @"unknown";
+ case WEUA_IE: return @"IE";
+ case WEUA_Netscape: return @"Netscape";
+ case WEUA_Lynx: return @"Lynx";
+ case WEUA_Links: return @"Links";
+ case WEUA_Opera: return @"Opera";
+ case WEUA_Amaya: return @"Amaya";
+ case WEUA_Emacs: return @"Emacs";
+ case WEUA_Wget: return @"Wget";
+ case WEUA_WebFolder: return @"WebFolder";
+ case WEUA_DAVFS: return @"DAVFS";
+ case WEUA_MACOSX_DAVFS: return @"MacOSXDAVFS";
+ case WEUA_CADAVER: return @"Cadaver";
+ case WEUA_GOLIVE: return @"GoLive";
+ case WEUA_Mozilla: return @"Mozilla";
+ case WEUA_OmniWeb: return @"OmniWeb";
+ case WEUA_iCab: return @"iCab";
+ case WEUA_Konqueror: return @"Konqueror";
+ case WEUA_Dillo: return @"Dillo";
+ case WEUA_JavaSDK: return @"Java";
+ case WEUA_PythonURLLIB: return @"Python-urllib";
+ case WEUA_AppleDAVAccess: return @"AppleDAVAccess";
+ case WEUA_MSWebPublisher: return @"MSWebPublisher";
+ case WEUA_CURL: return @"CURL";
+ case WEUA_Evolution: return @"Evolution";
+ case WEUA_SOUP: return @"SOUP";
+ case WEUA_MSOutlook: return @"MSOutlook";
+ case WEUA_MSOutlookExpress: return @"MSOutlookExpress";
+ case WEUA_GNOMEVFS: return @"GNOME-VFS";
+ case WEUA_ZideLook: return @"ZideLook";
+ case WEUA_Safari: return @"Safari";
+ case WEUA_Entourage: return @"Entourage";
+ case WEUA_NetNewsWire: return @"NetNewsWire";
+ case WEUA_xmlrpclib_py: return @"xmlrpclib.py";
+ case WEUA_Morgul: return @"Morgul";
+ case WEUA_KungLog: return @"KungLog";
+ case WEUA_Ecto: return @"Ecto";
+ case WEUA_NewsFire: return @"NewsFire";
+ case WEUA_Goliath: return @"Goliath";
+ case WEUA_PerlHTTPDAV: return @"PerlHTTPDAV";
+ case WEUA_Google: return @"Google";
+ case WEUA_WebDrive: return @"WebDrive";
+ case WEUA_Sunbird: return @"Sunbird";
+ case WEUA_PEAR_XMLRPC: return @"PHP PEAR XMLRPC";
+ case WEUA_Cook_XMLRPCdotNET: return @"PHP PEAR XMLRPC";
+ default: return @"unknown";
}
}
- (NSString *)os {
if (self->browser == WEUA_KungLog) return YES;
if (self->browser == WEUA_Ecto) return YES;
if (self->browser == WEUA_PEAR_XMLRPC) return YES;
+ if (self->browser == WEUA_Cook_XMLRPCdotNET) return YES;
return NO;
}
- (BOOL)isBLogClient {