beagle r4568 - in branches/beagle-win32-branch: . old-code/Beagle.Daemon.Tools src src/Beagle.Daemon src/Beagle.Daemon/Beagle.Daemon.IndexHelper src/Beagle.Engine src/Beagle.Engine/Beagle.Engine src/Beagle.Engine/Beagle.Engine.Queryables src/Beagle.IndexHelper src/Beagle.IndexHelper/Beagle.IndexHelper
- From: llipka svn gnome org
- To: svn-commits-list gnome org
- Subject: beagle r4568 - in branches/beagle-win32-branch: . old-code/Beagle.Daemon.Tools src src/Beagle.Daemon src/Beagle.Daemon/Beagle.Daemon.IndexHelper src/Beagle.Engine src/Beagle.Engine/Beagle.Engine src/Beagle.Engine/Beagle.Engine.Queryables src/Beagle.IndexHelper src/Beagle.IndexHelper/Beagle.IndexHelper
- Date: Sat, 1 Mar 2008 00:03:34 +0000 (GMT)
Author: llipka
Date: Sat Mar 1 00:03:33 2008
New Revision: 4568
URL: http://svn.gnome.org/viewvc/beagle?rev=4568&view=rev
Log:
Get the engine assembly building. Almost there wow
Added:
branches/beagle-win32-branch/old-code/Beagle.Daemon.Tools/
branches/beagle-win32-branch/old-code/Beagle.Daemon.Tools/BuildIndex.cs
- copied unchanged from r4561, /branches/beagle-win32-branch/src/Beagle.Engine/Beagle.Engine/BuildIndex.cs
branches/beagle-win32-branch/old-code/Beagle.Daemon.Tools/DumpIndex.cs
- copied unchanged from r4561, /branches/beagle-win32-branch/src/Beagle.Engine/Beagle.Engine/DumpIndex.cs
branches/beagle-win32-branch/old-code/Beagle.Daemon.Tools/ExtractContent.cs
- copied unchanged from r4561, /branches/beagle-win32-branch/src/Beagle.Engine/Beagle.Engine/ExtractContent.cs
branches/beagle-win32-branch/old-code/Beagle.Daemon.Tools/ManageIndex.cs
- copied unchanged from r4561, /branches/beagle-win32-branch/src/Beagle.Engine/Beagle.Engine/ManageIndex.cs
branches/beagle-win32-branch/old-code/Beagle.Daemon.Tools/MasterDelete.cs
- copied unchanged from r4561, /branches/beagle-win32-branch/src/Beagle.Engine/Beagle.Engine/MasterDelete.cs
branches/beagle-win32-branch/old-code/Beagle.Daemon.Tools/SnippetTest.cs
- copied unchanged from r4561, /branches/beagle-win32-branch/src/Beagle.Engine/Beagle.Engine/SnippetTest.cs
branches/beagle-win32-branch/src/Beagle.Engine/Beagle.Engine.Queryables/EvolutionBackendsAssemblyInfo.cs
- copied unchanged from r4561, /branches/beagle-win32-branch/src/Beagle.Engine/Beagle.Engine/EvolutionBackendsAssemblyInfo.cs
branches/beagle-win32-branch/src/Beagle.IndexHelper/
branches/beagle-win32-branch/src/Beagle.IndexHelper/Beagle.IndexHelper/
- copied from r4561, /branches/beagle-win32-branch/src/Beagle.Daemon/Beagle.Daemon.IndexHelper/
Removed:
branches/beagle-win32-branch/src/Beagle.Daemon/Beagle.Daemon.IndexHelper/
branches/beagle-win32-branch/src/Beagle.Engine/Beagle.Engine/BuildIndex.cs
branches/beagle-win32-branch/src/Beagle.Engine/Beagle.Engine/DumpIndex.cs
branches/beagle-win32-branch/src/Beagle.Engine/Beagle.Engine/EvolutionBackendsAssemblyInfo.cs
branches/beagle-win32-branch/src/Beagle.Engine/Beagle.Engine/ExtractContent.cs
branches/beagle-win32-branch/src/Beagle.Engine/Beagle.Engine/Filter.cs
branches/beagle-win32-branch/src/Beagle.Engine/Beagle.Engine/Flavor.cs
branches/beagle-win32-branch/src/Beagle.Engine/Beagle.Engine/ManageIndex.cs
branches/beagle-win32-branch/src/Beagle.Engine/Beagle.Engine/MasterDelete.cs
branches/beagle-win32-branch/src/Beagle.Engine/Beagle.Engine/SnippetTest.cs
Modified:
branches/beagle-win32-branch/Makefile.am
branches/beagle-win32-branch/src/Beagle.Daemon/Makefile.am
branches/beagle-win32-branch/src/Beagle.Engine/Beagle.Engine/BatteryMonitor.cs
branches/beagle-win32-branch/src/Beagle.Engine/Beagle.Engine/ExternalMetadataQueryable.cs
branches/beagle-win32-branch/src/Beagle.Engine/Beagle.Engine/FileAttributes.cs
branches/beagle-win32-branch/src/Beagle.Engine/Beagle.Engine/FileAttributesStore.cs
branches/beagle-win32-branch/src/Beagle.Engine/Beagle.Engine/FileAttributesStore_ExtendedAttribute.cs
branches/beagle-win32-branch/src/Beagle.Engine/Beagle.Engine/FileAttributesStore_Mixed.cs
branches/beagle-win32-branch/src/Beagle.Engine/Beagle.Engine/FileAttributesStore_Sqlite.cs
branches/beagle-win32-branch/src/Beagle.Engine/Beagle.Engine/FilterFactory.cs
branches/beagle-win32-branch/src/Beagle.Engine/Beagle.Engine/IFileAttributesStore.cs
branches/beagle-win32-branch/src/Beagle.Engine/Beagle.Engine/IIndexer.cs
branches/beagle-win32-branch/src/Beagle.Engine/Beagle.Engine/IQueryResult.cs
branches/beagle-win32-branch/src/Beagle.Engine/Beagle.Engine/IQueryWorker.cs
branches/beagle-win32-branch/src/Beagle.Engine/Beagle.Engine/IQueryable.cs
branches/beagle-win32-branch/src/Beagle.Engine/Beagle.Engine/IndexSynchronization.cs
branches/beagle-win32-branch/src/Beagle.Engine/Beagle.Engine/IndexerReceipts.cs
branches/beagle-win32-branch/src/Beagle.Engine/Beagle.Engine/IndexerRequest.cs
branches/beagle-win32-branch/src/Beagle.Engine/Beagle.Engine/InformationalMessagesRequestExecutor.cs
branches/beagle-win32-branch/src/Beagle.Engine/Beagle.Engine/LuceneBitArray.cs
branches/beagle-win32-branch/src/Beagle.Engine/Beagle.Engine/LuceneCommon.cs
branches/beagle-win32-branch/src/Beagle.Engine/Beagle.Engine/LuceneFileQueryable.cs
branches/beagle-win32-branch/src/Beagle.Engine/Beagle.Engine/LuceneIndexingDriver.cs
branches/beagle-win32-branch/src/Beagle.Engine/Beagle.Engine/LuceneQueryable.cs
branches/beagle-win32-branch/src/Beagle.Engine/Beagle.Engine/LuceneQueryingDriver.cs
branches/beagle-win32-branch/src/Beagle.Engine/Beagle.Engine/NoiseFilter.cs
branches/beagle-win32-branch/src/Beagle.Engine/Beagle.Engine/PropertyKeywordFu.cs
branches/beagle-win32-branch/src/Beagle.Engine/Beagle.Engine/QueryDriver.cs
branches/beagle-win32-branch/src/Beagle.Engine/Beagle.Engine/QueryExecutor.cs
branches/beagle-win32-branch/src/Beagle.Engine/Beagle.Engine/QueryResult.cs
branches/beagle-win32-branch/src/Beagle.Engine/Beagle.Engine/QueryStringParser.cs
branches/beagle-win32-branch/src/Beagle.Engine/Beagle.Engine/Queryable.cs
branches/beagle-win32-branch/src/Beagle.Engine/Beagle.Engine/QueryableFlavor.cs
branches/beagle-win32-branch/src/Beagle.Engine/Beagle.Engine/RemoteControlExecutors.cs
branches/beagle-win32-branch/src/Beagle.Engine/Beagle.Engine/RemoteIndexer.cs
branches/beagle-win32-branch/src/Beagle.Engine/Beagle.Engine/RemoteIndexerRequest.cs
branches/beagle-win32-branch/src/Beagle.Engine/Beagle.Engine/RemoteIndexerResponse.cs
branches/beagle-win32-branch/src/Beagle.Engine/Beagle.Engine/Server.cs
branches/beagle-win32-branch/src/Beagle.Engine/Beagle.Engine/Shutdown.cs
branches/beagle-win32-branch/src/Beagle.Engine/Beagle.Engine/SnippetExecutor.cs
branches/beagle-win32-branch/src/Beagle.Engine/Beagle.Engine/SnippetFu.cs
branches/beagle-win32-branch/src/Beagle.Engine/Beagle.Engine/SqliteUtils.cs
branches/beagle-win32-branch/src/Beagle.Engine/Beagle.Engine/StaticQueryable.cs
branches/beagle-win32-branch/src/Beagle.Engine/Beagle.Engine/TextCache.cs
branches/beagle-win32-branch/src/Beagle.Engine/Beagle.Engine/WebServer.cs
branches/beagle-win32-branch/src/Beagle.Engine/Beagle.Engine/Zeroconf.cs
branches/beagle-win32-branch/src/Beagle.Engine/Makefile.am
branches/beagle-win32-branch/src/Makefile.am
Modified: branches/beagle-win32-branch/Makefile.am
==============================================================================
--- branches/beagle-win32-branch/Makefile.am (original)
+++ branches/beagle-win32-branch/Makefile.am Sat Mar 1 00:03:33 2008
@@ -1,4 +1,6 @@
-SUBDIRS = src data
+SUBDIRS = src
+
+#data
if BUILD_DOCS
SUBDIRS += \
Modified: branches/beagle-win32-branch/src/Beagle.Daemon/Makefile.am
==============================================================================
--- branches/beagle-win32-branch/src/Beagle.Daemon/Makefile.am (original)
+++ branches/beagle-win32-branch/src/Beagle.Daemon/Makefile.am Sat Mar 1 00:03:33 2008
@@ -1,43 +1,3 @@
-autostartdir = $(sysconfdir)/xdg/autostart
-autostart_DATA = beagled-autostart.desktop
-
-############################################################
-
-WEBINTERFACE_FILES = \
- $(srcdir)/webinterface/default.js \
- $(srcdir)/webinterface/propname-table.js\
- $(srcdir)/webinterface/help.html \
- $(srcdir)/webinterface/mappings.xml \
- $(srcdir)/webinterface/opensearch.xml \
- $(srcdir)/webinterface/index.xsl \
- $(srcdir)/webinterface/hitresult.xsl \
- $(srcdir)/webinterface/statusresult.xsl \
- $(srcdir)/webinterface/default.css
-
-WEBINTERFACE_INDEX_XML_IN=$(srcdir)/webinterface/index.xml.in
-WEBINTERFACE_INDEX_XML=$(srcdir)/webinterface/index.xml
-
-webinterfacedir = $(datadir)/beagle/webinterface
-webinterface_DATA = \
- $(WEBINTERFACE_INDEX_XML) \
- $(WEBINTERFACE_FILES)
-
-webinterfaceimagesdir = $(webinterfacedir)/images
-webinterfaceimages_DATA = \
- $(srcdir)/webinterface/images/beagle-logo.png \
- $(srcdir)/webinterface/images/busy-animation.gif \
- $(srcdir)/webinterface/images/favicon.png \
- $(srcdir)/webinterface/images/system-search.png \
- $(srcdir)/webinterface/images/title_bg.png
-
-$(WEBINTERFACE_INDEX_XML): $(WEBINTERFACE_INDEX_XML_IN) $(WEBINTERFACE_FILES)
- sed -e "s|\ VERSION\@|$(VERSION)|" \
- -e "s|\ LAST_TIME\@|$(shell date +'%x %X')|" \
- < $(WEBINTERFACE_INDEX_XML_IN) > $@
-
-
-############################################################
-
# Warnings we don't want to see.
# Most of these are thanks to DotLucene. It would be nice if we could use
# "#pragma warning" on these.
@@ -48,17 +8,8 @@
# 0169 = The private method/field 'foo' is never used
# 0219 = Variable is assigned but never used
-CSC = $(MCS) -debug -nowarn:0162,0164,0168,0169,0219,0436
-
-BACKENDDIR = $(pkglibdir)/Backends
-
-PLUGIN_TARGET = BeagleDaemonPlugins.dll
-
-PLUGIN_CSFLAGS = -target:library
+CSC = $(MCS) -debug
-PLUGIN_CSFILES = \
- $(srcdir)/Flavor.cs \
- $(srcdir)/Filter.cs
PLUGIN_LOCAL_ASSEMBLIES = \
../Util/Util.dll \
Modified: branches/beagle-win32-branch/src/Beagle.Engine/Beagle.Engine/BatteryMonitor.cs
==============================================================================
--- branches/beagle-win32-branch/src/Beagle.Engine/Beagle.Engine/BatteryMonitor.cs (original)
+++ branches/beagle-win32-branch/src/Beagle.Engine/Beagle.Engine/BatteryMonitor.cs Sat Mar 1 00:03:33 2008
@@ -1,7 +1,7 @@
//
-// BatteryMonitor.cs
+// BatteryMonitor.cs
//
-// Copyright (c) 2007 Lukas Lipka, <lukaslipka gmail com>
+// Copyright (c) 2007 Lukas Lipka, <lukaslipka gmail com>
//
using System;
@@ -12,7 +12,7 @@
using Beagle.Util;
-namespace Beagle.Daemon {
+namespace Beagle.Engine {
public class BatteryMonitor {
@@ -44,7 +44,7 @@
break;
}
} catch (Exception e) {
- Log.Error (e, "Failed to acquire a HAL device for battery monitoring");
+ Log.Error (e, "Failed to acquire a HAL device for battery monitoring.");
}
}
@@ -73,6 +73,7 @@
prev_on_battery = false;
} else if (! prev_on_battery && ! on_ac && ! index_on_battery) {
Log.Info ("Detected a switch from AC power to battery. Stopping scheduler.");
+
Scheduler.Global.Stop ();
prev_on_battery = true;
}
Modified: branches/beagle-win32-branch/src/Beagle.Engine/Beagle.Engine/ExternalMetadataQueryable.cs
==============================================================================
--- branches/beagle-win32-branch/src/Beagle.Engine/Beagle.Engine/ExternalMetadataQueryable.cs (original)
+++ branches/beagle-win32-branch/src/Beagle.Engine/Beagle.Engine/ExternalMetadataQueryable.cs Sat Mar 1 00:03:33 2008
@@ -28,27 +28,23 @@
using System.Collections;
using System.IO;
-using Beagle.Daemon;
-using Beagle.Util;
using Beagle;
+using Beagle.Util;
-namespace Beagle.Daemon {
+namespace Beagle.Engine {
// An abstract class which doesn't have any storage backing it.
// These backends exist solely to add property change indexables to
// existing backends.
+
public abstract class ExternalMetadataQueryable : IQueryable {
- private FileAttributesStore fa_store;
+ private FileAttributesStore fa_store = null;
public ExternalMetadataQueryable ()
{
}
- public Scheduler ThisScheduler {
- get { return Scheduler.Global; }
- }
-
public virtual void Start ()
{
}
@@ -108,13 +104,14 @@
reader.Close ();
}
- string fingerprint;
+ string fingerprint = null;
+
if (external_fingerprint != null)
fingerprint = internal_fingerprint + "-" + external_fingerprint;
else
fingerprint = internal_fingerprint;
- IFileAttributesStore ifa_store;
+ IFileAttributesStore ifa_store = null;
if (ExtendedAttribute.Supported)
ifa_store = new FileAttributesStore_ExtendedAttribute (fingerprint);
@@ -123,5 +120,9 @@
fa_store = new FileAttributesStore (ifa_store);
}
+
+ public Scheduler ThisScheduler {
+ get { return Scheduler.Global; }
+ }
}
}
Modified: branches/beagle-win32-branch/src/Beagle.Engine/Beagle.Engine/FileAttributes.cs
==============================================================================
--- branches/beagle-win32-branch/src/Beagle.Engine/Beagle.Engine/FileAttributes.cs (original)
+++ branches/beagle-win32-branch/src/Beagle.Engine/Beagle.Engine/FileAttributes.cs Sat Mar 1 00:03:33 2008
@@ -29,18 +29,18 @@
using Beagle.Util;
-namespace Beagle.Daemon {
+namespace Beagle.Engine {
public class FileAttributes {
- private Guid unique_id;
- private string path;
- private DateTime last_mtime;
+ private Guid unique_id;
+ private string path;
+ private DateTime last_mtime;
private DateTime last_attrtime;
- private string filter_name;
- private int filter_version;
+ private string filter_name;
+ private int filter_version;
public Guid UniqueId {
get { return unique_id; }
Modified: branches/beagle-win32-branch/src/Beagle.Engine/Beagle.Engine/FileAttributesStore.cs
==============================================================================
--- branches/beagle-win32-branch/src/Beagle.Engine/Beagle.Engine/FileAttributesStore.cs (original)
+++ branches/beagle-win32-branch/src/Beagle.Engine/Beagle.Engine/FileAttributesStore.cs Sat Mar 1 00:03:33 2008
@@ -26,15 +26,16 @@
using System;
+using Beagle.Filters;
using Beagle.Util;
-namespace Beagle.Daemon {
+namespace Beagle.Engine {
public class FileAttributesStore {
private static bool Debug = false;
- private IFileAttributesStore ifas;
+ private IFileAttributesStore ifas = null;
public FileAttributesStore (IFileAttributesStore ifas)
{
Modified: branches/beagle-win32-branch/src/Beagle.Engine/Beagle.Engine/FileAttributesStore_ExtendedAttribute.cs
==============================================================================
--- branches/beagle-win32-branch/src/Beagle.Engine/Beagle.Engine/FileAttributesStore_ExtendedAttribute.cs (original)
+++ branches/beagle-win32-branch/src/Beagle.Engine/Beagle.Engine/FileAttributesStore_ExtendedAttribute.cs Sat Mar 1 00:03:33 2008
@@ -2,6 +2,7 @@
// FileAttributesStore_ExtendedAttribute.cs
//
// Copyright (C) 2004 Novell, Inc.
+// Copyright (C) 2006 Lukas Lipka <lukaslipka gmail com>
//
//
@@ -24,13 +25,15 @@
// SOFTWARE.
//
+// WARNING: This is not portable to Win32
+
using System;
using System.IO;
using Beagle.Util;
-namespace Beagle.Daemon {
-
+namespace Beagle.Engine {
+
public class FileAttributesStore_ExtendedAttribute : IFileAttributesStore {
// Version history:
@@ -38,7 +41,7 @@
// 2: Replace LastIndexedTime with LastAttrTime
// 3: Store EA's using a CSV format
// Format: "Version[2] Fingerprint,Uid,LastWriteTime,LastAttrTime,FilterVersion[3] FilterName"
- private const int EA_VERSION = 3;
+ private const int VERSION = 3;
public static bool Disable = false;
@@ -62,7 +65,7 @@
string[] csv = tmp.Split (',');
- if (int.Parse (csv [0].Substring (0, 2)) != EA_VERSION
+ if (int.Parse (csv [0].Substring (0, 2)) != VERSION
|| (index_fingerprint != null && csv [0].Substring (3) != index_fingerprint))
return null;
@@ -93,10 +96,7 @@
return false;
try {
- if (ExtendedAttribute.OldExists (attr.Path, "Fingerprint"))
- DropObsoleteAttributes (attr.Path);
-
- string fingerprint = String.Format ("{0:00} {1}", EA_VERSION, index_fingerprint);
+ string fingerprint = String.Format ("{0:00} {1}", VERSION, index_fingerprint);
string uid = GuidFu.ToShortString (attr.UniqueId);
string mtime = StringFu.DateTimeToString (attr.LastWriteTime);
@@ -137,29 +137,14 @@
}
}
- // IMPORTANT: Remove this post 0.3.3 release!
- private void DropObsoleteAttributes (string path)
- {
- try {
- ExtendedAttribute.RemoveOld (path, "Fingerprint");
- ExtendedAttribute.RemoveOld (path, "Uid");
- ExtendedAttribute.RemoveOld (path, "MTime");
- ExtendedAttribute.RemoveOld (path, "AttrTime");
- ExtendedAttribute.RemoveOld (path, "Filter");
-
- // And some others from Joe's favorite list :-)
- ExtendedAttribute.RemoveOld (path, "Name");
- ExtendedAttribute.RemoveOld (path, "IndexTime");
- } catch { }
- }
-
// There are no transactions for EAs
public void BeginTransaction ()
- { }
+ {
+ }
public void CommitTransaction ()
- { }
-
+ {
+ }
}
}
Modified: branches/beagle-win32-branch/src/Beagle.Engine/Beagle.Engine/FileAttributesStore_Mixed.cs
==============================================================================
--- branches/beagle-win32-branch/src/Beagle.Engine/Beagle.Engine/FileAttributesStore_Mixed.cs (original)
+++ branches/beagle-win32-branch/src/Beagle.Engine/Beagle.Engine/FileAttributesStore_Mixed.cs Sat Mar 1 00:03:33 2008
@@ -27,7 +27,7 @@
using System;
using Beagle.Util;
-namespace Beagle.Daemon {
+namespace Beagle.Engine {
public class FileAttributesStore_Mixed : IFileAttributesStore {
@@ -47,8 +47,7 @@
public FileAttributes Read (string path)
{
- FileAttributes attr;
- attr = store_sqlite.Read (path);
+ FileAttributes attr = store_sqlite.Read (path);
if (attr != null) {
// If we have write access to the path but it has attributes
@@ -61,8 +60,10 @@
bool success = store_ea.Write (attr);
if (success)
store_sqlite.Drop (path);
- } else
+ } else {
attr = store_ea.Read (path);
+ }
+
return attr;
}
@@ -71,10 +72,10 @@
if (store_ea.Write (attr)) {
// Drop any now-outdated information from the sqlite store.
store_sqlite.Drop (attr.Path);
-
return true;
- } else
- return store_sqlite.Write (attr);
+ }
+
+ return store_sqlite.Write (attr);
}
public void Drop (string path)
Modified: branches/beagle-win32-branch/src/Beagle.Engine/Beagle.Engine/FileAttributesStore_Sqlite.cs
==============================================================================
--- branches/beagle-win32-branch/src/Beagle.Engine/Beagle.Engine/FileAttributesStore_Sqlite.cs (original)
+++ branches/beagle-win32-branch/src/Beagle.Engine/Beagle.Engine/FileAttributesStore_Sqlite.cs Sat Mar 1 00:03:33 2008
@@ -33,9 +33,9 @@
using Beagle.Util;
-namespace Beagle.Daemon {
+namespace Beagle.Engine {
- // FIXME: This class isn't multithread safe! This class does not
+ // FIXME: This class isn't multithread safe! This class does not
// ensure that different threads don't utilize a transaction started
// in a certain thread at the same time. However, since all the
// writes to this database are handled by a single thread, this isn't
@@ -51,19 +51,22 @@
// 2: Replaced LastIndexedTime with LastAttrTime
// 3: Changed STRING to TEXT
// 4: Use (directory, filename) as unique constraint
- const int VERSION = 4;
+ private const int VERSION = 4;
private SqliteConnection connection;
private BitArray path_flags;
private int transaction_count = 0;
+
public SqliteCommand ReadCommand;
public SqliteCommand InsertCommand;
public SqliteCommand DeleteCommand;
- enum TransactionState {
+
+ private enum TransactionState {
None,
Requested,
Started
}
+
private TransactionState transaction_state;
public FileAttributesStore_Sqlite (string directory, string index_fingerprint)
@@ -74,7 +77,6 @@
if (! File.Exists (GetDbPath (directory))) {
create_new_db = true;
} else {
-
// Funky logic here to deal with sqlite versions.
//
// When sqlite 3 tries to open an sqlite 2 database,
Modified: branches/beagle-win32-branch/src/Beagle.Engine/Beagle.Engine/FilterFactory.cs
==============================================================================
--- branches/beagle-win32-branch/src/Beagle.Engine/Beagle.Engine/FilterFactory.cs (original)
+++ branches/beagle-win32-branch/src/Beagle.Engine/Beagle.Engine/FilterFactory.cs Sat Mar 1 00:03:33 2008
@@ -1,7 +1,8 @@
//
-// FilterFactory.cs
+// IndexableFilter.cs
//
// Copyright (C) 2004 Novell, Inc.
+// Copyright (C) 2008 Lukas Lipka <lukaslipka gmail com>
//
//
@@ -34,186 +35,18 @@
using System.Xml;
using System.Xml.Serialization;
+using Beagle.Filters;
using Beagle.Util;
-namespace Beagle.Daemon {
+namespace Beagle.Engine {
- public class FilterFactory {
+ public class IndexableFilter {
- static private bool Debug = false;
+ private static bool Debug = false;
- class FilterCache {
- private int version = 1;
- private SortedDictionary<string, DateTime> mtime_cache = new SortedDictionary<string, DateTime> ();
- private string filter_cache_dir;
-
- public FilterCache (string filter_cache_dir)
- {
- this.filter_cache_dir = filter_cache_dir;
- }
-
- internal void RegisterFilter (string filter_file_name, DateTime filter_last_mtime)
- {
- mtime_cache [filter_file_name] = filter_last_mtime;
- }
-
- // Return true if dirty, else return false
- internal bool UpdateCache ()
- {
- StringBuilder cache_string_sb = new StringBuilder ();
- // Format of filterver.dat:
- // <Version\n><FilterAssembly.Filename:FilterAssemblyFile.LastMTime>\n+
- //
- cache_string_sb.AppendFormat ("{0}\n", version);
-
- foreach (KeyValuePair<string, DateTime> kvp in mtime_cache)
- cache_string_sb.AppendFormat ("{0}:{1}\n", kvp.Key, kvp.Value);
-
- if (filter_cache_dir == null)
- filter_cache_dir = PathFinder.StorageDir;
-
- string filterver_dat = Path.Combine (filter_cache_dir, "filterver.dat");
- string old_cache_text = null;
-
- try {
- old_cache_text = File.ReadAllText (filterver_dat);
- } catch (FileNotFoundException) {
- Log.Debug ("Cannot read {0}, assuming dirty filterver.dat", filterver_dat);
- }
-
- string new_cache_text = cache_string_sb.ToString ();
-
- bool is_dirty = (old_cache_text != new_cache_text);
- Log.Debug ("Verifying filter_cache at {0} ... cache is dirty ? {1}", filterver_dat, is_dirty);
-
- if (! is_dirty)
- return false;
-
- // If dirty, write the new version info
- try {
- File.WriteAllText (filterver_dat, new_cache_text);
- } catch (Exception e) {
- Log.Warn ("Unable to update {0}", filterver_dat);
- }
-
- return true;
- }
- }
-
- static private string filter_cache_dir = null;
- public static string FilterCacheDir {
- set { filter_cache_dir = value; }
- }
-
- private static bool cache_dirty = true;
- public static bool DirtyFilterCache {
- get { return cache_dirty; }
- }
-
- static FilterFactory ()
- {
- FilterCache filter_cache = new FilterCache (filter_cache_dir);
- ReflectionFu.ScanEnvironmentForAssemblies ("BEAGLE_FILTER_PATH", PathFinder.FilterDir,
- delegate (Assembly a) {
- int n = ScanAssemblyForFilters (a, filter_cache);
- Logger.Log.Debug ("Loaded {0} filter{1} from {2}",
- n, n == 1 ? "" : "s", a.Location);
- });
-
- // FIXME: Up external filter version if external-filters.xml is modified
-
- // Check if cache is dirty and also update the cache on the disk
- cache_dirty = filter_cache.UpdateCache ();
- }
-
- /////////////////////////////////////////////////////////////////////////
-
-
- static private ICollection CreateFilters (Uri uri, string extension, string mime_type)
- {
- SortedList matched_filters_by_flavor = FilterFlavor.NewHashtable ();
-
- foreach (FilterFlavor flavor in FilterFlavor.Flavors) {
- if (flavor.IsMatch (uri, extension, mime_type)) {
- Filter matched_filter = null;
-
- try {
- matched_filter = (Filter) Activator.CreateInstance ((Type) FilterFlavor.FilterTable [flavor]);
-
- if (flavor.MimeType != null)
- matched_filter.MimeType = flavor.MimeType;
- if (flavor.Extension != null)
- matched_filter.Extension = flavor.Extension;
-
- } catch (Exception e) {
- continue;
- }
- matched_filters_by_flavor [flavor] = matched_filter;
- }
- }
-
- if (Debug) {
- foreach (DictionaryEntry entry in matched_filters_by_flavor) {
- FilterFlavor flav = (FilterFlavor) entry.Key;
- Filter filter = (Filter) entry.Value;
-
- Logger.Log.Debug ("Found matching filter: {0}, Weight: {1}", filter, flav.Weight);
- }
- }
-
- return matched_filters_by_flavor.Values;
- }
-
- static public int GetFilterVersion (string filter_name)
- {
- if (filter_versions_by_name.ContainsKey (filter_name)) {
- return filter_versions_by_name [filter_name];
- } else {
- return -1;
- }
- }
-
- /////////////////////////////////////////////////////////////////////////
-
- static public ICollection CreateFiltersFromMimeType (string mime_type)
+ private static bool ShouldWeFilterThis (Indexable indexable)
{
- return CreateFilters (null, null, mime_type);
- }
-
- static public ICollection CreateFilterFromExtension (string extension)
- {
- return CreateFilters (null, extension, null);
- }
-
- static public ICollection CreateFiltersFromPath (string path)
- {
- string guessed_mime_type = XdgMime.GetMimeType (path);
- string extension = Path.GetExtension (path);
- return CreateFilters (UriFu.PathToFileUri (path), extension, guessed_mime_type);
- }
-
- static public ICollection CreateFiltersFromUri (Uri uri)
- {
- if (uri.IsFile)
- return CreateFiltersFromPath (uri.LocalPath);
- else
- return CreateFilters (uri, null, null);
- }
-
- static public ICollection CreateFiltersFromIndexable (Indexable indexable)
- {
- string path = indexable.ContentUri.LocalPath;
- string extension = Path.GetExtension (path);
- string mime_type = indexable.MimeType;
- return CreateFilters (UriFu.PathToFileUri (path), extension, mime_type);
- }
-
- /////////////////////////////////////////////////////////////////////////
-
- static private bool ShouldWeFilterThis (Indexable indexable)
- {
- if (indexable.Filtering == IndexableFiltering.Never
- || indexable.NoContent)
+ if (indexable.Filtering == IndexableFiltering.Never || indexable.NoContent)
return false;
if (indexable.Filtering == IndexableFiltering.Always)
@@ -221,17 +54,19 @@
// Our default behavior is to try to filter non-transient file
// indexable and indexables with a specific mime type attached.
+
if (indexable.IsNonTransient || indexable.MimeType != null)
return true;
return false;
}
- static public bool FilterIndexable (Indexable indexable, TextCache text_cache, out Filter filter)
+ public static bool Filter (Indexable indexable, TextCache text_cache, out Filter filter)
{
- filter = null;
ICollection filters = null;
+ filter = null;
+
if (indexable.Filtering == IndexableFiltering.AlreadyFiltered)
return false;
@@ -247,7 +82,7 @@
// If a specific mime type is specified, try to index as that type.
if (indexable.MimeType != null)
- filters = CreateFiltersFromMimeType (indexable.MimeType);
+ filters = FilterFactory.CreateFiltersFromMimeType (indexable.MimeType);
if (indexable.ContentUri.IsFile) {
path = indexable.ContentUri.LocalPath;
@@ -279,7 +114,7 @@
}
if (filters == null || filters.Count == 0) {
- filters = CreateFiltersFromIndexable (indexable);
+ filters = FilterFactory.CreateFiltersFromIndexable (indexable);
}
}
@@ -350,52 +185,15 @@
return false;
}
- static public bool FilterIndexable (Indexable indexable, out Filter filter)
+ public static bool Filter (Indexable indexable, out Filter filter)
{
- return FilterIndexable (indexable, null, out filter);
+ return Filter (indexable, null, out filter);
}
- static public bool FilterIndexable (Indexable indexable)
+ public static bool Filter (Indexable indexable)
{
Filter filter = null;
-
- return FilterIndexable (indexable, null, out filter);
- }
-
- /////////////////////////////////////////////////////////////////////////
-
- private static Dictionary<string, int> filter_versions_by_name = new Dictionary<string, int> ();
-
- static private int ScanAssemblyForFilters (Assembly assembly, FilterCache filter_cache)
- {
- int count = 0;
-
- foreach (Type t in ReflectionFu.GetTypesFromAssemblyAttribute (assembly, typeof (FilterTypesAttribute))) {
- Filter filter = null;
-
- try {
- filter = (Filter) Activator.CreateInstance (t);
- } catch (Exception ex) {
- Logger.Log.Error (ex, "Caught exception while instantiating {0}", t);
- }
-
- if (filter == null)
- continue;
-
- filter_versions_by_name [t.ToString ()] = filter.Version;
-
- foreach (FilterFlavor flavor in filter.SupportedFlavors)
- FilterFlavor.FilterTable [flavor] = t;
-
- ++count;
- }
-
- if (count > 0) {
- DateTime last_mtime = File.GetLastWriteTimeUtc (assembly.Location);
- filter_cache.RegisterFilter (assembly.Location, last_mtime);
- }
-
- return count;
+ return Filter (indexable, null, out filter);
}
}
}
Modified: branches/beagle-win32-branch/src/Beagle.Engine/Beagle.Engine/IFileAttributesStore.cs
==============================================================================
--- branches/beagle-win32-branch/src/Beagle.Engine/Beagle.Engine/IFileAttributesStore.cs (original)
+++ branches/beagle-win32-branch/src/Beagle.Engine/Beagle.Engine/IFileAttributesStore.cs Sat Mar 1 00:03:33 2008
@@ -26,18 +26,18 @@
using System;
-namespace Beagle.Daemon {
+namespace Beagle.Engine {
public interface IFileAttributesStore {
- FileAttributes Read (string path);
+ FileAttributes Read (string path);
- bool Write (FileAttributes attr);
+ bool Write (FileAttributes attr);
- void Drop (string path);
+ void Drop (string path);
// These are not guaranteed to actually do anything.
- void BeginTransaction ();
- void CommitTransaction ();
+ void BeginTransaction ();
+ void CommitTransaction ();
}
}
Modified: branches/beagle-win32-branch/src/Beagle.Engine/Beagle.Engine/IIndexer.cs
==============================================================================
--- branches/beagle-win32-branch/src/Beagle.Engine/Beagle.Engine/IIndexer.cs (original)
+++ branches/beagle-win32-branch/src/Beagle.Engine/Beagle.Engine/IIndexer.cs Sat Mar 1 00:03:33 2008
@@ -27,12 +27,12 @@
using System;
using System.Collections;
-namespace Beagle.Daemon {
+namespace Beagle.Engine {
public interface IIndexer {
int GetItemCount ();
- IndexerReceipt [] Flush (IndexerRequest request);
+ IndexerReceipt[] Flush (IndexerRequest request);
}
}
Modified: branches/beagle-win32-branch/src/Beagle.Engine/Beagle.Engine/IQueryResult.cs
==============================================================================
--- branches/beagle-win32-branch/src/Beagle.Engine/Beagle.Engine/IQueryResult.cs (original)
+++ branches/beagle-win32-branch/src/Beagle.Engine/Beagle.Engine/IQueryResult.cs Sat Mar 1 00:03:33 2008
@@ -27,21 +27,16 @@
using System;
using System.Collections;
-namespace Beagle.Daemon {
+namespace Beagle.Engine {
- /*
-
- QueryResult has a lot of api that is tied to implementation details.
- The point of this interface is to only expose the minimum amount
- of QueryResult api to IQueryable.DoQuery implementations.
-
- */
+ // QueryResult has a lot of API that is tied to implementation details.
+ // The point of this interface is to only expose the minimum amount
+ // of QueryResult API to IQueryable.DoQuery implementations.
public interface IQueryResult {
void Add (ICollection some_hits);
void Add (ICollection some_hits, int total_matches);
-
void Subtract (ICollection some_uris);
}
}
Modified: branches/beagle-win32-branch/src/Beagle.Engine/Beagle.Engine/IQueryWorker.cs
==============================================================================
--- branches/beagle-win32-branch/src/Beagle.Engine/Beagle.Engine/IQueryWorker.cs (original)
+++ branches/beagle-win32-branch/src/Beagle.Engine/Beagle.Engine/IQueryWorker.cs Sat Mar 1 00:03:33 2008
@@ -24,7 +24,7 @@
// DEALINGS IN THE SOFTWARE.
//
-namespace Beagle.Daemon
+namespace Beagle.Engine
{
public interface IQueryWorker {
void DoWork ();
Modified: branches/beagle-win32-branch/src/Beagle.Engine/Beagle.Engine/IQueryable.cs
==============================================================================
--- branches/beagle-win32-branch/src/Beagle.Engine/Beagle.Engine/IQueryable.cs (original)
+++ branches/beagle-win32-branch/src/Beagle.Engine/Beagle.Engine/IQueryable.cs Sat Mar 1 00:03:33 2008
@@ -29,7 +29,7 @@
using Beagle.Util;
-namespace Beagle.Daemon {
+namespace Beagle.Engine {
public interface IQueryable {
@@ -39,9 +39,7 @@
bool AcceptQuery (Query query);
// Should not modify query
- void DoQuery (Query query,
- IQueryResult result,
- IQueryableChangeData data);
+ void DoQuery (Query query, IQueryResult result, IQueryableChangeData data);
// Just return the number of matches
int DoCountMatchQuery (Query query);
Modified: branches/beagle-win32-branch/src/Beagle.Engine/Beagle.Engine/IndexSynchronization.cs
==============================================================================
--- branches/beagle-win32-branch/src/Beagle.Engine/Beagle.Engine/IndexSynchronization.cs (original)
+++ branches/beagle-win32-branch/src/Beagle.Engine/Beagle.Engine/IndexSynchronization.cs Sat Mar 1 00:03:33 2008
@@ -31,7 +31,7 @@
using Beagle.Util;
-namespace Beagle.Daemon {
+namespace Beagle.Engine {
public class IndexSynchronization {
Modified: branches/beagle-win32-branch/src/Beagle.Engine/Beagle.Engine/IndexerReceipts.cs
==============================================================================
--- branches/beagle-win32-branch/src/Beagle.Engine/Beagle.Engine/IndexerReceipts.cs (original)
+++ branches/beagle-win32-branch/src/Beagle.Engine/Beagle.Engine/IndexerReceipts.cs Sat Mar 1 00:03:33 2008
@@ -31,7 +31,7 @@
using Beagle.Util;
-namespace Beagle.Daemon {
+namespace Beagle.Engine {
[XmlInclude (typeof (IndexerAddedReceipt)),
XmlInclude (typeof (IndexerRemovedReceipt)),
@@ -85,14 +85,19 @@
public int NumRemoved = -1;
}
- // This fake receipt is sent to the daemon to basically schedule indexing of filter generated indexables
+ // This fake receipt is sent to the daemon to basically schedule
+ // indexing of filter generated indexables
public class IndexerIndexablesReceipt : IndexerReceipt {
public IndexerIndexablesReceipt () { }
- // FIXME: We could send id here to get "permission" from the backend whether to continue
- // indexing the generated indexables from some backend scheduled indexable; currently I see
- // no need.
- // Another use for the id(s) could to tell the backend what parent indexable(s) are being currently indexed.
- // This could be useful in displaying correct status information.
+
+ // FIXME: We could send the Id here to get "permission" from
+ // the backend whether to continue indexing the generated
+ // indexables from some backend scheduled indexable, but
+ // currently I see no need.
+ //
+ // Another use for the Id(s) could be to tell the backend what
+ // parent indexable(s) are being currently indexed. This could
+ // be useful in displaying correct status information.
}
}
Modified: branches/beagle-win32-branch/src/Beagle.Engine/Beagle.Engine/IndexerRequest.cs
==============================================================================
--- branches/beagle-win32-branch/src/Beagle.Engine/Beagle.Engine/IndexerRequest.cs (original)
+++ branches/beagle-win32-branch/src/Beagle.Engine/Beagle.Engine/IndexerRequest.cs Sat Mar 1 00:03:33 2008
@@ -32,7 +32,7 @@
using Beagle.Util;
-namespace Beagle.Daemon {
+namespace Beagle.Engine {
public class IndexerRequest {
Modified: branches/beagle-win32-branch/src/Beagle.Engine/Beagle.Engine/InformationalMessagesRequestExecutor.cs
==============================================================================
--- branches/beagle-win32-branch/src/Beagle.Engine/Beagle.Engine/InformationalMessagesRequestExecutor.cs (original)
+++ branches/beagle-win32-branch/src/Beagle.Engine/Beagle.Engine/InformationalMessagesRequestExecutor.cs Sat Mar 1 00:03:33 2008
@@ -28,7 +28,7 @@
using Beagle.Util;
-namespace Beagle.Daemon {
+namespace Beagle.Engine {
[RequestMessage (typeof (Beagle.InformationalMessagesRequest))]
public class InformationalMessagesRequestExecutor : RequestMessageExecutor {
@@ -67,6 +67,7 @@
private void SendIndexingStatusResponse (IndexingStatus status)
{
Log.Debug ("Sending indexing status change from {0} to {1}", crawl_status, status);
+
this.crawl_status = status;
this.SendAsyncResponse (new IndexingStatusResponse (status));
}
Modified: branches/beagle-win32-branch/src/Beagle.Engine/Beagle.Engine/LuceneBitArray.cs
==============================================================================
--- branches/beagle-win32-branch/src/Beagle.Engine/Beagle.Engine/LuceneBitArray.cs (original)
+++ branches/beagle-win32-branch/src/Beagle.Engine/Beagle.Engine/LuceneBitArray.cs Sat Mar 1 00:03:33 2008
@@ -36,7 +36,7 @@
using Beagle.Util;
-namespace Beagle.Daemon {
+namespace Beagle.Engine {
public class LuceneBitArray : BetterBitArray {
@@ -67,8 +67,7 @@
this.scratch = null;
}
- public LuceneBitArray (LNS.IndexSearcher searcher,
- LNS.Query query) : this (searcher)
+ public LuceneBitArray (LNS.IndexSearcher searcher, LNS.Query query) : this (searcher)
{
this.Or (query);
}
@@ -79,6 +78,7 @@
scratch = new BetterBitArray (searcher.MaxDoc ());
else
scratch.SetAll (false);
+
collector.Array = scratch;
}
@@ -86,6 +86,7 @@
{
this.SetAll (false);
this.Or (query);
+
return this;
}
@@ -93,9 +94,12 @@
{
UseScratch ();
searcher.Search (query, null, collector);
+
if (Debug)
Explain (query);
+
this.And (scratch);
+
return this;
}
@@ -103,9 +107,12 @@
{
UseScratch ();
searcher.Search (query, null, collector);
+
if (Debug)
Explain (query);
+
this.AndNot (scratch);
+
return this;
}
@@ -113,8 +120,10 @@
{
collector.Array = this;
searcher.Search (query, null, collector);
+
if (Debug)
Explain (query);
+
return this;
}
@@ -122,20 +131,25 @@
{
UseScratch ();
searcher.Search (query, null, collector);
+
if (Debug)
Explain (query);
+
this.Xor (scratch);
+
return this;
}
private void Explain (LNS.Query query)
{
int j = 0;
+
while (j < collector.Array.Count) {
- int i;
- i = collector.Array.GetNextTrueIndex (j);
+ int i = collector.Array.GetNextTrueIndex (j);
+
if (i >= collector.Array.Count)
break;
+
j = i + 1;
Document doc = searcher.Doc (i);
@@ -159,12 +173,10 @@
if (pending_uris == null)
pending_uris = new ArrayList ();
- int pos;
-
// OrdinalComparer gives us the same order that the
// URIs are stored as terms in the index, so that our
// walk along them is linear.
- pos = pending_uris.BinarySearch (str, StringFu.OrdinalComparer.Instance);
+ int pos = pending_uris.BinarySearch (str, StringFu.OrdinalComparer.Instance);
// Value is already present
if (pos >= 0)
@@ -203,14 +215,15 @@
int j = 0;
while (j < this.Count) {
int i;
+
i = this.GetNextTrueIndex (j);
+
if (i >= this.Count)
break;
- j = i+1;
- Document doc;
- doc = searcher.Doc (i);
+ j = i+1;
+ Document doc = searcher.Doc (i);
other.AddUri (doc.Get ("Uri"));
}
@@ -219,8 +232,7 @@
public void Join (LuceneBitArray other)
{
- LuceneBitArray image;
- image = new LuceneBitArray (other.searcher);
+ LuceneBitArray image = new LuceneBitArray (other.searcher);
this.ProjectOnto (image);
other.Or (image);
Modified: branches/beagle-win32-branch/src/Beagle.Engine/Beagle.Engine/LuceneCommon.cs
==============================================================================
--- branches/beagle-win32-branch/src/Beagle.Engine/Beagle.Engine/LuceneCommon.cs (original)
+++ branches/beagle-win32-branch/src/Beagle.Engine/Beagle.Engine/LuceneCommon.cs Sat Mar 1 00:03:33 2008
@@ -44,7 +44,7 @@
using Beagle.Util;
-namespace Beagle.Daemon {
+namespace Beagle.Engine {
public class LuceneCommon {
Modified: branches/beagle-win32-branch/src/Beagle.Engine/Beagle.Engine/LuceneFileQueryable.cs
==============================================================================
--- branches/beagle-win32-branch/src/Beagle.Engine/Beagle.Engine/LuceneFileQueryable.cs (original)
+++ branches/beagle-win32-branch/src/Beagle.Engine/Beagle.Engine/LuceneFileQueryable.cs Sat Mar 1 00:03:33 2008
@@ -28,9 +28,10 @@
using System.Collections;
using System.IO;
+using Beagle.Filters;
using Beagle.Util;
-namespace Beagle.Daemon {
+namespace Beagle.Engine {
/**
* This queryable just takes the LuceneQueryable and adds some sane
@@ -42,15 +43,25 @@
*/
public abstract class LuceneFileQueryable : LuceneQueryable {
- public LuceneFileQueryable (string index_name, int minor_version, bool disable_locking) :
- base (index_name, minor_version, disable_locking)
- { }
+ public LuceneFileQueryable (string index_name, int minor_version, bool disable_locking)
+ : base (index_name, minor_version, disable_locking)
+ {
+ }
- public LuceneFileQueryable (string index_name) : this (index_name, -1, false) { }
+ public LuceneFileQueryable (string index_name)
+ : this (index_name, -1, false)
+ {
+ }
- public LuceneFileQueryable (string index_name, bool disable_locking) : this (index_name, -1, disable_locking) { }
+ public LuceneFileQueryable (string index_name, bool disable_locking)
+ : this (index_name, -1, disable_locking)
+ {
+ }
- public LuceneFileQueryable (string index_name, int minor_version) : this (index_name, minor_version, false) { }
+ public LuceneFileQueryable (string index_name, int minor_version)
+ : this (index_name, minor_version, false)
+ {
+ }
///////////////////////////////////////////////////////////////////////////
Modified: branches/beagle-win32-branch/src/Beagle.Engine/Beagle.Engine/LuceneIndexingDriver.cs
==============================================================================
--- branches/beagle-win32-branch/src/Beagle.Engine/Beagle.Engine/LuceneIndexingDriver.cs (original)
+++ branches/beagle-win32-branch/src/Beagle.Engine/Beagle.Engine/LuceneIndexingDriver.cs Sat Mar 1 00:03:33 2008
@@ -31,10 +31,11 @@
using Lucene.Net.Documents;
using Lucene.Net.Index;
+using Beagle.Filters;
using Beagle.Util;
using Stopwatch = Beagle.Util.Stopwatch;
-namespace Beagle.Daemon {
+namespace Beagle.Engine {
public class LuceneIndexingDriver : LuceneCommon, IIndexer {
@@ -536,7 +537,7 @@
// If we have content, try to find a filter
// we we can use to process the indexable
try {
- FilterFactory.FilterIndexable (indexable, (disable_textcache ? null : text_cache), out filter);
+ IndexableFilter.Filter (indexable, (disable_textcache ? null : text_cache), out filter);
} catch (Exception e) {
indexable.NoContent = true;
}
Modified: branches/beagle-win32-branch/src/Beagle.Engine/Beagle.Engine/LuceneQueryable.cs
==============================================================================
--- branches/beagle-win32-branch/src/Beagle.Engine/Beagle.Engine/LuceneQueryable.cs (original)
+++ branches/beagle-win32-branch/src/Beagle.Engine/Beagle.Engine/LuceneQueryable.cs Sat Mar 1 00:03:33 2008
@@ -31,7 +31,7 @@
using Beagle.Util;
-namespace Beagle.Daemon {
+namespace Beagle.Engine {
public abstract class LuceneQueryable : IQueryable {
Modified: branches/beagle-win32-branch/src/Beagle.Engine/Beagle.Engine/LuceneQueryingDriver.cs
==============================================================================
--- branches/beagle-win32-branch/src/Beagle.Engine/Beagle.Engine/LuceneQueryingDriver.cs (original)
+++ branches/beagle-win32-branch/src/Beagle.Engine/Beagle.Engine/LuceneQueryingDriver.cs Sat Mar 1 00:03:33 2008
@@ -45,7 +45,7 @@
using Beagle.Util;
using Stopwatch = Beagle.Util.Stopwatch;
-namespace Beagle.Daemon {
+namespace Beagle.Engine {
public class LuceneQueryingDriver : LuceneCommon {
Modified: branches/beagle-win32-branch/src/Beagle.Engine/Beagle.Engine/NoiseFilter.cs
==============================================================================
--- branches/beagle-win32-branch/src/Beagle.Engine/Beagle.Engine/NoiseFilter.cs (original)
+++ branches/beagle-win32-branch/src/Beagle.Engine/Beagle.Engine/NoiseFilter.cs Sat Mar 1 00:03:33 2008
@@ -32,17 +32,17 @@
using Lucene.Net.Analysis;
using LNSA = Lucene.Net.Analysis.Standard;
-namespace Beagle.Daemon {
+namespace Beagle.Engine {
// TokenFilter which does several fancy things
// 1. Removes words which are potential noise like dhyhy8ju7q9
// 2. Splits email addresses into meaningful tokens
// 3. Splits hostnames into subparts
+
class NoiseEmailHostFilter : TokenFilter {
private bool tokenize_email_hostname;
-
- TokenStream token_stream;
+ private TokenStream token_stream;
public NoiseEmailHostFilter (TokenStream input, bool tokenize_email_hostname)
: base (input)
@@ -66,10 +66,12 @@
// <digit> <letter> 1
// <x> <punct>+ <x> 1
// <x> <punct>+ <y> 2
+
const int transitions_cutoff = 4;
int last_type = -1, last_non_punct_type = -1, first_type = -1;
bool has_letter = false, has_digit = false, has_punctuation = false;
int transitions = 0;
+
for (int i = 0; i < text.Length && transitions < transitions_cutoff; ++i) {
char c = text [i];
int type = -1;
@@ -85,7 +87,6 @@
}
if (type != -1) {
-
if (type != last_type) {
if (last_type == 3) {
if (type != last_non_punct_type)
@@ -99,6 +100,7 @@
first_type = type;
last_type = type;
+
if (type != 3)
last_non_punct_type = type;
}
Modified: branches/beagle-win32-branch/src/Beagle.Engine/Beagle.Engine/PropertyKeywordFu.cs
==============================================================================
--- branches/beagle-win32-branch/src/Beagle.Engine/Beagle.Engine/PropertyKeywordFu.cs (original)
+++ branches/beagle-win32-branch/src/Beagle.Engine/Beagle.Engine/PropertyKeywordFu.cs Sat Mar 1 00:03:33 2008
@@ -35,14 +35,12 @@
using Beagle;
using Beagle.Util;
-namespace Beagle.Daemon {
+namespace Beagle.Engine {
- public class PropertyKeywordFu {
- // mapping
- private static Hashtable property_table;
+ public static class PropertyKeywordFu {
- // static class
- private PropertyKeywordFu () { }
+ // Mappings
+ private static Hashtable property_table;
public static IEnumerable Keys {
get { return property_table.Keys; }
@@ -134,7 +132,8 @@
////////////////////////////////////////////////////////
// return false if property not found!
- public static bool GetMapping (string keyword, out int num, out string[] name, out PropertyType[] type) {
+ public static bool GetMapping (string keyword, out int num, out string[] name, out PropertyType[] type)
+ {
num = 0;
name = null;
type = null;
Modified: branches/beagle-win32-branch/src/Beagle.Engine/Beagle.Engine/QueryDriver.cs
==============================================================================
--- branches/beagle-win32-branch/src/Beagle.Engine/Beagle.Engine/QueryDriver.cs (original)
+++ branches/beagle-win32-branch/src/Beagle.Engine/Beagle.Engine/QueryDriver.cs Sat Mar 1 00:03:33 2008
@@ -31,23 +31,26 @@
using System.Reflection;
using System.Text;
using System.Threading;
-using Beagle.Util;
using System.Xml.Serialization;
-namespace Beagle.Daemon {
+using Beagle.Util;
+
+namespace Beagle.Engine {
public class QueryDriver {
// Contains list of queryables explicitly asked by --allow-backend or --backend name
// --allow-backend/--backend name : dont read config information and only start backend 'name'
- static ArrayList excl_allowed_queryables = new ArrayList ();
+ private static List<string> excl_allowed_queryables = new List<string> ();
// Contains list of denied queryables from config/arguments (every queryable is enabled by default)
// Unless overruled by --allow-backend/--backend name, deny backend only if names appears here.
- static ArrayList denied_queryables = new ArrayList ();
+ private static List<string> denied_queryables = new List<string> ();
- static bool to_read_conf = true; // read backends from conf if true
- static bool done_reading_conf = false;
+ // Read backends from conf if true
+ private static bool to_read_conf = true;
+
+ private static bool done_reading_conf = false;
static private void ReadBackendsFromConf ()
{
@@ -114,7 +117,7 @@
// Paths to static queryables
- static ArrayList static_queryables = new ArrayList ();
+ private static List<string> static_queryables = new List<string> ();
static public void AddStaticQueryable (string path) {
Modified: branches/beagle-win32-branch/src/Beagle.Engine/Beagle.Engine/QueryExecutor.cs
==============================================================================
--- branches/beagle-win32-branch/src/Beagle.Engine/Beagle.Engine/QueryExecutor.cs (original)
+++ branches/beagle-win32-branch/src/Beagle.Engine/Beagle.Engine/QueryExecutor.cs Sat Mar 1 00:03:33 2008
@@ -30,7 +30,7 @@
using Beagle.Util;
-namespace Beagle.Daemon {
+namespace Beagle.Engine {
[RequestMessage (typeof (Beagle.Query))]
public class QueryExecutor : RequestMessageExecutor {
@@ -93,9 +93,7 @@
AttachResult ();
QueryDriver.ChangedEvent += OnQueryDriverChanged;
- QueryDriver.DoQuery (query,
- this.result,
- new RequestMessageExecutor.AsyncResponse (this.SendAsyncResponse));
+ QueryDriver.DoQuery (query, result, new RequestMessageExecutor.AsyncResponse (SendAsyncResponse));
// Don't send a response; we'll be sending them async
return null;
Modified: branches/beagle-win32-branch/src/Beagle.Engine/Beagle.Engine/QueryResult.cs
==============================================================================
--- branches/beagle-win32-branch/src/Beagle.Engine/Beagle.Engine/QueryResult.cs (original)
+++ branches/beagle-win32-branch/src/Beagle.Engine/Beagle.Engine/QueryResult.cs Sat Mar 1 00:03:33 2008
@@ -31,7 +31,7 @@
using System.Threading;
using Beagle.Util;
-namespace Beagle.Daemon {
+namespace Beagle.Engine {
public class QueryResult : IQueryResult, IDisposable {
@@ -57,7 +57,6 @@
Hashtable per_worker_started_time = new Hashtable ();
bool is_index_listener = false;
-
public QueryResult ()
{
Modified: branches/beagle-win32-branch/src/Beagle.Engine/Beagle.Engine/QueryStringParser.cs
==============================================================================
--- branches/beagle-win32-branch/src/Beagle.Engine/Beagle.Engine/QueryStringParser.cs (original)
+++ branches/beagle-win32-branch/src/Beagle.Engine/Beagle.Engine/QueryStringParser.cs Sat Mar 1 00:03:33 2008
@@ -29,14 +29,11 @@
using System.Text.RegularExpressions;
using Beagle.Util;
-using FSQ=Beagle.Daemon.FileSystemQueryable;
-namespace Beagle.Daemon {
+namespace Beagle.Engine {
- public class QueryStringParser {
+ public static class QueryStringParser {
- private QueryStringParser () { } // a static class
-
private static Regex query_string_regex;
private static Regex extension_re;
Modified: branches/beagle-win32-branch/src/Beagle.Engine/Beagle.Engine/Queryable.cs
==============================================================================
--- branches/beagle-win32-branch/src/Beagle.Engine/Beagle.Engine/Queryable.cs (original)
+++ branches/beagle-win32-branch/src/Beagle.Engine/Beagle.Engine/Queryable.cs Sat Mar 1 00:03:33 2008
@@ -31,7 +31,7 @@
using Beagle.Util;
using Beagle;
-namespace Beagle.Daemon {
+namespace Beagle.Engine {
public class Queryable {
@@ -46,32 +46,14 @@
public void Start ()
{
- if (! Shutdown.ShutdownRequested)
+ if (!Shutdown.ShutdownRequested)
iqueryable.Start ();
}
- public string Name {
- get { return flavor.Name; }
- }
-
- public QueryDomain Domain {
- get { return flavor.Domain; }
- }
-
- public string DependsOn {
- get { return flavor.DependsOn; }
- }
-
- public IQueryable IQueryable {
- get { return iqueryable; }
- }
-
public bool AcceptQuery (Query query)
{
- return query != null
- && (query.IsIndexListener || ! query.IsEmpty)
- && query.AllowsDomain (Domain)
- && iqueryable.AcceptQuery (query);
+ return query != null && (query.IsIndexListener || ! query.IsEmpty)
+ && query.AllowsDomain (Domain) && iqueryable.AcceptQuery (query);
}
public void DoQuery (Query query, IQueryResult result, IQueryableChangeData change_data)
@@ -107,7 +89,7 @@
try {
return iqueryable.GetSnippet (query_terms, hit, full_text);
} catch (Exception ex) {
- Logger.Log.Warn (ex, "Caught exception calling DoQuery on '{0}'", Name);
+ Logger.Log.Warn (ex, "Caught exception calling GetSnippet on '{0}'", Name);
}
return null;
@@ -124,6 +106,22 @@
return status;
}
+
+ public string Name {
+ get { return flavor.Name; }
+ }
+
+ public QueryDomain Domain {
+ get { return flavor.Domain; }
+ }
+
+ public string DependsOn {
+ get { return flavor.DependsOn; }
+ }
+
+ public IQueryable IQueryable {
+ get { return iqueryable; }
+ }
}
}
Modified: branches/beagle-win32-branch/src/Beagle.Engine/Beagle.Engine/QueryableFlavor.cs
==============================================================================
--- branches/beagle-win32-branch/src/Beagle.Engine/Beagle.Engine/QueryableFlavor.cs (original)
+++ branches/beagle-win32-branch/src/Beagle.Engine/Beagle.Engine/QueryableFlavor.cs Sat Mar 1 00:03:33 2008
@@ -26,15 +26,15 @@
using System;
-namespace Beagle.Daemon {
+namespace Beagle.Engine {
[AttributeUsage (AttributeTargets.Class)]
public class QueryableFlavor : Attribute {
- public string Name;
+ public string Name;
public QueryDomain Domain;
- public bool RequireInotify = true;
- public bool RequireExtendedAttributes = false;
- public string DependsOn;
+ public bool RequireInotify = true;
+ public bool RequireExtendedAttributes = false;
+ public string DependsOn;
}
}
Modified: branches/beagle-win32-branch/src/Beagle.Engine/Beagle.Engine/RemoteControlExecutors.cs
==============================================================================
--- branches/beagle-win32-branch/src/Beagle.Engine/Beagle.Engine/RemoteControlExecutors.cs (original)
+++ branches/beagle-win32-branch/src/Beagle.Engine/Beagle.Engine/RemoteControlExecutors.cs Sat Mar 1 00:03:33 2008
@@ -31,7 +31,7 @@
using Beagle.Util;
-namespace Beagle.Daemon {
+namespace Beagle.Engine {
[RequestMessage (typeof (DaemonInformationRequest))]
public class DaemonInformationExecutor : RequestMessageExecutor {
Modified: branches/beagle-win32-branch/src/Beagle.Engine/Beagle.Engine/RemoteIndexer.cs
==============================================================================
--- branches/beagle-win32-branch/src/Beagle.Engine/Beagle.Engine/RemoteIndexer.cs (original)
+++ branches/beagle-win32-branch/src/Beagle.Engine/Beagle.Engine/RemoteIndexer.cs Sat Mar 1 00:03:33 2008
@@ -34,26 +34,29 @@
using Beagle.Util;
using Stopwatch = Beagle.Util.Stopwatch;
-namespace Beagle.Daemon {
+namespace Beagle.Engine {
public class RemoteIndexer : IIndexer {
- static string helper_path;
- static int helper_pid = -1;
+ private static string helper_path;
+ private static int helper_pid = -1;
- string remote_index_name;
- int remote_index_minor_version = 0;
- int last_item_count = -1;
+ private string remote_index_name;
+ private int remote_index_minor_version = 0;
+ private int last_item_count = -1;
static RemoteIndexer ()
{
string bihp = Environment.GetEnvironmentVariable ("_BEAGLED_INDEX_HELPER_PATH");
- if (bihp == null)
+
+ if (String.IsNullOrEmpty (bihp))
throw new Exception ("_BEAGLED_INDEX_HELPER_PATH not set!");
helper_path = Path.GetFullPath (Path.Combine (bihp, "beagled-index-helper"));
+
if (! File.Exists (helper_path))
throw new Exception ("Could not find " + helper_path);
+
Logger.Log.Debug ("Found index helper at {0}", helper_path);
}
Modified: branches/beagle-win32-branch/src/Beagle.Engine/Beagle.Engine/RemoteIndexerRequest.cs
==============================================================================
--- branches/beagle-win32-branch/src/Beagle.Engine/Beagle.Engine/RemoteIndexerRequest.cs (original)
+++ branches/beagle-win32-branch/src/Beagle.Engine/Beagle.Engine/RemoteIndexerRequest.cs Sat Mar 1 00:03:33 2008
@@ -31,7 +31,7 @@
using Beagle;
using Beagle.Util;
-namespace Beagle.Daemon {
+namespace Beagle.Engine {
public class RemoteIndexerRequest : RequestMessage {
Modified: branches/beagle-win32-branch/src/Beagle.Engine/Beagle.Engine/RemoteIndexerResponse.cs
==============================================================================
--- branches/beagle-win32-branch/src/Beagle.Engine/Beagle.Engine/RemoteIndexerResponse.cs (original)
+++ branches/beagle-win32-branch/src/Beagle.Engine/Beagle.Engine/RemoteIndexerResponse.cs Sat Mar 1 00:03:33 2008
@@ -30,7 +30,7 @@
using Beagle.Util;
-namespace Beagle.Daemon {
+namespace Beagle.Engine {
public class RemoteIndexerResponse : ResponseMessage {
Modified: branches/beagle-win32-branch/src/Beagle.Engine/Beagle.Engine/Server.cs
==============================================================================
--- branches/beagle-win32-branch/src/Beagle.Engine/Beagle.Engine/Server.cs (original)
+++ branches/beagle-win32-branch/src/Beagle.Engine/Beagle.Engine/Server.cs Sat Mar 1 00:03:33 2008
@@ -37,7 +37,7 @@
using Beagle.Util;
-namespace Beagle.Daemon {
+namespace Beagle.Engine {
class HttpItemHandler {
Modified: branches/beagle-win32-branch/src/Beagle.Engine/Beagle.Engine/Shutdown.cs
==============================================================================
--- branches/beagle-win32-branch/src/Beagle.Engine/Beagle.Engine/Shutdown.cs (original)
+++ branches/beagle-win32-branch/src/Beagle.Engine/Beagle.Engine/Shutdown.cs Sat Mar 1 00:03:33 2008
@@ -27,19 +27,22 @@
using System;
using System.Threading;
using System.Collections;
+
using Beagle.Util;
-namespace Beagle.Daemon {
+namespace Beagle.Engine {
public class Shutdown {
static public bool Debug = false;
- static object shutdownLock = new object ();
- static Hashtable workers = new Hashtable ();
- static Hashtable workers_names = new Hashtable ();
- static bool shutdownRequested = false;
- static bool shutdownStarted = false;
+ private static GLib.MainLoop main_loop = null;
+
+ private static object shutdownLock = new object ();
+ private static Hashtable workers = new Hashtable ();
+ private static Hashtable workers_names = new Hashtable ();
+ private static bool shutdownRequested = false;
+ private static bool shutdownStarted = false;
public delegate void ShutdownHandler ();
public static event ShutdownHandler ShutdownEvent;
@@ -101,8 +104,6 @@
}
}
- private static GLib.MainLoop main_loop = null;
-
public static void RegisterMainLoop (GLib.MainLoop loop)
{
main_loop = loop;
Modified: branches/beagle-win32-branch/src/Beagle.Engine/Beagle.Engine/SnippetExecutor.cs
==============================================================================
--- branches/beagle-win32-branch/src/Beagle.Engine/Beagle.Engine/SnippetExecutor.cs (original)
+++ branches/beagle-win32-branch/src/Beagle.Engine/Beagle.Engine/SnippetExecutor.cs Sat Mar 1 00:03:33 2008
@@ -31,7 +31,7 @@
using Beagle.Util;
-namespace Beagle.Daemon {
+namespace Beagle.Engine {
[RequestMessage (typeof (SnippetRequest))]
public class SnippetExecutor : RequestMessageExecutor {
@@ -39,16 +39,20 @@
public override ResponseMessage Execute (RequestMessage req)
{
SnippetRequest request = (SnippetRequest) req;
+
Queryable queryable = QueryDriver.GetQueryable (request.Hit.Source);
- ISnippetReader snippet_reader;
+
+ ISnippetReader snippet_reader = null;
bool full_text = request.FullText;
if (queryable == null) {
Log.Error ("SnippetExecutor: No queryable object matches '{0}'", request.Hit.Source);
+
snippet_reader = new SnippetReader (null, null, false);
full_text = false;
- } else
+ } else {
snippet_reader = queryable.GetSnippet (request.QueryTerms, request.Hit, full_text);
+ }
return new SnippetResponse (new SnippetList (full_text, snippet_reader));
}
Modified: branches/beagle-win32-branch/src/Beagle.Engine/Beagle.Engine/SnippetFu.cs
==============================================================================
--- branches/beagle-win32-branch/src/Beagle.Engine/Beagle.Engine/SnippetFu.cs (original)
+++ branches/beagle-win32-branch/src/Beagle.Engine/Beagle.Engine/SnippetFu.cs Sat Mar 1 00:03:33 2008
@@ -34,7 +34,7 @@
// FIXME: Use Lucence.Net highlighting.
-namespace Beagle.Daemon {
+namespace Beagle.Engine {
public class SnippetFu {
Modified: branches/beagle-win32-branch/src/Beagle.Engine/Beagle.Engine/SqliteUtils.cs
==============================================================================
--- branches/beagle-win32-branch/src/Beagle.Engine/Beagle.Engine/SqliteUtils.cs (original)
+++ branches/beagle-win32-branch/src/Beagle.Engine/Beagle.Engine/SqliteUtils.cs Sat Mar 1 00:03:33 2008
@@ -31,10 +31,7 @@
namespace Beagle.Util {
- public class SqliteUtils {
-
- // static class
- private SqliteUtils () { }
+ public static class SqliteUtils {
public static int DoNonQuery (SqliteConnection connection, string command_text, string[] param_names, object[] param_args)
{
@@ -75,17 +72,19 @@
public static int DoNonQuery (SqliteCommand command)
{
int ret = 0;
+
while (true) {
try {
ret = command.ExecuteNonQuery ();
break;
- } catch (SqliteBusyException ex) {
+ } catch (SqliteBusyException) {
Thread.Sleep (50);
} catch (Exception e) {
- Log.Error ( e, "SQL that caused the exception: {0}", command.CommandText);
+ Log.Error (e, "SQL that caused the exception: {0}", command.CommandText);
throw;
}
}
+
return ret;
}
@@ -93,13 +92,15 @@
public static SqliteDataReader ExecuteReaderOrWait (SqliteCommand command)
{
SqliteDataReader reader = null;
+
while (reader == null) {
try {
reader = command.ExecuteReader ();
- } catch (SqliteBusyException ex) {
+ } catch (SqliteBusyException) {
Thread.Sleep (50);
}
}
+
return reader;
}
@@ -108,7 +109,7 @@
while (true) {
try {
return reader.Read ();
- } catch (SqliteBusyException ex) {
+ } catch (SqliteBusyException) {
Thread.Sleep (50);
}
}
Modified: branches/beagle-win32-branch/src/Beagle.Engine/Beagle.Engine/StaticQueryable.cs
==============================================================================
--- branches/beagle-win32-branch/src/Beagle.Engine/Beagle.Engine/StaticQueryable.cs (original)
+++ branches/beagle-win32-branch/src/Beagle.Engine/Beagle.Engine/StaticQueryable.cs Sat Mar 1 00:03:33 2008
@@ -34,13 +34,14 @@
using Beagle.Util;
-namespace Beagle.Daemon {
+namespace Beagle.Engine {
public class StaticQueryable : LuceneQueryable {
protected TextCache text_cache;
- public StaticQueryable (string index_name, string index_path, bool read_only_mode) : base (index_path, read_only_mode)
+ public StaticQueryable (string index_name, string index_path, bool read_only_mode)
+ : base (index_path, read_only_mode)
{
Logger.Log.Debug ("Initializing static queryable: {0}", index_path);
@@ -48,25 +49,27 @@
try {
text_cache = new TextCache (index_path, true);
} catch (UnauthorizedAccessException) {
- Logger.Log.Warn ("Unable to purge static queryable text cache in {0}. Will run without it.", index_path);
+ Logger.Log.Warn ("Unable to purge static queryable text cache in {0}", index_path);
+ Logger.Log.Warn ("Will run without it.");
}
}
}
- override public ISnippetReader GetSnippet (string[] query_terms, Hit hit, bool full_text)
+ public override ISnippetReader GetSnippet (string[] query_terms, Hit hit, bool full_text)
{
if (text_cache == null)
return null;
// Look up the hit in our local text cache.
TextReader reader = text_cache.GetReader (hit.Uri);
+
if (reader == null)
return null;
return SnippetFu.GetSnippet (query_terms, reader, full_text);
}
- override protected bool HitIsValid (Uri uri)
+ protected override bool HitIsValid (Uri uri)
{
// We can't check anything else than file uris
if (! uri.IsFile)
@@ -74,8 +77,8 @@
// FIXME: This is a hack, we need to support parent Uri's in some sane way
try {
- int j = uri.LocalPath.LastIndexOf ('#');
- string actual_path = ((j == -1) ? uri.LocalPath : uri.LocalPath.Substring (0, j));
+ int i = uri.LocalPath.LastIndexOf ('#');
+ string actual_path = (i == -1) ? uri.LocalPath : uri.LocalPath.Substring (0, i);
return File.Exists (actual_path) || Directory.Exists (actual_path);
} catch (Exception e) {
Logger.Log.Warn ("Exception executing HitIsValid on {0}", uri.LocalPath);
Modified: branches/beagle-win32-branch/src/Beagle.Engine/Beagle.Engine/TextCache.cs
==============================================================================
--- branches/beagle-win32-branch/src/Beagle.Engine/Beagle.Engine/TextCache.cs (original)
+++ branches/beagle-win32-branch/src/Beagle.Engine/Beagle.Engine/TextCache.cs Sat Mar 1 00:03:33 2008
@@ -35,9 +35,9 @@
using Beagle.Util;
-namespace Beagle.Daemon {
+namespace Beagle.Engine {
- // FIXME: This class isn't multithread safe! This class does not
+ // FIXME: This class isn't multithread safe! This class does not
// ensure that different threads don't utilize a transaction started
// in a certain thread at the same time. However, since all the
// writes to this database are handled by a single thread, this isn't
@@ -50,10 +50,12 @@
private const string SELF_CACHE_TAG = "*self*";
private const string BLOB_TAG = "*blob*";
+
public SqliteCommand InsertCommand;
public SqliteCommand LookupPathCommand;
public SqliteCommand LookupDataCommand;
public SqliteCommand DeleteCommand;
+
private string text_cache_dir;
internal string TextCacheDir {
get { return text_cache_dir; }
Modified: branches/beagle-win32-branch/src/Beagle.Engine/Beagle.Engine/WebServer.cs
==============================================================================
--- branches/beagle-win32-branch/src/Beagle.Engine/Beagle.Engine/WebServer.cs (original)
+++ branches/beagle-win32-branch/src/Beagle.Engine/Beagle.Engine/WebServer.cs Sat Mar 1 00:03:33 2008
@@ -34,7 +34,7 @@
using Beagle.Util;
-namespace Beagle.Daemon {
+namespace Beagle.Engine {
class WebServer {
Modified: branches/beagle-win32-branch/src/Beagle.Engine/Beagle.Engine/Zeroconf.cs
==============================================================================
--- branches/beagle-win32-branch/src/Beagle.Engine/Beagle.Engine/Zeroconf.cs (original)
+++ branches/beagle-win32-branch/src/Beagle.Engine/Beagle.Engine/Zeroconf.cs Sat Mar 1 00:03:33 2008
@@ -33,7 +33,7 @@
using Beagle.Util;
-namespace Beagle.Daemon.Network {
+namespace Beagle.Engine.Network {
public class Zeroconf : IDisposable {
Modified: branches/beagle-win32-branch/src/Beagle.Engine/Makefile.am
==============================================================================
--- branches/beagle-win32-branch/src/Beagle.Engine/Makefile.am (original)
+++ branches/beagle-win32-branch/src/Beagle.Engine/Makefile.am Sat Mar 1 00:03:33 2008
@@ -1,4 +1,11 @@
-CSC = $(MCS) -debug
+# 0162 = Unreachable code detected
+# 0164 = This label has not been referenced
+# 0168 = The variable 'foo' is declared but never used
+# 0169 = The private method/field 'foo' is never used
+# 0219 = Variable is assigned but never used
+
+CSC = $(MCS) -debug -nowarn:0162,0164,0168,0169,0219,0436
+
ASSEMBLY_NAME = Beagle.Engine
ASSEMBLY = $(ASSEMBLY_NAME).dll
@@ -262,6 +269,7 @@
ASSEMBLY_REFERENCES = \
-r:../Beagle.Util/Beagle.Util.dll \
+ -r:../Beagle.Filters/Beagle.Filters.dll \
-r:../Beagle/Beagle.dll \
-r:Mono.Posix \
-r:Mono.Data.Sqlite \
Modified: branches/beagle-win32-branch/src/Makefile.am
==============================================================================
--- branches/beagle-win32-branch/src/Makefile.am (original)
+++ branches/beagle-win32-branch/src/Makefile.am Sat Mar 1 00:03:33 2008
@@ -1 +1 @@
-SUBDIRS = libbeagleglue Beagle.Util Beagle Beagle.Engine Beagle.Filters Beagle.Daemon
+SUBDIRS = libbeagleglue Beagle.Util Beagle Beagle.Filters Beagle.Engine Beagle.Daemon
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]