kodi
MediaBrowserWrapper.h
1 /*****************************************************************
2 |
3 | Platinum - Media Browser Wrapper
4 |
5 | Copyright (c) 2004-2008, Plutinosoft, LLC.
6 | All rights reserved.
7 | http://www.plutinosoft.com
8 |
9 | This program is free software; you can redistribute it and/or
10 | modify it under the terms of the GNU General Public License
11 | as published by the Free Software Foundation; either version 2
12 | of the License, or (at your option) any later version.
13 |
14 | OEMs, ISVs, VARs and other distributors that combine and
15 | distribute commercially licensed software with Platinum software
16 | and do not wish to distribute the source code for the commercially
17 | licensed software under version 2, or (at your option) any later
18 | version, of the GNU General Public License (the "GPL") must enter
19 | into a commercial license agreement with Plutinosoft, LLC.
20 | licensing@plutinosoft.com
21 |
22 | This program is distributed in the hope that it will be useful,
23 | but WITHOUT ANY WARRANTY; without even the implied warranty of
24 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
25 | GNU General Public License for more details.
26 |
27 | You should have received a copy of the GNU General Public License
28 | along with this program; see the file LICENSE.txt. If not, write to
29 | the Free Software Foundation, Inc.,
30 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
31 | http://www.gnu.org/licenses/gpl-2.0.html
32 |
33 ****************************************************************/
34 
35 /*----------------------------------------------------------------------
36 | includes
37 +---------------------------------------------------------------------*/
38 #import <Platinum/Platinum.h>
39 
40 /*----------------------------------------------------------------------
41 | DiscoveryWrapper
42 +---------------------------------------------------------------------*/
43 @interface DiscoveryWrapper : NSObject
44 {
45  @public
47  bool added;
48 }
49 @end
50 
51 /*----------------------------------------------------------------------
52 | BrowseResponseWrapper
53 +---------------------------------------------------------------------*/
54 @interface BrowseResponseWrapper : NSObject
55 {
56  @public
57  NPT_Result res;
59  PLT_BrowseInfo *info;
60  void *userdata;
61 }
62 @end
63 
64 /*----------------------------------------------------------------------
65 | MediaBrowserDelegate interface
66 +---------------------------------------------------------------------*/
68 
69 -(void) handleDiscovery: (DiscoveryWrapper*) wrapper;
70 -(void) handleBrowseResponse: (BrowseResponseWrapper*) wrapper;
71 
72 @end
73 
74 /*----------------------------------------------------------------------
75 | PLT_MediaBrowserWrapper class
76 +---------------------------------------------------------------------*/
79 {
80 public:
82  virtual ~PLT_MediaBrowserWrapper();
83 
84  // public methods
85  virtual void SetWrapperDelegate(id delegate) { m_WrapperDelegate = delegate; }
86 
87  // PLT_MediaBrowserDelegate methods
88  bool OnMSAdded(PLT_DeviceDataReference& device);
89  void OnMSRemoved(PLT_DeviceDataReference& device);
90  void OnBrowseResult(NPT_Result res,
91  PLT_DeviceDataReference& device,
92  PLT_BrowseInfo* info,
93  void* userdata);
94 
95 private:
96  void NotifyAddedRemoved(PLT_DeviceDataReference& device,
97  bool added);
98 
99 private:
100  id m_WrapperDelegate;
101 };
Definition: MediaBrowserWrapper.h:67
The PLT_MediaBrowser class implements a UPnP AV Media Server control point.
Definition: PltMediaBrowser.h:114
Definition: MediaBrowserWrapper.h:54
The PLT_BrowseInfo struct is used to marshall Browse or Search action response results across differe...
Definition: PltMediaBrowser.h:55
Definition: MediaBrowserWrapper.h:77
The PLT_MediaBrowserDelegate class is an interface for receiving PLT_MediaBrowser events or action re...
Definition: PltMediaBrowser.h:71
Definition: MediaBrowserWrapper.h:43