Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc
Commits
a270b32b
Commit
a270b32b
authored
May 18, 2014
by
David Fuhrmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
macosx: lock access to addon_entry_t
parent
4a7e027c
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
47 additions
and
13 deletions
+47
-13
modules/gui/macosx/AddonListDataSource.h
modules/gui/macosx/AddonListDataSource.h
+1
-1
modules/gui/macosx/AddonListDataSource.m
modules/gui/macosx/AddonListDataSource.m
+36
-8
modules/gui/macosx/AddonManager.m
modules/gui/macosx/AddonManager.m
+10
-4
No files found.
modules/gui/macosx/AddonListDataSource.h
View file @
a270b32b
...
@@ -32,7 +32,7 @@
...
@@ -32,7 +32,7 @@
-
(
id
)
initWithAddon
:(
addon_entry_t
*
)
p_entry
;
-
(
id
)
initWithAddon
:(
addon_entry_t
*
)
p_entry
;
-
(
uint8_t
*
)
uuid
;
-
(
NSData
*
)
uuid
;
-
(
NSString
*
)
name
;
-
(
NSString
*
)
name
;
-
(
NSString
*
)
author
;
-
(
NSString
*
)
author
;
...
...
modules/gui/macosx/AddonListDataSource.m
View file @
a270b32b
...
@@ -43,38 +43,66 @@
...
@@ -43,38 +43,66 @@
[
super
dealloc
];
[
super
dealloc
];
}
}
-
(
uint8_t
*
)
uuid
-
(
NSData
*
)
uuid
{
{
return
p_addon_entry
->
uuid
;
vlc_mutex_lock
(
&
p_addon_entry
->
lock
);
NSData
*
o_uuid
=
[
NSData
dataWithBytes
:
p_addon_entry
->
uuid
length
:
sizeof
(
p_addon_entry
->
uuid
)];
vlc_mutex_unlock
(
&
p_addon_entry
->
lock
);
return
o_uuid
;
}
}
-
(
NSString
*
)
name
-
(
NSString
*
)
name
{
{
return
toNSStr
(
p_addon_entry
->
psz_name
);
vlc_mutex_lock
(
&
p_addon_entry
->
lock
);
NSString
*
o_str
=
toNSStr
(
p_addon_entry
->
psz_name
);
vlc_mutex_unlock
(
&
p_addon_entry
->
lock
);
return
o_str
;
}
}
-
(
NSString
*
)
author
-
(
NSString
*
)
author
{
{
return
toNSStr
(
p_addon_entry
->
psz_author
);
vlc_mutex_lock
(
&
p_addon_entry
->
lock
);
NSString
*
o_str
=
toNSStr
(
p_addon_entry
->
psz_author
);
vlc_mutex_unlock
(
&
p_addon_entry
->
lock
);
return
o_str
;
}
}
-
(
NSString
*
)
version
-
(
NSString
*
)
version
{
{
return
toNSStr
(
p_addon_entry
->
psz_version
);
vlc_mutex_lock
(
&
p_addon_entry
->
lock
);
NSString
*
o_str
=
toNSStr
(
p_addon_entry
->
psz_version
);
vlc_mutex_unlock
(
&
p_addon_entry
->
lock
);
return
o_str
;
}
}
-
(
NSString
*
)
description
-
(
NSString
*
)
description
{
{
return
toNSStr
(
p_addon_entry
->
psz_description
);
vlc_mutex_lock
(
&
p_addon_entry
->
lock
);
NSString
*
o_str
=
toNSStr
(
p_addon_entry
->
psz_description
);
vlc_mutex_unlock
(
&
p_addon_entry
->
lock
);
return
o_str
;
}
}
-
(
BOOL
)
isInstalled
-
(
BOOL
)
isInstalled
{
{
return
p_addon_entry
->
e_state
==
ADDON_INSTALLED
;
vlc_mutex_lock
(
&
p_addon_entry
->
lock
);
BOOL
b_installed
=
p_addon_entry
->
e_state
==
ADDON_INSTALLED
;
vlc_mutex_unlock
(
&
p_addon_entry
->
lock
);
return
b_installed
;
}
}
-
(
addon_type_t
)
type
-
(
addon_type_t
)
type
{
{
return
p_addon_entry
->
e_type
;
vlc_mutex_lock
(
&
p_addon_entry
->
lock
);
addon_type_t
type
=
p_addon_entry
->
e_type
;
vlc_mutex_unlock
(
&
p_addon_entry
->
lock
);
return
type
;
}
}
@end
@end
modules/gui/macosx/AddonManager.m
View file @
a270b32b
...
@@ -276,14 +276,20 @@ static VLCAddonManager *_o_sharedInstance = nil;
...
@@ -276,14 +276,20 @@ static VLCAddonManager *_o_sharedInstance = nil;
addons_manager_LoadCatalog
(
_manager
);
addons_manager_LoadCatalog
(
_manager
);
}
}
-
(
void
)
_installAddonWithID
:(
addon_uuid_t
)
addonid
-
(
void
)
_installAddonWithID
:(
NSData
*
)
o_data
{
{
addons_manager_Install
(
_manager
,
addonid
);
addon_uuid_t
uuid
;
[
o_data
getBytes
:
uuid
length
:
sizeof
(
uuid
)];
addons_manager_Install
(
_manager
,
uuid
);
}
}
-
(
void
)
_removeAddonWithID
:(
addon_uuid_t
)
addonid
-
(
void
)
_removeAddonWithID
:(
NSData
*
)
o_data
{
{
addons_manager_Remove
(
_manager
,
addonid
);
addon_uuid_t
uuid
;
[
o_data
getBytes
:
uuid
length
:
sizeof
(
uuid
)];
addons_manager_Remove
(
_manager
,
uuid
);
}
}
-
(
NSString
*
)
_getAddonType
:(
int
)
i_type
-
(
NSString
*
)
_getAddonType
:(
int
)
i_type
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment