| 1 | /* |
|---|
| 2 | * SapphireMedia.h |
|---|
| 3 | * Sapphire |
|---|
| 4 | * |
|---|
| 5 | * Created by Graham Booker on Jun. 25, 2007. |
|---|
| 6 | * Copyright 2007 Sapphire Development Team and/or www.nanopi.net |
|---|
| 7 | * All rights reserved. |
|---|
| 8 | * |
|---|
| 9 | * This program is free software; you can redistribute it and/or modify it under the terms of the GNU |
|---|
| 10 | * General Public License as published by the Free Software Foundation; either version 3 of the License, |
|---|
| 11 | * or (at your option) any later version. |
|---|
| 12 | * |
|---|
| 13 | * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even |
|---|
| 14 | * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General |
|---|
| 15 | * Public License for more details. |
|---|
| 16 | * |
|---|
| 17 | * You should have received a copy of the GNU General Public License along with this program; if not, |
|---|
| 18 | * write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
|---|
| 19 | */ |
|---|
| 20 | |
|---|
| 21 | |
|---|
| 22 | /*! |
|---|
| 23 | * @brief A media asset class to provied custom resume times and cover art |
|---|
| 24 | * |
|---|
| 25 | * This class is designed to allow the custom settings of resume time as well as a custom image path. It extends from BRSimpleMediaAsset, so it can be used whenever a URL based asset is needed. |
|---|
| 26 | */ |
|---|
| 27 | @interface SapphireMedia : BRXMLMediaAsset { |
|---|
| 28 | unsigned int resumeTime; /*!< @brief The resume time to use, 0 to use super*/ |
|---|
| 29 | NSString *imagePath; /*!< @brief The cover art path to use, nil to use super*/ |
|---|
| 30 | NSImage *coverart; /*!< @brief The cover art as image data */ |
|---|
| 31 | } |
|---|
| 32 | |
|---|
| 33 | /*! |
|---|
| 34 | * @brief Creates a media with a URL. Compatibility with old calling mechanism |
|---|
| 35 | * |
|---|
| 36 | * @param url The url to use for this media. |
|---|
| 37 | * @return The media |
|---|
| 38 | */ |
|---|
| 39 | - (id)initWithMediaURL:(NSURL *)url; |
|---|
| 40 | |
|---|
| 41 | /*! |
|---|
| 42 | * @brief Set the resume time for the media |
|---|
| 43 | * |
|---|
| 44 | * @param time the time at which to resume |
|---|
| 45 | */ |
|---|
| 46 | - (void)setResumeTime:(unsigned int)time; |
|---|
| 47 | |
|---|
| 48 | /*! |
|---|
| 49 | * @brief Sets the image path for cover art so it can be displayed |
|---|
| 50 | * |
|---|
| 51 | * param path The path to the cover art |
|---|
| 52 | */ |
|---|
| 53 | - (void)setImagePath:(NSString *)path; |
|---|
| 54 | |
|---|
| 55 | /*! |
|---|
| 56 | * @brief Sets the image for cover art so it can be displayed |
|---|
| 57 | * |
|---|
| 58 | * param[in] image The cover art as an NSImage object |
|---|
| 59 | */ |
|---|
| 60 | - (void)setImage:(NSImage *)image; |
|---|
| 61 | |
|---|
| 62 | @end |
|---|