~ubuntu-branches/ubuntu/quantal/banshee/quantal

« back to all changes in this revision

Viewing changes to src/Backends/Banshee.Osx/Banshee.Hardware.Osx/UsbDevice.cs

  • Committer: Package Import Robot
  • Author(s): Chow Loong Jin
  • Date: 2012-09-23 16:41:43 UTC
  • mfrom: (1.2.22) (6.3.25 experimental)
  • Revision ID: package-import@ubuntu.com-20120923164143-xuygdccvr2uqjdfj
Tags: 2.5.1-1ubuntu1
* [9615bd3e] Merge from Debian Experimental (LP: #1041245), remaining changes:
  - Enable and recommend SoundMenu and Disable NotificationArea by default
  - Disable boo and karma extensions
  - Move desktop file for Meego UI to /usr/share/une/applications
  - Change the url for the Amazon store redirector
  - [9b356d6] Add workaround for set_Height exception.
  - [ccbcbbd] Make Banshee translatable in Launchpad
* [77c7309] Drop Workaruond-for-set_Height-Exceptions.patch.
  Applied upstream

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
//
 
2
// UsbDevice.cs
 
3
//
 
4
// Author:
 
5
//   Timo Dörr <timo@latecrew.de>
 
6
//
 
7
// Copyright 2012 Timo Dörr
 
8
//
 
9
// Permission is hereby granted, free of charge, to any person obtaining a copy
 
10
// of this software and associated documentation files (the "Software"), to deal
 
11
// in the Software without restriction, including without limitation the rights
 
12
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 
13
// copies of the Software, and to permit persons to whom the Software is
 
14
// furnished to do so, subject to the following conditions:
 
15
// 
 
16
// The above copyright notice and this permission notice shall be included in
 
17
// all copies or substantial portions of the Software.
 
18
// 
 
19
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 
20
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 
21
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 
22
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 
23
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 
24
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 
25
// THE SOFTWARE.
 
26
 
 
27
using System;
 
28
 
 
29
using MonoMac.Foundation;
 
30
 
 
31
using Banshee.Hardware;
 
32
using Banshee.Hardware.Osx.LowLevel;
 
33
 
 
34
namespace Banshee.Hardware.Osx
 
35
{
 
36
    public class UsbDevice : Device, IUsbDevice
 
37
    {
 
38
        public UsbDevice (DeviceArguments arguments) : base (arguments)
 
39
        {
 
40
        }
 
41
 
 
42
        #region IUsbDevice implementation
 
43
        public int ProductId {
 
44
            get {
 
45
                if (deviceArguments.UsbInfo != null)
 
46
                    return (int) deviceArguments.UsbInfo.ProductId;
 
47
                else
 
48
                    return 0;
 
49
            }
 
50
        }
 
51
 
 
52
        public int VendorId {
 
53
            get {
 
54
                if (deviceArguments.UsbInfo != null)
 
55
                    return (int) deviceArguments.UsbInfo.VendorId;
 
56
                else
 
57
                    return 0;
 
58
            }
 
59
        }
 
60
 
 
61
        public double Speed {
 
62
            get { return 2.0; }
 
63
        }
 
64
 
 
65
        public double Version {
 
66
            get { return 2.0; }
 
67
        }
 
68
        #endregion
 
69
    }
 
70
}