1 /*****************************************************************************
2 * AddonListDataSource.m: Addons manager for the Mac
3 ****************************************************************************
4 * Copyright (C) 2014 VideoLAN and authors
5 * Authors: Felix Paul Kühne <fkuehne # videolan.org>
6 * David Fuhrmann <dfuhrmann # videolan.org>
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
21 *****************************************************************************/
24 #import "AddonListDataSource.h"
25 #import "StringUtility.h"
27 @implementation VLCAddon
29 - (id)initWithAddon:(addon_entry_t *)p_entry
33 p_addon_entry = addon_entry_Hold(p_entry);
41 addon_entry_Release(p_addon_entry);
48 vlc_mutex_lock(&p_addon_entry->lock);
49 NSData *o_uuid = [NSData dataWithBytes:p_addon_entry->uuid length:sizeof(p_addon_entry->uuid)];
50 vlc_mutex_unlock(&p_addon_entry->lock);
57 vlc_mutex_lock(&p_addon_entry->lock);
58 NSString *o_str = toNSStr(p_addon_entry->psz_name);
59 vlc_mutex_unlock(&p_addon_entry->lock);
65 vlc_mutex_lock(&p_addon_entry->lock);
66 NSString *o_str = toNSStr(p_addon_entry->psz_author);
67 vlc_mutex_unlock(&p_addon_entry->lock);
74 vlc_mutex_lock(&p_addon_entry->lock);
75 NSString *o_str = toNSStr(p_addon_entry->psz_version);
76 vlc_mutex_unlock(&p_addon_entry->lock);
81 - (NSString *)description
83 vlc_mutex_lock(&p_addon_entry->lock);
84 NSString *o_str = toNSStr(p_addon_entry->psz_description);
85 vlc_mutex_unlock(&p_addon_entry->lock);
92 vlc_mutex_lock(&p_addon_entry->lock);
93 BOOL b_installed = p_addon_entry->e_state == ADDON_INSTALLED;
94 vlc_mutex_unlock(&p_addon_entry->lock);
101 vlc_mutex_lock(&p_addon_entry->lock);
102 addon_type_t type = p_addon_entry->e_type;
103 vlc_mutex_unlock(&p_addon_entry->lock);