~ubuntu-branches/ubuntu/jaunty/gnome-do-plugins/jaunty-proposed

« back to all changes in this revision

Viewing changes to BundledLibraries/libgoogle-data-mono-1.4.0.2/src/youtube/complaintentry.cs

  • Committer: Bazaar Package Importer
  • Author(s): Iain Lane, Daniel T Chen, Iain Lane
  • Date: 2009-03-18 00:40:51 UTC
  • mfrom: (1.1.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20090318004051-ujn1ja3kiu3ky7ru
Tags: 0.8.1.3+dfsg-0ubuntu1
[ Daniel T Chen ]
* New upstream release (LP: #344578)
  + Banshee plugin goes crazy if banshee isn't loaded first
    (LP: #289802)
  + gnome-do gCalculate plugin fails to display "times" symbol
    (LP: #274252)
  + Banshee-1 fails to build in Mono 2.0 (LP: #309188)
  + Pidgin 2.5.4 has incompatible dbus interface. s/uint/int/
    (LP: #314927)
  + Pidgin plugin hangs opening a chat if pidgin is unresponsive
    (LP: #315565)
  + twitter plugin still reports friend updates even when
    deactivated (LP: #317674)
  + Misspelling in microblogging plugin confirmation message
    (LP: #319433)
  + make install uses mdtool, but configure doesn't check for it
    (LP: #322951)
  + Virtualbox Icon in 2.10 are broken because of a new
    specification (LP: #323902)
  + Google Maps Plugin shouldn't always use route (LP: #324271)
  + Fix for Google Maps when using newlines and other special
    characters (LP: #324667)
  + VirtualBox failed to load icon (LP: #325712)
  + 'Read Man Pages' plugin makes Gnome-Do unresponsive
    (LP: #325935)
  + Search returns broken URLs (LP: #327855)
  + Default action for SSH hosts is "open" (LP: #328236)
  + Files and Folders Configuration doesn't use standard buttons
    (LP: #328236)
  + Window manager maximize action should focus if window is not
    currently focused (LP: #258893)
  + Locate plugin has no error message (LP: #262360)
  + Wishlist: Let user specify files and folders to ignore
    (LP: #263177)
  + ts-client plugin doesn't index subdirectories (LP: #322352)
  + Max 3000 items in Files and Folders plugin (LP: #324105)
  + putty cannot find host when running from gnome do
    (LP: #324282)
  + locate plugin with globbing (LP: #334798)
  + Twitter plugin encountered an error in UpdateFriends
    (LP: #317575)
  + gnome-terminal profiles no longer work (LP: #321977)
  + Creating a task using Remember the Milk plugin can fail if
    no task list is specified (LP: #324066)
  + bundled libraries makefile needs destdir (LP: #324704)
  + Typographical error in del.icio.us plugin (LP: #330525)
  + ImageShack fails to upload (LP: #337324)
* debian/copyright
  + Refresh for new upstream version; new plugins added.
* debian/patches/00_dfsg_autofoo.dpatch
  + Update for new upstream version
  + Don't build the YouTube plugin due to removal of shipped
    exes and dlls causing FTBFS
* debian/patches/02_ssh_respect_exec_arg.dpatch
  debian/patches/03_buildsystem_respect_mcs.dpatch
  debian/patches/04_fix_pidgin_dbus_ints.dpatch
  + Drop; fixed upstream

[ Iain Lane ]
* debian/rules: Update repackaging to not delete *.dll; upstream now ships
  source copies of google-gdata meaning we can now enable the Google and
  Youtube plugins.
* debian/patches/00_dfsg_autofoo: Drop, fixed by including and building
  these libs now. 
* debian/copyright: Update with information for google-gdata. 
* debian/patches/04_fix_pidgin_dbus_ints.dpatch: Add left out piece of patch
* debian/control: Bump gnome-do build-dep to require current version. 

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* Copyright (c) 2008 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
/* Change history
 
16
* Oct 13 2008  Joe Feser       joseph.feser@gmail.com
 
17
* Removed warnings
 
18
 
19
*/
 
20
#define USE_TRACING
 
21
 
 
22
using System;
 
23
using System.Xml;
 
24
using System.IO; 
 
25
using System.Collections;
 
26
using Google.GData.Client;
 
27
using Google.GData.Extensions;
 
28
 
 
29
namespace Google.GData.YouTube {
 
30
 
 
31
 
 
32
    //////////////////////////////////////////////////////////////////////
 
33
    /// <summary>
 
34
    /// Entry API customization class for defining comment entries in an comments feed.
 
35
    /// </summary>
 
36
    //////////////////////////////////////////////////////////////////////
 
37
    public class ComplaintEntry : YouTubeBaseEntry
 
38
    {
 
39
        /// <summary>
 
40
        /// Describes the nature of the complaint
 
41
        /// </summary>
 
42
        public enum ComplaintType
 
43
        {
 
44
            /// <summary>
 
45
            /// The video contains sexual content
 
46
            /// </summary>
 
47
            PORN,
 
48
            /// <summary>
 
49
            /// The video contains violent or repulsive content
 
50
            /// </summary>
 
51
            VIOLENCE,
 
52
            /// <summary>
 
53
            /// The video contains hateful or abusive content
 
54
            /// </summary>
 
55
            HATE,
 
56
            /// <summary>
 
57
            /// The video contains harmful or dangerous acts
 
58
            /// </summary>
 
59
            DANGEROUS,
 
60
            /// <summary>
 
61
            /// The video infringes on the complainant's rights or copyright.
 
62
            /// </summary>
 
63
            RIGHTS,
 
64
            /// <summary>
 
65
            /// The video is clearly spam.
 
66
            /// </summary>
 
67
            SPAM,
 
68
            /// <summary>
 
69
            /// The type of complaint is not set yet.
 
70
            /// </summary>
 
71
            UNKNOWN
 
72
        }
 
73
        /// <summary>
 
74
        /// Constructs a new CommentEntry instance
 
75
        /// </summary>
 
76
        public ComplaintEntry()
 
77
        : base()
 
78
        {
 
79
            Tracing.TraceMsg("Created complaint entry");
 
80
 
 
81
            Content c = new Content();
 
82
 
 
83
            this.AddExtension(c);
 
84
        }
 
85
 
 
86
        /// <summary>
 
87
        /// getter/setter for yt:content subelement
 
88
        /// </summary>
 
89
        public string Complaint
 
90
        {
 
91
            get
 
92
            {
 
93
                return getYouTubeExtensionValue(YouTubeNameTable.Content);
 
94
            }
 
95
            set
 
96
            {
 
97
                setYouTubeExtension(YouTubeNameTable.Content, value);
 
98
            }
 
99
        }
 
100
 
 
101
 
 
102
        /// <summary>
 
103
        /// gets and sets the associated atom:category
 
104
        /// </summary>
 
105
        public ComplaintType Type
 
106
        {
 
107
            get
 
108
            {
 
109
                ComplaintType t = ComplaintType.UNKNOWN;
 
110
 
 
111
                foreach (AtomCategory category in this.Categories)
 
112
                {
 
113
                    if (category.Scheme == YouTubeNameTable.ComplaintCategorySchema)
 
114
                    {
 
115
                        try
 
116
                        {
 
117
                            t = (ComplaintType) Enum.Parse(typeof(ComplaintType), category.Term, true);
 
118
                        }
 
119
                        catch (ArgumentException)
 
120
                        {
 
121
                            t = ComplaintType.UNKNOWN;
 
122
                        }
 
123
                    }
 
124
                }
 
125
                return t;
 
126
            }
 
127
            set
 
128
            {
 
129
                AtomCategory cat = null;
 
130
                foreach (AtomCategory category in this.Categories)
 
131
                {
 
132
                    if (category.Scheme == YouTubeNameTable.ComplaintCategorySchema)
 
133
                    {
 
134
                        cat = category;
 
135
                        break;
 
136
                    }
 
137
                }
 
138
                if (cat == null)
 
139
                {
 
140
                    cat = new AtomCategory();
 
141
                    this.Categories.Add(cat);
 
142
                }
 
143
                cat.Term = value.ToString();
 
144
                cat.Scheme = new AtomUri(YouTubeNameTable.ComplaintCategorySchema);
 
145
            }
 
146
        }
 
147
    }
 
148
}
 
149
 
 
150