diff options
author | Manish Sinha <manishsinha@ubuntu.com> | 2011-05-13 02:17:37 +0530 |
---|---|---|
committer | Manish Sinha <manishsinha@ubuntu.com> | 2011-05-13 02:17:37 +0530 |
commit | 2a13abf23bc72c271d99abcc59702a2ebcd0e407 (patch) | |
tree | a275e7d3a1986cb15eae962f537410bed5add1b8 | |
parent | b75b6a23123e799afc2440b6f975ac80b58754c6 (diff) |
Add the Property extensions to LogClient and add Travis as copyright holder
-rw-r--r-- | Zeitgeist.Testsuite/Log/TestProperties.cs | 45 | ||||
-rw-r--r-- | Zeitgeist.Testsuite/Zeitgeist.Testsuite.csproj | 1 | ||||
-rw-r--r-- | Zeitgeist/Client/ILog.cs | 4 | ||||
-rw-r--r-- | Zeitgeist/Datamodel/DataSource.cs | 3 | ||||
-rw-r--r-- | Zeitgeist/LogClient.cs | 27 | ||||
-rw-r--r-- | Zeitgeist/Zeitgeist.csproj | 2 |
6 files changed, 79 insertions, 3 deletions
diff --git a/Zeitgeist.Testsuite/Log/TestProperties.cs b/Zeitgeist.Testsuite/Log/TestProperties.cs new file mode 100644 index 0000000..2cbf5b1 --- /dev/null +++ b/Zeitgeist.Testsuite/Log/TestProperties.cs @@ -0,0 +1,45 @@ +/****************************************************************************** + * The MIT/X11/Expat License + * Copyright (c) 2011 Manish Sinha<manishsinha@ubuntu.com> + + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. +********************************************************************************/ + +using System; +using NUnit.Framework; +using Zeitgeist; +using Zeitgeist.Datamodel; +using System.Collections.Generic; +using System.Diagnostics; +using System.IO; + +namespace Zeitgeist.Testsuite +{ + [TestFixture()] + public class TestProperties + { + [Test()] + public void TestExtensions() + { + LogClient client = new LogClient(); + Assert.Greater(client.Extensions.Count, 0); + } + } +} + diff --git a/Zeitgeist.Testsuite/Zeitgeist.Testsuite.csproj b/Zeitgeist.Testsuite/Zeitgeist.Testsuite.csproj index edbbf3c..a8f912b 100644 --- a/Zeitgeist.Testsuite/Zeitgeist.Testsuite.csproj +++ b/Zeitgeist.Testsuite/Zeitgeist.Testsuite.csproj @@ -46,6 +46,7 @@ <Compile Include="Log\TestInsertAndDeleteEvents.cs" /> <Compile Include="Monitor\TestMonitor.cs" /> <Compile Include="Blacklist\TestInsertEventsWithBlacklist.cs" /> + <Compile Include="Log\TestProperties.cs" /> </ItemGroup> <ItemGroup> <ProjectReference Include="..\Zeitgeist\Zeitgeist.csproj"> diff --git a/Zeitgeist/Client/ILog.cs b/Zeitgeist/Client/ILog.cs index c635a7e..49b1c9a 100644 --- a/Zeitgeist/Client/ILog.cs +++ b/Zeitgeist/Client/ILog.cs @@ -159,7 +159,7 @@ namespace Zeitgeist.Client /// Register a client side monitor object to receive callbacks when events matching time_range and event_templates are inserted or deleted. /// </summary> /// <param name="monitorPath"> - /// The path to be monitored <see cref="NDesk.DBus.ObjectPath"/> + /// The path to be monitored <see cref="DBus.ObjectPath"/> /// </param> /// <param name="range"> /// The time range under which Monitored events must fall within <see cref="TimeRange"/> @@ -173,7 +173,7 @@ namespace Zeitgeist.Client /// Remove a monitor installed with InstallMonitor() /// </summary> /// <param name="monitorPath"> - /// The path of the monitor to be removed <see cref="NDesk.DBus.ObjectPath"/> + /// The path of the monitor to be removed <see cref="DBus.ObjectPath"/> /// </param> void RemoveMonitor(ObjectPath monitorPath); diff --git a/Zeitgeist/Datamodel/DataSource.cs b/Zeitgeist/Datamodel/DataSource.cs index e0350ae..b077ced 100644 --- a/Zeitgeist/Datamodel/DataSource.cs +++ b/Zeitgeist/Datamodel/DataSource.cs @@ -1,6 +1,7 @@ /****************************************************************************** * The MIT/X11/Expat License - * Copyright (c) 2010 Manish Sinha<mail@manishsinha.net> + * Copyright (c) 2010 Manish Sinha <manishsinha@ubuntu.com> + * Copyright (c) 2011 Travis Glenn Hansen <travisghansen@yahoo.com> * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/Zeitgeist/LogClient.cs b/Zeitgeist/LogClient.cs index e1ddb12..a572f93 100644 --- a/Zeitgeist/LogClient.cs +++ b/Zeitgeist/LogClient.cs @@ -74,6 +74,7 @@ namespace Zeitgeist private void setUpClient() { srcInterface = ZsUtils.GetDBusObject<ILog>(objectPath); + dbusInterface = ZsUtils.GetDBusObject<IDBus>(objectPath); } #region Fetch, Insert and Delete Events @@ -345,8 +346,34 @@ namespace Zeitgeist srcInterface.Quit(); } + #region Properties + + /// <summary> + /// The list of zeitgeist daemon extension loaded by the engine + /// </summary> + /// <remarks> + /// Examples are Blacklist, DataSourceRegistry, Full-Text-Search, StorageMonitor etc + /// </remarks> + public List<string> Extensions + { + get + { + object exten = dbusInterface.Get("org.gnome.zeitgeist.Log", "extensions"); + if(exten != null && exten.GetType() == typeof(System.String[])) + { + return new List<string>((string[])exten); + } + else + return new List<string>(); + } + } + + #endregion + private ILog srcInterface; + private IDBus dbusInterface; + private static string objectPath = "/org/gnome/zeitgeist/log/activity"; private List<MonitorData> listOfMonitors; diff --git a/Zeitgeist/Zeitgeist.csproj b/Zeitgeist/Zeitgeist.csproj index f01dd26..3b39d0e 100644 --- a/Zeitgeist/Zeitgeist.csproj +++ b/Zeitgeist/Zeitgeist.csproj @@ -64,6 +64,8 @@ <Compile Include="Datamodel\Monitor.cs" /> <Compile Include="Datamodel\Delegates.cs" /> <Compile Include="AssemblyInfo.cs" /> + <Compile Include="Datamodel\Version.cs" /> + <Compile Include="Client\IDBus.cs" /> </ItemGroup> <ItemGroup> <Folder Include="Datamodel\" /> |