diff --git a/src/add-ons/kernel/file_systems/Jamfile b/src/add-ons/kernel/file_systems/Jamfile index 135aeb44f2..8b29b05cba 100644 --- a/src/add-ons/kernel/file_systems/Jamfile +++ b/src/add-ons/kernel/file_systems/Jamfile @@ -8,7 +8,6 @@ SubInclude HAIKU_TOP src add-ons kernel file_systems cdda ; SubInclude HAIKU_TOP src add-ons kernel file_systems exfat ; SubInclude HAIKU_TOP src add-ons kernel file_systems ext2 ; SubInclude HAIKU_TOP src add-ons kernel file_systems fat ; -SubInclude HAIKU_TOP src add-ons kernel file_systems googlefs ; SubInclude HAIKU_TOP src add-ons kernel file_systems iso9660 ; SubInclude HAIKU_TOP src add-ons kernel file_systems netfs ; SubInclude HAIKU_TOP src add-ons kernel file_systems nfs ; @@ -20,6 +19,7 @@ SubInclude HAIKU_TOP src add-ons kernel file_systems reiserfs ; SubInclude HAIKU_TOP src add-ons kernel file_systems udf ; SubInclude HAIKU_TOP src add-ons kernel file_systems ufs2 ; SubInclude HAIKU_TOP src add-ons kernel file_systems userlandfs ; +SubInclude HAIKU_TOP src add-ons kernel file_systems websearchfs ; SubInclude HAIKU_TOP src add-ons kernel file_systems xfs ; SubInclude HAIKU_TOP src add-ons kernel file_systems layers ; diff --git a/src/add-ons/kernel/file_systems/googlefs/README.googlefs.txt b/src/add-ons/kernel/file_systems/googlefs/README.googlefs.txt deleted file mode 100644 index 7eb0742b21..0000000000 --- a/src/add-ons/kernel/file_systems/googlefs/README.googlefs.txt +++ /dev/null @@ -1,29 +0,0 @@ -Welcome to the Google™ FileSystem for BeOS™, Zeta™ and Haiku®. -Copyright© 2004, 2005, François Revol. -Google is a trademark of Google,Inc. -BeOS is a trademark of PalmSource. -Zeta is a trademark of yellowTAB GmbH. -Haiku is a trademark of Haiku, Inc. - - -REQUIRES BONE - -mkdir /google; ndmount googlefs /google - -Use "Search Google" query template in this folder to ask google anything. - -or: - -query -v /google '((name=="*QUESTION*")&&(BEOS:TYPE=="application/x-vnd.Be-bookmark"))' -where QUESTION is what you want to ask google. (googlefs currently filters queries to only answer those) -( you will want to pipe that to catattr: -query -v /google '((name=="*site:bebits.com bone*")&&(BEOS:TYPE=="application/x-vnd.Be-bookmark"))' | xargs catattr META:url -note that won't work with sync_unlink true in the settings) - -Included are 2 scripts, google and imlucky that runs such a query using the arguments given on the command line. - -An addon for Ingo Weinhold's UserlandFS is provided, compiled with debug printouts, so you can see it at work. -To use it, startUserlandFSServer and run: -ufs_mount googlefs /dev/zero /google - -Enjoy. diff --git a/src/add-ons/kernel/file_systems/googlefs/attrs.c b/src/add-ons/kernel/file_systems/googlefs/attrs.c deleted file mode 100644 index d517e1f70d..0000000000 --- a/src/add-ons/kernel/file_systems/googlefs/attrs.c +++ /dev/null @@ -1,622 +0,0 @@ -/* - * Copyright 2004-2008, François Revol, . - * Distributed under the terms of the MIT License. - */ - -#include -#include -#include "googlefs.h" - -#define SZSTR(s) sizeof(s), s -#define SZTAB(s) sizeof(s), s - -// #pragma mark - root folder icons - -#if 0 -/* old one */ -const char google_icon_M[] = { -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x1e, 0x1b, 0xd9, 0xd9, 0x1d, 0xff, 0xff, -0xff, 0xff, 0x1d, 0x82, 0x82, 0x19, 0xff, 0xff, 0x1e, 0xd8, 0x64, 0x63, 0x63, 0xd8, 0x1b, 0xff, -0xff, 0x1a, 0x2c, 0x2d, 0x2d, 0x2c, 0xc4, 0x1d, 0x62, 0x63, 0x1c, 0x3f, 0x1e, 0x63, 0xd8, 0x1d, -0x1a, 0x2c, 0xca, 0x1a, 0x1d, 0x82, 0x2d, 0xa3, 0xd8, 0x62, 0x3f, 0x3f, 0x3f, 0x1e, 0xd8, 0x1a, -0x82, 0x2d, 0x1a, 0x3f, 0x3f, 0x3f, 0xa3, 0x2d, 0xd8, 0x62, 0x0e, 0x1e, 0x3f, 0x1f, 0xd8, 0x62, -0x82, 0x2d, 0x1d, 0x3f, 0x3f, 0x0f, 0x82, 0x2e, 0x63, 0x83, 0x0a, 0x1e, 0x3f, 0xfd, 0x64, 0x1b, -0x19, 0x2c, 0x5a, 0x3f, 0x1e, 0x0b, 0xc4, 0xeb, 0x1a, 0x64, 0xd8, 0xd9, 0xd9, 0x64, 0x83, 0xff, -0xff, 0xca, 0x2c, 0xa3, 0x5a, 0xc4, 0x2e, 0x82, 0xff, 0x1b, 0x83, 0x8a, 0x89, 0x17, 0x17, 0xff, -0xff, 0x1a, 0xa9, 0x2e, 0x2e, 0xca, 0x82, 0x17, 0xff, 0xff, 0xff, 0x17, 0x17, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0x1a, 0x1a, 0x1a, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff -}; -const char google_icon_L[] = { -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x1c, 0x1b, 0x1c, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff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, 0xf8, 0xf8, 0xd8, 0xfd, 0x1f, 0x1f, 0x1e, 0xfd, 0xd8, 0xf8, 0x84, 0x89, 0x1a, 0xff, -0xff, 0x82, 0x2d, 0x2c, 0x2c, 0xda, 0x3f, 0x3f, 0x3f, 0x3f, 0x17, 0x13, 0xc4, 0x2d, 0xeb, 0xa9, -0x1a, 0x1a, 0x83, 0x84, 0x64, 0xf8, 0xd8, 0xd8, 0xd8, 0xf8, 0xf8, 0x84, 0x89, 0x1b, 0xff, 0xff, -0xff, 0x1a, 0xca, 0x2d, 0x2c, 0x2c, 0x5a, 0x1e, 0x3f, 0x1f, 0xda, 0xc4, 0x2c, 0xeb, 0x2f, 0x18, -0xff, 0xff, 0x1a, 0x89, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x8a, 0x89, 0x1b, 0xff, 0xff, 0xff, -0xff, 0xff, 0x19, 0xeb, 0x2d, 0x2c, 0x2c, 0x2c, 0xc4, 0x2c, 0x2c, 0x2c, 0x2e, 0x2f, 0x13, 0xff, -0xff, 0xff, 0xff, 0x1a, 0x17, 0x89, 0x89, 0x8a, 0x89, 0x89, 0x18, 0x1a, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0x19, 0xca, 0x2e, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0xeb, 0x2f, 0x13, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x1a, 0x1a, 0x1a, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0x1c, 0xa9, 0xca, 0xeb, 0xeb, 0xeb, 0xca, 0xa9, 0x18, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x1a, 0x1a, 0x18, 0x61, 0x1b, 0x1a, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff -}; -#endif - -// icons by ahwayakchih - -const char google_icon_M[] = { -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x1b, 0xd9, 0xd9, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0x82, 0x82, 0x19, 0xff, 0xff, 0xff, 0xd8, 0x64, 0x63, 0x63, 0xd8, 0xff, 0xff, -0xff, 0xff, 0x2c, 0x2d, 0x2d, 0x2c, 0xc4, 0xff, 0x62, 0x63, 0x1c, 0x3f, 0x1e, 0x63, 0xd8, 0xff, -0xff, 0x2c, 0xca, 0x1a, 0x1d, 0x82, 0x2d, 0xa3, 0xd8, 0x62, 0x3f, 0x3f, 0x3f, 0x1e, 0xd8, 0x1a, -0x82, 0x2d, 0x1a, 0x3f, 0x3f, 0x3f, 0xa3, 0x2d, 0xd8, 0x62, 0x0e, 0x1e, 0x3f, 0x1f, 0xd8, 0x62, -0x82, 0x2d, 0x1d, 0x3f, 0x3f, 0x0f, 0x82, 0x2e, 0x63, 0x83, 0x0a, 0x1e, 0x3f, 0xfd, 0x64, 0xff, -0xff, 0x2c, 0x5a, 0x3f, 0x1e, 0x0b, 0xc4, 0xeb, 0xff, 0x64, 0xd8, 0xd9, 0xd9, 0x64, 0x83, 0xff, -0xff, 0xca, 0x2c, 0xa3, 0x5a, 0xc4, 0x2e, 0x82, 0xff, 0xff, 0x83, 0x8a, 0x89, 0x17, 0xff, 0xff, -0xff, 0xff, 0xa9, 0x2e, 0x2e, 0xca, 0x82, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff -}; - -const char google_icon_L[] = { -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x04, 0x00, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x04, 0x1b, -0x09, 0x08, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x04, 0x00, 0x04, 0x1c, -0x1b, 0x1c, 0x08, 0x09, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x04, 0x1b, 0x09, 0x08, -0x1c, 0x1c, 0x1b, 0x1c, 0x08, 0x09, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x04, 0x00, 0x04, 0x1c, 0x1b, 0x1c, -0x08, 0x09, 0x1c, 0x1b, 0x1c, 0x1b, 0x09, 0x08, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x04, 0x1b, 0x09, 0x08, 0x1c, 0x1c, -0x1b, 0x1c, 0x08, 0x09, 0x1c, 0x1b, 0x1c, 0x1b, 0x09, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x04, 0x00, 0x04, 0x1c, 0x1b, 0x1c, 0x08, 0x09, -0x1c, 0x1b, 0x1c, 0x1b, 0x09, 0x08, 0x1c, 0x1c, 0x1b, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x04, 0x1b, 0x09, 0x08, 0x1c, 0x1c, 0x1b, 0x1c, -0x08, 0x09, 0x1c, 0x1b, 0x1c, 0x1b, 0x09, 0x00, 0x1c, 0x00, 0xd9, 0x00, 0x00, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x04, 0x04, 0x04, 0x1c, 0x1c, 0x1b, 0x09, 0x08, 0x1c, 0x1b, -0x1c, 0x1c, 0x08, 0x09, 0x1b, 0x1c, 0x1c, 0x00, 0x15, 0x00, 0xd1, 0xd9, 0xd9, 0x00, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x04, 0x3f, 0x08, 0x09, 0x1b, 0x1c, 0x1b, 0x1c, 0x09, 0x08, -0x1c, 0x1b, 0x1c, 0x1c, 0x08, 0x00, 0x1c, 0x00, 0x15, 0x00, 0xd1, 0xd1, 0xd9, 0x00, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0x04, 0x04, 0x04, 0x1c, 0x3f, 0x3f, 0x08, 0x09, 0x1b, 0x1c, 0x1b, 0x1c, -0x09, 0x08, 0x1c, 0x1b, 0x1c, 0x00, 0x15, 0x00, 0x15, 0x00, 0xd1, 0xd9, 0xaa, 0x01, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0x04, 0x3f, 0x08, 0x09, 0x1b, 0x1c, 0x3f, 0x3f, 0x08, 0x09, 0x1b, 0x1c, -0x1b, 0x1c, 0x09, 0x00, 0x1b, 0x00, 0x15, 0x00, 0x0f, 0x00, 0xd9, 0xaa, 0xaa, 0x00, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0x04, 0x3f, 0x3f, 0x3f, 0x08, 0x09, 0x1b, 0x1c, 0x3f, 0x3f, 0x08, 0x09, -0x1b, 0x1c, 0x1b, 0x00, 0x16, 0x00, 0x15, 0x00, 0x0f, 0xd9, 0xaa, 0xaa, 0xaa, 0x00, 0xff, 0xff, -0xff, 0xff, 0xff, 0x00, 0x04, 0x3f, 0x1b, 0x1c, 0x3f, 0x3f, 0x08, 0x09, 0x1b, 0x1c, 0x3f, 0x3f, -0x08, 0x00, 0x1c, 0x00, 0x15, 0x00, 0x0f, 0x00, 0xd9, 0xaa, 0xaa, 0xaa, 0xaa, 0x00, 0xff, 0xff, -0xff, 0xff, 0x00, 0xd9, 0x04, 0x3f, 0x1b, 0x1c, 0x1b, 0x1c, 0x3f, 0x3f, 0x08, 0x09, 0x1b, 0x1c, -0x3f, 0x00, 0x15, 0x00, 0x15, 0x00, 0x0f, 0xd9, 0xaa, 0xaa,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x2c, 0x82, 0x3f, 0x3f, 0x3f, 0x3f, 0x1b, 0x02, 0x00, 0xa9, 0x2c, 0xeb, -0x2f, 0xaa, 0x83, 0xf8, 0xf8, 0xd8, 0xfd, 0x3f, 0x3f, 0x1e, 0xfd, 0xd8, 0xf8, 0x84, 0x89, 0xff, -0xff, 0xff, 0x82, 0x2d, 0x2c, 0x2c, 0xda, 0x3f, 0x3f, 0x3f, 0x3f, 0x17, 0x13, 0xc4, 0x2d, 0xeb, -0xa9, 0x00, 0x0f, 0x83, 0x84, 0x64, 0xf8, 0xd8, 0xd8, 0xd8, 0xf8, 0xf8, 0x84, 0x89, 0xff, 0xff, -0xff, 0xff, 0xff, 0xca, 0x2d, 0x2c, 0x2c, 0x5a, 0x1e, 0x3f, 0x3f, 0xda, 0xc4, 0x2c, 0xeb, 0x2f, -0x00, 0x0f, 0x0f, 0xff, 0x89, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x8a, 0x89, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xeb, 0x2d, 0x2c, 0x2c, 0x2c, 0xc4, 0x2c, 0x2c, 0x2c, 0xeb, 0x2f, 0x00, -0x0f, 0x0f, 0xff, 0xff, 0xff, 0xff, 0x89, 0x89, 0x8a, 0x89, 0x89, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xca, 0xeb, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0xeb, 0x2f, 0x00, 0x0f, -0x0e, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xa9, 0xca, 0xeb, 0xeb, 0xeb, 0xca, 0xa9, 0x00, 0x0e, 0x0f, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff -}; - -const char google_icon_HVIF[] = { - 0x6e, 0x63, 0x69, 0x66, 0x12, 0x03, 0x99, 0x66, 0x33, 0x02, 0x00, 0x06, - 0x02, 0xb8, 0x7f, 0xa1, 0x3b, 0x71, 0xab, 0xbb, 0xc2, 0xa0, 0xb8, 0xba, - 0x5d, 0x4b, 0x18, 0xa2, 0x49, 0x9b, 0x1d, 0x00, 0xff, 0xcc, 0x99, 0xff, - 0xbd, 0x87, 0x52, 0x02, 0x00, 0x06, 0x02, 0x3b, 0x93, 0xe4, 0xb9, 0x93, - 0xe4, 0x39, 0x93, 0xe4, 0x3b, 0x93, 0xe4, 0x49, 0xa8, 0x8a, 0x47, 0x9b, - 0x06, 0x7c, 0x99, 0x66, 0x33, 0xc0, 0xb7, 0x87, 0x59, 0x02, 0x00, 0x06, - 0x02, 0x37, 0xb8, 0xfe, 0x38, 0x79, 0x61, 0xbb, 0x32, 0x4b, 0x3a, 0x67, - 0x9b, 0x4a, 0x8e, 0x15, 0x48, 0x6e, 0x2b, 0x00, 0xc8, 0x8c, 0x51, 0xff, - 0xff, 0xcc, 0x99, 0x02, 0x00, 0x16, 0x02, 0x38, 0x00, 0x17, 0xb9, 0xff, - 0xf7, 0x3a, 0x33, 0x30, 0x38, 0x33, 0x4f, 0x4a, 0x5e, 0xc6, 0x4a, 0x0f, - 0x65, 0x00, 0x67, 0xff, 0xff, 0x02, 0x00, 0x06, 0x02, 0xbb, 0x12, 0xa8, - 0x3a, 0x8f, 0x8c, 0xba, 0x8f, 0x8c, 0xbb, 0x12, 0xa8, 0x4b, 0x34, 0x46, - 0x4a, 0xf0, 0x63, 0x00, 0x99, 0x66, 0x33, 0xff, 0x68, 0x3a, 0x0e, 0x02, - 0x00, 0x06, 0x02, 0x3a, 0x0e, 0xd7, 0x3b, 0x6e, 0x12, 0xbb, 0x6e, 0x12, - 0x3a, 0x0e, 0xd7, 0x49, 0x97, 0xce, 0x48, 0x60, 0xc5, 0x00, 0xff, 0xe6, - 0xce, 0xff, 0xff, 0xcc, 0x99, 0x02, 0x00, 0x06, 0x02, 0x3a, 0x46, 0xde, - 0x3b, 0x49, 0xec, 0xbb, 0x49, 0xec, 0x3a, 0x46, 0xde, 0x4a, 0x60, 0x61, - 0x4a, 0x4d, 0xe6, 0x00, 0xad, 0x8a, 0x67, 0xff, 0x7e, 0x4e, 0x1e, 0x02, - 0x00, 0x06, 0x02, 0x38, 0x0d, 0x6f, 0x3b, 0xdd, 0xb9, 0xbb, 0xdd, 0xb9, - 0x38, 0x0d, 0x6f, 0x49, 0x75, 0xc0, 0x4a, 0x03, 0x71, 0x00, 0xee, 0xce, - 0xae, 0xff, 0xcc, 0x99, 0x66, 0x03, 0x01, 0x00, 0x00, 0x04, 0x00, 0x75, - 0x02, 0x00, 0x06, 0x03, 0x38, 0x00, 0x17, 0xb9, 0xff, 0xf7, 0x3a, 0x33, - 0x30, 0x38, 0x33, 0x4f, 0x4a, 0x5e, 0xc6, 0x4a, 0x0f, 0x65, 0x00, 0x4b, - 0x41, 0x16, 0xbd, 0xba, 0xb0, 0x88, 0xff, 0xfc, 0xf8, 0xe8, 0x03, 0x01, - 0x00, 0x00, 0x05, 0x00, 0x02, 0x01, 0x06, 0x02, 0x3b, 0x40, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x3b, 0x40, 0x00, 0x48, 0x60, 0x00, 0x4a, - 0xe0, 0x00, 0x00, 0xf3, 0xf8, 0xfa, 0xff, 0xbd, 0xdc, 0xe9, 0x03, 0x01, - 0x00, 0x00, 0x02, 0x01, 0x06, 0x03, 0x3d, 0x04, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x3d, 0x04, 0x00, 0x47, 0x58, 0x00, 0x4a, 0x50, 0x00, - 0x00, 0xff, 0xff, 0xff, 0x7c, 0xff, 0x06, 0x06, 0xff, 0x3c, 0x25, 0x25, - 0x02, 0x01, 0x06, 0x03, 0x3d, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x3d, 0x04, 0x00, 0x47, 0x58, 0x00, 0x4a, 0x50, 0x00, 0x00, 0xff, - 0xff, 0xff, 0x7c, 0xff, 0xea, 0x05, 0xff, 0x3c, 0x25, 0x25, 0x10, 0x0a, - 0x04, 0x2c, 0x40, 0x3c, 0x47, 0x3c, 0x4c, 0x2c, 0x44, 0x0a, 0x06, 0x2a, - 0x40, 0x2a, 0x4c, 0x42, 0x58, 0x5a, 0x40, 0x5a, 0x36, 0x42, 0x2c, 0x0a, - 0x04, 0x2a, 0x40, 0x42, 0x4c, 0x5a, 0x36, 0x42, 0x2c, 0x0a, 0x06, 0xc6, - 0x88, 0xbd, 0xf6, 0xc8, 0xa6, 0xbc, 0x05, 0xc0, 0xaf, 0xb8, 0xb3, 0xb8, - 0x6e, 0xbf, 0x95, 0xba, 0x6c, 0xc0, 0x94, 0x42, 0x34, 0x0a, 0x04, 0xc6, - 0x88, 0xbd, 0xf6, 0xc0, 0x69, 0xc3, 0x92, 0xba, 0x6c, 0xc0, 0x94, 0x42, - 0x34, 0x0a, 0x04, 0x42, 0x58, 0x5a, 0x40, 0x5a, 0x36, 0x42, 0x4c, 0x0a, - 0x06, 0x26, 0x32, 0x26, 0x4e, 0x42, 0x5c, 0x44, 0x5a, 0x44, 0x3c, 0x28, - 0x30, 0x0a, 0x04, 0x26, 0x32, 0x42, 0x3e, 0x44, 0x3c, 0x28, 0x30, 0x0a, - 0x04, 0x42, 0x5c, 0x44, 0x5a, 0x44, 0x3c, 0x42, 0x3e, 0x0a, 0x04, 0x26, - 0x4e, 0x42, 0x5c, 0x42, 0x3e, 0x26, 0x32, 0x0a, 0x07, 0x42, 0x5e, 0x54, - 0x5e, 0x56, 0x5c, 0x4b, 0x57, 0x62, 0x40, 0x5c, 0x3e, 0x42, 0x3e, 0x0a, - 0x09, 0x58, 0x54, 0x50, 0x50, 0x5c, 0x50, 0x54, 0x4c, 0x60, 0x4c, 0x58, - 0x48, 0x64, 0x48, 0x58, 0x42, 0x46, 0x54, 0x0a, 0x05, 0x46, 0x45, 0x46, - 0x36, 0x36, 0x2f, 0x36, 0x43, 0xc0, 0x58, 0xc3, 0x3c, 0x0a, 0x0a, 0x23, - 0x2f, 0x2d, 0x49, 0x4a, 0x5b, 0x5c, 0x2c, 0x50, 0x2a, 0x4c, 0x2c, 0x3a, - 0x28, 0x38, 0x2d, 0x30, 0x2b, 0xb9, 0x57, 0xba, 0xa7, 0x02, 0x04, 0x32, - 0x46, 0xbb, 0xee, 0x46, 0xb8, 0x69, 0x46, 0x2a, 0x4e, 0x2a, 0xc3, 0x91, - 0x2a, 0xc7, 0x16, 0x32, 0x56, 0xb8, 0x69, 0x56, 0xbb, 0xee, 0x56, 0x3a, - 0x4e, 0x3a, 0xc7, 0x16, 0x3a, 0xc3, 0x91, 0x08, 0x04, 0x23, 0xb3, 0xe5, - 0xcb, 0x34, 0xb4, 0x18, 0xcb, 0x81, 0xcb, 0x5a, 0x24, 0xcb, 0xa7, 0x1a, - 0x0a, 0x0a, 0x02, 0x0a, 0x0b, 0x20, 0x1c, 0x20, 0x0a, 0x09, 0x01, 0x01, - 0x30, 0x1c, 0x20, 0x01, 0x17, 0x84, 0x10, 0x04, 0x0a, 0x01, 0x01, 0x02, - 0x20, 0x1c, 0x20, 0x0a, 0x02, 0x01, 0x03, 0x20, 0x1c, 0x20, 0x0a, 0x03, - 0x01, 0x04, 0x20, 0x1c, 0x20, 0x0a, 0x05, 0x01, 0x05, 0x20, 0x1c, 0x20, - 0x0a, 0x0c, 0x01, 0x0c, 0x30, 0x28, 0x14, 0x01, 0x17, 0x84, 0x10, 0x04, - 0x0a, 0x0b, 0x01, 0x0c, 0x20, 0x28, 0x14, 0x0a, 0x0c, 0x01, 0x0c, 0x30, - 0x24, 0x18, 0x01, 0x17, 0x84, 0x10, 0x04, 0x0a, 0x0b, 0x01, 0x0c, 0x20, - 0x24, 0x18, 0x0a, 0x0c, 0x01, 0x0c, 0x30, 0x20, 0x1c, 0x01, 0x17, 0x84, - 0x10, 0x04, 0x0a, 0x0b, 0x01, 0x0c, 0x20, 0x20, 0x1c, 0x0a, 0x0c, 0x01, - 0x0c, 0x30, 0x1c, 0x20, 0x01, 0x17, 0x84, 0x10, 0x04, 0x0a, 0x0b, 0x01, - 0x0c, 0x20, 0x1c, 0x20, 0x0a, 0x09, 0x01, 0x06, 0x30, 0x1c, 0x20, 0x01, - 0x17, 0x84, 0x00, 0x04, 0x0a, 0x06, 0x01, 0x07, 0x20, 0x1c, 0x20, 0x0a, - 0x07, 0x01, 0x08, 0x20, 0x1c, 0x20, 0x0a, 0x08, 0x01, 0x09, 0x20, 0x1c, - 0x20, 0x0a, 0x00, 0x01, 0x00, 0x20, 0x1e, 0x24, 0x0a, 0x0c, 0x01, 0x00, - 0x20, 0x1c, 0x20, 0x0a, 0x10, 0x01, 0x0e, 0x30, 0xb0, 0x42, 0xb5, 0xbd, - 0x01, 0x17, 0x84, 0x00, 0x04, 0x0a, 0x0e, 0x01, 0x0e, 0x20, 0xb0, 0x42, - 0xb5, 0xbd, 0x0a, 0x0f, 0x01, 0x0e, 0x02, 0x3c, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x46, 0xe8, 0x00, 0x4a, 0xb6, - 0x00, 0x0a, 0x11, 0x01, 0x0e, 0x30, 0xb7, 0xfb, 0xb3, 0x8c, 0x01, 0x17, - 0x84, 0x00, 0x04, 0x0a, 0x0e, 0x01, 0x0e, 0x20, 0xb7, 0xfb, 0xb3, 0x8c, - 0x0a, 0x0f, 0x01, 0x0e, 0x02, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x3c, 0x00, 0x00, 0x48, 0xc0, 0x00, 0x4a, 0x6e, 0x00 -}; - -const char google_icon_SVG[] = { - 0x54, 0x1f, 0x00, 0x00, 0x78, 0xda, 0xed, 0x98, 0x5d, 0x6f, 0xdb, 0x36, 0x14, 0x86, 0xef, 0xf3, - 0x2b, 0x08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 0xd8, - 0xdf, 0xf2, 0xab, 0xca, 0x06, 0xe4, 0x81, 0xa3, 0xc1, 0x23, 0xaa, 0xc2, 0x80, 0xac, 0xb1, 0x08, - 0x8c, 0x2a, 0xc0, 0xbb, 0x30, 0x0a, 0x14, 0xde, 0x45, 0x70, 0xd6, 0x58, 0x94, 0x86, 0xb2, 0xd0, - 0x19, 0x1d, 0xbf, 0x56, 0xad, 0x8a, 0x25, 0x29, 0x66, 0xb3, 0xca, 0x22, 0x2a, 0xcc, 0x81, 0x55, - 0x2c, 0x07, 0x35, 0x2e, 0xa3, 0xe0, 0x74, 0x36, 0x4b, 0xd3, 0x28, 0x0a, 0xce, 0x76, 0x34, 0xe5, - 0x5b, 0x4d, 0xaf, 0xa7, 0x26, 0xc4, 0x4f, 0x35, 0x43, 0x38, 0xdb, 0x1c, 0xc3, 0x6e, 0x3b, 0xdc, - 0x95, 0x8b, 0x77, 0xa7, 0x8f, 0x23, 0xeb, 0xed, 0xd0, 0xd6, 0x29, 0x89, 0xf2, 0xa2, 0xb0, 0x3f, - 0x55, 0x55, 0xee, 0xa5, 0x6a, 0x48, 0x4d, 0xa3, 0x69, 0x48, 0x41, 0x37, 0x92, 0x0a, 0x4d, 0x25, - 0x34, 0x92, 0x0e, 0x42, 0xca, 0xe4, 0x4e, 0x49, 0xa9, 0x34, 0x46, 0x6f, 0x89, 0x15, 0x45, 0x5a, - 0x0b, 0xb1, 0x53, 0x57, 0x46, 0x43, 0x25, 0xc2, 0x6d, 0x71, 0x43, 0x14, 0x37, 0xda, 0x5b, 0x5c, - 0xbe, 0x25, 0xae, 0x8c, 0x28, 0x03, 0x02, 0x21, 0x55, 0x1c, 0x27, 0x2b, 0x15, 0x02, 0xf5, 0xa5, - 0xda, 0x71, 0x4c, 0x9d, 0xca, 0x78, 0xe6, 0x31, 0x17, 0x54, 0x03, 0x11, 0x1c, 0x51, 0x8a, 0xb9, - 0xa1, 0x5a, 0xe0, 0x3c, 0xa4, 0xcc, 0x38, 0x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xdc, 0x0b, 0xdd, 0x6b, 0xfd, 0x68, 0xd0, 0xd4, 0xa0, - 0xfe, 0xf5, 0xd9, 0x93, 0x0a, 0x38, 0x3c, 0x15, 0xc0, 0x04, 0x6f, 0xa9, 0xa8, 0x8b, 0x3c, 0xea, - 0x4b, 0xed, 0x47, 0x84, 0x98, 0x99, 0x59, 0xe2, 0x99, 0x33, 0x9e, 0xa6, 0x36, 0xfa, 0x11, 0x0b, - 0x6f, 0x1a, 0x75, 0x3b, 0xa5, 0xf6, 0xe2, 0x8d, 0xe8, 0xe9, 0x4b, 0xfe, 0xf3, 0x61, 0xa0, 0xd1, - 0x55, 0x67, 0x7d, 0xd5, 0xe7, 0x9c, 0x6a, 0xbc, 0xc8, 0xda, 0x31, 0x78, 0x22, 0x29, 0x5e, 0xbf, - 0xa3, 0xb2, 0x09, 0x53, 0xc7, 0x77, 0x54, 0xe2, 0xd5, 0x38, 0x2a, 0xdc, 0x8c, 0x20, 0x1b, 0x3f, - 0xc0, 0x84, 0xfc, 0x9f, 0xba, 0x29, 0xd9, 0x7b, 0x55, 0x26, 0x7c, 0x9d, 0x4e, 0x0a, 0xa0, 0x2f, - 0xcc, 0x86, 0xbb, 0x1d, 0x9e, 0xcd, 0x2f, 0x4e, 0x86, 0x67, 0xd5, 0x3d, 0x5e, 0xfe, 0x01, 0xe0, - 0x04, 0x88, 0xf2 -}; - -// #pragma mark - root folder attribute list -//0x6949434F 7 "BEOS:D:STD_ICON" 49 44 58 5A 05 53 00 -uint8 root_folder_attrs_1[] = { 0x49, 0x44, 0x58, 0x5A, 0x05, 0x53, 0x00 }; // needed for SVG icons in Zeta... -uint64 root_folder_attrs_2 = 0xdeadbeef50385038LL; // volume id, just in case - -struct attr_entry root_folder_attrs[] = { -{ "BEOS:TYPE", /*B_MIME_STRING_TYPE*/'MIMS', SZSTR("application/x-vnd.Be-directory") }, -{ "BEOS:M:STD_ICON", 'MICN', 16*16, (char *)google_icon_M }, -{ "BEOS:L:STD_ICON", 'ICON', 32*32, (char *)google_icon_L }, -{ "BEOS:V:STD_ICON", 'zICO', sizeof(google_icon_SVG), (char *)google_icon_SVG }, -{ "BEOS:D:STD_ICON", 0x6949434F, sizeof(root_folder_attrs_1), &root_folder_attrs_1 }, -{ "BEOS:ICON", 'VICN', sizeof(google_icon_HVIF), (char *)google_icon_HVIF }, -//{ "BEOS:EMBLEMS", 'CSTR', SZSTR("palm") }, -{ "be:volume_id", B_UINT64_TYPE, sizeof(root_folder_attrs_2), &root_folder_attrs_2 }, -{ NULL, 0, 0, NULL } /* end of list */ -}; - -static uint8 folders_attrs_1[] = { - 0x52, 0x56, 0xf2, 0x4f, 0x15, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x54, 0x69, 0x74, 0x6c, - 0x65, 0x00, 0x00, 0x00, 0x20, 0x42, 0x00, 0x00, 0x02, 0x43, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x00, - 0x00, 0x00, 0x4d, 0x45, 0x54, 0x41, 0x3a, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x00, 0x52, 0x7d, 0xfb, - 0x77, 0x52, 0x54, 0x53, 0x43, 0x00, 0x01, 0x52, 0x56, 0xf2, 0x4f, 0x15, 0x00, 0x00, 0x00, 0x03, - 0x00, 0x00, 0x00, 0x55, 0x52, 0x4c, 0x00, 0x00, 0x00, 0x39, 0x43, 0x00, 0x00, 0x2a, 0x43, 0x00, - 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x4d, 0x45, 0x54, 0x41, 0x3a, 0x75, 0x72, 0x6c, 0x00, - 0x52, 0x54, 0x5b, 0xe3, 0x52, 0x54, 0x53, 0x43, 0x00, 0x01, 0x52, 0x56, 0xf2, 0x4f, 0x15, 0x00, - 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x4b, 0x65, 0x79, 0x77, 0x6f, 0x72, 0x64, 0x73, 0x00, 0x00, - 0x00, 0xb9, 0x43, 0x00, 0x00, 0x02, 0x43, 0x00, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x4d, - 0x45, 0x54, 0x41, 0x3a, 0x6b, 0x65, 0x79, 0x77, 0x00, 0x52, 0xdc, 0xf3, 0xdb, 0x52, 0x54, 0x53, - 0x43, 0x00, 0x01, 0x52, 0x56, 0xf2, 0x4f, 0x15, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x4d, - 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x00, 0x00, 0xc0, 0x00, 0x44, 0x00, 0x00, 0x16, 0x43, - 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x2f, 0x6d, 0x6f, - 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x00, 0x45, 0x6d, 0x4b, 0x5d, 0x45, 0x4d, 0x49, 0x54, 0x01, - 0x00, 0x52, 0x56, 0xf2, 0x4f, 0x15, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x47, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x20, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x00, 0x00, 0x00, 0x2a, 0x44, 0x00, 0x00, - 0xa0, 0x41, 0x01, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x47, 0x4f, 0x4f, 0x47, 0x4c, 0x45, - 0x3a, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x00, 0x47, 0xde, 0xef, 0xfc, 0x47, 0x4e, 0x4f, 0x4c, 0x00, - 0x01 }; -static uint8 folders_attrs_2[] = { - 0x52, 0xf5, 0x5e, 0x6f, 0x0a, 0x00, 0x00, 0x00, 0x74, 0x73, 0x6c, 0x54, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x47, 0xde, 0xef, 0xfc, 0x47, 0x4e, 0x4f, 0x4c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x01 }; -struct attr_entry folders_attrs[] = { -{ "BEOS:TYPE", /*B_MIME_STRING_TYPE*/'MIMS', SZSTR("application/x-vnd.Be-directory") }, -{ "_trk/columns_le", 'RAWT', SZTAB(folders_attrs_1) }, -{ "_trk/viewstate_le", 'RAWT', SZTAB(folders_attrs_2) }, -{ "", 'RAWT', SZTAB(folders_attrs_2) }, -{ NULL, 0, 0, NULL } /* end of list */ -}; - -struct attr_entry bookmark_attrs[] = { -{ "BEOS:TYPE", /*B_MIME_STRING_TYPE*/'MIMS', SZSTR("application/x-vnd.Be-bookmark") }, -{ NULL, 0, 0, NULL } /* end of list */ -}; - -/* for debugging */ -//static int32 fake_bm_attr_1 = 1; -struct attr_entry fake_bookmark_attrs[] = { -{ "BEOS:TYPE", /*B_MIME_STRING_TYPE*/'MIMS', SZSTR("application/x-vnd.Be-bookmark") }, -{ "META:title", 'CSTR', SZSTR("Plop!") }, -{ "META:url", 'CSTR', SZSTR("http://127.0.0.1/") }, -{ "META:keyw", 'CSTR', SZSTR("plop") }, -//{ "GOOGLE:order", 'LONG', sizeof(int32), &fake_bm_attr_1 }, -{ NULL, 0, 0, NULL } /* end of list */ -}; - -static uint8 template_1_attrs_1 = 1; -static int32 template_1_attrs_2 = 1; -static uint8 template_1_attrs_3[] = { - 0x31, 0x42, 0x4F, 0x46, 0x01, 0x00, 0x00, 0x98, 0x98, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x01, 0x0F, 0x47, 0x4E, 0x4F, 0x4C, 0x04, 0x0C, 0x63, 0x72, 0x65, 0x61, 0x74, 0x69, 0x6F, 0x6E, - 0x44, 0x61, 0x74, 0x65, 0x51, 0xEA, 0xC7, 0x41, 0x0F, 0x47, 0x4E, 0x4C, 0x4C, 0x08, 0x08, 0x63, - 0x61, 0x70, 0x61, 0x63, 0x69, 0x74, 0x79, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0B, - 0x52, 0x54, 0x53, 0x43, 0x08, 0x0A, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x4E, 0x61, 0x6D, 0x65, - 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x41, 0x0B, 0x52, 0x54, 0x53, 0x43, 0x10, 0x0A, 0x76, - 0x6F, 0x6C, 0x75, 0x6D, 0x65, 0x4E, 0x61, 0x6D, 0x65, 0x07, 0x00, 0x00, 0x00, 0x47, 0x6F, 0x6F, - 0x67, 0x6C, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0B, 0x52, 0x54, 0x53, 0x43, 0x10, 0x07, - 0x66, 0x73, 0x68, 0x4E, 0x61, 0x6D, 0x65, 0x09, 0x00, 0x00, 0x00, 0x67, 0x6F, 0x6F, 0x67, 0x6C, - 0x65, 0x66, 0x73, 0x00, 0x00, 0x00, 0x00, 0x00 }; -static int32 template_1_attrs_4 = 0x4662796E; -static uint8 template_1_attrs_5[] = { - 0x00, 0x00, 0x06, 0xEC, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00 }; -static int32 template_1_attrs_6 = 0x00000027; -static int32 template_1_attrs_7 = 0x00000000; -static uint8 template_1_attrs_8[] = { - 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x82, 0x43, 0x00, 0x00, 0xA0, 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0xE0, 0x9F, 0x44, 0x00, 0xC0, 0x7F, 0x44, 0xFF, 0xFF, 0xFF, 0xFF }; -static uint8 template_1_attrs_9[] = { - 0x00, 0x00, 0x00, 0x00, 0x58, 0x10, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x48, 0x44, - 0x00, 0x00, 0x0c, 0x44 }; -/*static uint8 template_1_attrs_10[] = { - 0x52, 0x56, 0xf2, 0x4f, 0x15, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x54, 0x69, 0x74, 0x6c, - 0x65, 0x00, 0x00, 0x00, 0x20, 0x42, 0x00, 0x00, 0x50, 0x43, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x00, - 0x00, 0x00, 0x4d, 0x45, 0x54, 0x41, 0x3a, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x00, 0x52, 0x7d, 0xfb, - 0x77, 0x52, 0x54, 0x53, 0x43, 0x00, 0x01, 0x52, 0x56, 0xf2, 0x4f, 0x15, 0x00, 0x00, 0x00, 0x03, - 0x00, 0x00, 0x00, 0x55, 0x52, 0x4c, 0x00, 0x00, 0x80, 0x83, 0x43, 0x00, 0x80, 0x85, 0x43, 0x00, - 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x4d, 0x45, 0x54, 0x41, 0x3a, 0x75, 0x72, 0x6c, 0x00, - 0x52, 0x54, 0x5b, 0xe3, 0x52, 0x54, 0x53, 0x43, 0x00, 0x01, 0x52, 0x56, 0xf2, 0x4f, 0x15, 0x00, - 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x4b, 0x65, 0x79, 0x77, 0x6f, 0x72, 0x64, 0x73, 0x00, 0x00, - 0x40, 0x08, 0x44, 0x00, 0x00, 0x02, 0x43, 0x00, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x4d, - 0x45, 0x54, 0x41, 0x3a, 0x6b, 0x65, 0x79, 0x77, 0x00, 0x52, 0xdc, 0xf3, 0xdb, 0x52, 0x54, 0x53, - 0x43, 0x00, 0x01, 0x52, 0x56, 0xf2, 0x4f, 0x15, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x4d, - 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x00, 0x00, 0x80, 0x2c, 0x44, 0x00, 0x00, 0x16, 0x43, - 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x2f, 0x6d, 0x6f, - 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x00, 0x45, 0x6d, 0x4b, 0x5d, 0x45, 0x4d, 0x49, 0x54, 0x01, - 0x00, 0x52, 0x56, 0xf2, 0x4f, 0x15, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x47, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x20, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x00, 0x00, 0xc0, 0x55, 0x44, 0x00, 0x00, - 0x70, 0x41, 0x01, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x47, 0x4f, 0x4f, 0x47, 0x4c, 0x45, - 0x3a, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x00, 0x47, 0xde, 0xef, 0xfc, 0x47, 0x4e, 0x4f, 0x4c, 0x00, - 0x00 };*/ -static uint8 template_1_attrs_11[] = { - 0x52, 0xf5, 0x5e, 0x6f, 0x0a, 0x00, 0x00, 0x00, 0x74, 0x73, 0x6c, 0x54, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x47, 0xde, 0xef, 0xfc, 0x47, 0x4e, 0x4f, 0x4c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x01 }; -struct attr_entry template_1_attrs[] = { -{ "BEOS:TYPE", /*B_MIME_STRING_TYPE*/'MIMS', SZSTR("application/x-vnd.Be-queryTemplate") }, -{ "_trk/qrystr", 'CSTR', SZSTR("((name==\"*[aA][nN][yY] [qQ][uU][eE][sS][tT][iI][oO][nN] [yY][oO][uU]\\'[dD] [lL][iI][kK][eE] [tT][oO] [aA][sS][kK] [gG][oO][oO][gG][lL][eE] ?*\")&&(BEOS:TYPE==\"application/x-vnd.Be-bookmark\"))") }, -{ "_trk/queryDynamicDate", 'BOOL', 1, &template_1_attrs_1 }, -{ "_trk/recentQuery", 'LONG', sizeof(int32), &template_1_attrs_2 }, -{ "_trk/qryvol1", 'MSGG', SZTAB(template_1_attrs_3) }, -{ "_trk/qryinitmime", 'CSTR', SZSTR("Bookmark") }, -{ "_trk/qryinitmode", 'LONG', sizeof(int32), &template_1_attrs_4 }, -{ "_trk/qrymoreoptions_le", 'RAWT', SZTAB(template_1_attrs_5) }, -{ "_trk/qryinitstr", 'CSTR', SZSTR("Any question you'd like to ask google ?") }, -{ "_trk/focusedView", 'CSTR', SZSTR("TextControl") }, -{ "_trk/focusedSelEnd", 'LONG', sizeof(int32), &template_1_attrs_6 }, -{ "_trk/focusedSelStart", 'LONG', sizeof(int32), &template_1_attrs_7 }, -{ "_trk/xtpinfo_le", 'RAWT', SZTAB(template_1_attrs_8) }, -{ "_trk/pinfo_le", 'RAWT', SZTAB(template_1_attrs_9) }, -{ "_trk/columns_le", 'RAWT', SZTAB(folders_attrs_1)/*SZTAB(template_1_attrs_10)*/ }, -{ "_trk/viewstate_le", 'RAWT', SZTAB(template_1_attrs_11) }, -{ NULL, 0, 0, NULL } /* end of list */ -}; - -static int32 text_attrs_1 = 0x0000FFFF; -static int32 text_attrs_2 = 0x00000000; -static uint8 text_attrs_3 = 1; -static uint8 text_attrs_4[] = { - 0x41, 0x6c, 0x69, 0x21, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, - 0x53, 0x77, 0x69, 0x73, 0x37, 0x32, 0x31, 0x20, 0x42, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x52, 0x6f, 0x6d, 0x61, 0x6e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x41, 0x60, 0x00, 0x00, 0x42, 0xb4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x28, 0x53, 0x77, 0x69, 0x73, 0x37, 0x32, 0x31, 0x20, 0x42, 0x54, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x52, 0x6f, 0x6d, 0x61, 0x6e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x41, 0x60, 0x00, 0x00, 0x42, 0xb4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x29, 0x53, 0x77, 0x69, 0x73, 0x37, 0x32, 0x31, 0x20, - 0x42, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x52, 0x6f, 0x6d, 0x61, 0x6e, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x60, 0x00, 0x00, 0x42, 0xb4, 0x00, 0x00, - 0x00, 0x00, 0xff, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2a, 0x53, 0x77, 0x69, 0x73, - 0x37, 0x32, 0x31, 0x20, 0x42, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x52, 0x6f, 0x6d, 0x61, - 0x6e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x60, 0x00, 0x00, - 0x42, 0xb4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, - 0x53, 0x77, 0x69, 0x73, 0x37, 0x32, 0x31, 0x20, 0x42, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x52, 0x6f, 0x6d, 0x61, 0x6e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x41, 0x20, 0x00, 0x00, 0x42, 0xb4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00 }; -struct attr_entry text_attrs[] = { -{ "BEOS:TYPE", /*B_MIME_STRING_TYPE*/'MIMS', SZSTR("text/plain") }, -{ "be:encoding", 'LONG', sizeof(int32), &text_attrs_1 }, -{ "alignment", 'LONG', sizeof(int32), &text_attrs_2 }, -{ "wrap", 'BOOL', sizeof(uint8), &text_attrs_3 }, -{ "styles", 'RAWT', SZTAB(text_attrs_4) }, -{ NULL, 0, 0, NULL } /* end of list */ -}; - -char *readmestr = \ -"Welcome to the Google™ FileSystem for BeOS™, Zeta™ and Haiku®.\n" -"Copyright© 2004-2008, François Revol.\n" -"Google is a trademark of Google, Inc.\n" -"BeOS is a trademark of ACCESS.\n" -"Zeta is a trademark of yellowTAB GmbH.\n" -"Haiku is a trademark of Haiku, Inc.\n" -"\n" -"Use \"Search Google\" query template in this folder to ask google anything.\n" -"\n"; - -struct attr_entry mailto_me_bookmark_attrs[] = { -{ "BEOS:TYPE", /*B_MIME_STRING_TYPE*/'MIMS', SZSTR("application/x-person") }, -{ "META:email", 'CSTR', SZSTR("revol@free.fr") }, -{ "META:name", 'CSTR', SZSTR("François Revol") }, -{ "META:country", 'CSTR', SZSTR("France") }, -{ "META:nickname", 'CSTR', SZSTR("mmu_man") }, -//{ "META:company", 'CSTR', SZSTR("yellowTAB GmbH") }, -{ "META:url", 'CSTR', SZSTR("http://revolf.free.fr/") }, -{ "META:group", 'CSTR', SZSTR("") }, -{ "IM:connections", 'CSTR', SZSTR("icq:77792625;gtalk:revolf@gmail.com;yahoo:mmu_man;msn:revol@mail.com") }, -#if 0 -{ "BEOS:TYPE", /*B_MIME_STRING_TYPE*/'MIMS', SZSTR("application/x-vnd.Be-bookmark") }, -{ "META:title", 'CSTR', SZSTR("Report googlefs bugs") }, -{ "META:url", 'CSTR', SZSTR("mailto:revol@free.fr"/*"&subject=googlefs bug report""&body=Hi, I found a bug in GoogleFS."*/) }, -{ "META:keyw", 'CSTR', SZSTR("googlefs") }, -//{ "GOOGLE:order", 'LONG', sizeof(int32), &fake_bm_attr_1 }, -#endif -{ NULL, 0, 0, NULL } /* end of list */ -}; - -#if 0 -File: Search Google a -Type Size Name Value ----------- ---------- ---------------------------------- ----------------------------------------------------------------- -'MIMS' 35 "BEOS:TYPE" "application/x-vnd.Be-queryTemplate" -STRING 191 "_trk/qrystr" "((name==\"*[aA][nN][yY] [qQ][uU][eE][sS][tT][iI][oO][nN] [yY][o" - "O][uU]\\'[dD] [lL][iI][kK][eE] [tT][oO] [aA][sS][kK] [gG][oO][o" - "O][gG][lL][eE] ?*\")&&(BEOS:TYPE==\"application/x-vnd.Be-bookma" - "rk\"))" -BOOL 1 "_trk/queryDynamicDate" TRUE -INT32 4 "_trk/recentQuery" 1 0x00000001 - 01 0F 47 4E 4F 4C 04 0C-63 72 65 61 74 69 6F 6E ..GNOL..creation - 44 61 74 65 51 EA C7 41-0F 47 4E 4C 4C 08 08 63 DateQ..A.GNLL..c - 61 70 61 63 69 74 79 00-00 00 00 00 00 00 00 0B apacity......... - 52 54 53 43 08 0A 64 65-76 69 63 65 4E 61 6D 65 RTSC..deviceName - 01 00 00 00 00 00 70 41-0B 52 54 53 43 10 0A 76 ......pA.RTSC..v - 6F 6C 75 6D 65 4E 61 6D-65 07 00 00 00 47 6F 6F olumeName....Goo - 67 6C 65 00 00 00 00 00-00 0B 52 54 53 43 10 07 gle.......RTSC.. - 66 73 68 4E 61 6D 65 09-00 00 00 67 6F 6F 67 6C fshName....googl - 65 66 73 00 00 00 00 00- efs..... -STRING 9 "_trk/qryinitmime" "Bookmark" -INT32 4 "_trk/qryinitmode" 1180858734 0x4662796E -RAW 36 "_trk/qrymoreoptions_le" 00 00 06 EC 00 00 00 00-01 00 00 00 00 00 00 00 ................ - 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 ................ - 00 00 00 00 - .... -STRING 40 "_trk/qryinitstr" "Any question you'd like to ask google ?" -STRING 12 "_trk/focusedView" "TextControl" -INT32 4 "_trk/focusedSelEnd" 39 0x00000027 -INT32 4 "_trk/focusedSelStart" 0 0x00000000 -RAW 60 "_trk/xtpinfo_le" FF FF FF FF 00 00 00 00-00 00 00 00 00 00 00 00 ................ - 00 00 00 00 00 00 00 00-00 00 00 00 01 00 00 00 ................ - 00 00 82 43 00 00 A0 42-00 00 00 00 00 00 00 00 ...C...B........ - 00 E0 9F 44 00 C0 7F 44-FF FF FF FF ...D...D.... -#endif -#if 0 -, 0x41, 0x6E, 0x79, 0x20, 0x71, 0x75, 0x65, 0x73-74, 0x69, 0x6F, 0x6E, 0x20, 0x79, 0x6F, 0x75 -, 0x27, 0x64, 0x20, 0x6C, 0x69, 0x6B, 0x65, 0x20-74, 0x6F, 0x20, 0x61, 0x73, 0x6B, 0x20, 0x67 -, 0x6F, 0x6F, 0x67, 0x6C, 0x65, 0x20, 0x3F, 0x00-, 0x, 0x, 0x, 0x, 0x, 0x, 0x, 0x, 0x, 0x, 0x, 0x, 0x, 0x, 0x, 0x, 0x, 0x, 0x, 0x, 0x, 0x, 0x -, 0x54, 0x65, 0x78, 0x74, 0x43, 0x6F, 0x6E, 0x74-72, 0x6F, 0x6C, 0x00, 0x, 0x, 0x, 0x, 0x, 0x, 0x, 0x, 0x, 0x, 0x, 0x -, 0x27, 0x00, 0x00, 0x00, 0x, 0x, 0x, 0x, 0x, 0x, 0x, 0x, 0x, 0x, 0x, 0x-, 0x, 0x, 0x, 0x, 0x, 0x, 0x, 0x, 0x, 0x, 0x, 0x, 0x, 0x, 0x, 0x, 0x, 0x, 0x, 0x, 0x, 0x, 0x -, 0x00, 0x00, 0x00, 0x00, 0x, 0x, 0x, 0x, 0x, 0x, 0x, 0x, 0x, 0x, 0x, 0x-, 0x, 0x, 0x, 0x, 0x, 0x, 0x, 0x, 0x, 0x, 0x, 0x, 0x, 0x, 0x, 0x, 0x, 0x, 0x, 0x, 0x, 0x, 0x -#endif diff --git a/src/add-ons/kernel/file_systems/googlefs/bin/google b/src/add-ons/kernel/file_systems/googlefs/bin/google deleted file mode 100755 index c0f099f95e..0000000000 --- a/src/add-ons/kernel/file_systems/googlefs/bin/google +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -query -v /google/ '((name=="*'"$*"'*")&&(BEOS:TYPE=="application/x-vnd.Be-bookmark"))' | xargs catattr META:url diff --git a/src/add-ons/kernel/file_systems/googlefs/bin/imlucky b/src/add-ons/kernel/file_systems/googlefs/bin/imlucky deleted file mode 100755 index 639343c2ca..0000000000 --- a/src/add-ons/kernel/file_systems/googlefs/bin/imlucky +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -query -v /google/ '((name=="*'"$*"'*")&&(BEOS:TYPE=="application/x-vnd.Be-bookmark"))' | xargs catattr META:url | head -1 diff --git a/src/add-ons/kernel/file_systems/googlefs/google_request.h b/src/add-ons/kernel/file_systems/googlefs/google_request.h deleted file mode 100644 index 314c0869ce..0000000000 --- a/src/add-ons/kernel/file_systems/googlefs/google_request.h +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright 2004-2008, François Revol, . - * Distributed under the terms of the MIT License. - */ -#ifndef _GOOGLE_REQUEST_H -#define _GOOGLE_REQUEST_H - -#ifdef __cplusplus -#include -using namespace BPrivate::Network; -extern "C" { -#else -struct BUrlRequest; -typedef struct BUrlRequest BUrlRequest; -#endif - -struct google_request { - struct google_request *next; - struct fs_volume *volume; - struct fs_node *query_node; /* root folder for that query */ - char *query_string; - BUrlRequest *cnx; - struct google_result *results; - long nextid; -}; - -/* those are quite arbitrary values */ -#define GR_MAX_NAME 70 -#define GR_MAX_PROTO 16 -#define GR_MAX_URL 1024 -#define GR_MAX_SNIPSET 256 -struct google_result { - struct google_result *next; - long id; - char name[GR_MAX_NAME]; - char proto[GR_MAX_PROTO]; - char url[GR_MAX_URL]; - char snipset[GR_MAX_SNIPSET]; - char cache_url[GR_MAX_URL]; - char similar_url[GR_MAX_URL]; -}; - -extern status_t google_request_process(struct google_request *req); -extern status_t google_request_process_async(struct google_request *req); -extern status_t google_request_close(struct google_request *req); -extern status_t google_request_open(const char *query_string, struct fs_volume *volume, struct fs_node *query_node, struct google_request **req); -extern status_t google_request_free(struct google_request *req); - -extern int google_parse_results(const char *html, size_t htmlsize, long *nextid, struct google_result **results); - -#ifdef __cplusplus -} -#endif - -#endif /* _GOOGLE_REQUEST_H */ diff --git a/src/add-ons/kernel/file_systems/googlefs/googlefs.docs.txt b/src/add-ons/kernel/file_systems/googlefs/googlefs.docs.txt deleted file mode 100644 index 943ab28fa1..0000000000 --- a/src/add-ons/kernel/file_systems/googlefs/googlefs.docs.txt +++ /dev/null @@ -1,10 +0,0 @@ -====================== -pointers to docs - -parsing google results from python (+ diffs on User-Agent ?): -http://forums.devshed.com/archive/t-154742 - -perl hack: plain old XML instead of SOAP: -http://hacks.oreilly.com/pub/h/173 - -http://www.webmasterworld.com/forum10003/2856.htm diff --git a/src/add-ons/kernel/file_systems/googlefs/Jamfile b/src/add-ons/kernel/file_systems/websearchfs/Jamfile similarity index 73% rename from src/add-ons/kernel/file_systems/googlefs/Jamfile rename to src/add-ons/kernel/file_systems/websearchfs/Jamfile index 3343d79f2c..1d3ada6c57 100644 --- a/src/add-ons/kernel/file_systems/googlefs/Jamfile +++ b/src/add-ons/kernel/file_systems/websearchfs/Jamfile @@ -1,4 +1,4 @@ -SubDir HAIKU_TOP src add-ons kernel file_systems googlefs ; +SubDir HAIKU_TOP src add-ons kernel file_systems websearchfs ; local userlandFSTop = [ FDirName $(HAIKU_TOP) src add-ons kernel file_systems userlandfs ] ; @@ -8,15 +8,14 @@ UsePrivateHeaders shared ; UsePrivateHeaders netservices ; #SubDirCcFlags -DTRACK_FILENAME ; -#SubDirCcFlags -DDEBUG_GOOGLEFS=1 ; SubDirCcFlags -D_IMPEXP_KERNEL= ; -Addon googlefs : +Addon websearchfs : attrs.c - google_request.cpp - googlefs.c + duckduckgo_request.cpp + websearchfs.c lists2.c - parse_google_html.c + parse_duckduckgo_html.c query.c settings.c string_utils.c diff --git a/src/add-ons/kernel/file_systems/websearchfs/README.websearchfs.txt b/src/add-ons/kernel/file_systems/websearchfs/README.websearchfs.txt new file mode 100644 index 0000000000..1f87216ad7 --- /dev/null +++ b/src/add-ons/kernel/file_systems/websearchfs/README.websearchfs.txt @@ -0,0 +1,29 @@ +Welcome to the Web Search FileSystem for BeOS™, Zeta™ and Haiku®. +Copyright© 2004, 2005, François Revol. + +DuckDuckGo is a trademark of DuckDuckGo. +BeOS is a trademark of PalmSource. +Zeta is a trademark of yellowTAB GmbH. +Haiku is a trademark of Haiku, Inc. + +REQUIRES USERLANDFS + +mkdir /Web; mount -t userlandfs -p websearchfs /Web + +Use "Search the Web" query template in this folder to search anything on the web. +The search results are kindly provided by DuckDuckGo (https://duckduckgo.com). + +or from the commande line: + + query -v /Web '((name=="*QUESTION*")&&(BEOS:TYPE=="application/x-vnd.Be-bookmark"))' + +where QUESTION is what you want to search. (websearchfs currently filters queries to only answer those). +You will want to pipe that to catattr to get the URLs: + + query -v /Web '((name=="*site:haiku-os.org userlandfs*")&&(BEOS:TYPE=="application/x-vnd.Be-bookmark"))' | xargs catattr META:url + +(note that won't work with sync_unlink true in the settings) + +Included are 2 scripts, search and imlucky that runs such a query using the arguments given on the command line. + +Enjoy. diff --git a/src/add-ons/kernel/file_systems/googlefs/attr2c b/src/add-ons/kernel/file_systems/websearchfs/attr2c similarity index 100% rename from src/add-ons/kernel/file_systems/googlefs/attr2c rename to src/add-ons/kernel/file_systems/websearchfs/attr2c diff --git a/src/add-ons/kernel/file_systems/websearchfs/attrs.c b/src/add-ons/kernel/file_systems/websearchfs/attrs.c new file mode 100644 index 0000000000..011b1412aa --- /dev/null +++ b/src/add-ons/kernel/file_systems/websearchfs/attrs.c @@ -0,0 +1,555 @@ +/* + * Copyright 2004-2008, François Revol, . + * Distributed under the terms of the MIT License. + */ + +#include +#include +#include "websearchfs.h" + +#define SZSTR(s) sizeof(s), s +#define SZTAB(s) sizeof(s), s + +// #pragma mark - root folder icons + + +// icons by ahwayakchih + +const char websearch_icon_HVIF[] = { + 0x6e, 0x63, 0x69, 0x66, 0x09, 0x05, 0x00, 0x02, 0x01, 0x02, 0x02, 0x3b, + 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3b, 0x40, 0x00, 0x48, + 0x60, 0x00, 0x4a, 0xe0, 0x00, 0x00, 0xdc, 0xf3, 0xff, 0x5e, 0xff, 0x5f, + 0x94, 0xaa, 0x78, 0x02, 0x00, 0x16, 0x02, 0x34, 0x4f, 0xd5, 0x34, 0x79, + 0x20, 0xba, 0x5f, 0xcc, 0x3a, 0x38, 0x28, 0x47, 0xb3, 0xd1, 0x4b, 0x15, + 0x01, 0x00, 0xd4, 0xff, 0x47, 0x05, 0xff, 0x05, 0x00, 0x04, 0x00, 0x57, + 0x02, 0x01, 0x06, 0x03, 0x3d, 0x8a, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0xbd, 0x8a, 0xfe, 0x48, 0xf1, 0x07, 0x48, 0xa0, 0x78, 0x31, 0x32, + 0xe4, 0xff, 0xc8, 0x00, 0x66, 0xff, 0xff, 0x00, 0x34, 0xcc, 0x02, 0x01, + 0x06, 0x03, 0x3d, 0x0a, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xbd, + 0x0a, 0xfe, 0x48, 0xf1, 0x07, 0x48, 0xa0, 0x78, 0x54, 0x09, 0xb4, 0xb6, + 0xd8, 0x03, 0x37, 0x84, 0xff, 0x05, 0x1d, 0x61, 0x02, 0x01, 0x06, 0x04, + 0x3d, 0x95, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3d, 0x95, 0x0b, + 0x49, 0x4f, 0xbc, 0x47, 0x9b, 0xec, 0x00, 0xd5, 0xff, 0xd5, 0x4c, 0x6e, + 0xff, 0x6e, 0x90, 0x1e, 0xbc, 0x1e, 0xff, 0x04, 0xb2, 0x04, 0x10, 0x0a, + 0x0a, 0x23, 0x2f, 0x2d, 0x49, 0x4a, 0x5b, 0x5c, 0x2c, 0x50, 0x2a, 0x4c, + 0x2c, 0x3a, 0x28, 0x38, 0x2d, 0x30, 0x2b, 0xb9, 0x57, 0xba, 0xa7, 0x02, + 0x04, 0x32, 0x46, 0xbb, 0xee, 0x46, 0xb8, 0x69, 0x46, 0x2a, 0x4e, 0x2a, + 0xc3, 0x91, 0x2a, 0xc7, 0x16, 0x32, 0x56, 0xb8, 0x69, 0x56, 0xbb, 0xee, + 0x56, 0x3a, 0x4e, 0x3a, 0xc7, 0x16, 0x3a, 0xc3, 0x91, 0x06, 0x06, 0xba, + 0x06, 0x2b, 0x54, 0x24, 0x5a, 0xb4, 0xbe, 0xca, 0xc1, 0xb4, 0x8b, 0xca, + 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2, 0x62, 0xc3, 0x2b, + 0xc2, 0x80, 0xc3, 0x37, 0xc2, 0x49, 0xc3, 0x22, 0xc2, 0x13, 0xc3, 0x27, + 0xc2, 0x2a, 0xc3, 0x31, 0xc2, 0x13, 0xc3, 0x27, 0x02, 0x04, 0x48, 0x44, + 0xc8, 0x37, 0x44, 0xbd, 0xa8, 0x44, 0x30, 0x4f, 0x30, 0xc3, 0x4e, 0x30, + 0xc8, 0x25, 0x48, 0x5a, 0xbd, 0xa8, 0x5a, 0xc8, 0x37, 0x5a, 0x60, 0x4f, + 0x60, 0xc8, 0x25, 0x60, 0xc3, 0x4e, 0x0a, 0x0a, 0x05, 0x01, 0x0f, 0x00, + 0x0a, 0x04, 0x01, 0x03, 0x10, 0x01, 0x17, 0x84, 0x00, 0x04, 0x0a, 0x06, + 0x01, 0x03, 0x00, 0x0a, 0x07, 0x01, 0x04, 0x02, 0x40, 0x65, 0xc8, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x65, 0xc8, 0xc6, 0x97, 0x79, 0xbf, + 0x1c, 0xdb, 0x0a, 0x08, 0x0a, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0d, + 0x0e, 0x05, 0x0c, 0x02, 0x40, 0x65, 0xc8, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x40, 0x65, 0xc8, 0xc6, 0x97, 0x79, 0xbf, 0x1c, 0xdb, 0x0a, 0x03, + 0x01, 0x01, 0x02, 0x3d, 0xff, 0x88, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x3d, 0xff, 0x88, 0x48, 0xa0, 0x71, 0x40, 0x02, 0xb1, 0x0a, 0x00, 0x01, + 0x02, 0x12, 0x41, 0xff, 0x88, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, + 0xff, 0x88, 0xc1, 0xf3, 0x87, 0xcb, 0xdf, 0x74, 0x01, 0x17, 0x82, 0x00, + 0x04, 0x0a, 0x02, 0x01, 0x02, 0x02, 0x41, 0xff, 0x88, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x41, 0xff, 0x88, 0xc1, 0xf3, 0x87, 0xcb, 0xdf, 0x74, + 0x0a, 0x00, 0x01, 0x01, 0x12, 0x41, 0xff, 0x88, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x41, 0xff, 0x88, 0xc1, 0xf3, 0x87, 0xcb, 0xdf, 0x74, 0x01, + 0x17, 0x82, 0x00, 0x04, 0x0a, 0x01, 0x01, 0x01, 0x02, 0x41, 0xff, 0x88, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0xff, 0x88, 0xc1, 0xf3, 0x87, + 0xcb, 0xdf, 0x74 +}; + +// #pragma mark - root folder attribute list +//0x6949434F 7 "BEOS:D:STD_ICON" 49 44 58 5A 05 53 00 +uint8 root_folder_attrs_1[] = { 0x49, 0x44, 0x58, 0x5A, 0x05, 0x53, 0x00 }; // needed for SVG icons in Zeta... +uint64 root_folder_attrs_2 = 0xdeadbeef50385038LL; // volume id, just in case + +struct attr_entry root_folder_attrs[] = { +{ "BEOS:TYPE", /*B_MIME_STRING_TYPE*/'MIMS', SZSTR("application/x-vnd.Be-directory") }, +{ "BEOS:ICON", 'VICN', sizeof(websearch_icon_HVIF), (char *)websearch_icon_HVIF }, +//{ "BEOS:EMBLEMS", 'CSTR', SZSTR("palm") }, +{ "be:volume_id", B_UINT64_TYPE, sizeof(root_folder_attrs_2), &root_folder_attrs_2 }, +{ NULL, 0, 0, NULL } /* end of list */ +}; + +static uint8 folders_attrs_1[] = { + 0x52, 0x56, 0xf2, 0x4f, 0x15, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x54, 0x69, 0x74, 0x6c, + 0x65, 0x00, 0x00, 0x00, 0x20, 0x42, 0x00, 0x00, 0x02, 0x43, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x00, + 0x00, 0x00, 0x4d, 0x45, 0x54, 0x41, 0x3a, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x00, 0x52, 0x7d, 0xfb, + 0x77, 0x52, 0x54, 0x53, 0x43, 0x00, 0x01, 0x52, 0x56, 0xf2, 0x4f, 0x15, 0x00, 0x00, 0x00, 0x03, + 0x00, 0x00, 0x00, 0x55, 0x52, 0x4c, 0x00, 0x00, 0x00, 0x39, 0x43, 0x00, 0x00, 0x2a, 0x43, 0x00, + 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x4d, 0x45, 0x54, 0x41, 0x3a, 0x75, 0x72, 0x6c, 0x00, + 0x52, 0x54, 0x5b, 0xe3, 0x52, 0x54, 0x53, 0x43, 0x00, 0x01, 0x52, 0x56, 0xf2, 0x4f, 0x15, 0x00, + 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x4b, 0x65, 0x79, 0x77, 0x6f, 0x72, 0x64, 0x73, 0x00, 0x00, + 0x00, 0xb9, 0x43, 0x00, 0x00, 0x02, 0x43, 0x00, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x4d, + 0x45, 0x54, 0x41, 0x3a, 0x6b, 0x65, 0x79, 0x77, 0x00, 0x52, 0xdc, 0xf3, 0xdb, 0x52, 0x54, 0x53, + 0x43, 0x00, 0x01, 0x52, 0x56, 0xf2, 0x4f, 0x15, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x4d, + 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x00, 0x00, 0xc0, 0x00, 0x44, 0x00, 0x00, 0x16, 0x43, + 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x2f, 0x6d, 0x6f, + 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x00, 0x45, 0x6d, 0x4b, 0x5d, 0x45, 0x4d, 0x49, 0x54, 0x01, + 0x00, 0x52, 0x56, 0xf2, 0x4f, 0x15, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x47, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x20, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x00, 0x00, 0x00, 0x2a, 0x44, 0x00, 0x00, + 0xa0, 0x41, 0x01, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x47, 0x4f, 0x4f, 0x47, 0x4c, 0x45, + 0x3a, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x00, 0x47, 0xde, 0xef, 0xfc, 0x47, 0x4e, 0x4f, 0x4c, 0x00, + 0x01 }; +static uint8 folders_attrs_2[] = { + 0x52, 0xf5, 0x5e, 0x6f, 0x0a, 0x00, 0x00, 0x00, 0x74, 0x73, 0x6c, 0x54, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x47, 0xde, 0xef, 0xfc, 0x47, 0x4e, 0x4f, 0x4c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x01 }; +struct attr_entry folders_attrs[] = { +{ "BEOS:TYPE", /*B_MIME_STRING_TYPE*/'MIMS', SZSTR("application/x-vnd.Be-directory") }, +{ "_trk/columns_le", 'RAWT', SZTAB(folders_attrs_1) }, +{ "_trk/viewstate_le", 'RAWT', SZTAB(folders_attrs_2) }, +{ "", 'RAWT', SZTAB(folders_attrs_2) }, +{ NULL, 0, 0, NULL } /* end of list */ +}; + +struct attr_entry bookmark_attrs[] = { +{ "BEOS:TYPE", /*B_MIME_STRING_TYPE*/'MIMS', SZSTR("application/x-vnd.Be-bookmark") }, +{ NULL, 0, 0, NULL } /* end of list */ +}; + +/* for debugging */ +//static int32 fake_bm_attr_1 = 1; +struct attr_entry fake_bookmark_attrs[] = { +{ "BEOS:TYPE", /*B_MIME_STRING_TYPE*/'MIMS', SZSTR("application/x-vnd.Be-bookmark") }, +{ "META:title", 'CSTR', SZSTR("Plop!") }, +{ "META:url", 'CSTR', SZSTR("http://127.0.0.1/") }, +{ "META:keyw", 'CSTR', SZSTR("plop") }, +{ NULL, 0, 0, NULL } /* end of list */ +}; + +static uint8 template_1_attrs_1 = 1; +static int32 template_1_attrs_2 = 1; +static uint8 template_1_attrs_3[] = { + 0x31, 0x42, 0x4F, 0x46, 0x01, 0x00, 0x00, 0x98, 0x98, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x01, 0x0F, 0x47, 0x4E, 0x4F, 0x4C, 0x04, 0x0C, 0x63, 0x72, 0x65, 0x61, 0x74, 0x69, 0x6F, 0x6E, + 0x44, 0x61, 0x74, 0x65, 0x51, 0xEA, 0xC7, 0x41, 0x0F, 0x47, 0x4E, 0x4C, 0x4C, 0x08, 0x08, 0x63, + 0x61, 0x70, 0x61, 0x63, 0x69, 0x74, 0x79, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0B, + 0x52, 0x54, 0x53, 0x43, 0x08, 0x0A, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x4E, 0x61, 0x6D, 0x65, + 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x41, 0x0B, 0x52, 0x54, 0x53, 0x43, 0x10, 0x0A, 0x76, + 0x6F, 0x6C, 0x75, 0x6D, 0x65, 0x4E, 0x61, 0x6D, 0x65, 0x07, 0x00, 0x00, 0x00, 0x47, 0x6F, 0x6F, + 0x67, 0x6C, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0B, 0x52, 0x54, 0x53, 0x43, 0x10, 0x07, + 0x66, 0x73, 0x68, 0x4E, 0x61, 0x6D, 0x65, 0x09, 0x00, 0x00, 0x00, 0x67, 0x6F, 0x6F, 0x67, 0x6C, + 0x65, 0x66, 0x73, 0x00, 0x00, 0x00, 0x00, 0x00 }; +static int32 template_1_attrs_4 = 0x4662796E; +static uint8 template_1_attrs_5[] = { + 0x00, 0x00, 0x06, 0xEC, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00 }; +static int32 template_1_attrs_6 = 0x00000027; +static int32 template_1_attrs_7 = 0x00000000; +static uint8 template_1_attrs_8[] = { + 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x82, 0x43, 0x00, 0x00, 0xA0, 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0xE0, 0x9F, 0x44, 0x00, 0xC0, 0x7F, 0x44, 0xFF, 0xFF, 0xFF, 0xFF }; +static uint8 template_1_attrs_9[] = { + 0x00, 0x00, 0x00, 0x00, 0x58, 0x10, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x48, 0x44, + 0x00, 0x00, 0x0c, 0x44 }; +static uint8 template_1_attrs_11[] = { + 0x52, 0xf5, 0x5e, 0x6f, 0x0a, 0x00, 0x00, 0x00, 0x74, 0x73, 0x6c, 0x54, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x47, 0xde, 0xef, 0xfc, 0x47, 0x4e, 0x4f, 0x4c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x01 }; +struct attr_entry template_1_attrs[] = { +{ "BEOS:TYPE", /*B_MIME_STRING_TYPE*/'MIMS', SZSTR("application/x-vnd.Be-queryTemplate") }, +{ "_trk/qrystr", 'CSTR', SZSTR("((name==\"*[aA][nN][yY][tT][hH][iI][nN][gG] [yY][oO][uU]\\'[dD] [lL][iI][kK][eE] [tT][oO] [sS][eE][aA][rR][cC][hH] ?*\")&&(BEOS:TYPE==\"application/x-vnd.Be-bookmark\"))") }, +{ "_trk/queryDynamicDate", 'BOOL', 1, &template_1_attrs_1 }, +{ "_trk/recentQuery", 'LONG', sizeof(int32), &template_1_attrs_2 }, +{ "_trk/qryvol1", 'MSGG', SZTAB(template_1_attrs_3) }, +{ "_trk/qryinitmime", 'CSTR', SZSTR("Bookmark") }, +{ "_trk/qryinitmode", 'LONG', sizeof(int32), &template_1_attrs_4 }, +{ "_trk/qrymoreoptions_le", 'RAWT', SZTAB(template_1_attrs_5) }, +{ "_trk/qryinitstr", 'CSTR', SZSTR("Anything you'd like to search ?") }, +{ "_trk/focusedView", 'CSTR', SZSTR("TextControl") }, +{ "_trk/focusedSelEnd", 'LONG', sizeof(int32), &template_1_attrs_6 }, +{ "_trk/focusedSelStart", 'LONG', sizeof(int32), &template_1_attrs_7 }, +{ "_trk/xtpinfo_le", 'RAWT', SZTAB(template_1_attrs_8) }, +{ "_trk/pinfo_le", 'RAWT', SZTAB(template_1_attrs_9) }, +{ "_trk/columns_le", 'RAWT', SZTAB(folders_attrs_1)/*SZTAB(template_1_attrs_10)*/ }, +{ "_trk/viewstate_le", 'RAWT', SZTAB(template_1_attrs_11) }, +{ NULL, 0, 0, NULL } /* end of list */ +}; + +static int32 text_attrs_1 = 0x0000FFFF; +static int32 text_attrs_2 = 0x00000000; +static uint8 text_attrs_3 = 1; +static uint8 text_attrs_4[] = { + 0x41, 0x6c, 0x69, 0x21, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, + 0x53, 0x77, 0x69, 0x73, 0x37, 0x32, 0x31, 0x20, 0x42, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x52, 0x6f, 0x6d, 0x61, 0x6e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x41, 0x60, 0x00, 0x00, 0x42, 0xb4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x28, 0x53, 0x77, 0x69, 0x73, 0x37, 0x32, 0x31, 0x20, 0x42, 0x54, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x52, 0x6f, 0x6d, 0x61, 0x6e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x41, 0x60, 0x00, 0x00, 0x42, 0xb4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x29, 0x53, 0x77, 0x69, 0x73, 0x37, 0x32, 0x31, 0x20, + 0x42, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x52, 0x6f, 0x6d, 0x61, 0x6e, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x60, 0x00, 0x00, 0x42, 0xb4, 0x00, 0x00, + 0x00, 0x00, 0xff, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2a, 0x53, 0x77, 0x69, 0x73, + 0x37, 0x32, 0x31, 0x20, 0x42, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x52, 0x6f, 0x6d, 0x61, + 0x6e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x60, 0x00, 0x00, + 0x42, 0xb4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, + 0x53, 0x77, 0x69, 0x73, 0x37, 0x32, 0x31, 0x20, 0x42, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x52, 0x6f, 0x6d, 0x61, 0x6e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x41, 0x20, 0x00, 0x00, 0x42, 0xb4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00 }; +struct attr_entry text_attrs[] = { +{ "BEOS:TYPE", /*B_MIME_STRING_TYPE*/'MIMS', SZSTR("text/plain") }, +{ "be:encoding", 'LONG', sizeof(int32), &text_attrs_1 }, +{ "alignment", 'LONG', sizeof(int32), &text_attrs_2 }, +{ "wrap", 'BOOL', sizeof(uint8), &text_attrs_3 }, +{ "styles", 'RAWT', SZTAB(text_attrs_4) }, +{ NULL, 0, 0, NULL } /* end of list */ +}; + +char *readmestr = \ +"Welcome to the Web Search FileSystem for BeOS™, Zeta™ and Haiku®.\n" +"Copyright© 2004-2008, François Revol.\n" +"DuckDuckGo is a trademark of DuckDuckGo.\n" +"BeOS is a trademark of ACCESS.\n" +"Zeta is a trademark of yellowTAB GmbH.\n" +"Haiku is a trademark of Haiku, Inc.\n" +"\n" +"Use \"Search the Web\" query template in this folder to search anything.\n" +"\n"; + +struct attr_entry mailto_me_bookmark_attrs[] = { +{ "BEOS:TYPE", /*B_MIME_STRING_TYPE*/'MIMS', SZSTR("application/x-person") }, +{ "META:email", 'CSTR', SZSTR("revol@free.fr") }, +{ "META:name", 'CSTR', SZSTR("François Revol") }, +{ "META:country", 'CSTR', SZSTR("France") }, +{ "META:nickname", 'CSTR', SZSTR("mmu_man") }, +//{ "META:company", 'CSTR', SZSTR("yellowTAB GmbH") }, +{ "META:url", 'CSTR', SZSTR("http://revolf.free.fr/") }, +{ "META:group", 'CSTR', SZSTR("") }, +{ "IM:connections", 'CSTR', SZSTR("icq:77792625;gtalk:revolf@gmail.com;yahoo:mmu_man;msn:revol@mail.com") }, +{ NULL, 0, 0, NULL } /* end of list */ +}; + diff --git a/src/add-ons/kernel/file_systems/googlefs/attrs.h b/src/add-ons/kernel/file_systems/websearchfs/attrs.h similarity index 100% rename from src/add-ons/kernel/file_systems/googlefs/attrs.h rename to src/add-ons/kernel/file_systems/websearchfs/attrs.h diff --git a/src/add-ons/kernel/file_systems/googlefs/attrs.txt b/src/add-ons/kernel/file_systems/websearchfs/attrs.txt similarity index 87% rename from src/add-ons/kernel/file_systems/googlefs/attrs.txt rename to src/add-ons/kernel/file_systems/websearchfs/attrs.txt index eb805c8ce3..0834a38bca 100644 --- a/src/add-ons/kernel/file_systems/googlefs/attrs.txt +++ b/src/add-ons/kernel/file_systems/websearchfs/attrs.txt @@ -1,11 +1,10 @@ -File: Search Google a +File: Search The Web a Type Size Name Value ---------- ---------- ---------------------------------- ----------------------------------------------------------------- 'MIMS' 35 "BEOS:TYPE" "application/x-vnd.Be-queryTemplate" -STRING 191 "_trk/qrystr" "((name==\"*[aA][nN][yY] [qQ][uU][eE][sS][tT][iI][oO][nN] [yY][o" - "O][uU]\\'[dD] [lL][iI][kK][eE] [tT][oO] [aA][sS][kK] [gG][oO][o" - "O][gG][lL][eE] ?*\")&&(BEOS:TYPE==\"application/x-vnd.Be-bookma" - "rk\"))" +STRING 191 "_trk/qrystr" "((name==\"*[aA][nN][yY][tT][hH][iI][nN][gG] [yY][oO][uU]\\'[dD]" + "[lL][iI][kK][eE] [tT][oO] [sS][eE][aA][rR][cC][hH] ?*\")&&(BEOS" + ":TYPE==\"application/x-vnd.Be-bookmark\"))" BOOL 1 "_trk/queryDynamicDate" TRUE INT32 4 "_trk/recentQuery" 1 0x00000001 MESSAGE 152 "_trk/qryvol1" 31 42 4F 46 01 00 00 98-98 00 00 00 00 00 00 00 1BOF............ @@ -23,7 +22,7 @@ INT32 4 "_trk/qryinitmode" 1180858734 0x4662796 RAW 36 "_trk/qrymoreoptions_le" 00 00 06 EC 00 00 00 00-01 00 00 00 00 00 00 00 ................ 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 ................ 00 00 00 00 - .... -STRING 40 "_trk/qryinitstr" "Any question you'd like to ask google ?" +STRING 40 "_trk/qryinitstr" "Anything you'd like to search ?" STRING 12 "_trk/focusedView" "TextControl" INT32 4 "_trk/focusedSelEnd" 39 0x00000027 INT32 4 "_trk/focusedSelStart" 0 0x00000000 diff --git a/src/add-ons/kernel/file_systems/websearchfs/bin/imlucky b/src/add-ons/kernel/file_systems/websearchfs/bin/imlucky new file mode 100755 index 0000000000..50378252da --- /dev/null +++ b/src/add-ons/kernel/file_systems/websearchfs/bin/imlucky @@ -0,0 +1,2 @@ +#!/bin/sh +open `query -v /Web/ '((name=="*'"$*"'*")&&(BEOS:TYPE=="application/x-vnd.Be-bookmark"))' | xargs catattr META:url | head -1` diff --git a/src/add-ons/kernel/file_systems/websearchfs/bin/websearch b/src/add-ons/kernel/file_systems/websearchfs/bin/websearch new file mode 100755 index 0000000000..64cc4c91ea --- /dev/null +++ b/src/add-ons/kernel/file_systems/websearchfs/bin/websearch @@ -0,0 +1,2 @@ +#!/bin/sh +query -v /Web/ '((name=="*'"$*"'*")&&(BEOS:TYPE=="application/x-vnd.Be-bookmark"))' | xargs catattr META:url diff --git a/src/add-ons/kernel/file_systems/googlefs/bookmark.mime b/src/add-ons/kernel/file_systems/websearchfs/bookmark.mime similarity index 98% rename from src/add-ons/kernel/file_systems/googlefs/bookmark.mime rename to src/add-ons/kernel/file_systems/websearchfs/bookmark.mime index 958b89d02e..656715cb73 100644 --- a/src/add-ons/kernel/file_systems/googlefs/bookmark.mime +++ b/src/add-ons/kernel/file_systems/websearchfs/bookmark.mime @@ -8,7 +8,7 @@ -attribute "META:title" -attrName "Title" \ -attrType 'CSTR' -attrWidth 130 -attrAlignment left \ -attrViewable 1 -attrEditable 1 -attrExtra 0 \ - -attribute "GOOGLE:order" -attrName "Google order" \ + -attribute "WEBSEARCH:order" -attrName "Search result order" \ -attrType 'LONG' -attrWidth 40 -attrAlignment right \ -attrViewable 1 -attrEditable 1 -attrExtra 0 \ -miniIcon ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000ffffffffffffffffffffffff00003f1b0000ffffffff\ diff --git a/src/add-ons/kernel/file_systems/googlefs/config/googlefs b/src/add-ons/kernel/file_systems/websearchfs/config/websearchfs similarity index 64% rename from src/add-ons/kernel/file_systems/googlefs/config/googlefs rename to src/add-ons/kernel/file_systems/websearchfs/config/websearchfs index c5efb1ae32..1a9ad68c8e 100644 --- a/src/add-ons/kernel/file_systems/googlefs/config/googlefs +++ b/src/add-ons/kernel/file_systems/websearchfs/config/websearchfs @@ -1,11 +1,6 @@ -# googlefs configuration file +# websearchfs configuration file # -# IP of the google server to query -server 66.102.11.99 -# alternative one: -#server 74.125.45.100 - # max number of vnodes allowed in the fs (to limit RAM usage) # 10 <= allowed <= 1000000 max_nodes 5000 diff --git a/src/add-ons/kernel/file_systems/googlefs/google_request.cpp b/src/add-ons/kernel/file_systems/websearchfs/duckduckgo_request.cpp similarity index 61% rename from src/add-ons/kernel/file_systems/googlefs/google_request.cpp rename to src/add-ons/kernel/file_systems/websearchfs/duckduckgo_request.cpp index 99dba0e8d2..c3629e55ad 100644 --- a/src/add-ons/kernel/file_systems/googlefs/google_request.cpp +++ b/src/add-ons/kernel/file_systems/websearchfs/duckduckgo_request.cpp @@ -12,9 +12,9 @@ #include #include #include -#include "google_request.h" +#include "duckduckgo_request.h" -#include "googlefs.h" +#include "websearchfs.h" #include "lists2.h" #include "settings.h" #include "string_utils.h" @@ -25,21 +25,23 @@ using namespace BPrivate::Network; #define DO_PUBLISH -//#define FAKE_INPUT "/boot/home/devel/drivers/googlefs/log2.html" +//#define FAKE_INPUT "/boot/home/devel/drivers/websearchfs/log2.html" -#define TESTURL "http://www.google.com/search?hl=en&ie=UTF-8&num=50&q=beos" +#define TESTURL "http://www.duckduckgo.com/search?hl=en&ie=UTF-8&num=50&q=beos" #define BASEURL "https://html.duckduckgo.com/html/?kd=-1" + // kd=-1 disables redirection of all URLs through duckduckgo servers #define FMT_NUM "&num=%u" + // TODO remove this, duckduckgo does not have this option #define FMT_Q "&q=%s" -/* parse_google_html.c */ -extern int google_parse_results(const char *html, size_t htmlsize, long *nextid, struct google_result **results); +/* parse_duckduckgo_html.c */ +extern int duckduckgo_parse_results(const char *html, size_t htmlsize, long *nextid, struct duckduckgo_result **results); -status_t google_request_process(struct google_request *req) +status_t duckduckgo_request_process(struct duckduckgo_request *req) { struct BUrlRequest *cnx = NULL; - struct google_result *res; + struct duckduckgo_result *res; status_t err; int count; char *p = NULL; @@ -62,7 +64,7 @@ status_t google_request_process(struct google_request *req) sprintf(url+strlen(url), FMT_NUM, (unsigned int)max_results); sprintf(url+strlen(url), FMT_Q, p); - fprintf(stderr, "google_request: final URL: %s\n", url); + fprintf(stderr, "duckduckgo_request: final URL: %s\n", url); cnx = BUrlProtocolRoster::MakeRequest(url, &output, NULL); if (cnx == NULL) @@ -71,11 +73,11 @@ status_t google_request_process(struct google_request *req) t = cnx->Run(); wait_for_thread(t, &err); - fprintf(stderr, "google_request: buffer @ %p, len %ld\n", output.Buffer(), output.BufferLength()); + fprintf(stderr, "duckduckgo_request: buffer @ %p, len %ld\n", output.Buffer(), output.BufferLength()); { int fd; // debug output - fd = open("/tmp/google.html", O_CREAT|O_TRUNC|O_RDWR, 0644); + fd = open("/tmp/duckduckgo.html", O_CREAT|O_TRUNC|O_RDWR, 0644); write(fd, output.Buffer(), output.BufferLength()); close(fd); } @@ -100,19 +102,19 @@ status_t google_request_process(struct google_request *req) close(fd); } #endif /* FAKE_INPUT */ - err = count = google_parse_results((const char*)output.Buffer(), output.BufferLength(), + err = count = duckduckgo_parse_results((const char*)output.Buffer(), output.BufferLength(), &req->nextid, &req->results); if (err < 0) goto err_get; #ifdef DO_PUBLISH while ((res = SLL_DEQUEUE(req->results, next))) { res->next = NULL; - googlefs_push_result_to_query(req, res); + websearchfs_push_result_to_query(req, res); } #endif free(url); free(p); - // request is kept and deleted in google_request_close + // request is kept and deleted in duckduckgo_request_close return B_OK; @@ -126,12 +128,12 @@ err_con: return err; } -status_t google_request_process_async(struct google_request *req) +status_t duckduckgo_request_process_async(struct duckduckgo_request *req) { return ENOSYS; } -status_t google_request_close(struct google_request *req) +status_t duckduckgo_request_close(struct duckduckgo_request *req) { if (!req) return EINVAL; @@ -142,15 +144,15 @@ status_t google_request_close(struct google_request *req) return B_OK; } -status_t google_request_open(const char *query_string, struct fs_volume *volume, struct fs_node *query_node, struct google_request **req) +status_t duckduckgo_request_open(const char *query_string, struct fs_volume *volume, struct fs_node *query_node, struct duckduckgo_request **req) { - struct google_request *r; + struct duckduckgo_request *r; if (!req) return EINVAL; - r = (google_request*)malloc(sizeof(struct google_request)); + r = (duckduckgo_request*)malloc(sizeof(struct duckduckgo_request)); if (!r) return ENOMEM; - memset(r, 0, sizeof(struct google_request)); + memset(r, 0, sizeof(struct duckduckgo_request)); r->query_string = strdup(query_string); r->volume = volume; r->query_node = query_node; @@ -158,7 +160,7 @@ status_t google_request_open(const char *query_string, struct fs_volume *volume, return B_OK; } -status_t google_request_free(struct google_request *req) +status_t duckduckgo_request_free(struct duckduckgo_request *req) { if (!req) return EINVAL; diff --git a/src/add-ons/kernel/file_systems/websearchfs/duckduckgo_request.h b/src/add-ons/kernel/file_systems/websearchfs/duckduckgo_request.h new file mode 100644 index 0000000000..95dd3ca5ff --- /dev/null +++ b/src/add-ons/kernel/file_systems/websearchfs/duckduckgo_request.h @@ -0,0 +1,55 @@ +/* + * Copyright 2004-2008, François Revol, . + * Distributed under the terms of the MIT License. + */ +#ifndef _DUCKDUCKGO_REQUEST_H +#define _DUCKDUCKGO_REQUEST_H + +#ifdef __cplusplus +#include +using namespace BPrivate::Network; +extern "C" { +#else +struct BUrlRequest; +typedef struct BUrlRequest BUrlRequest; +#endif + +struct duckduckgo_request { + struct duckduckgo_request *next; + struct fs_volume *volume; + struct fs_node *query_node; /* root folder for that query */ + char *query_string; + BUrlRequest *cnx; + struct duckduckgo_result *results; + long nextid; +}; + +/* those are quite arbitrary values */ +#define GR_MAX_NAME 70 +#define GR_MAX_PROTO 16 +#define GR_MAX_URL 1024 +#define GR_MAX_SNIPSET 256 +struct duckduckgo_result { + struct duckduckgo_result *next; + long id; + char name[GR_MAX_NAME]; + char proto[GR_MAX_PROTO]; + char url[GR_MAX_URL]; + char snipset[GR_MAX_SNIPSET]; + char cache_url[GR_MAX_URL]; + char similar_url[GR_MAX_URL]; +}; + +extern status_t duckduckgo_request_process(struct duckduckgo_request *req); +extern status_t duckduckgo_request_process_async(struct duckduckgo_request *req); +extern status_t duckduckgo_request_close(struct duckduckgo_request *req); +extern status_t duckduckgo_request_open(const char *query_string, struct fs_volume *volume, struct fs_node *query_node, struct duckduckgo_request **req); +extern status_t duckduckgo_request_free(struct duckduckgo_request *req); + +extern int duckduckgo_parse_results(const char *html, size_t htmlsize, long *nextid, struct duckduckgo_result **results); + +#ifdef __cplusplus +} +#endif + +#endif /* _DUCKDUCKGO_REQUEST_H */ diff --git a/src/add-ons/kernel/file_systems/googlefs/fsproto.h b/src/add-ons/kernel/file_systems/websearchfs/fsproto.h similarity index 100% rename from src/add-ons/kernel/file_systems/googlefs/fsproto.h rename to src/add-ons/kernel/file_systems/websearchfs/fsproto.h diff --git a/src/add-ons/kernel/file_systems/googlefs/ksocket.h b/src/add-ons/kernel/file_systems/websearchfs/ksocket.h similarity index 100% rename from src/add-ons/kernel/file_systems/googlefs/ksocket.h rename to src/add-ons/kernel/file_systems/websearchfs/ksocket.h diff --git a/src/add-ons/kernel/file_systems/googlefs/lists.c b/src/add-ons/kernel/file_systems/websearchfs/lists.c similarity index 100% rename from src/add-ons/kernel/file_systems/googlefs/lists.c rename to src/add-ons/kernel/file_systems/websearchfs/lists.c diff --git a/src/add-ons/kernel/file_systems/googlefs/lists.h b/src/add-ons/kernel/file_systems/websearchfs/lists.h similarity index 100% rename from src/add-ons/kernel/file_systems/googlefs/lists.h rename to src/add-ons/kernel/file_systems/websearchfs/lists.h diff --git a/src/add-ons/kernel/file_systems/googlefs/lists2.c b/src/add-ons/kernel/file_systems/websearchfs/lists2.c similarity index 100% rename from src/add-ons/kernel/file_systems/googlefs/lists2.c rename to src/add-ons/kernel/file_systems/websearchfs/lists2.c diff --git a/src/add-ons/kernel/file_systems/googlefs/lists2.h b/src/add-ons/kernel/file_systems/websearchfs/lists2.h similarity index 100% rename from src/add-ons/kernel/file_systems/googlefs/lists2.h rename to src/add-ons/kernel/file_systems/websearchfs/lists2.h diff --git a/src/add-ons/kernel/file_systems/googlefs/lock.h b/src/add-ons/kernel/file_systems/websearchfs/lock.h similarity index 100% rename from src/add-ons/kernel/file_systems/googlefs/lock.h rename to src/add-ons/kernel/file_systems/websearchfs/lock.h diff --git a/src/add-ons/kernel/file_systems/googlefs/makezip.sh b/src/add-ons/kernel/file_systems/websearchfs/makezip.sh similarity index 100% rename from src/add-ons/kernel/file_systems/googlefs/makezip.sh rename to src/add-ons/kernel/file_systems/websearchfs/makezip.sh diff --git a/src/add-ons/kernel/file_systems/googlefs/parse_google_html.c b/src/add-ons/kernel/file_systems/websearchfs/parse_duckduckgo_html.c similarity index 85% rename from src/add-ons/kernel/file_systems/googlefs/parse_google_html.c rename to src/add-ons/kernel/file_systems/websearchfs/parse_duckduckgo_html.c index 20cde3bfa2..22c6b2bb32 100644 --- a/src/add-ons/kernel/file_systems/googlefs/parse_google_html.c +++ b/src/add-ons/kernel/file_systems/websearchfs/parse_duckduckgo_html.c @@ -11,7 +11,7 @@ #include #include #include -#include "google_request.h" +#include "duckduckgo_request.h" #include "string_utils.h" #define TESTME @@ -21,7 +21,7 @@ #undef TESTME #endif -#define DBG "googlefs: parse_html: " +#define DBG "duckduckgofs: parse_html: " #ifdef TESTME #define BUFSZ (128*1024) @@ -40,9 +40,9 @@ int dbgstep = 0; #define G_BEGIN_CACHESIM " " -int google_parse_results(const char *html, size_t htmlsize, long *nextid, struct google_result **results) +int duckduckgo_parse_results(const char *html, size_t htmlsize, long *nextid, struct duckduckgo_result **results) { - struct google_result *res = NULL, *nres = NULL, *prev = NULL; + struct duckduckgo_result *res = NULL, *nres = NULL, *prev = NULL; char *p, *q; char *nextresult = NULL; long numres = 0; @@ -60,7 +60,6 @@ int google_parse_results(const char *html, size_t htmlsize, long *nextid, struct return EINVAL; } PRST; -// p = strstr(html, "Google Search:"); p = strstr(html, "DuckDuckGo"); if (!p) return EINVAL; PRST; @@ -85,12 +84,12 @@ int google_parse_results(const char *html, size_t htmlsize, long *nextid, struct #ifdef TESTME dbgstep = 0; #endif - nres = malloc(sizeof(struct google_result)); + nres = malloc(sizeof(struct duckduckgo_result)); if (!nres) { // XXX: cleanup! goto err0; } - memset(nres, 0, sizeof(struct google_result)); + memset(nres, 0, sizeof(struct duckduckgo_result)); nres->id = (*nextid)++; //- 1; PRST; @@ -119,7 +118,6 @@ int google_parse_results(const char *html, size_t htmlsize, long *nextid, struct urlp[itemlen] = '\0'; /* find name */ - //<b>Google</b> Web APIs - FAQ</a><table item = p; p = strstr(p, G_END_NAME); if (!p) break; @@ -158,7 +156,6 @@ int google_parse_results(const char *html, size_t htmlsize, long *nextid, struct #if 0 /* find snipset */ - //<td class=j><font size=-1><b>...</b> a custom Java client library, documentation on <b>how</b> <b>to</b> use the <b>...</b> You can find it at http://<b>api</b>.<b>google</b>.com/GoogleSearch.wsdl <b>...</b> need to get started is in <b>googleapi</b>.jar <b>...</b> <br> if (!p) break; q = strstr(p, G_BEGIN_SNIPSET); if (q && (!nextresult || (q < nextresult))) { @@ -194,7 +191,6 @@ int google_parse_results(const char *html, size_t htmlsize, long *nextid, struct #endif /* find cache/similar url */ - // <a class=fl href="http://216.239.59.104/search?q=cache:vR7BaPWutnkJ:www.google.com/apis/api_faq.html+google+api++help+%22frequently+asked%22+-plop&hl=en&lr=lang_en&ie=UTF-8">Cached</a> for (i = 0; i < 2; i++) { if (!p) break; q = strstr(p, G_BEGIN_CACHESIM); @@ -249,8 +245,8 @@ err0: #ifdef TESTME int main(int argc, char **argv) { - struct google_result *results; - struct google_result *tag1 = (void*)0xaaaa5555, *res = NULL, *tag2 = (void*)0x5555aaaa; + struct duckduckgo_result *results; + struct duckduckgo_result *tag1 = (void*)0xaaaa5555, *res = NULL, *tag2 = (void*)0x5555aaaa; size_t len; char *p; int err; @@ -261,7 +257,7 @@ int main(int argc, char **argv) p[BUFSZ+4-1] = '\0'; *(uint32 *)p = 0xa5a5a5a5; *(uint32 *)(&p[BUFSZ+4]) = 0x5a5a5a5a; - err = google_parse_results(p+4, len, &nextid, &results); + err = duckduckgo_parse_results(p+4, len, &nextid, &results); printf("error 0x%08x\n", err); if (err < 0) return 1; diff --git a/src/add-ons/kernel/file_systems/googlefs/query.c b/src/add-ons/kernel/file_systems/websearchfs/query.c similarity index 100% rename from src/add-ons/kernel/file_systems/googlefs/query.c rename to src/add-ons/kernel/file_systems/websearchfs/query.c diff --git a/src/add-ons/kernel/file_systems/googlefs/query.h b/src/add-ons/kernel/file_systems/websearchfs/query.h similarity index 100% rename from src/add-ons/kernel/file_systems/googlefs/query.h rename to src/add-ons/kernel/file_systems/websearchfs/query.h diff --git a/src/add-ons/kernel/file_systems/googlefs/ringbuff.c b/src/add-ons/kernel/file_systems/websearchfs/ringbuff.c similarity index 99% rename from src/add-ons/kernel/file_systems/googlefs/ringbuff.c rename to src/add-ons/kernel/file_systems/websearchfs/ringbuff.c index 684e8ae1a0..d5c61b8b67 100644 --- a/src/add-ons/kernel/file_systems/googlefs/ringbuff.c +++ b/src/add-ons/kernel/file_systems/websearchfs/ringbuff.c @@ -10,7 +10,7 @@ #include <sys/param.h> #ifndef TEST_RB //#include "lock.h" -#include "googlefs.h" +#include "websearchfs.h" #endif #ifdef TEST_RB diff --git a/src/add-ons/kernel/file_systems/googlefs/ringbuff.h b/src/add-ons/kernel/file_systems/websearchfs/ringbuff.h similarity index 100% rename from src/add-ons/kernel/file_systems/googlefs/ringbuff.h rename to src/add-ons/kernel/file_systems/websearchfs/ringbuff.h diff --git a/src/add-ons/kernel/file_systems/googlefs/settings.c b/src/add-ons/kernel/file_systems/websearchfs/settings.c similarity index 54% rename from src/add-ons/kernel/file_systems/googlefs/settings.c rename to src/add-ons/kernel/file_systems/websearchfs/settings.c index 68ab357d16..19a1096377 100644 --- a/src/add-ons/kernel/file_systems/googlefs/settings.c +++ b/src/add-ons/kernel/file_systems/websearchfs/settings.c @@ -11,10 +11,7 @@ #include <stdio.h> -#define DEFAULT_GOOGLE_SERVER "74.125.136.105" #define DEFAULT_MAX_VNODES 5000 -char google_server[20] = DEFAULT_GOOGLE_SERVER; -int google_server_port = 80; uint32 max_vnodes = DEFAULT_MAX_VNODES; uint32 max_results = 50; bool sync_unlink_queries = false; @@ -23,19 +20,11 @@ status_t load_settings(void) { void *handle; const char *val; - handle = load_driver_settings("googlefs"); + handle = load_driver_settings("websearchfs"); if (!handle) return ENOENT; - fprintf(stderr, "googlefs: loaded settings\n"); - - val = get_driver_parameter(handle, "server", \ - DEFAULT_GOOGLE_SERVER, DEFAULT_GOOGLE_SERVER); - strncpy(google_server, val, 20); - google_server[20-1] = '\0'; - - val = get_driver_parameter(handle, "port", "80", "80"); - google_server_port = strtoul(val, NULL, 10); + fprintf(stderr, "websearchfs: loaded settings\n"); val = get_driver_parameter(handle, "max_nodes", "5000", "5000"); max_vnodes = strtoul(val, NULL, 10); @@ -49,10 +38,9 @@ status_t load_settings(void) sync_unlink_queries = get_driver_boolean_parameter(handle, "sync_unlink", false, true); - fprintf(stderr, "googlefs: settings: server = %s\n", google_server); - fprintf(stderr, "googlefs: settings: max_nodes = %" B_PRIu32 "\n", max_vnodes); - fprintf(stderr, "googlefs: settings: max_results = %" B_PRIu32 " \n", max_results); - fprintf(stderr, "googlefs: settings: sync_unlink = %c\n", sync_unlink_queries?'t':'f'); + fprintf(stderr, "websearchfs: settings: max_nodes = %" B_PRIu32 "\n", max_vnodes); + fprintf(stderr, "websearchfs: settings: max_results = %" B_PRIu32 " \n", max_results); + fprintf(stderr, "websearchfs: settings: sync_unlink = %c\n", sync_unlink_queries?'t':'f'); unload_driver_settings(handle); return B_OK; } diff --git a/src/add-ons/kernel/file_systems/googlefs/settings.h b/src/add-ons/kernel/file_systems/websearchfs/settings.h similarity index 86% rename from src/add-ons/kernel/file_systems/googlefs/settings.h rename to src/add-ons/kernel/file_systems/websearchfs/settings.h index 1aab15f919..8e334760a7 100644 --- a/src/add-ons/kernel/file_systems/googlefs/settings.h +++ b/src/add-ons/kernel/file_systems/websearchfs/settings.h @@ -10,8 +10,6 @@ extern "C" { #endif /* settings */ -extern char google_server[20]; -extern int google_server_port; extern uint32 max_vnodes; extern uint32 max_results; extern bool sync_unlink_queries; diff --git a/src/add-ons/kernel/file_systems/googlefs/string_utils.c b/src/add-ons/kernel/file_systems/websearchfs/string_utils.c similarity index 100% rename from src/add-ons/kernel/file_systems/googlefs/string_utils.c rename to src/add-ons/kernel/file_systems/websearchfs/string_utils.c diff --git a/src/add-ons/kernel/file_systems/googlefs/string_utils.h b/src/add-ons/kernel/file_systems/websearchfs/string_utils.h similarity index 100% rename from src/add-ons/kernel/file_systems/googlefs/string_utils.h rename to src/add-ons/kernel/file_systems/websearchfs/string_utils.h diff --git a/src/add-ons/kernel/file_systems/googlefs/vnidpool.c b/src/add-ons/kernel/file_systems/websearchfs/vnidpool.c similarity index 100% rename from src/add-ons/kernel/file_systems/googlefs/vnidpool.c rename to src/add-ons/kernel/file_systems/websearchfs/vnidpool.c diff --git a/src/add-ons/kernel/file_systems/googlefs/vnidpool.h b/src/add-ons/kernel/file_systems/websearchfs/vnidpool.h similarity index 95% rename from src/add-ons/kernel/file_systems/googlefs/vnidpool.h rename to src/add-ons/kernel/file_systems/websearchfs/vnidpool.h index a8f99bb746..322433e69d 100644 --- a/src/add-ons/kernel/file_systems/googlefs/vnidpool.h +++ b/src/add-ons/kernel/file_systems/websearchfs/vnidpool.h @@ -5,7 +5,7 @@ #ifndef _VNIDPOOL_H #define _VNIDPOOL_H -#include "googlefs.h" +#include "websearchfs.h" typedef struct vnidpool { lock lock; diff --git a/src/add-ons/kernel/file_systems/googlefs/googlefs.c b/src/add-ons/kernel/file_systems/websearchfs/websearchfs.c similarity index 72% rename from src/add-ons/kernel/file_systems/googlefs/googlefs.c rename to src/add-ons/kernel/file_systems/websearchfs/websearchfs.c index 7dd565f351..133f0857dc 100644 --- a/src/add-ons/kernel/file_systems/googlefs/googlefs.c +++ b/src/add-ons/kernel/file_systems/websearchfs/websearchfs.c @@ -4,7 +4,7 @@ */ /* - * googlefs - a bookmark-populated virtual filesystem using Google results. + * websearchfs - a bookmark-populated virtual filesystem using DuckDuckGo results. */ #define _BUILDING_fs 1 @@ -20,21 +20,21 @@ #include <string.h> #include <fs_query.h> #include "query.h" -#include "googlefs.h" +#include "websearchfs.h" #include "vnidpool.h" -#include "google_request.h" +#include "duckduckgo_request.h" #include "settings.h" /* just publish fake entries; for debugging */ //#define NO_SEARCH -#define PFS "googlefs: " +#define PFS "websearchfs: " -#define TRACE_GOOGLEFS -#ifdef TRACE_GOOGLEFS +#define TRACE_WEBSEARCHFS +#ifdef TRACE_WEVSEARCHFS # define TRACE(x...) fprintf(stderr, PFS x) #else -# define TRACE(x) +# define TRACE(x...) #endif @@ -54,12 +54,12 @@ extern struct attr_entry mailto_me_bookmark_attrs[]; extern char *readmestr; -static fs_volume_ops sGoogleFSVolumeOps; -static fs_vnode_ops sGoogleFSVnodeOps; +static fs_volume_ops sWebSearchFSVolumeOps; +static fs_vnode_ops sWebSearchFSVnodeOps; -static int googlefs_create_gen(fs_volume *_volume, fs_node *dir, const char *name, int omode, int perms, ino_t *vnid, fs_node **node, struct attr_entry *iattrs, bool mkdir, bool uniq); -static int googlefs_free_vnode(fs_volume *_volume, fs_node *node); +static int websearchfs_create_gen(fs_volume *_volume, fs_node *dir, const char *name, int omode, int perms, ino_t *vnid, fs_node **node, struct attr_entry *iattrs, bool mkdir, bool uniq); +static int websearchfs_free_vnode(fs_volume *_volume, fs_node *node); static void fill_default_stat(struct stat *st, nspace_id nsid, ino_t vnid, mode_t mode) { @@ -80,32 +80,32 @@ static void fill_default_stat(struct stat *st, nspace_id nsid, ino_t vnid, mode_ /** Publishes some entries in the root vnode: a query template, the readme file, and a People file of the author. */ -static int googlefs_publish_static_entries(fs_volume *_volume) +static int websearchfs_publish_static_entries(fs_volume *_volume) { fs_nspace *ns = (fs_nspace *)_volume->private_volume; status_t err = B_OK; fs_node *dir = ns->root; fs_node *n;// *dummy; - //char ename[GOOGLEFS_NAME_LEN]; + //char ename[WEBSEARCHFS_NAME_LEN]; //char *p; //int i; - TRACE("googlefs_publish_static_entries(%" B_PRId32 ")\n", ns->nsid); + TRACE("websearchfs_publish_static_entries(%" B_PRId32 ")\n", ns->nsid); if (!ns || !dir) return EINVAL; - err = googlefs_create_gen(_volume, dir, "Search Google", 0, 0444, NULL, &n, template_1_attrs, false, true); + err = websearchfs_create_gen(_volume, dir, "Search the Web", 0, 0444, NULL, &n, template_1_attrs, false, true); if (err) return err; n->is_perm = 1; - err = googlefs_create_gen(_volume, dir, "README", 0, 0444, NULL, &n, text_attrs, false, true); + err = websearchfs_create_gen(_volume, dir, "README", 0, 0444, NULL, &n, text_attrs, false, true); if (err) return err; n->is_perm = 1; n->data = readmestr; n->data_size = strlen(n->data);// + 1; - err = googlefs_create_gen(_volume, dir, "Author", 0, 0444, NULL, &n, mailto_me_bookmark_attrs, false, true); + err = websearchfs_create_gen(_volume, dir, "Author", 0, 0444, NULL, &n, mailto_me_bookmark_attrs, false, true); if (err) return err; n->is_perm = 1; @@ -119,7 +119,7 @@ err: */ } -static status_t googlefs_mount(fs_volume *_vol, const char *devname, uint32 flags, +static status_t websearchfs_mount(fs_volume *_vol, const char *devname, uint32 flags, const char *parms, ino_t *vnid) { fs_nspace *ns; @@ -147,7 +147,7 @@ static status_t googlefs_mount(fs_volume *_vol, const char *devname, uint32 flag return err; atomic_add(&ns->nodecount, 1); - new_lock(&(ns->l), "googlefs main lock"); + new_lock(&(ns->l), "websearchfs main lock"); ns->nodes = NULL; @@ -162,16 +162,16 @@ static status_t googlefs_mount(fs_volume *_vol, const char *devname, uint32 flag root->vnid = ns->rootid; fill_default_stat(&root->st, ns->nsid, ns->rootid, 0777 | S_IFDIR); root->attrs_indirect = root_folder_attrs; - new_lock(&(root->l), "googlefs root dir"); + new_lock(&(root->l), "websearchfs root dir"); TRACE("mount: root->l @ %p\n", &root->l); _vol->private_volume = ns; - _vol->ops = &sGoogleFSVolumeOps; + _vol->ops = &sWebSearchFSVolumeOps; *vnid = ns->rootid; ns->nodes = root; // sll_insert - err = publish_vnode(_vol, *vnid, root, &sGoogleFSVnodeOps, S_IFDIR, 0); + err = publish_vnode(_vol, *vnid, root, &sWebSearchFSVnodeOps, S_IFDIR, 0); if (err == B_OK) { - googlefs_publish_static_entries(_vol); + websearchfs_publish_static_entries(_vol); TRACE("mount() OK, nspace@ %p, id %" B_PRId32 ", root@ %p, id %" B_PRId64 "\n", ns, ns->nsid, root, ns->rootid); return B_OK; } @@ -184,7 +184,7 @@ static status_t googlefs_mount(fs_volume *_vol, const char *devname, uint32 flag return err; } -static status_t googlefs_unmount(fs_volume *_volume) +static status_t websearchfs_unmount(fs_volume *_volume) { fs_nspace *ns = (fs_nspace *)_volume->private_volume; status_t err; @@ -196,7 +196,7 @@ static status_t googlefs_unmount(fs_volume *_volume) /* anything in still in use ? */ for (node = ns->nodes; node; node = ns->nodes) { ns->nodes = node->nlnext; /* better cache that before we free node */ - googlefs_free_vnode(_volume, node); + websearchfs_free_vnode(_volume, node); } // Unlike in BeOS, we need to put the reference to our root node ourselves @@ -216,7 +216,7 @@ static int compare_fs_node_by_vnid(fs_node *node, ino_t *id) return !(node->vnid == *id); } -static int googlefs_free_vnode(fs_volume *_volume, fs_node *node) +static int websearchfs_free_vnode(fs_volume *_volume, fs_node *node) { fs_nspace *ns = (fs_nspace *)_volume->private_volume; TRACE("%s(%" B_PRId32 ", %" B_PRId64 ")\n", __FUNCTION__, ns->nsid, node->vnid); @@ -224,13 +224,13 @@ static int googlefs_free_vnode(fs_volume *_volume, fs_node *node) atomic_add(&ns->nodecount, -1); vnidpool_put(ns->vnids, node->vnid); if (node->request) - google_request_free(node->request); + duckduckgo_request_free(node->request); free(node->result); free(node); return 0; } -static status_t googlefs_remove_vnode(fs_volume *_volume, fs_vnode *_node, bool reenter) +static status_t websearchfs_remove_vnode(fs_volume *_volume, fs_vnode *_node, bool reenter) { fs_nspace *ns = (fs_nspace *)_volume->private_volume; fs_node *node = (fs_node *)_node->private_node; @@ -255,13 +255,13 @@ TRACE("SLL_REMOVE(node->parent->children %p, next, %p)\n", node->parent->childre SLL_REMOVE(node->parent->children, next, node); UNLOCK(&node->parent->l); } - googlefs_free_vnode(_volume, node); + websearchfs_free_vnode(_volume, node); if (!reenter) UNLOCK(&ns->l); return err; } -static status_t googlefs_read_vnode(fs_volume *_volume, ino_t vnid, fs_vnode *_node, int* _type, uint32* _flags, bool reenter) +static status_t websearchfs_read_vnode(fs_volume *_volume, ino_t vnid, fs_vnode *_node, int* _type, uint32* _flags, bool reenter) { fs_nspace *ns = (fs_nspace *)_volume->private_volume; fs_node *n; @@ -274,7 +274,7 @@ static status_t googlefs_read_vnode(fs_volume *_volume, ino_t vnid, fs_vnode *_n n = (fs_node *)SLL_FIND(ns->nodes, nlnext, (sll_compare_func)compare_fs_node_by_vnid, (void *)&vnid); if (n) { _node->private_node = n; - _node->ops = &sGoogleFSVnodeOps; + _node->ops = &sWebSearchFSVnodeOps; *_type = n->st.st_mode & ~S_IUMSK; /*XXX: S_IFMT ?*/ *_flags = 0; @@ -285,7 +285,7 @@ static status_t googlefs_read_vnode(fs_volume *_volume, ino_t vnid, fs_vnode *_n return err; } -static status_t googlefs_release_vnode(fs_volume *_volume, fs_vnode *_node, bool reenter) +static status_t websearchfs_release_vnode(fs_volume *_volume, fs_vnode *_node, bool reenter) { fs_node *node = (fs_node *)_node->private_node; TRACE("%s(%" B_PRId32 ", %" B_PRId64 ", %s)\n", __FUNCTION__, _volume->id, node->vnid, reenter?"r":"!r"); @@ -294,23 +294,23 @@ static status_t googlefs_release_vnode(fs_volume *_volume, fs_vnode *_node, bool static int compare_fs_node_by_name(fs_node *node, char *name) { - //return memcmp(node->name, name, GOOGLEFS_NAME_LEN); + //return memcmp(node->name, name, WEBSEARCHFS__NAME_LEN); //TRACE("find_by_name: '%s' <> '%s'\n", node->name, name); - return strncmp(node->name, name, GOOGLEFS_NAME_LEN); + return strncmp(node->name, name, WEBSEARCHFS_NAME_LEN); } -static status_t googlefs_get_vnode_name(fs_volume *_volume, fs_vnode *_node, char *buffer, size_t len) +static status_t websearchfs_get_vnode_name(fs_volume *_volume, fs_vnode *_node, char *buffer, size_t len) { fs_nspace *ns = (fs_nspace *)_volume->private_volume; fs_node *node = (fs_node *)_node->private_node; TRACE("get_vnode_name(%" B_PRId32 ", %" B_PRId64 ", )\n", ns->nsid, (int64)(node?node->vnid:-1)); - strlcpy(buffer, node->name, MIN(GOOGLEFS_NAME_LEN, len)); + strlcpy(buffer, node->name, MIN(WEBSEARCHFS_NAME_LEN, len)); return B_OK; } -static status_t googlefs_walk(fs_volume *_volume, fs_vnode *_base, const char *file, ino_t *vnid) +static status_t websearchfs_walk(fs_volume *_volume, fs_vnode *_base, const char *file, ino_t *vnid) { fs_nspace *ns = (fs_nspace *)_volume->private_volume; fs_node *base = _base->private_node; @@ -353,7 +353,7 @@ static status_t googlefs_walk(fs_volume *_volume, fs_vnode *_base, const char *f return err; } -static status_t googlefs_opendir(fs_volume *_volume, fs_vnode *_node, void **cookie) +static status_t websearchfs_opendir(fs_volume *_volume, fs_vnode *_node, void **cookie) { fs_nspace *ns = (fs_nspace *)_volume->private_volume; fs_node *node = (fs_node *)_node->private_node; @@ -384,7 +384,7 @@ static status_t googlefs_opendir(fs_volume *_volume, fs_vnode *_node, void **coo return err; } -static status_t googlefs_closedir(fs_volume *_volume, fs_vnode *_node, void *_cookie) +static status_t websearchfs_closedir(fs_volume *_volume, fs_vnode *_node, void *_cookie) { fs_nspace *ns = (fs_nspace *)_volume->private_volume; fs_node *node = (fs_node *)_node->private_node; @@ -402,7 +402,7 @@ static status_t googlefs_closedir(fs_volume *_volume, fs_vnode *_node, void *_co return err; } -static status_t googlefs_rewinddir(fs_volume *_volume, fs_vnode *_node, void *_cookie) +static status_t websearchfs_rewinddir(fs_volume *_volume, fs_vnode *_node, void *_cookie) { fs_nspace *ns = (fs_nspace *)_volume->private_volume; fs_node *node = (fs_node *)_node->private_node; @@ -412,7 +412,8 @@ static status_t googlefs_rewinddir(fs_volume *_volume, fs_vnode *_node, void *_c return B_OK; } -static status_t googlefs_readdir(fs_volume *_volume, fs_vnode *_node, void *_cookie, struct dirent *buf, size_t bufsize, uint32 *num) +static status_t websearchfs_readdir(fs_volume *_volume, fs_vnode *_node, void *_cookie, + struct dirent *buf, size_t bufsize, uint32 *num) { fs_nspace *ns = (fs_nspace *)_volume->private_volume; fs_node *node = (fs_node *)_node->private_node; @@ -420,8 +421,10 @@ static status_t googlefs_readdir(fs_volume *_volume, fs_vnode *_node, void *_coo fs_node *n = NULL; fs_node *parent = node->parent; int index; - TRACE("readdir(%" B_PRId32 ", %" B_PRId64 ") @ %d\n", ns->nsid, node->vnid, cookie->dir_current); - if (!node || !cookie || !num || !*num || !buf || (bufsize < (sizeof(dirent_t)+GOOGLEFS_NAME_LEN))) + TRACE("readdir(%" B_PRId32 ", %" B_PRId64 ") @ %d\n", ns->nsid, node->vnid, + cookie->dir_current); + if (!node || !cookie || !num || !*num || !buf + || (bufsize < (sizeof(dirent_t) + WEBSEARCHFS_NAME_LEN))) return EINVAL; LOCK(&node->l); if (cookie->dir_current == 0) { /* .. */ @@ -467,7 +470,7 @@ static status_t googlefs_readdir(fs_volume *_volume, fs_vnode *_node, void *_coo return B_OK; } -static status_t googlefs_free_dircookie(fs_volume *_volume, fs_vnode *_node, void *_cookie) +static status_t websearchfs_free_dircookie(fs_volume *_volume, fs_vnode *_node, void *_cookie) { fs_nspace *ns = (fs_nspace *)_volume->private_volume; fs_node *node = (fs_node *)_node->private_node; @@ -484,7 +487,7 @@ static status_t googlefs_free_dircookie(fs_volume *_volume, fs_vnode *_node, voi return B_OK; } -static status_t googlefs_rstat(fs_volume *_volume, fs_vnode *_node, struct stat *st) +static status_t websearchfs_rstat(fs_volume *_volume, fs_vnode *_node, struct stat *st) { fs_nspace *ns = (fs_nspace *)_volume->private_volume; fs_node *node = (fs_node *)_node->private_node; @@ -504,11 +507,11 @@ static status_t googlefs_rstat(fs_volume *_volume, fs_vnode *_node, struct stat return err; } -static status_t googlefs_rfsstat(fs_volume *_volume, struct fs_info *info) +static status_t websearchfs_rfsstat(fs_volume *_volume, struct fs_info *info) { fs_nspace *ns = (fs_nspace *)_volume->private_volume; - info->block_size=1024;//googlefs_BUFF_SIZE; - info->io_size=1024;//GOOGLEFS_BUFF_SIZE; + info->block_size = 1024; // websearchfs_BUFF_SIZE; + info->io_size = 1024; // WEBSEARCHFS_BUFF_SIZE; info->total_blocks=0; info->free_blocks=0; info->total_nodes=MAX_VNIDS; @@ -517,12 +520,12 @@ static status_t googlefs_rfsstat(fs_volume *_volume, struct fs_info *info) info->root=ns->rootid; info->flags=/*B_FS_IS_SHARED|*/B_FS_IS_PERSISTENT|B_FS_HAS_MIME|B_FS_HAS_ATTR|B_FS_HAS_QUERY; strcpy (info->device_name, ""); - strcpy (info->volume_name, "Google"); - strcpy (info->fsh_name, GOOGLEFS_NAME); + strcpy (info->volume_name, "Web Search"); + strcpy (info->fsh_name, WEBSEARCHFS_NAME); return B_OK; } -static status_t googlefs_open(fs_volume *_volume, fs_vnode *_node, int omode, void **cookie) +static status_t websearchfs_open(fs_volume *_volume, fs_vnode *_node, int omode, void **cookie) { fs_nspace *ns = (fs_nspace *)_volume->private_volume; fs_node *node = (fs_node *)_node->private_node; @@ -577,7 +580,7 @@ err_n_l: return err; } -static status_t googlefs_close(fs_volume *_volume, fs_vnode *_node, void *_cookie) +static status_t websearchfs_close(fs_volume *_volume, fs_vnode *_node, void *_cookie) { fs_nspace *ns = (fs_nspace *)_volume->private_volume; fs_node *node = (fs_node *)_node->private_node; @@ -597,7 +600,7 @@ static status_t googlefs_close(fs_volume *_volume, fs_vnode *_node, void *_cooki return err; } -static status_t googlefs_free_cookie(fs_volume *_volume, fs_vnode *_node, void *_cookie) +static status_t websearchfs_free_cookie(fs_volume *_volume, fs_vnode *_node, void *_cookie) { fs_nspace *ns = (fs_nspace *)_volume->private_volume; fs_node *node = (fs_node *)_node->private_node; @@ -625,7 +628,7 @@ static status_t googlefs_free_cookie(fs_volume *_volume, fs_vnode *_node, void * return err; } -static status_t googlefs_read(fs_volume *_volume, fs_vnode *_node, void *_cookie, off_t pos, void *buf, size_t *len) +static status_t websearchfs_read(fs_volume *_volume, fs_vnode *_node, void *_cookie, off_t pos, void *buf, size_t *len) { fs_nspace *ns = (fs_nspace *)_volume->private_volume; fs_node *node = (fs_node *)_node->private_node; @@ -642,7 +645,7 @@ static status_t googlefs_read(fs_volume *_volume, fs_vnode *_node, void *_cookie return B_OK; } -static status_t googlefs_write(fs_volume *_volume, fs_vnode *_node, void *_cookie, off_t pos, const void *buf, size_t *len) +static status_t websearchfs_write(fs_volume *_volume, fs_vnode *_node, void *_cookie, off_t pos, const void *buf, size_t *len) { fs_node *node = (fs_node *)_node->private_node; TRACE("write(%" B_PRId32 ", %" B_PRId64 ", %jd, %zu)\n", _volume->id, node->vnid, pos, *len); @@ -650,14 +653,14 @@ static status_t googlefs_write(fs_volume *_volume, fs_vnode *_node, void *_cooki return ENOSYS; } -static status_t googlefs_wstat(fs_volume *_volume, fs_vnode *_node, const struct stat *st, uint32 mask) +static status_t websearchfs_wstat(fs_volume *_volume, fs_vnode *_node, const struct stat *st, uint32 mask) { fs_node *node = (fs_node *)_node->private_node; TRACE("wstat(%" B_PRId32 ", %" B_PRId64 ", , 0x%08" B_PRIx32 ")\n", _volume->id, node->vnid, mask); return ENOSYS; } -static status_t googlefs_wfsstat(fs_volume *_volume, const struct fs_info *info, uint32 mask) +static status_t websearchfs_wfsstat(fs_volume *_volume, const struct fs_info *info, uint32 mask) { TRACE("wfsstat(%" B_PRId32 ", , 0x%08" B_PRIx32 ")\n", _volume->id, mask); return ENOSYS; @@ -673,17 +676,17 @@ static status_t googlefs_wfsstat(fs_volume *_volume, const struct fs_info *info, * @param mkdir create a directory instead of a file * @param uniq choose an unique name, appending a number if required */ -static int googlefs_create_gen(fs_volume *_volume, fs_node *dir, const char *name, int omode, int perms, ino_t *vnid, fs_node **node, struct attr_entry *iattrs, bool mkdir, bool uniq) +static int websearchfs_create_gen(fs_volume *_volume, fs_node *dir, const char *name, int omode, int perms, ino_t *vnid, fs_node **node, struct attr_entry *iattrs, bool mkdir, bool uniq) { fs_nspace *ns = (fs_nspace *)_volume->private_volume; //fs_node *dir = (fs_node *)_dir->private_node; - char newname[GOOGLEFS_NAME_LEN]; + char newname[WEBSEARCHFS_NAME_LEN]; status_t err; fs_node *n; int i; TRACE("create_gen(%" B_PRId32 ", %" B_PRId64 ", '%s', 0x%08x, %c, %c)\n", ns->nsid, dir->vnid, name, omode, mkdir?'t':'f', uniq?'t':'f'); - if (strlen(name) > GOOGLEFS_NAME_LEN-1) + if (strlen(name) > WEBSEARCHFS_NAME_LEN-1) return ENAMETOOLONG; err = LOCK(&dir->l); if (err < 0) @@ -697,11 +700,11 @@ static int googlefs_create_gen(fs_volume *_volume, fs_node *dir, const char *nam if (n && (omode & O_EXCL) && !uniq) /* already existing entry in there! */ goto err_l; - strncpy(newname, name, GOOGLEFS_NAME_LEN); - newname[GOOGLEFS_NAME_LEN-1] = '\0'; + strncpy(newname, name, WEBSEARCHFS_NAME_LEN); + newname[WEBSEARCHFS_NAME_LEN-1] = '\0'; for (i = 1; uniq && n && i < 5000; i++) { /* uniquify the name */ - //sprintf("%"#(GOOGLEFS_NAME_LEN-8)"s %05d", name, i); + //sprintf("%"#(WEBSEARCHFS_NAME_LEN-8)"s %05d", name, i); strncpy(newname, name, 56); newname[56] = '\0'; sprintf(newname+strlen(newname), " %05d", i); @@ -733,7 +736,7 @@ static int googlefs_create_gen(fs_volume *_volume, fs_node *dir, const char *nam //n->is_perm = 1; fill_default_stat(&n->st, ns->nsid, n->vnid, (perms & ~S_IFMT) | (mkdir?S_IFDIR:S_IFREG)); - new_lock(&(n->l), mkdir?"googlefs dir":"googlefs file"); + new_lock(&(n->l), mkdir?"websearchfs dir":"websearchfs file"); err = LOCK(&ns->l); if (err) @@ -777,27 +780,27 @@ done: return err; } -static status_t googlefs_create(fs_volume *_volume, fs_vnode *_dir, const char *name, int omode, int perms, void **cookie, ino_t *vnid) +static status_t websearchfs_create(fs_volume *_volume, fs_vnode *_dir, const char *name, int omode, int perms, void **cookie, ino_t *vnid) { fs_nspace *ns = (fs_nspace *)_volume->private_volume; fs_node *dir = (fs_node *)_dir->private_node; status_t err; fs_node *n; - struct fs_vnode child = { NULL, &sGoogleFSVnodeOps }; + struct fs_vnode child = { NULL, &sWebSearchFSVnodeOps }; TRACE("create(%" B_PRId32 ", %" B_PRId64 ", '%s', 0x%08x)\n", ns->nsid, dir->vnid, name, omode); /* don't let ppl mess our fs up */ return ENOSYS; - err = googlefs_create_gen(_volume, dir, name, omode, perms, vnid, &n, NULL, false, false); + err = websearchfs_create_gen(_volume, dir, name, omode, perms, vnid, &n, NULL, false, false); if (err) return err; child.private_node = (void *)n; - err = googlefs_open(_volume, &child, omode, cookie); + err = websearchfs_open(_volume, &child, omode, cookie); return err; } -static int googlefs_unlink_gen(fs_volume *_volume, fs_node *dir, const char *name) +static int websearchfs_unlink_gen(fs_volume *_volume, fs_node *dir, const char *name) { fs_nspace *ns = (fs_nspace *)_volume->private_volume; status_t err; @@ -832,27 +835,27 @@ static int googlefs_unlink_gen(fs_volume *_volume, fs_node *dir, const char *nam return err; } -static status_t googlefs_unlink(fs_volume *_volume, fs_vnode *_dir, const char *name) +static status_t websearchfs_unlink(fs_volume *_volume, fs_vnode *_dir, const char *name) { //fs_nspace *ns = (fs_nspace *)_volume->private_volume; //fs_node *dir = (fs_node *)_dir->private_node; - return googlefs_unlink_gen(_volume, (fs_node *)_dir->private_node, name); + return websearchfs_unlink_gen(_volume, (fs_node *)_dir->private_node, name); } -static status_t googlefs_rmdir(fs_volume *_volume, fs_vnode *_dir, const char *name) +static status_t websearchfs_rmdir(fs_volume *_volume, fs_vnode *_dir, const char *name) { //fs_nspace *ns = (fs_nspace *)_volume->private_volume; fs_node *dir = (fs_node *)_dir->private_node; TRACE("rmdir(%" B_PRId32 ", %" B_PRId64 ", %s)\n", _volume->id, dir->vnid, name); - return googlefs_unlink(_volume, _dir, name); + return websearchfs_unlink(_volume, _dir, name); } -static int googlefs_unlink_node_rec(fs_volume *_volume, fs_node *node) +static int websearchfs_unlink_node_rec(fs_volume *_volume, fs_node *node) { fs_nspace *ns = (fs_nspace *)_volume->private_volume; status_t err; fs_node *n; - TRACE("googlefs_unlink_node_rec(%" B_PRId32 ", %" B_PRId64 ":%s)\n", ns->nsid, node->vnid, node->name); + TRACE("websearchfs_unlink_node_rec(%" B_PRId32 ", %" B_PRId64 ":%s)\n", ns->nsid, node->vnid, node->name); if (!ns || !node) return EINVAL; // kill_request(); @@ -862,15 +865,15 @@ static int googlefs_unlink_node_rec(fs_volume *_volume, fs_node *node) if (!n) break; UNLOCK(&node->l); - err = googlefs_unlink_node_rec(_volume, n); + err = websearchfs_unlink_node_rec(_volume, n); LOCK(&node->l); } UNLOCK(&node->l); - err = googlefs_unlink_gen(_volume, node->parent, node->name); + err = websearchfs_unlink_gen(_volume, node->parent, node->name); return err; } -static status_t googlefs_access(fs_volume *_volume, fs_vnode *_node, int mode) +static status_t websearchfs_access(fs_volume *_volume, fs_vnode *_node, int mode) { fs_nspace *ns = (fs_nspace *)_volume->private_volume; fs_node *node = (fs_node *)_node->private_node; @@ -878,114 +881,18 @@ static status_t googlefs_access(fs_volume *_volume, fs_vnode *_node, int mode) return B_OK; } -/* -static int googlefs_setflags(fs_volume *_volume, fs_vnode *_node, fs_file_cookie *cookie, int flags) -{ - return EINVAL; -} -*/ -#if 0 -static int googlefs_mkdir_gen(fs_volume *_volume, fs_vnode *_dir, const char *name, int perms, fs_node **node, bool uniq) -{ - fs_nspace *ns = (fs_nspace *)_volume->private_volume; - fs_node *dir = (fs_node *)_dir->private_node; - char newname[GOOGLEFS_NAME_LEN]; - status_t err; - fs_node *n; - int i; - TRACE("mkdir_gen(%" B_PRId32 ", %" B_PRId64 ", '%s', 0x%08x, %c)\n", ns->nsid, dir->vnid, name, perms, uniq?'t':'f'); - - if (strlen(name) > GOOGLEFS_NAME_LEN-1) - return ENAMETOOLONG; - err = LOCK(&dir->l); - if (err < 0) - return err; - err = ENOTDIR; - if (!S_ISDIR(dir->st.st_mode)) - goto err_l; - n = (fs_node *)SLL_FIND(dir->children, next, - (sll_compare_func)compare_fs_node_by_name, (void *)name); - err = EEXIST; - if (n && !uniq) /* already existing entry in there! */ - goto err_l; - - strncpy(newname, name, GOOGLEFS_NAME_LEN); - newname[GOOGLEFS_NAME_LEN-1] = '\0'; - for (i = 1; n && i < 5000; i++) { /* uniquify the name */ - //sprintf("%"#(GOOGLEFS_NAME_LEN-8)"s %05d", name, i); - sprintf("%56s %05d", name, i); - n = (fs_node *)SLL_FIND(dir->children, next, - (sll_compare_func)compare_fs_node_by_name, (void *)newname); - } - if (n) /* still there! */ - goto err_l; - name = newname; - - err = ENOMEM; - n = malloc(sizeof(fs_node)); - if (!n) - goto err_l; - memset(n, 0, sizeof(fs_node)); - err = vnidpool_get(ns->vnids, &n->vnid); - if (err < B_OK) - goto err_m; - atomic_add(&ns->nodecount, 1); - strcpy(n->name, name); - //n->is_perm = 1; - fill_default_stat(&n->st, ns->nsid, n->vnid, (perms & ~S_IFMT) | S_IFDIR); - new_lock(&(n->l), "googlefs dir"); - err = LOCK(&ns->l); - if (err) - goto err_nl; - err = SLL_INSERT(ns->nodes, nlnext, n); - if (err) - goto err_lns; - err = SLL_INSERT(dir->children, next, n); - if (err) - goto err_insnl; -// err = new_vnode(ns->nsid, n->vnid, n); -// if (err) -// goto err_ins; - n->parent = dir; - dir->st.st_nlink++; - UNLOCK(&ns->l); - n->attrs_indirect = folders_attrs; - notify_entry_created(ns->nsid, dir->vnid, name, n->vnid); - /* dosfs doesn't do that one but I believe it should */ - //notify_listener(B_STAT_CHANGED, ns->nsid, 0LL, 0LL, dir->vnid, NULL); - /* give node to caller if it wants it */ - if (node) - *node = n; - goto done; - -err_insnl: - SLL_REMOVE(ns->nodes, nlnext, n); -err_lns: - UNLOCK(&ns->l); -err_nl: - free_lock(&n->l); - atomic_add(&ns->nodecount, -1); -err_m: - free(n); -err_l: -done: - UNLOCK(&dir->l); - return err; -} -#endif - -static status_t googlefs_mkdir(fs_volume *_volume, fs_vnode *_dir, const char *name, int perms) +static status_t websearchfs_mkdir(fs_volume *_volume, fs_vnode *_dir, const char *name, int perms) { fs_nspace *ns = (fs_nspace *)_volume->private_volume; fs_node *dir = (fs_node *)_dir->private_node; TRACE("mkdir(%" B_PRId32 ", %" B_PRId64 ", '%s', 0x%08x)\n", ns->nsid, dir->vnid, name, perms); - return googlefs_create_gen(_volume, dir, name, O_EXCL, perms, NULL, NULL, folders_attrs, true, false); + return websearchfs_create_gen(_volume, dir, name, O_EXCL, perms, NULL, NULL, folders_attrs, true, false); } /* attr stuff */ -static status_t googlefs_open_attrdir(fs_volume *_volume, fs_vnode *_node, void **cookie) +static status_t websearchfs_open_attrdir(fs_volume *_volume, fs_vnode *_node, void **cookie) { fs_nspace *ns = (fs_nspace *)_volume->private_volume; fs_node *node = (fs_node *)_node->private_node; @@ -1014,7 +921,7 @@ static status_t googlefs_open_attrdir(fs_volume *_volume, fs_vnode *_node, void return err; } -static status_t googlefs_close_attrdir(fs_volume *_volume, fs_vnode *_node, void *_cookie) +static status_t websearchfs_close_attrdir(fs_volume *_volume, fs_vnode *_node, void *_cookie) { fs_nspace *ns = (fs_nspace *)_volume->private_volume; fs_node *node = (fs_node *)_node->private_node; @@ -1029,7 +936,7 @@ static status_t googlefs_close_attrdir(fs_volume *_volume, fs_vnode *_node, void return err; } -static status_t googlefs_free_attrdircookie(fs_volume *_volume, fs_vnode *_node, void *_cookie) +static status_t websearchfs_free_attrdircookie(fs_volume *_volume, fs_vnode *_node, void *_cookie) { fs_nspace *ns = (fs_nspace *)_volume->private_volume; fs_node *node = (fs_node *)_node->private_node; @@ -1045,7 +952,7 @@ static status_t googlefs_free_attrdircookie(fs_volume *_volume, fs_vnode *_node, return B_OK; } -static status_t googlefs_rewind_attrdir(fs_volume *_volume, fs_vnode *_node, void *_cookie) +static status_t websearchfs_rewind_attrdir(fs_volume *_volume, fs_vnode *_node, void *_cookie) { fs_nspace *ns = (fs_nspace *)_volume->private_volume; fs_node *node = (fs_node *)_node->private_node; @@ -1055,7 +962,8 @@ static status_t googlefs_rewind_attrdir(fs_volume *_volume, fs_vnode *_node, voi return B_OK; } -static status_t googlefs_read_attrdir(fs_volume *_volume, fs_vnode *_node, void *_cookie, struct dirent *buf, size_t bufsize, uint32 *num) +static status_t websearchfs_read_attrdir(fs_volume *_volume, fs_vnode *_node, void *_cookie, + struct dirent *buf, size_t bufsize, uint32 *num) { fs_nspace *ns = (fs_nspace *)_volume->private_volume; fs_node *node = (fs_node *)_node->private_node; @@ -1065,16 +973,21 @@ static status_t googlefs_read_attrdir(fs_volume *_volume, fs_vnode *_node, void attr_entry *ae = NULL; int i; int count_indirect; - TRACE("read_attrdir(%" B_PRId32 ", %" B_PRId64 ") @ %d\n", ns->nsid, node->vnid, cookie->dir_current); - if (!node || !cookie || !num || !*num || !buf || (bufsize < (sizeof(dirent_t)+GOOGLEFS_NAME_LEN))) + TRACE("read_attrdir(%" B_PRId32 ", %" B_PRId64 ") @ %d\n", ns->nsid, node->vnid, + cookie->dir_current); + if (!node || !cookie || !num || !*num || !buf + || (bufsize < (sizeof(dirent_t) + WEBSEARCHFS_NAME_LEN))) return EINVAL; LOCK(&node->l); - for (i = 0, count_indirect = 0; node->attrs_indirect && !ae && node->attrs_indirect[i].name; i++, count_indirect++) + for (i = 0, count_indirect = 0; node->attrs_indirect && !ae && node->attrs_indirect[i].name; + i++, count_indirect++) { if (i == cookie->dir_current) ae = &node->attrs_indirect[i]; - for (i = 0; !ae && i < 10 && node->attrs[i].name; i++) + } + for (i = 0; !ae && i < 10 && node->attrs[i].name; i++) { if (i + count_indirect == cookie->dir_current) ae = &node->attrs[i]; + } if (ae) { TRACE("read_attrdir: giving %s\n", ae->name); @@ -1101,7 +1014,7 @@ static status_t googlefs_read_attrdir(fs_volume *_volume, fs_vnode *_node, void */ /* for Haiku, but also used by BeOS calls to factorize code */ -static status_t googlefs_open_attr_h(fs_volume *_volume, fs_vnode *_node, const char *name, int omode, void **cookie) +static status_t websearchfs_open_attr_h(fs_volume *_volume, fs_vnode *_node, const char *name, int omode, void **cookie) { fs_nspace *ns = (fs_nspace *)_volume->private_volume; fs_node *node = (fs_node *)_node->private_node; @@ -1162,13 +1075,14 @@ err_n_l: return err; } -static status_t googlefs_close_attr_h(fs_volume *_volume, fs_vnode *_node, void *_cookie) +static status_t websearchfs_close_attr_h(fs_volume *_volume, fs_vnode *_node, void *_cookie) { fs_nspace *ns = (fs_nspace *)_volume->private_volume; fs_node *node = (fs_node *)_node->private_node; fs_file_cookie *cookie = (fs_file_cookie *)_cookie; status_t err; - TRACE("close_attr(%" B_PRId32 ", %" B_PRId64 ":%s)\n", ns->nsid, node->vnid, cookie->attr?cookie->attr->name:"?"); + TRACE("close_attr(%" B_PRId32 ", %" B_PRId64 ":%s)\n", ns->nsid, node->vnid, + cookie->attr ? cookie->attr->name : "?"); if (!ns || !node || !cookie) return EINVAL; err = LOCK(&node->l); @@ -1182,13 +1096,14 @@ static status_t googlefs_close_attr_h(fs_volume *_volume, fs_vnode *_node, void return err; } -static status_t googlefs_free_attr_cookie_h(fs_volume *_volume, fs_vnode *_node, void *_cookie) +static status_t websearchfs_free_attr_cookie_h(fs_volume *_volume, fs_vnode *_node, void *_cookie) { fs_nspace *ns = (fs_nspace *)_volume->private_volume; fs_node *node = (fs_node *)_node->private_node; fs_file_cookie *cookie = (fs_file_cookie *)_cookie; status_t err = B_OK; - TRACE("free_attrcookie(%" B_PRId32 ", %" B_PRId64 ":%s)\n", ns->nsid, node->vnid, cookie->attr?cookie->attr->name:"?"); + TRACE("free_attrcookie(%" B_PRId32 ", %" B_PRId64 ":%s)\n", ns->nsid, node->vnid, + cookie->attr ? cookie->attr->name : "?"); err = LOCK(&node->l); if (err) return err; @@ -1202,7 +1117,8 @@ static status_t googlefs_free_attr_cookie_h(fs_volume *_volume, fs_vnode *_node, return err; } -static status_t googlefs_read_attr_stat(fs_volume *_volume, fs_vnode *_node, void *_cookie, struct stat *st) +static status_t websearchfs_read_attr_stat(fs_volume *_volume, fs_vnode *_node, void *_cookie, + struct stat *st) { fs_nspace *ns = (fs_nspace *)_volume->private_volume; fs_node *node = (fs_node *)_node->private_node; @@ -1219,7 +1135,8 @@ static status_t googlefs_read_attr_stat(fs_volume *_volume, fs_vnode *_node, voi return err; } -static status_t googlefs_read_attr(fs_volume *_volume, fs_vnode *_node, void *_cookie, off_t pos, void *buf, size_t *len) +static status_t websearchfs_read_attr(fs_volume *_volume, fs_vnode *_node, void *_cookie, + off_t pos, void *buf, size_t *len) { fs_nspace *ns = (fs_nspace *)_volume->private_volume; fs_node *node = (fs_node *)_node->private_node; @@ -1251,7 +1168,7 @@ static status_t googlefs_read_attr(fs_volume *_volume, fs_vnode *_node, void *_c static int compare_fs_node_by_recent_query_string(fs_node *node, char *query) { time_t tm = time(NULL); - //return memcmp(node->name, name, GOOGLEFS_NAME_LEN); + //return memcmp(node->name, name, WEBSEARCHFS_NAME_LEN); TRACE("find_by_recent_query_string: '%s' <> '%s'\n", \ node->request?node->request->query_string:NULL, query); if (!node->request || !node->request->query_string) @@ -1262,7 +1179,7 @@ static int compare_fs_node_by_recent_query_string(fs_node *node, char *query) return strcmp(node->request->query_string, query); } -static status_t googlefs_open_query(fs_volume *_volume, const char *query, uint32 flags, +static status_t websearchfs_open_query(fs_volume *_volume, const char *query, uint32 flags, port_id port, uint32 token, void **cookie) { fs_nspace *ns = (fs_nspace *)_volume->private_volume; @@ -1272,18 +1189,20 @@ static status_t googlefs_open_query(fs_volume *_volume, const char *query, uint3 const char *p; char *q; char *qstring = NULL; - char qname[GOOGLEFS_NAME_LEN]; + char qname[WEBSEARCHFS_NAME_LEN]; bool accepted = true; bool reused = false; //int i; - TRACE("open_query(%" B_PRId32 ", '%s', 0x%08" B_PRIx32 ", %" B_PRId32 ", %" B_PRId32 ")\n", ns->nsid, query, flags, port, token); + TRACE("open_query(%" B_PRId32 ", '%s', 0x%08" B_PRIx32 ", %" B_PRId32 ", %" B_PRId32 ")\n", + ns->nsid, query, flags, port, token); // if (flags & B_LIVE_QUERY) // return ENOSYS; /* no live query yet, they are live enough anyway */ //return ENOSYS; if (!query || !cookie) return EINVAL; - // filter out queries that aren't for us, we don't want to trigger google searches when apps check for mails, ... :) + // filter out queries that aren't for us, we don't want to trigger DuckDuckGo searches when + // apps check for mails, ... :) err = B_NO_MEMORY; c = malloc(sizeof(fs_query_cookie)); @@ -1340,8 +1259,8 @@ static status_t googlefs_open_query(fs_volume *_volume, const char *query, uint3 } /* stripped name for folder */ - strncpy(qname, qstring, GOOGLEFS_NAME_LEN); - qname[GOOGLEFS_NAME_LEN-1] = '\0'; + strncpy(qname, qstring, WEBSEARCHFS_NAME_LEN); + qname[WEBSEARCHFS_NAME_LEN-1] = '\0'; /* strip out slashes */ q = qname; @@ -1349,7 +1268,7 @@ static status_t googlefs_open_query(fs_volume *_volume, const char *query, uint3 strcpy(q, q + 1); /* should get/put_vnode(ns->root); around that I think... */ - err = googlefs_create_gen(_volume, ns->root, qname, 0, 0755, NULL, &qn, folders_attrs, true, true); + err = websearchfs_create_gen(_volume, ns->root, qname, 0, 0755, NULL, &qn, folders_attrs, true, true); if (err) goto err_qs; @@ -1359,14 +1278,14 @@ static status_t googlefs_open_query(fs_volume *_volume, const char *query, uint3 //#ifndef NO_SEARCH - /* let's ask google */ - err = google_request_open(qstring, _volume, qn, &qn->request); + /* let's ask DuckDuckGo */ + err = duckduckgo_request_open(qstring, _volume, qn, &qn->request); if (err) goto err_gn; TRACE("open_query: request_open done\n"); #ifndef NO_SEARCH - err = google_request_process(qn->request); + err = duckduckgo_request_process(qn->request); if (err) goto err_gro; TRACE("open_query: request_process done\n"); @@ -1374,20 +1293,20 @@ static status_t googlefs_open_query(fs_volume *_volume, const char *query, uint3 #else /* fake entries */ for (i = 0; i < 10; i++) { - err = googlefs_create_gen(_volume, qn, "B", 0, 0644, NULL, &n, fake_bookmark_attrs, false, true); + err = websearchfs_create_gen(_volume, qn, "B", 0, 0644, NULL, &n, fake_bookmark_attrs, false, true); /* fake that to test sorting */ *(int32 *)&n->attrs[1].value = i + 1; // hack n->attrs[0].type = 'LONG'; n->attrs[0].value = &n->attrs[1].value; n->attrs[0].size = sizeof(int32); - n->attrs[0].name = "GOOGLE:order"; + n->attrs[0].name = "WEBSEARCH:order"; notify_attribute_changed(ns->nsid, -1, n->vnid, n->attrs[0].name, B_ATTR_CHANGED); if (err) goto err_gn; } #endif /*NO_SEARCH*/ // - //err = google_request_close(q->request); + //err = duckduckgo_request_close(q->request); LOCK(&ns->l); SLL_INSERT(ns->queries, qnext, qn); @@ -1406,12 +1325,12 @@ reuse: //err_grp: err_gro: if (qn->request) - google_request_close(qn->request); + duckduckgo_request_close(qn->request); err_gn: put_vnode(_volume, qn->vnid); err_mkdir: if (!reused) - googlefs_unlink_gen(_volume, ns->root, qn->name); + websearchfs_unlink_gen(_volume, ns->root, qn->name); err_qs: free(qstring); //err_m: @@ -1420,13 +1339,14 @@ err_qs: return err; } -static status_t googlefs_close_query(fs_volume *_volume, void *_cookie) +static status_t websearchfs_close_query(fs_volume *_volume, void *_cookie) { fs_nspace *ns = (fs_nspace *)_volume->private_volume; fs_query_cookie *cookie = (fs_query_cookie *)_cookie; status_t err; fs_node *q; - TRACE("close_query(%" B_PRId32 ", %" B_PRId64 ")\n", ns->nsid, cookie->node?cookie->node->vnid:(int64)0); + TRACE("close_query(%" B_PRId32 ", %" B_PRId64 ")\n", ns->nsid, + cookie->node ? cookie->node->vnid : (int64)0); //return ENOSYS; q = cookie->node; if (!q) @@ -1435,19 +1355,19 @@ static status_t googlefs_close_query(fs_volume *_volume, void *_cookie) LOCK(&q->l); SLL_REMOVE(q->opened, next, cookie); if (q->request /*&& !q->opened*/) { - err = google_request_close(q->request); + err = duckduckgo_request_close(q->request); } UNLOCK(&q->l); /* if last cookie on the query and sync_unlink, trash all */ if (sync_unlink_queries && !q->opened) - err = googlefs_unlink_node_rec(_volume, q); + err = websearchfs_unlink_node_rec(_volume, q); err = put_vnode(_volume, q->vnid); return err; } #ifdef __HAIKU__ /* protos are different... */ -static status_t googlefs_free_query_cookie(fs_volume *_volume, void *_cookie) +static status_t websearchfs_free_query_cookie(fs_volume *_volume, void *_cookie) { fs_query_cookie *cookie = (fs_query_cookie *)_cookie; status_t err = B_OK; @@ -1461,7 +1381,7 @@ static status_t googlefs_free_query_cookie(fs_volume *_volume, void *_cookie) return err; err = SLL_REMOVE(q->opened, next, cookie); /* just to make sure */ if (q->request /*&& !q->opened*/) { - err = google_request_close(q->request); + err = duckduckgo_request_close(q->request); } // if (err) // goto err_n_l; @@ -1472,15 +1392,17 @@ no_node: } #endif -static status_t googlefs_read_query(fs_volume *_volume, void *_cookie, struct dirent *buf, size_t bufsize, uint32 *num) +static status_t websearchfs_read_query(fs_volume *_volume, void *_cookie, struct dirent *buf, + size_t bufsize, uint32 *num) { fs_nspace *ns = (fs_nspace *)_volume->private_volume; fs_query_cookie *cookie = (fs_query_cookie *)_cookie; fs_node *n = NULL; fs_node *node = cookie->node; int index; - TRACE("read_query(%" B_PRId32 ", %" B_PRId64 ") @ %d\n", ns->nsid, node?node->vnid:(int64)0, cookie->dir_current); - if (!cookie || !num || !*num || !buf || (bufsize < (sizeof(dirent_t)+GOOGLEFS_NAME_LEN))) + TRACE("read_query(%" B_PRId32 ", %" B_PRId64 ") @ %d\n", ns->nsid, node ? node->vnid : (int64)0, + cookie->dir_current); + if (!cookie || !num || !*num || !buf || (bufsize < (sizeof(dirent_t) + WEBSEARCHFS_NAME_LEN))) return EINVAL; if (!node) { /* a query we don't care about, just return no entries to please apps */ @@ -1508,14 +1430,15 @@ static status_t googlefs_read_query(fs_volume *_volume, void *_cookie, struct di return B_OK; } -int googlefs_push_result_to_query(struct google_request *request, struct google_result *result) +int websearchfs_push_result_to_query(struct duckduckgo_request *request, + struct duckduckgo_result *result) { status_t err = B_OK; fs_volume *_volume = request->volume; fs_nspace *ns = (fs_nspace *)_volume->private_volume; fs_node *qn = request->query_node; fs_node *n; - char ename[GOOGLEFS_NAME_LEN]; + char ename[WEBSEARCHFS_NAME_LEN]; char *p; int i; TRACE("push_result_to_query(%" B_PRId32 ", %" B_PRId64 ", %ld:'%s')\n", ns->nsid, qn->vnid, result->id, result->name); @@ -1524,17 +1447,18 @@ int googlefs_push_result_to_query(struct google_request *request, struct google_ if (!ns || !qn) return EINVAL; - // filter out queries that aren't for us, we don't want to trigger google searches when apps check for mails, ... :) + // filter out queries that aren't for us, we don't want to trigger DuckDuckGo searches when + // apps check for mails, ... :) /* stripped name for folder */ - strncpy(ename, result->name, GOOGLEFS_NAME_LEN); - ename[GOOGLEFS_NAME_LEN-1] = '\0'; + strncpy(ename, result->name, WEBSEARCHFS_NAME_LEN); + ename[WEBSEARCHFS_NAME_LEN-1] = '\0'; /* strip out slashes */ p = ename; while ((p = strchr(p, '/'))) *p++ = '_'; - err = googlefs_create_gen(_volume, qn, ename, 0, 0644, NULL, &n, bookmark_attrs, false, true); + err = websearchfs_create_gen(_volume, qn, ename, 0, 0644, NULL, &n, bookmark_attrs, false, true); if (err) return err; LOCK(&n->l); @@ -1561,14 +1485,14 @@ int googlefs_push_result_to_query(struct google_request *request, struct google_ n->attrs[i].type = 'LONG'; n->attrs[i].value = &result->id; n->attrs[i].size = sizeof(int32); - n->attrs[i].name = "GOOGLE:order"; + n->attrs[i].name = "WEBSEARCH:order"; notify_attribute_changed(ns->nsid, -1, n->vnid, n->attrs[i].name, B_ATTR_CREATED); i++; if (result->snipset[0]) { n->attrs[i].type = 'CSTR'; n->attrs[i].value = result->snipset; n->attrs[i].size = strlen(result->snipset)+1; - n->attrs[i].name = "GOOGLE:excerpt"; + n->attrs[i].name = "WEBSEARCH:excerpt"; notify_attribute_changed(ns->nsid, -1, n->vnid, n->attrs[i].name, B_ATTR_CREATED); i++; } @@ -1576,7 +1500,7 @@ int googlefs_push_result_to_query(struct google_request *request, struct google_ n->attrs[i].type = 'CSTR'; n->attrs[i].value = result->cache_url; n->attrs[i].size = strlen(result->cache_url)+1; - n->attrs[i].name = "GOOGLE:cache_url"; + n->attrs[i].name = "WEBSEARCH:cache_url"; notify_attribute_changed(ns->nsid, -1, n->vnid, n->attrs[i].name, B_ATTR_CREATED); i++; } @@ -1584,7 +1508,7 @@ int googlefs_push_result_to_query(struct google_request *request, struct google_ n->attrs[i].type = 'CSTR'; n->attrs[i].value = result->similar_url; n->attrs[i].size = strlen(result->similar_url)+1; - n->attrs[i].name = "GOOGLE:similar_url"; + n->attrs[i].name = "WEBSEARCH:similar_url"; notify_attribute_changed(ns->nsid, -1, n->vnid, n->attrs[i].name, B_ATTR_CREATED); i++; } @@ -1598,7 +1522,7 @@ int googlefs_push_result_to_query(struct google_request *request, struct google_ // #pragma mark - static status_t -googlefs_std_ops(int32 op, ...) +websearchfs_std_ops(int32 op, ...) { switch (op) { case B_MODULE_INIT: @@ -1613,115 +1537,115 @@ googlefs_std_ops(int32 op, ...) } -static fs_volume_ops sGoogleFSVolumeOps = { - &googlefs_unmount, - &googlefs_rfsstat, - &googlefs_wfsstat, +static fs_volume_ops sWebSearchFSVolumeOps = { + &websearchfs_unmount, + &websearchfs_rfsstat, + &websearchfs_wfsstat, NULL, // no sync! - &googlefs_read_vnode, + &websearchfs_read_vnode, /* index directory & index operations */ - NULL, // &googlefs_open_index_dir - NULL, // &googlefs_close_index_dir - NULL, // &googlefs_free_index_dir_cookie - NULL, // &googlefs_read_index_dir - NULL, // &googlefs_rewind_index_dir + NULL, // &websearchfs_open_index_dir + NULL, // &websearchfs_close_index_dir + NULL, // &websearchfs_free_index_dir_cookie + NULL, // &websearchfs_read_index_dir + NULL, // &websearchfs_rewind_index_dir - NULL, // &googlefs_create_index - NULL, // &googlefs_remove_index - NULL, // &googlefs_stat_index + NULL, // &websearchfs_create_index + NULL, // &websearchfs_remove_index + NULL, // &websearchfs_stat_index /* query operations */ - &googlefs_open_query, - &googlefs_close_query, - &googlefs_free_query_cookie, - &googlefs_read_query, - NULL, // &googlefs_rewind_query, + &websearchfs_open_query, + &websearchfs_close_query, + &websearchfs_free_query_cookie, + &websearchfs_read_query, + NULL, // &websearchfs_rewind_query, }; -static fs_vnode_ops sGoogleFSVnodeOps = { +static fs_vnode_ops sWebSearchFSVnodeOps = { /* vnode operations */ - &googlefs_walk, - &googlefs_get_vnode_name, //NULL, // fs_get_vnode_name - &googlefs_release_vnode, - &googlefs_remove_vnode, + &websearchfs_walk, + &websearchfs_get_vnode_name, //NULL, // fs_get_vnode_name + &websearchfs_release_vnode, + &websearchfs_remove_vnode, /* VM file access */ - NULL, // &googlefs_can_page - NULL, // &googlefs_read_pages - NULL, // &googlefs_write_pages + NULL, // &websearchfs_can_page + NULL, // &websearchfs_read_pages + NULL, // &websearchfs_write_pages NULL, // io() NULL, // cancel_io() - NULL, // &googlefs_get_file_map, + NULL, // &websearchfs_get_file_map, - NULL, // &googlefs_ioctl - NULL, // &googlefs_setflags, - NULL, // &googlefs_select - NULL, // &googlefs_deselect - NULL, // &googlefs_fsync + NULL, // &websearchfs_ioctl + NULL, // &websearchfs_setflags, + NULL, // &websearchfs_select + NULL, // &websearchfs_deselect + NULL, // &websearchfs_fsync - NULL, // &googlefs_readlink, - NULL, // &googlefs_symlink, + NULL, // &websearchfs_readlink, + NULL, // &websearchfs_symlink, - NULL, // &googlefs_link, - &googlefs_unlink, - NULL, // &googlefs_rename, + NULL, // &websearchfs_link, + &websearchfs_unlink, + NULL, // &websearchfs_rename, - &googlefs_access, - &googlefs_rstat, - &googlefs_wstat, + &websearchfs_access, + &websearchfs_rstat, + &websearchfs_wstat, NULL, // fs_preallocate /* file operations */ - &googlefs_create, - &googlefs_open, - &googlefs_close, - &googlefs_free_cookie, - &googlefs_read, - &googlefs_write, + &websearchfs_create, + &websearchfs_open, + &websearchfs_close, + &websearchfs_free_cookie, + &websearchfs_read, + &websearchfs_write, /* directory operations */ - &googlefs_mkdir, - &googlefs_rmdir, - &googlefs_opendir, - &googlefs_closedir, - &googlefs_free_dircookie, - &googlefs_readdir, - &googlefs_rewinddir, + &websearchfs_mkdir, + &websearchfs_rmdir, + &websearchfs_opendir, + &websearchfs_closedir, + &websearchfs_free_dircookie, + &websearchfs_readdir, + &websearchfs_rewinddir, /* attribute directory operations */ - &googlefs_open_attrdir, - &googlefs_close_attrdir, - &googlefs_free_attrdircookie, - &googlefs_read_attrdir, - &googlefs_rewind_attrdir, + &websearchfs_open_attrdir, + &websearchfs_close_attrdir, + &websearchfs_free_attrdircookie, + &websearchfs_read_attrdir, + &websearchfs_rewind_attrdir, /* attribute operations */ - NULL, // &googlefs_create_attr - &googlefs_open_attr_h, - &googlefs_close_attr_h, - &googlefs_free_attr_cookie_h, - &googlefs_read_attr, - NULL, // &googlefs_write_attr_h, + NULL, // &websearchfs_create_attr + &websearchfs_open_attr_h, + &websearchfs_close_attr_h, + &websearchfs_free_attr_cookie_h, + &websearchfs_read_attr, + NULL, // &websearchfs_write_attr_h, - &googlefs_read_attr_stat, - NULL, // &googlefs_write_attr_stat - NULL, // &googlefs_rename_attr - NULL, // &googlefs_remove_attr + &websearchfs_read_attr_stat, + NULL, // &websearchfs_write_attr_stat + NULL, // &websearchfs_rename_attr + NULL, // &websearchfs_remove_attr }; -file_system_module_info sGoogleFSModule = { +file_system_module_info sWebSearchFSModule = { { - "file_systems/googlefs" B_CURRENT_FS_API_VERSION, + "file_systems/websearchfs" B_CURRENT_FS_API_VERSION, 0, - googlefs_std_ops, + websearchfs_std_ops, }, - "googlefs", // short_name - GOOGLEFS_PRETTY_NAME, // pretty_name + "websearchfs", // short_name + WEBSEARCHFS_PRETTY_NAME, // pretty_name 0,//B_DISK_SYSTEM_SUPPORTS_WRITING, // DDM flags // scanning @@ -1730,11 +1654,11 @@ file_system_module_info sGoogleFSModule = { NULL, // fs_free_identify_partition_cookie, NULL, // free_partition_content_cookie() - &googlefs_mount, + &websearchfs_mount, }; module_info *modules[] = { - (module_info *)&sGoogleFSModule, + (module_info *)&sWebSearchFSModule, NULL, }; diff --git a/src/add-ons/kernel/file_systems/googlefs/googlefs.h b/src/add-ons/kernel/file_systems/websearchfs/websearchfs.h similarity index 78% rename from src/add-ons/kernel/file_systems/googlefs/googlefs.h rename to src/add-ons/kernel/file_systems/websearchfs/websearchfs.h index a88d707486..5d303efa65 100644 --- a/src/add-ons/kernel/file_systems/googlefs/googlefs.h +++ b/src/add-ons/kernel/file_systems/websearchfs/websearchfs.h @@ -2,8 +2,8 @@ * Copyright 2004-2008, François Revol, <revol@free.fr>. * Distributed under the terms of the MIT License. */ -#ifndef _GOOGLEFS_H -#define _GOOGLEFS_H +#ifndef _WEBSEARCHFS_H +#define _WEBSEARCHFS_H /* wrappers */ #ifdef __HAIKU__ @@ -34,13 +34,13 @@ typedef dev_t nspace_id; #include <SupportDefs.h> /* should be more than enough */ -//#define GOOGLEFS_NAME_LEN B_OS_NAME_LENGTH -//#define GOOGLEFS_NAME_LEN 64 /* GR_MAX_NAME */ -/* some google results are a bit more than 64 */ -#define GOOGLEFS_NAME_LEN 70 /* GR_MAX_NAME */ +//#define WEBSEARCHFS_NAME_LEN B_OS_NAME_LENGTH +//#define WEBSEARCHFS_NAME_LEN 64 /* GR_MAX_NAME */ +/* some DuckDuckGo results are a bit more than 64 */ +#define WEBSEARCHFS_NAME_LEN 70 /* GR_MAX_NAME */ -#define GOOGLEFS_NAME "googlefs" -#define GOOGLEFS_PRETTY_NAME "Google Bookmark File System" +#define WEBSEARCHFS_NAME "websearchfs" +#define WEBSEARCHFS_PRETTY_NAME "Web Search Bookmark File System" #define MAX_VNIDS 5000 @@ -73,7 +73,7 @@ struct fs_node struct fs_node *parent, *children; struct fs_file_cookie *opened; /* opened on this node */ - char name[GOOGLEFS_NAME_LEN]; + char name[WEBSEARCHFS_NAME_LEN]; ino_t vnid; lock l; @@ -82,8 +82,8 @@ struct fs_node int qcompleted:1; int hidden:1; /* don't list in readdir */ struct stat st; /* including S_IFDIR in st_mode */ - struct google_request *request; /* set on root folder for a query */ - struct google_result *result; /* for query results */ + struct duckduckgo_request *request; /* set on root folder for a query */ + struct duckduckgo_result *result; /* for query results */ struct attr_entry *attrs_indirect; struct attr_entry attrs[10]; void *data; @@ -128,12 +128,13 @@ typedef struct fs_file_cookie fs_file_cookie; ino_t new_vnid(fs_nspace *ns); -int googlefs_event(fs_nspace *ns, fs_node *node, int flags); +int websearchfs_event(fs_nspace *ns, fs_node *node, int flags); /* used by the requester to publish entries in queries * result = NULL to notify end of list */ -extern int googlefs_push_result_to_query(struct google_request *request, struct google_result *result); +extern int websearchfs_push_result_to_query(struct duckduckgo_request *request, + struct duckduckgo_result *result); #ifdef __cplusplus } diff --git a/src/add-ons/kernel/file_systems/googlefs/googlefs_res.rdef b/src/add-ons/kernel/file_systems/websearchfs/websearchfs_res.rdef similarity index 99% rename from src/add-ons/kernel/file_systems/googlefs/googlefs_res.rdef rename to src/add-ons/kernel/file_systems/websearchfs/websearchfs_res.rdef index 74512ce08b..7588df208b 100644 --- a/src/add-ons/kernel/file_systems/googlefs/googlefs_res.rdef +++ b/src/add-ons/kernel/file_systems/websearchfs/websearchfs_res.rdef @@ -1,5 +1,5 @@ /* -** googlefs.rdef +** websearchfs.rdef ** ** Automatically generated by BResourceParser on ** Saturday, January 20, 2007 at 01:48:42.