blob: 7b537f9d771e32bcccf710cf0ea07e8bad67fe09 [file] [log] [blame]
Francesco Furfariec7e1752006-10-02 13:37:04 +00001/*
2 * Licensed to the Apache Software Foundation (ASF) under one
3 * or more contributor license agreements. See the NOTICE file
4 * distributed with this work for additional information
5 * regarding copyright ownership. The ASF licenses this file
6 * to you under the Apache License, Version 2.0 (the
7 * "License"); you may not use this file except in compliance
8 * with the License. You may obtain a copy of the License at
Francesco Furfarid1072b52006-05-03 07:44:48 +00009 *
Francesco Furfariec7e1752006-10-02 13:37:04 +000010 * http://www.apache.org/licenses/LICENSE-2.0
Francesco Furfarid1072b52006-05-03 07:44:48 +000011 *
Francesco Furfariec7e1752006-10-02 13:37:04 +000012 * Unless required by applicable law or agreed to in writing,
13 * software distributed under the License is distributed on an
14 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 * KIND, either express or implied. See the License for the
16 * specific language governing permissions and limitations
17 * under the License.
Francesco Furfarid1072b52006-05-03 07:44:48 +000018 */
19
20package org.apache.felix.upnp.sample.binaryLight;
21import java.io.IOException;
22import java.io.InputStream;
23
24import org.osgi.service.upnp.UPnPIcon;
25
26/*
Karl Paulsd312acc2007-06-18 20:38:33 +000027* @author <a href="mailto:dev@felix.apache.org">Felix Project Team</a>
Francesco Furfarid1072b52006-05-03 07:44:48 +000028*/
29
30public class LightIcon implements UPnPIcon {
31
32 /* (non-Javadoc)
33 * @see org.osgi.service.upnp.UPnPIcon#getMimeType()
34 */
35 public String getMimeType() {
36 return "image/gif";
37 }
38
39 /* (non-Javadoc)
40 * @see org.osgi.service.upnp.UPnPIcon#getWidth()
41 */
42 public int getWidth() {
43 return 32;
44 }
45
46 /* (non-Javadoc)
47 * @see org.osgi.service.upnp.UPnPIcon#getHeight()
48 */
49 public int getHeight() {
50 return 32;
51 }
52
53 /* (non-Javadoc)
54 * @see org.osgi.service.upnp.UPnPIcon#getSize()
55 */
56 public int getSize() {
Francesco Furfarif2a67912006-07-17 17:08:02 +000057 return 1072;
Francesco Furfarid1072b52006-05-03 07:44:48 +000058 }
59
60 /* (non-Javadoc)
61 * @see org.osgi.service.upnp.UPnPIcon#getDepth()
62 */
63 public int getDepth() {
64 return 16;
65 }
66
67 /* (non-Javadoc)
68 * @see org.osgi.service.upnp.UPnPIcon#getInputStream()
69 */
70 public InputStream getInputStream() throws IOException {
71 return LightIcon.class.getResourceAsStream("images/LightOn.gif");
72 }
73}