diff options
author | Manish Sinha <manishsinha@ubuntu.com> | 2011-06-17 02:27:08 +0530 |
---|---|---|
committer | Manish Sinha <manishsinha@ubuntu.com> | 2011-06-17 02:27:08 +0530 |
commit | 874f60d4546537f1cc71ee5b814e4af1ef5ce789 (patch) | |
tree | 38b799dfec4ce4d2bb13fa95596a990f0da03877 | |
parent | 7ddcaac551a6b4b6fc3dd8d9c2c9038f1fc41a0b (diff) |
Added remaining filesvv0.8.0.0
-rw-r--r-- | Zeitgeist.Testsuite/Log/TestFindEvents.cs | 5 | ||||
-rw-r--r-- | Zeitgeist/Client/IDBus.cs | 37 | ||||
-rw-r--r-- | Zeitgeist/Datamodel/Version.cs | 167 |
3 files changed, 208 insertions, 1 deletions
diff --git a/Zeitgeist.Testsuite/Log/TestFindEvents.cs b/Zeitgeist.Testsuite/Log/TestFindEvents.cs index eb9624b..bd5fcb2 100644 --- a/Zeitgeist.Testsuite/Log/TestFindEvents.cs +++ b/Zeitgeist.Testsuite/Log/TestFindEvents.cs @@ -46,8 +46,11 @@ namespace Zeitgeist.Testsuite e.Subjects.Add(sub); Event e2 = new Event(); - e2.Actor = "application://gedit.desktop"; + e2.Actor = "application://tomboy.desktop"; Subject sub2 = new Subject(); + sub2.MimeType = "application/x-note"; + sub2.Interpretation = Interpretation.Instance.Document.Document; + sub2.Manifestation = Manifestation.Instance.FileDataObject.FileDataObject; e2.Subjects.Add(sub2); LogClient client = new LogClient(); diff --git a/Zeitgeist/Client/IDBus.cs b/Zeitgeist/Client/IDBus.cs new file mode 100644 index 0000000..3fc2f52 --- /dev/null +++ b/Zeitgeist/Client/IDBus.cs @@ -0,0 +1,37 @@ +/****************************************************************************** + * The MIT/X11/Expat License + * Copyright (c) 2010 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 Zeitgeist.Datamodel; +using Zeitgeist; +using DBus; + +namespace Zeitgeist +{ + [DBus.Interface ("org.freedesktop.DBus.Properties")] + internal interface IDBus + { + object Get(string interfaceName, string propertyName); + } +} + diff --git a/Zeitgeist/Datamodel/Version.cs b/Zeitgeist/Datamodel/Version.cs new file mode 100644 index 0000000..6ecb223 --- /dev/null +++ b/Zeitgeist/Datamodel/Version.cs @@ -0,0 +1,167 @@ +/****************************************************************************** + * 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; +namespace Zeitgeist.Datamodel +{ + /// <summary> + /// Represents a version number of format X.Y.Z (Major-Minor-Revision) + /// </summary> + /// <remarks> + /// The fourth number(Patch) is ommitted + /// </remarks> + public class Version + { + public Version () + { + } + + /// <summary> + /// The major version section of a Version + /// </summary> + /// <remarks> + /// X is the major version part of X.Y.Z + /// </remarks> + public string MajorVersion + { + get + { + return _majorVersion; + } + set + { + _majorVersion = value; + } + } + + /// <summary> + /// The minor version section of a Version + /// </summary> + /// <remarks> + /// Y is the minor version part of X.Y.Z + /// </remarks> + public string MinorVersion + { + get + { + return _minorVersion; + } + set + { + _minorVersion = value; + } + } + + /// <summary> + /// The Revision section of a Version + /// </summary> + /// <remarks> + /// Z is the Revision part of X.Y.Z + /// </remarks> + public string Revision + { + get + { + return _revision; + } + set + { + _revision = value; + } + } + + #region Private Members + + private string _majorVersion; + + private string _minorVersion; + + private string _revision; + + #endregion + } + + internal struct RawVersion + { + public RawVersion(Version ver) : this() + { + this.MajorVersion = ver.MajorVersion; + this.MinorVersion = ver.MinorVersion; + this.Revision = ver.Revision; + } + + public Version FromRaw() + { + Version ver = new Version(); + + ver.MajorVersion = this.MajorVersion; + ver.MinorVersion = this.MinorVersion; + ver.Revision = this.Revision; + + return ver; + } + + public string MajorVersion + { + get + { + return _majorVersion; + } + set + { + _majorVersion = value; + } + } + + public string MinorVersion + { + get + { + return _minorVersion; + } + set + { + _minorVersion = value; + } + } + + public string Revision + { + get + { + return _revision; + } + set + { + _revision = value; + } + } + + private string _majorVersion; + + private string _minorVersion; + + private string _revision; + } +} + |