mirror of https://github.com/kiwix/libkiwix.git
Reorder methods to get metadata.
Use the same order than https://wiki.openzim.org/wiki/Metadata
This commit is contained in:
parent
651cb9165c
commit
420be55bfa
|
@ -160,6 +160,13 @@ class Reader
|
||||||
*/
|
*/
|
||||||
bool getMetatag(const string& name, string& value) const;
|
bool getMetatag(const string& name, string& value) const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the name of the zim file.
|
||||||
|
*
|
||||||
|
* @return The name of the zim file as specified in the zim metadata.
|
||||||
|
*/
|
||||||
|
string getName() const;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the title of the zim file.
|
* Get the title of the zim file.
|
||||||
*
|
*
|
||||||
|
@ -169,6 +176,27 @@ class Reader
|
||||||
*/
|
*/
|
||||||
string getTitle() const;
|
string getTitle() const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the creator of the zim file.
|
||||||
|
*
|
||||||
|
* @return The creator of the zim file as specified in the zim metadata.
|
||||||
|
*/
|
||||||
|
string getCreator() const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the publisher of the zim file.
|
||||||
|
*
|
||||||
|
* @return The publisher of the zim file as specified in the zim metadata.
|
||||||
|
*/
|
||||||
|
string getPublisher() const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the date of the zim file.
|
||||||
|
*
|
||||||
|
* @return The date of the zim file as specified in the zim metadata.
|
||||||
|
*/
|
||||||
|
string getDate() const;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the description of the zim file.
|
* Get the description of the zim file.
|
||||||
*
|
*
|
||||||
|
@ -184,13 +212,6 @@ class Reader
|
||||||
*/
|
*/
|
||||||
string getLanguage() const;
|
string getLanguage() const;
|
||||||
|
|
||||||
/**
|
|
||||||
* Get the name of the zim file.
|
|
||||||
*
|
|
||||||
* @return The name of the zim file as specified in the zim metadata.
|
|
||||||
*/
|
|
||||||
string getName() const;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the tags of the zim file.
|
* Get the tags of the zim file.
|
||||||
*
|
*
|
||||||
|
@ -198,27 +219,6 @@ class Reader
|
||||||
*/
|
*/
|
||||||
string getTags() const;
|
string getTags() const;
|
||||||
|
|
||||||
/**
|
|
||||||
* Get the date of the zim file.
|
|
||||||
*
|
|
||||||
* @return The date of the zim file as specified in the zim metadata.
|
|
||||||
*/
|
|
||||||
string getDate() const;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Get the creator of the zim file.
|
|
||||||
*
|
|
||||||
* @return The creator of the zim file as specified in the zim metadata.
|
|
||||||
*/
|
|
||||||
string getCreator() const;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Get the publisher of the zim file.
|
|
||||||
*
|
|
||||||
* @return The publisher of the zim file as specified in the zim metadata.
|
|
||||||
*/
|
|
||||||
string getPublisher() const;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the origId of the zim file.
|
* Get the origId of the zim file.
|
||||||
*
|
*
|
||||||
|
|
|
@ -289,6 +289,13 @@ bool Reader::getMetatag(const string& name, string& value) const
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
string Reader::getName() const
|
||||||
|
{
|
||||||
|
string value;
|
||||||
|
this->getMetatag("Name", value);
|
||||||
|
return value;
|
||||||
|
}
|
||||||
|
|
||||||
string Reader::getTitle() const
|
string Reader::getTitle() const
|
||||||
{
|
{
|
||||||
string value;
|
string value;
|
||||||
|
@ -302,17 +309,24 @@ string Reader::getTitle() const
|
||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
|
|
||||||
string Reader::getName() const
|
string Reader::getCreator() const
|
||||||
{
|
{
|
||||||
string value;
|
string value;
|
||||||
this->getMetatag("Name", value);
|
this->getMetatag("Creator", value);
|
||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
|
|
||||||
string Reader::getTags() const
|
string Reader::getPublisher() const
|
||||||
{
|
{
|
||||||
string value;
|
string value;
|
||||||
this->getMetatag("Tags", value);
|
this->getMetatag("Publisher", value);
|
||||||
|
return value;
|
||||||
|
}
|
||||||
|
|
||||||
|
string Reader::getDate() const
|
||||||
|
{
|
||||||
|
string value;
|
||||||
|
this->getMetatag("Date", value);
|
||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -336,24 +350,10 @@ string Reader::getLanguage() const
|
||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
|
|
||||||
string Reader::getDate() const
|
string Reader::getTags() const
|
||||||
{
|
{
|
||||||
string value;
|
string value;
|
||||||
this->getMetatag("Date", value);
|
this->getMetatag("Tags", value);
|
||||||
return value;
|
|
||||||
}
|
|
||||||
|
|
||||||
string Reader::getCreator() const
|
|
||||||
{
|
|
||||||
string value;
|
|
||||||
this->getMetatag("Creator", value);
|
|
||||||
return value;
|
|
||||||
}
|
|
||||||
|
|
||||||
string Reader::getPublisher() const
|
|
||||||
{
|
|
||||||
string value;
|
|
||||||
this->getMetatag("Publisher", value);
|
|
||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue