~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/youtube/playlistsentry.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
 
#define USE_TRACING
16
 
 
17
 
using System;
18
 
using System.Xml;
19
 
using System.IO; 
20
 
using System.Collections;
21
 
using Google.GData.Client;
22
 
using Google.GData.Extensions;
23
 
using System.Globalization;
24
 
 
25
 
 
26
 
namespace Google.GData.YouTube {
27
 
 
28
 
 
29
 
    //////////////////////////////////////////////////////////////////////
30
 
    /// <summary>
31
 
    /// Entry API customization class for defining entries in an Playlist feed.
32
 
    /// </summary>
33
 
    //////////////////////////////////////////////////////////////////////
34
 
    public class PlaylistsEntry : YouTubeBaseEntry
35
 
    {
36
 
         /// <summary>
37
 
        /// Category used to label entries as Playlistentries
38
 
        /// </summary>
39
 
        public static AtomCategory PLAYLISTS_CATEGORY =
40
 
        new AtomCategory(YouTubeNameTable.KIND_PLAYLIST_LINK, new AtomUri(BaseNameTable.gKind));
41
 
 
42
 
        /// <summary>
43
 
        /// Constructs a new PlayListEntry instance
44
 
        /// </summary>
45
 
        public PlaylistsEntry()
46
 
        : base()
47
 
        {
48
 
            Tracing.TraceMsg("Created PlaylistsEntry");
49
 
 
50
 
            if (this.ProtocolMajor == 1)
51
 
            {
52
 
                Description d = new Description();
53
 
                FeedLink f = new FeedLink();
54
 
 
55
 
                this.AddExtension(d);
56
 
                this.AddExtension(f);
57
 
            } 
58
 
            CountHint c = new CountHint();
59
 
            this.AddExtension(c);
60
 
            this.AddExtension(new Private());
61
 
 
62
 
 
63
 
            Categories.Add(PLAYLISTS_CATEGORY);
64
 
        }
65
 
 
66
 
 
67
 
 
68
 
        /// <summary>
69
 
        /// getter/setter for Description subelement
70
 
        /// </summary>
71
 
        [Obsolete("replaced with Summary.Text")] 
72
 
        public string Description 
73
 
        {
74
 
            get
75
 
            {
76
 
                return getDescription();
77
 
            }
78
 
            set
79
 
            {
80
 
                setDescription(value);
81
 
            }
82
 
        }
83
 
 
84
 
        /// <summary>
85
 
        /// getter/setter for the feedlink subelement
86
 
        /// </summary>
87
 
        [Obsolete("replaced with Content.Src.Content")] 
88
 
        public FeedLink FeedLink 
89
 
        {
90
 
            get
91
 
            {
92
 
                return FindExtension(GDataParserNameTable.XmlFeedLinkElement, 
93
 
                                      BaseNameTable.gNamespace) as FeedLink;
94
 
 
95
 
            }
96
 
            set
97
 
            {
98
 
                ReplaceExtension(GDataParserNameTable.XmlFeedLinkElement,
99
 
                                BaseNameTable.gNamespace,
100
 
                                value);
101
 
            }
102
 
        }
103
 
 
104
 
        /// <summary>
105
 
        /// returns the int value of the countHint tag
106
 
        /// <para>
107
 
        /// yt:countHint specifies the number of entries in a playlist feed. The yt:countHint tag appears in the entries in a playlists feed, 
108
 
        /// where each entry contains information about a single playlist.</para>
109
 
        /// </summary>
110
 
        /// <returns>-1 if no counthint was present, else the value</returns>
111
 
        public int CountHint
112
 
        {
113
 
            get
114
 
            {
115
 
                CountHint c =  getYouTubeExtension(YouTubeNameTable.CountHint) as CountHint;
116
 
                if (c != null) 
117
 
                {
118
 
                    return c.IntegerValue;
119
 
                }
120
 
                return -1; 
121
 
            }
122
 
            set
123
 
            {
124
 
                CountHint c =  getYouTubeExtension(YouTubeNameTable.CountHint) as CountHint;
125
 
                if (c == null)
126
 
                {
127
 
                    c = new CountHint();
128
 
                    this.ExtensionElements.Add(c);
129
 
                }
130
 
                c.IntegerValue = value;
131
 
            }
132
 
        }
133
 
 
134
 
        /// <summary>
135
 
        /// getter/setter for the private subelement. Indicates if the playlist is private
136
 
        /// </summary>
137
 
        public bool Private
138
 
        {
139
 
            get
140
 
            {
141
 
                return Convert.ToBoolean(getYouTubeExtensionValue(YouTubeNameTable.Private), CultureInfo.InvariantCulture);
142
 
            }
143
 
            set
144
 
            {
145
 
                setYouTubeExtension(YouTubeNameTable.Private, value == false ? null : "");
146
 
            }
147
 
        }
148
 
 
149
 
    }
150
 
}
151
 
 
152