@@ -0,0 +1,1544 @@
+/*%0A * ServeStream: A HTTP stream browser/player for Android%0A * Copyright 2010 William Seemann%0A * %0A * Licensed under the Apache License, Version 2.0 (the %22License%22);%0A * you may not use this file except in compliance with the License.%0A * You may obtain a copy of the License at%0A *%0A *     http://www.apache.org/licenses/LICENSE-2.0%0A *%0A * Unless required by applicable law or agreed to in writing, software%0A * distributed under the License is distributed on an %22AS IS%22 BASIS,%0A * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.%0A * See the License for the specific language governing permissions and%0A * limitations under the License.%0A */%0A%0Apackage net.sourceforge.servestream.transport;%0A%0Apublic class ProtocolFactory %7B%0A%09%0A%09public static final String HTTP_HINT = %22hostname/path%22;%0A%09public static final String HTTPS_HINT = %22hostname/path%22;%0A%09%0A%09/**%0A%09 * Default constructor%0A%09 */%0A%09public ProtocolFactory() %7B%0A%09%09%0A%09%7D%0A%09%0A%09/**%0A%09 * Returns a hint for the protocol passed in %0A%09 * %0A%09 * @param protocol The protocol%0A%09 * @return String The hint for the protocol%0A%09 */%0A%09public static String getProtocolHint(String protocol) %7B%0A%09%09if (protocol.equals(%22http%22)) %7B%0A%09%09%09return HTTP_HINT;%0A%09%09%7D else if (protocol.equals(%22https%22)) %7B%0A%09%09%09return HTTPS_HINT;%0A%09%09%7D else %7B%0A%09%09%09return null;%0A%09%09%7D%0A%09%7D%0A%09%0A%09/**%0A%09 * %0A%09 * %0A%09 * @param scheme %0A%09 * @return String Protocol%0A%09 */%0A%09public static String getProtocol(String scheme) %7B%0A%09%09if (scheme.equals(%22http%22)) %7B%0A%09%09%09return %22http://%22;%0A%09%09%7D else if (scheme.equals(%22https%22)) %7B%0A%09%09%09return %22https://%22;%0A%09%09%7D else %7B%0A%09%09%09return null;%0A%09%09%7D%0A%09%7D%0A%09%0A%7D

Add class for protocol spinner