001/* 002 * Copyright (c) 2012, the Last.fm Java Project and Committers 003 * All rights reserved. 004 * 005 * Redistribution and use of this software in source and binary forms, with or without modification, are 006 * permitted provided that the following conditions are met: 007 * 008 * - Redistributions of source code must retain the above 009 * copyright notice, this list of conditions and the 010 * following disclaimer. 011 * 012 * - Redistributions in binary form must reproduce the above 013 * copyright notice, this list of conditions and the 014 * following disclaimer in the documentation and/or other 015 * materials provided with the distribution. 016 * 017 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED 018 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A 019 * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR 020 * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 021 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 022 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR 023 * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 024 * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 025 */ 026 027package de.umass.lastfm.scrobble; 028 029/** 030 * The source of the track. See <a href="https://www.last.fm/api/submissions#subs">https://www.last.fm/api/submissions#subs</a> for more 031 * information. 032 * 033 * @author Janni Kovacs 034 * @deprecated The 1.2.x scrobble protocol has now been deprecated in favour of the 2.0 protocol which is part of the Last.fm web services 035 * API. 036 */ 037@Deprecated 038public enum Source { 039 040 /** 041 * Chosen by the user (the most common value, unless you have a reason for choosing otherwise, use this). 042 */ 043 USER("P"), 044 045 /** 046 * Non-personalised broadcast (e.g. Shoutcast, BBC Radio 1). 047 */ 048 NON_PERSONALIZED_BROADCAST("R"), 049 050 /** 051 * Personalised recommendation except Last.fm (e.g. Pandora, Launchcast). 052 */ 053 PERSONALIZED_BROADCAST("E"), 054 055 /** 056 * Last.fm (any mode). In this case, the 5-digit Last.fm recommendation key must be appended to this source ID 057 * to prove the validity of the submission (for example, "o[0]=L1b48a"). 058 */ 059 LAST_FM("L"), 060 061 /** 062 * Source unknown. 063 */ 064 UNKNOWN("U"); 065 066 private String code; 067 068 Source(String code) { 069 this.code = code; 070 } 071 072 /** 073 * Returns the corresponding code for this source. 074 * 075 * @return the code 076 */ 077 public String getCode() { 078 return code; 079 } 080}