<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> <title>Barry: Barry::Sync::vTimeConverter Class Reference</title> <link href="tabs.css" rel="stylesheet" type="text/css"/> <link href="doxygen.css" rel="stylesheet" type="text/css"/> </head> <body> <!-- Generated by Doxygen 1.6.2-20100208 --> <div class="navigation" id="top"> <div class="tabs"> <ul> <li><a href="index.html"><span>Main Page</span></a></li> <li><a href="modules.html"><span>Modules</span></a></li> <li><a href="namespaces.html"><span>Namespaces</span></a></li> <li class="current"><a href="annotated.html"><span>Classes</span></a></li> <li><a href="files.html"><span>Files</span></a></li> <li><a href="dirs.html"><span>Directories</span></a></li> </ul> </div> <div class="tabs"> <ul> <li><a href="annotated.html"><span>Class List</span></a></li> <li><a href="classes.html"><span>Class Index</span></a></li> <li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li> <li><a href="functions.html"><span>Class Members</span></a></li> </ul> </div> <div class="navpath"><a class="el" href="namespaceBarry.html">Barry</a>::<b>Sync</b>::<a class="el" href="classBarry_1_1Sync_1_1vTimeConverter.html">vTimeConverter</a> </div> </div> <div class="contents"> <h1>Barry::Sync::vTimeConverter Class Reference</h1><!-- doxytag: class="Barry::Sync::vTimeConverter" --> <p>A virtual base class that the plugins may override, to do time related conversions. <a href="#_details">More...</a></p> <p><code>#include <<a class="el" href="vbase_8h_source.html">vbase.h</a>></code></p> <p><a href="classBarry_1_1Sync_1_1vTimeConverter-members.html">List of all members.</a></p> <table border="0" cellpadding="0" cellspacing="0"> <tr><td colspan="2"><h2>Public Member Functions</h2></td></tr> <tr><td class="memItemLeft" align="right" valign="top">virtual std::string </td><td class="memItemRight" valign="bottom"><a class="el" href="classBarry_1_1Sync_1_1vTimeConverter.html#a42139cdc07f1695f605e15ad1a7c08aa">unix2vtime</a> (const time_t *timestamp)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Convert a time_t into an ISO timestamp string Throws <a class="el" href="classBarry_1_1ConvertError.html" title="Thrown by the vformat related barrysync library classes.">Barry::ConvertError</a> on error, but these errors must be rare. <a href="#a42139cdc07f1695f605e15ad1a7c08aa"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">virtual time_t </td><td class="memItemRight" valign="bottom"><a class="el" href="classBarry_1_1Sync_1_1vTimeConverter.html#a231567ee26a99891dd04f9b4635c702d">vtime2unix</a> (const char *vtime)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Convert an ISO timestamp string into a time_t, using the current system timezone if vtime is not in UTC. <a href="#a231567ee26a99891dd04f9b4635c702d"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">virtual int </td><td class="memItemRight" valign="bottom"><a class="el" href="classBarry_1_1Sync_1_1vTimeConverter.html#a054d690d23c17d0ade9f2640128e5aa2">alarmduration2sec</a> (const char *alarm)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Convert a VEVENT alarm duration string in the format of "[+-]P.W.DT.H.M.S" where the periods represent numbers and each letter besides P and T represent Week, Day, Hour, Minute, and Second respectively. <a href="#a054d690d23c17d0ade9f2640128e5aa2"></a><br/></td></tr> </table> <hr/><a name="_details"></a><h2>Detailed Description</h2> <p>A virtual base class that the plugins may override, to do time related conversions. </p> <p>Default implementations for these functions are provided, but may be overrided depending on need.</p> <p>We do this in a "callback" style, so that it doesn't matter what version of the opensync library we link against, in case the user wishes to use the opensync time functions. </p> <p>Definition at line <a class="el" href="vbase_8h_source.html#l00044">44</a> of file <a class="el" href="vbase_8h_source.html">vbase.h</a>.</p> <hr/><h2>Member Function Documentation</h2> <a class="anchor" id="a054d690d23c17d0ade9f2640128e5aa2"></a><!-- doxytag: member="Barry::Sync::vTimeConverter::alarmduration2sec" ref="a054d690d23c17d0ade9f2640128e5aa2" args="(const char *alarm)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">int Barry::Sync::vTimeConverter::alarmduration2sec </td> <td>(</td> <td class="paramtype">const char * </td> <td class="paramname"> <em>alarm</em></td> <td> ) </td> <td><code> [virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Convert a VEVENT alarm duration string in the format of "[+-]P.W.DT.H.M.S" where the periods represent numbers and each letter besides P and T represent Week, Day, Hour, Minute, and Second respectively. </p> <p>Definition at line <a class="el" href="vbase_8cc_source.html#l00072">72</a> of file <a class="el" href="vbase_8cc_source.html">vbase.cc</a>.</p> </div> </div> <a class="anchor" id="a42139cdc07f1695f605e15ad1a7c08aa"></a><!-- doxytag: member="Barry::Sync::vTimeConverter::unix2vtime" ref="a42139cdc07f1695f605e15ad1a7c08aa" args="(const time_t *timestamp)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">std::string Barry::Sync::vTimeConverter::unix2vtime </td> <td>(</td> <td class="paramtype">const time_t * </td> <td class="paramname"> <em>timestamp</em></td> <td> ) </td> <td><code> [virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Convert a time_t into an ISO timestamp string Throws <a class="el" href="classBarry_1_1ConvertError.html" title="Thrown by the vformat related barrysync library classes.">Barry::ConvertError</a> on error, but these errors must be rare. </p> <p>Definition at line <a class="el" href="vbase_8cc_source.html#l00040">40</a> of file <a class="el" href="vbase_8cc_source.html">vbase.cc</a>.</p> </div> </div> <a class="anchor" id="a231567ee26a99891dd04f9b4635c702d"></a><!-- doxytag: member="Barry::Sync::vTimeConverter::vtime2unix" ref="a231567ee26a99891dd04f9b4635c702d" args="(const char *vtime)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">time_t Barry::Sync::vTimeConverter::vtime2unix </td> <td>(</td> <td class="paramtype">const char * </td> <td class="paramname"> <em>vtime</em></td> <td> ) </td> <td><code> [virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Convert an ISO timestamp string into a time_t, using the current system timezone if vtime is not in UTC. </p> <p>Returns (time_t)-1 on error. </p> <p>Definition at line <a class="el" href="vbase_8cc_source.html#l00056">56</a> of file <a class="el" href="vbase_8cc_source.html">vbase.cc</a>.</p> <p>References <a class="el" href="tzwrapper_8cc_source.html#l00107">Barry::Sync::TzWrapper::iso_mktime()</a>.</p> <p><div class="dynheader"> Here is the call graph for this function:</div> <div class="dynsection"> <div class="center"><img src="classBarry_1_1Sync_1_1vTimeConverter_a231567ee26a99891dd04f9b4635c702d_cgraph.png" border="0" usemap="#classBarry_1_1Sync_1_1vTimeConverter_a231567ee26a99891dd04f9b4635c702d_cgraph_map" alt=""></div> <map name="classBarry_1_1Sync_1_1vTimeConverter_a231567ee26a99891dd04f9b4635c702d_cgraph_map" id="classBarry_1_1Sync_1_1vTimeConverter_a231567ee26a99891dd04f9b4635c702d_cgraph"> <area shape="rect" id="node3" href="classBarry_1_1Sync_1_1TzWrapper.html#ac1524071e5a61fa789331c9784b6093d" title="Converts an ISO timestamp (YYYYMMDDTHHMMWW[Z]) into a unix time_t." alt="" coords="324,5,564,35"/><area shape="rect" id="node5" href="classBarry_1_1Sync_1_1TzWrapper.html#aab3349c356c87e37d41841d78fd8f227" title="Set timezone to UTC." alt="" coords="613,5,835,35"/></map> </div> </p> </div> </div> <hr/>The documentation for this class was generated from the following files:<ul> <li><a class="el" href="vbase_8h_source.html">vbase.h</a></li> <li><a class="el" href="vbase_8cc_source.html">vbase.cc</a></li> </ul> </div> <hr class="footer"/><address style="text-align: right;"><small>Generated by <a href="http://www.doxygen.org/index.html"> <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.2-20100208 </small></address> </body> </html>