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
2996a461
Commit
2996a461
authored
Oct 09, 2009
by
Felix Paul Kühne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
osx/framework: allow VLCTime to handle int values
parent
390f573e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
0 deletions
+27
-0
projects/macosx/framework/Headers/Public/VLCTime.h
projects/macosx/framework/Headers/Public/VLCTime.h
+3
-0
projects/macosx/framework/Sources/VLCTime.m
projects/macosx/framework/Sources/VLCTime.m
+24
-0
No files found.
projects/macosx/framework/Headers/Public/VLCTime.h
View file @
2996a461
...
@@ -35,13 +35,16 @@
...
@@ -35,13 +35,16 @@
/* Factories */
/* Factories */
+
(
VLCTime
*
)
nullTime
;
+
(
VLCTime
*
)
nullTime
;
+
(
VLCTime
*
)
timeWithNumber
:(
NSNumber
*
)
aNumber
;
+
(
VLCTime
*
)
timeWithNumber
:(
NSNumber
*
)
aNumber
;
+
(
VLCTime
*
)
timeWithInt
:(
int
)
aInt
;
/* Initializers */
/* Initializers */
-
(
id
)
initWithNumber
:(
NSNumber
*
)
aNumber
;
-
(
id
)
initWithNumber
:(
NSNumber
*
)
aNumber
;
-
(
id
)
initWithInt
:(
int
)
aInt
;
/* Properties */
/* Properties */
@property
(
readonly
)
NSNumber
*
numberValue
;
@property
(
readonly
)
NSNumber
*
numberValue
;
@property
(
readonly
)
NSString
*
stringValue
;
@property
(
readonly
)
NSString
*
stringValue
;
@property
(
readonly
)
int
intValue
;
/* Comparitors */
/* Comparitors */
-
(
NSComparisonResult
)
compare
:(
VLCTime
*
)
aTime
;
-
(
NSComparisonResult
)
compare
:(
VLCTime
*
)
aTime
;
...
...
projects/macosx/framework/Sources/VLCTime.m
View file @
2996a461
...
@@ -39,6 +39,11 @@
...
@@ -39,6 +39,11 @@
return
[[[
VLCTime
alloc
]
initWithNumber
:
aNumber
]
autorelease
];
return
[[[
VLCTime
alloc
]
initWithNumber
:
aNumber
]
autorelease
];
}
}
+
(
VLCTime
*
)
timeWithInt
:(
int
)
aInt
{
return
[[[
VLCTime
alloc
]
initWithInt
:
aInt
]
autorelease
];
}
/* Initializers */
/* Initializers */
-
(
id
)
initWithNumber
:(
NSNumber
*
)
aNumber
-
(
id
)
initWithNumber
:(
NSNumber
*
)
aNumber
{
{
...
@@ -52,6 +57,18 @@
...
@@ -52,6 +57,18 @@
return
self
;
return
self
;
}
}
-
(
id
)
initWithInt
:(
int
)
aInt
{
if
(
self
=
[
super
init
])
{
if
(
aInt
)
value
=
[[
NSNumber
numberWithInt
:
aInt
]
retain
];
else
value
=
nil
;
}
return
self
;
}
-
(
void
)
dealloc
-
(
void
)
dealloc
{
{
[
value
release
];
[
value
release
];
...
@@ -100,6 +117,13 @@
...
@@ -100,6 +117,13 @@
}
}
}
}
-
(
int
)
intValue
{
if
(
value
)
return
[
value
intValue
];
return
0
;
}
-
(
NSComparisonResult
)
compare
:(
VLCTime
*
)
aTime
-
(
NSComparisonResult
)
compare
:(
VLCTime
*
)
aTime
{
{
if
(
!
aTime
&&
!
value
)
if
(
!
aTime
&&
!
value
)
...
...
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