Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Open sidebar
VideoLAN
medialibrary
Commits
599674e4
Commit
599674e4
authored
Oct 01, 2015
by
Hugo Beauzée-Luyssen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
IFile: Rename "ready" into "parsed"
A file is now always "ready" in the sense that is always has a type
parent
68abcae2
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
11 additions
and
8 deletions
+11
-8
include/IFile.h
include/IFile.h
+6
-3
src/File.cpp
src/File.cpp
+2
-2
src/File.h
src/File.h
+2
-2
src/Parser.cpp
src/Parser.cpp
+1
-1
No files found.
include/IFile.h
View file @
599674e4
...
...
@@ -50,9 +50,12 @@ class IFile
/// Returns wether the file has been added as a stand alone file (true), or as
/// part of a folder (false)
virtual
bool
isStandAlone
()
=
0
;
/// Explicitely mark a file as "ready" (meaning all required metadata have been parsed)
virtual
bool
setReady
()
=
0
;
virtual
bool
isReady
()
const
=
0
;
/// Explicitely mark a file as fully parsed, meaning no metadata service needs to run anymore.
//FIXME: This lacks granularity as we don't have a straight forward way to know which service
//needs to run or not.
virtual
bool
markParsed
()
=
0
;
virtual
bool
isParsed
()
const
=
0
;
virtual
unsigned
int
lastModificationDate
()
=
0
;
};
...
...
src/File.cpp
View file @
599674e4
...
...
@@ -227,12 +227,12 @@ unsigned int File::lastModificationDate()
return
m_lastModificationDate
;
}
bool
File
::
is
Ready
()
const
bool
File
::
is
Parsed
()
const
{
return
m_isParsed
;
}
bool
File
::
setReady
()
bool
File
::
markParsed
()
{
if
(
m_isParsed
==
true
)
return
true
;
...
...
src/File.h
View file @
599674e4
...
...
@@ -72,8 +72,8 @@ class File : public IFile, public Cache<File, IFile, policy::FileTable, policy::
virtual
bool
isStandAlone
()
override
;
virtual
unsigned
int
lastModificationDate
()
override
;
virtual
bool
isReady
()
const
;
bool
setReady
()
;
virtual
bool
markParsed
()
override
;
virtual
bool
isParsed
()
const
override
;
private:
DBConnection
m_dbConnection
;
...
...
src/Parser.cpp
View file @
599674e4
...
...
@@ -94,7 +94,7 @@ void Parser::done( FilePtr file, ServiceStatus status, void* data )
++
t
->
it
;
if
(
t
->
it
==
t
->
end
)
{
file
->
setReady
();
file
->
markParsed
();
delete
t
;
return
;
}
...
...
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