~ubuntu-branches/debian/squeeze/gnome-do-plugins/squeeze

« back to all changes in this revision

Viewing changes to BundledLibraries/libgoogle-data-mono-1.4.0.2/src/core/atomId.cs

  • Committer: Bazaar Package Importer
  • Author(s): Christopher James Halse Rogers
  • Date: 2009-06-27 16:11:49 UTC
  • mfrom: (1.1.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20090627161149-b74nc297di2842u1
* New upstream release
  + Pidgin plugin now supports initial text for messages (LP: #338608)
  + Pidgin plugin opens conversations on the correct IM network (LP: #370965)
* debian/rules:
  + Update get-orig-source target.  Upstream no longer ships gdata* binaries,
    so we no longer need to strip them
* debian/patches/00_use_system_gdata
  + Drop.  Upstream now builds against system libgdata.
* debian/patches/04_fix_pidgin_dbus_ints
* debian/patches/10_fix_rhythmbox_file
* debian/patches/15_twitter_api
* debian/patches/20_twitter_overflow:
  + Drop.  Included upstream.
* debian/patches/01_firefox_iceweasel_rename:
  + Refresh for new version
* debian/patches/02_fix_banshee_plugin:
  + Drop refernce to /usr/lib/banshee-1/Banshee.CollectionIndexer.dll.
    This is unnecessary, and causes errors when Banshee isn't installed.
* debian/patches/00_debian_default_plugins:
  + Enable a bunch of useful plugins that do not require configuration from 
    the "Official" plugin set by default.  Makes Do more useful out of the 
    box.
* debian/control:
  + Bump versioned build-dep on gnome-do to 0.8.2
  + Split out gnome-do-plugin-evolution package, now that this is possible.
    libevolution5.0-cil has an annoyingly large dependency stack.
    (LP: #351535) (Closes: #524993).

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* Copyright (c) 2006 Google Inc.
2
 
 *
3
 
 * Licensed under the Apache License, Version 2.0 (the "License");
4
 
 * you may not use this file except in compliance with the License.
5
 
 * You may obtain a copy of the License at
6
 
 *
7
 
 *     http://www.apache.org/licenses/LICENSE-2.0
8
 
 *
9
 
 * Unless required by applicable law or agreed to in writing, software
10
 
 * distributed under the License is distributed on an "AS IS" BASIS,
11
 
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
 
 * See the License for the specific language governing permissions and
13
 
 * limitations under the License.
14
 
*/
15
 
#region Using directives
16
 
 
17
 
#define USE_TRACING
18
 
 
19
 
using System;
20
 
using System.Xml;
21
 
using System.Globalization;
22
 
using System.ComponentModel;
23
 
 
24
 
 
25
 
#endregion
26
 
 
27
 
//////////////////////////////////////////////////////////////////////
28
 
// contains AtomId
29
 
//////////////////////////////////////////////////////////////////////
30
 
namespace Google.GData.Client
31
 
{
32
 
    //////////////////////////////////////////////////////////////////////
33
 
    /// <summary>The "atom:id" element conveys a permanent, universally unique identifier for an entry or feed.
34
 
    /// </summary> 
35
 
    //////////////////////////////////////////////////////////////////////
36
 
#if WindowsCE || PocketPC
37
 
#else 
38
 
    [TypeConverterAttribute(typeof(AtomBaseLinkConverter)), DescriptionAttribute("Expand to see the link attributes for the Id.")]
39
 
#endif
40
 
    public class AtomId : AtomBaseLink, IComparable
41
 
    {
42
 
 
43
 
        //////////////////////////////////////////////////////////////////////
44
 
        /// <summary>empty constructor</summary> 
45
 
        //////////////////////////////////////////////////////////////////////
46
 
        public AtomId() : base()
47
 
        {
48
 
        }
49
 
        /////////////////////////////////////////////////////////////////////////////
50
 
 
51
 
 
52
 
        //////////////////////////////////////////////////////////////////////
53
 
        /// <summary>public AtomId(string uri)</summary> 
54
 
        /// <param name="link">the URI for the ID</param>
55
 
        /// <returns> </returns>
56
 
        //////////////////////////////////////////////////////////////////////
57
 
        public AtomId(string link) : base()
58
 
        {
59
 
            this.Uri = new AtomUri(link); 
60
 
        }
61
 
        /////////////////////////////////////////////////////////////////////////////
62
 
 
63
 
   
64
 
        #region Persistence overloads
65
 
        //////////////////////////////////////////////////////////////////////
66
 
        /// <summary>Returns the constant representing this XML element.</summary> 
67
 
        //////////////////////////////////////////////////////////////////////
68
 
        public override string XmlName 
69
 
        {
70
 
            get { return AtomParserNameTable.XmlIdElement; }
71
 
        }
72
 
        /////////////////////////////////////////////////////////////////////////////
73
 
        #endregion
74
 
 
75
 
        #region IComparable Members
76
 
 
77
 
        /// <summary>
78
 
        /// as we do comparisons, we need to override this
79
 
        /// we return the hashcode of our string member
80
 
        /// </summary>
81
 
        /// <returns>int</returns>
82
 
        public override int GetHashCode()
83
 
        {
84
 
            return this.Uri.GetHashCode(); 
85
 
        }
86
 
 
87
 
 
88
 
        /// <summary>
89
 
        /// overloaded IComparable interface method
90
 
        /// </summary>
91
 
        /// <param name="obj">the object to compare this instance with</param>
92
 
        /// <returns>int</returns>
93
 
                public int CompareTo(object obj)
94
 
                {
95
 
                    AtomId other = obj as AtomId;
96
 
 
97
 
            if (other == null)
98
 
                return -1;
99
 
 
100
 
            if (this.Uri != null) 
101
 
                return this.Uri.CompareTo(other.Uri);
102
 
 
103
 
            if (other.Uri == null)
104
 
                return 0;
105
 
 
106
 
            return -1;
107
 
                }
108
 
 
109
 
                #endregion
110
 
 
111
 
        /// <summary>
112
 
        /// overridden equal method
113
 
        /// </summary>
114
 
        /// <param name="obj"></param>
115
 
        /// <returns>bool</returns>
116
 
        public override bool Equals(object obj)
117
 
        {
118
 
            return this.CompareTo(obj) == 0;
119
 
        }
120
 
 
121
 
        /// <summary>
122
 
        /// overridden comparson operator
123
 
        /// </summary>
124
 
        /// <param name="a"></param>
125
 
        /// <param name="b"></param>
126
 
        /// <returns>bool</returns>
127
 
        public static bool operator ==(AtomId a, AtomId b)
128
 
        {
129
 
            if ((object)a == null && (object)b == null) return true;
130
 
            if ((object)a != null && (object)b != null)
131
 
            {
132
 
                return a.Equals(b);
133
 
            }
134
 
            return false;
135
 
        }
136
 
 
137
 
        /// <summary>
138
 
        /// overridden comparson operator
139
 
        /// </summary>
140
 
        /// <param name="a"></param>
141
 
        /// <param name="b"></param>
142
 
        /// <returns>bool</returns>
143
 
        public static bool operator !=(AtomId a, AtomId b)
144
 
        {
145
 
            return !(a == b);
146
 
        }
147
 
 
148
 
 
149
 
    }
150
 
    /////////////////////////////////////////////////////////////////////////////
151
 
152
 
/////////////////////////////////////////////////////////////////////////////