blob: 5947c8591ad1c6b63d52fdf884d199eff00d27d9 [file] [log] [blame]
<!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"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.5"/>
<title>Apache Mesos: src/version/version.hpp Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td style="padding-left: 0.5em;">
<div id="projectname">Apache Mesos
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.5 -->
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="index.html"><span>Main&#160;Page</span></a></li>
<li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
<li><a href="namespaces.html"><span>Namespaces</span></a></li>
<li><a href="annotated.html"><span>Classes</span></a></li>
<li class="current"><a href="files.html"><span>Files</span></a></li>
<li><a href="examples.html"><span>Examples</span></a></li>
</ul>
</div>
<div id="navrow2" class="tabs2">
<ul class="tablist">
<li><a href="files.html"><span>File&#160;List</span></a></li>
<li><a href="globals.html"><span>File&#160;Members</span></a></li>
</ul>
</div>
<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a class="el" href="dir_f208d550dbffb9fb7a9061b68ff675d7.html">version</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="headertitle">
<div class="title">version.hpp</div> </div>
</div><!--header-->
<div class="contents">
<a href="src_2version_2version_8hpp.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span>&#160;<span class="comment">// Licensed to the Apache Software Foundation (ASF) under one</span></div>
<div class="line"><a name="l00002"></a><span class="lineno"> 2</span>&#160;<span class="comment">// or more contributor license agreements. See the NOTICE file</span></div>
<div class="line"><a name="l00003"></a><span class="lineno"> 3</span>&#160;<span class="comment">// distributed with this work for additional information</span></div>
<div class="line"><a name="l00004"></a><span class="lineno"> 4</span>&#160;<span class="comment">// regarding copyright ownership. The ASF licenses this file</span></div>
<div class="line"><a name="l00005"></a><span class="lineno"> 5</span>&#160;<span class="comment">// to you under the Apache License, Version 2.0 (the</span></div>
<div class="line"><a name="l00006"></a><span class="lineno"> 6</span>&#160;<span class="comment">// &quot;License&quot;); you may not use this file except in compliance</span></div>
<div class="line"><a name="l00007"></a><span class="lineno"> 7</span>&#160;<span class="comment">// with the License. You may obtain a copy of the License at</span></div>
<div class="line"><a name="l00008"></a><span class="lineno"> 8</span>&#160;<span class="comment">//</span></div>
<div class="line"><a name="l00009"></a><span class="lineno"> 9</span>&#160;<span class="comment">// http://www.apache.org/licenses/LICENSE-2.0</span></div>
<div class="line"><a name="l00010"></a><span class="lineno"> 10</span>&#160;<span class="comment">//</span></div>
<div class="line"><a name="l00011"></a><span class="lineno"> 11</span>&#160;<span class="comment">// Unless required by applicable law or agreed to in writing, software</span></div>
<div class="line"><a name="l00012"></a><span class="lineno"> 12</span>&#160;<span class="comment">// distributed under the License is distributed on an &quot;AS IS&quot; BASIS,</span></div>
<div class="line"><a name="l00013"></a><span class="lineno"> 13</span>&#160;<span class="comment">// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.</span></div>
<div class="line"><a name="l00014"></a><span class="lineno"> 14</span>&#160;<span class="comment">// See the License for the specific language governing permissions and</span></div>
<div class="line"><a name="l00015"></a><span class="lineno"> 15</span>&#160;<span class="comment">// limitations under the License.</span></div>
<div class="line"><a name="l00016"></a><span class="lineno"> 16</span>&#160;</div>
<div class="line"><a name="l00017"></a><span class="lineno"> 17</span>&#160;<span class="preprocessor">#ifndef __VERSION_HPP__</span></div>
<div class="line"><a name="l00018"></a><span class="lineno"> 18</span>&#160;<span class="preprocessor"></span><span class="preprocessor">#define __VERSION_HPP__</span></div>
<div class="line"><a name="l00019"></a><span class="lineno"> 19</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l00020"></a><span class="lineno"> 20</span>&#160;<span class="preprocessor">#include &lt;string&gt;</span></div>
<div class="line"><a name="l00021"></a><span class="lineno"> 21</span>&#160;</div>
<div class="line"><a name="l00022"></a><span class="lineno"> 22</span>&#160;<span class="preprocessor">#include &lt;<a class="code" href="future_8hpp.html">process/future.hpp</a>&gt;</span></div>
<div class="line"><a name="l00023"></a><span class="lineno"> 23</span>&#160;<span class="preprocessor">#include &lt;<a class="code" href="3rdparty_2libprocess_2include_2process_2http_8hpp.html">process/http.hpp</a>&gt;</span></div>
<div class="line"><a name="l00024"></a><span class="lineno"> 24</span>&#160;<span class="preprocessor">#include &lt;<a class="code" href="libprocess_2include_2process_2process_8hpp.html">process/process.hpp</a>&gt;</span></div>
<div class="line"><a name="l00025"></a><span class="lineno"> 25</span>&#160;</div>
<div class="line"><a name="l00026"></a><span class="lineno"> 26</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="build_8hpp.html">common/build.hpp</a>&quot;</span></div>
<div class="line"><a name="l00027"></a><span class="lineno"> 27</span>&#160;</div>
<div class="line"><a name="l00028"></a><span class="lineno"> 28</span>&#160;<span class="keyword">namespace </span>mesos {</div>
<div class="line"><a name="l00029"></a><span class="lineno"> 29</span>&#160;<span class="keyword">namespace </span>internal {</div>
<div class="line"><a name="l00030"></a><span class="lineno"> 30</span>&#160;</div>
<div class="line"><a name="l00031"></a><span class="lineno"> 31</span>&#160;<span class="comment">// Helper function to return Mesos version.</span></div>
<div class="line"><a name="l00032"></a><span class="lineno"><a class="line" href="namespacemesos_1_1internal.html#a4311a7bd3d79fd1225d08444f8ff758a"> 32</a></span>&#160;<span class="keyword">inline</span> <a class="code" href="structJSON_1_1Object.html">JSON::Object</a> <a class="code" href="namespacemesos_1_1internal.html#a4311a7bd3d79fd1225d08444f8ff758a">version</a>()</div>
<div class="line"><a name="l00033"></a><span class="lineno"> 33</span>&#160;{</div>
<div class="line"><a name="l00034"></a><span class="lineno"> 34</span>&#160; <a class="code" href="structJSON_1_1Object.html">JSON::Object</a> object;</div>
<div class="line"><a name="l00035"></a><span class="lineno"> 35</span>&#160; <span class="keywordtype">object</span>.<a class="code" href="structJSON_1_1Object.html#a41bbf967d564eb3f57c2bb5453a0e7af">values</a>[<span class="stringliteral">&quot;version&quot;</span>] = MESOS_VERSION;</div>
<div class="line"><a name="l00036"></a><span class="lineno"> 36</span>&#160;</div>
<div class="line"><a name="l00037"></a><span class="lineno"> 37</span>&#160; <span class="keywordflow">if</span> (<a class="code" href="namespacemesos_1_1internal_1_1build.html#ac100c57fe8d1090b0117fd1f26fcf730">build::GIT_SHA</a>.isSome()) {</div>
<div class="line"><a name="l00038"></a><span class="lineno"> 38</span>&#160; <span class="keywordtype">object</span>.values[<span class="stringliteral">&quot;git_sha&quot;</span>] = <a class="code" href="namespacemesos_1_1internal_1_1build.html#ac100c57fe8d1090b0117fd1f26fcf730">build::GIT_SHA</a>.<a class="code" href="classOption.html#a21358442c0fac1cc978a67a9a9089a79">get</a>();</div>
<div class="line"><a name="l00039"></a><span class="lineno"> 39</span>&#160; }</div>
<div class="line"><a name="l00040"></a><span class="lineno"> 40</span>&#160;</div>
<div class="line"><a name="l00041"></a><span class="lineno"> 41</span>&#160; <span class="keywordflow">if</span> (<a class="code" href="namespacemesos_1_1internal_1_1build.html#acb7d084d37c709bfa87207ba1b5be465">build::GIT_BRANCH</a>.isSome()) {</div>
<div class="line"><a name="l00042"></a><span class="lineno"> 42</span>&#160; <span class="keywordtype">object</span>.values[<span class="stringliteral">&quot;git_branch&quot;</span>] = <a class="code" href="namespacemesos_1_1internal_1_1build.html#acb7d084d37c709bfa87207ba1b5be465">build::GIT_BRANCH</a>.<a class="code" href="classOption.html#a21358442c0fac1cc978a67a9a9089a79">get</a>();</div>
<div class="line"><a name="l00043"></a><span class="lineno"> 43</span>&#160; }</div>
<div class="line"><a name="l00044"></a><span class="lineno"> 44</span>&#160;</div>
<div class="line"><a name="l00045"></a><span class="lineno"> 45</span>&#160; <span class="keywordflow">if</span> (<a class="code" href="namespacemesos_1_1internal_1_1build.html#acb25c3d04299afc5daa3a7218f5e09d4">build::GIT_TAG</a>.isSome()) {</div>
<div class="line"><a name="l00046"></a><span class="lineno"> 46</span>&#160; <span class="keywordtype">object</span>.values[<span class="stringliteral">&quot;git_tag&quot;</span>] = <a class="code" href="namespacemesos_1_1internal_1_1build.html#acb25c3d04299afc5daa3a7218f5e09d4">build::GIT_TAG</a>.<a class="code" href="classOption.html#a21358442c0fac1cc978a67a9a9089a79">get</a>();</div>
<div class="line"><a name="l00047"></a><span class="lineno"> 47</span>&#160; }</div>
<div class="line"><a name="l00048"></a><span class="lineno"> 48</span>&#160;</div>
<div class="line"><a name="l00049"></a><span class="lineno"> 49</span>&#160; <span class="keywordtype">object</span>.values[<span class="stringliteral">&quot;build_date&quot;</span>] = <a class="code" href="namespacemesos_1_1internal_1_1build.html#a815dab7636e7ddbb6ede2493d9b3f40f">build::DATE</a>;</div>
<div class="line"><a name="l00050"></a><span class="lineno"> 50</span>&#160; <span class="keywordtype">object</span>.values[<span class="stringliteral">&quot;build_time&quot;</span>] = <a class="code" href="namespacemesos_1_1internal_1_1build.html#aa79f42728c96cf89104ff674afd449ef">build::TIME</a>;</div>
<div class="line"><a name="l00051"></a><span class="lineno"> 51</span>&#160; <span class="keywordtype">object</span>.values[<span class="stringliteral">&quot;build_user&quot;</span>] = <a class="code" href="namespacemesos_1_1internal_1_1build.html#a990aa9342d17028bb8dbce24b4e9ef10">build::USER</a>;</div>
<div class="line"><a name="l00052"></a><span class="lineno"> 52</span>&#160;</div>
<div class="line"><a name="l00053"></a><span class="lineno"> 53</span>&#160; <span class="keywordflow">return</span> object;</div>
<div class="line"><a name="l00054"></a><span class="lineno"> 54</span>&#160;}</div>
<div class="line"><a name="l00055"></a><span class="lineno"> 55</span>&#160;</div>
<div class="line"><a name="l00056"></a><span class="lineno"> 56</span>&#160;</div>
<div class="line"><a name="l00057"></a><span class="lineno"><a class="line" href="classmesos_1_1internal_1_1VersionProcess.html"> 57</a></span>&#160;<span class="keyword">class </span><a class="code" href="classmesos_1_1internal_1_1VersionProcess.html">VersionProcess</a> : <span class="keyword">public</span> <a class="code" href="classprocess_1_1Process.html">process::Process</a>&lt;VersionProcess&gt;</div>
<div class="line"><a name="l00058"></a><span class="lineno"> 58</span>&#160;{</div>
<div class="line"><a name="l00059"></a><span class="lineno"> 59</span>&#160;<span class="keyword">public</span>:</div>
<div class="line"><a name="l00060"></a><span class="lineno"> 60</span>&#160; <a class="code" href="classmesos_1_1internal_1_1VersionProcess.html#a9b450b8bfc7cacfae7173b374536968a">VersionProcess</a>();</div>
<div class="line"><a name="l00061"></a><span class="lineno"> 61</span>&#160;</div>
<div class="line"><a name="l00062"></a><span class="lineno"> 62</span>&#160;<span class="keyword">protected</span>:</div>
<div class="line"><a name="l00063"></a><span class="lineno"> 63</span>&#160; <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classmesos_1_1internal_1_1VersionProcess.html#a1f0746cf6e384fc26bfd7e892fa464c2">initialize</a>();</div>
<div class="line"><a name="l00064"></a><span class="lineno"> 64</span>&#160;</div>
<div class="line"><a name="l00065"></a><span class="lineno"> 65</span>&#160;<span class="keyword">private</span>:</div>
<div class="line"><a name="l00066"></a><span class="lineno"> 66</span>&#160; <span class="keyword">static</span> <a class="code" href="classprocess_1_1Future.html">process::Future&lt;process::http::Response&gt;</a> version(</div>
<div class="line"><a name="l00067"></a><span class="lineno"> 67</span>&#160; <span class="keyword">const</span> <a class="code" href="structprocess_1_1http_1_1Request.html">process::http::Request</a>&amp; <a class="code" href="namespaceprocess_1_1http.html#ad8f400b5e54038df7e5662ec35da05fa">request</a>);</div>
<div class="line"><a name="l00068"></a><span class="lineno"> 68</span>&#160;};</div>
<div class="line"><a name="l00069"></a><span class="lineno"> 69</span>&#160;</div>
<div class="line"><a name="l00070"></a><span class="lineno"> 70</span>&#160;} <span class="comment">// namespace internal {</span></div>
<div class="line"><a name="l00071"></a><span class="lineno"> 71</span>&#160;} <span class="comment">// namespace mesos {</span></div>
<div class="line"><a name="l00072"></a><span class="lineno"> 72</span>&#160;</div>
<div class="line"><a name="l00073"></a><span class="lineno"> 73</span>&#160;<span class="preprocessor">#endif // __VERSION_HPP__</span></div>
<div class="ttc" id="namespaceprocess_1_1http_html_ad8f400b5e54038df7e5662ec35da05fa"><div class="ttname"><a href="namespaceprocess_1_1http.html#ad8f400b5e54038df7e5662ec35da05fa">process::http::request</a></div><div class="ttdeci">Future&lt; Response &gt; request(const Request &amp;request, bool streamedResponse=false)</div><div class="ttdoc">Asynchronously sends an HTTP request to the process and returns the HTTP response once the entire res...</div></div>
<div class="ttc" id="namespacemesos_1_1internal_1_1build_html_a990aa9342d17028bb8dbce24b4e9ef10"><div class="ttname"><a href="namespacemesos_1_1internal_1_1build.html#a990aa9342d17028bb8dbce24b4e9ef10">mesos::internal::build::USER</a></div><div class="ttdeci">const std::string USER</div></div>
<div class="ttc" id="build_8hpp_html"><div class="ttname"><a href="build_8hpp.html">build.hpp</a></div></div>
<div class="ttc" id="namespacemesos_1_1internal_1_1build_html_aa79f42728c96cf89104ff674afd449ef"><div class="ttname"><a href="namespacemesos_1_1internal_1_1build.html#aa79f42728c96cf89104ff674afd449ef">mesos::internal::build::TIME</a></div><div class="ttdeci">const double TIME</div></div>
<div class="ttc" id="namespacemesos_1_1internal_html_a4311a7bd3d79fd1225d08444f8ff758a"><div class="ttname"><a href="namespacemesos_1_1internal.html#a4311a7bd3d79fd1225d08444f8ff758a">mesos::internal::version</a></div><div class="ttdeci">JSON::Object version()</div><div class="ttdef"><b>Definition:</b> version.hpp:32</div></div>
<div class="ttc" id="structJSON_1_1Object_html_a41bbf967d564eb3f57c2bb5453a0e7af"><div class="ttname"><a href="structJSON_1_1Object.html#a41bbf967d564eb3f57c2bb5453a0e7af">JSON::Object::values</a></div><div class="ttdeci">std::map&lt; std::string, Value &gt; values</div><div class="ttdef"><b>Definition:</b> json.hpp:189</div></div>
<div class="ttc" id="classmesos_1_1internal_1_1VersionProcess_html_a1f0746cf6e384fc26bfd7e892fa464c2"><div class="ttname"><a href="classmesos_1_1internal_1_1VersionProcess.html#a1f0746cf6e384fc26bfd7e892fa464c2">mesos::internal::VersionProcess::initialize</a></div><div class="ttdeci">virtual void initialize()</div><div class="ttdoc">Invoked when a process gets spawned. </div></div>
<div class="ttc" id="structprocess_1_1http_1_1Request_html"><div class="ttname"><a href="structprocess_1_1http_1_1Request.html">process::http::Request</a></div><div class="ttdef"><b>Definition:</b> http.hpp:511</div></div>
<div class="ttc" id="structJSON_1_1Object_html"><div class="ttname"><a href="structJSON_1_1Object.html">JSON::Object</a></div><div class="ttdef"><b>Definition:</b> json.hpp:153</div></div>
<div class="ttc" id="namespacemesos_1_1internal_1_1build_html_a815dab7636e7ddbb6ede2493d9b3f40f"><div class="ttname"><a href="namespacemesos_1_1internal_1_1build.html#a815dab7636e7ddbb6ede2493d9b3f40f">mesos::internal::build::DATE</a></div><div class="ttdeci">const std::string DATE</div></div>
<div class="ttc" id="classOption_html_a21358442c0fac1cc978a67a9a9089a79"><div class="ttname"><a href="classOption.html#a21358442c0fac1cc978a67a9a9089a79">Option::get</a></div><div class="ttdeci">const T &amp; get() const &amp;</div><div class="ttdef"><b>Definition:</b> option.hpp:111</div></div>
<div class="ttc" id="namespacemesos_1_1internal_1_1build_html_acb7d084d37c709bfa87207ba1b5be465"><div class="ttname"><a href="namespacemesos_1_1internal_1_1build.html#acb7d084d37c709bfa87207ba1b5be465">mesos::internal::build::GIT_BRANCH</a></div><div class="ttdeci">const Option&lt; std::string &gt; GIT_BRANCH</div></div>
<div class="ttc" id="future_8hpp_html"><div class="ttname"><a href="future_8hpp.html">future.hpp</a></div></div>
<div class="ttc" id="classmesos_1_1internal_1_1VersionProcess_html_a9b450b8bfc7cacfae7173b374536968a"><div class="ttname"><a href="classmesos_1_1internal_1_1VersionProcess.html#a9b450b8bfc7cacfae7173b374536968a">mesos::internal::VersionProcess::VersionProcess</a></div><div class="ttdeci">VersionProcess()</div></div>
<div class="ttc" id="namespacemesos_1_1internal_1_1build_html_acb25c3d04299afc5daa3a7218f5e09d4"><div class="ttname"><a href="namespacemesos_1_1internal_1_1build.html#acb25c3d04299afc5daa3a7218f5e09d4">mesos::internal::build::GIT_TAG</a></div><div class="ttdeci">const Option&lt; std::string &gt; GIT_TAG</div></div>
<div class="ttc" id="namespacemesos_1_1internal_1_1build_html_ac100c57fe8d1090b0117fd1f26fcf730"><div class="ttname"><a href="namespacemesos_1_1internal_1_1build.html#ac100c57fe8d1090b0117fd1f26fcf730">mesos::internal::build::GIT_SHA</a></div><div class="ttdeci">const Option&lt; std::string &gt; GIT_SHA</div></div>
<div class="ttc" id="classmesos_1_1internal_1_1VersionProcess_html"><div class="ttname"><a href="classmesos_1_1internal_1_1VersionProcess.html">mesos::internal::VersionProcess</a></div><div class="ttdef"><b>Definition:</b> version.hpp:57</div></div>
<div class="ttc" id="3rdparty_2libprocess_2include_2process_2http_8hpp_html"><div class="ttname"><a href="3rdparty_2libprocess_2include_2process_2http_8hpp.html">http.hpp</a></div></div>
<div class="ttc" id="classprocess_1_1Process_html"><div class="ttname"><a href="classprocess_1_1Process.html">process::Process</a></div><div class="ttdef"><b>Definition:</b> process.hpp:490</div></div>
<div class="ttc" id="libprocess_2include_2process_2process_8hpp_html"><div class="ttname"><a href="libprocess_2include_2process_2process_8hpp.html">process.hpp</a></div></div>
<div class="ttc" id="classprocess_1_1Future_html"><div class="ttname"><a href="classprocess_1_1Future.html">process::Future</a></div><div class="ttdef"><b>Definition:</b> future.hpp:56</div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.5
</small></address>
</body>
</html>