1
0
Fork 0
mirror of https://github.com/warmcat/libwebsockets.git synced 2025-03-16 00:00:07 +01:00
libwebsockets/doc/html/md_README.generic-table.html

96 lines
4.9 KiB
HTML
Raw Normal View History

2016-07-05 18:40:40 +08:00
<!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.11"/>
<title>libwebsockets: Notes about generic-table</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="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
$(document).ready(initResizable);
$(window).load(resizeHeight);
</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 id="projectlogo"><img alt="Logo" src="libwebsockets.org-logo.png"/></td>
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libwebsockets
</div>
<div id="projectbrief">Lightweight C library for HTML5 websockets</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.11 -->
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="index.html"><span>Main&#160;Page</span></a></li>
<li class="current"><a href="pages.html"><span>Related&#160;Pages</span></a></li>
<li><a href="modules.html"><span>Modules</span></a></li>
<li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
<li><a href="files.html"><span>Files</span></a></li>
</ul>
</div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
<div id="nav-tree">
<div id="nav-tree-contents">
<div id="nav-sync" class="sync"></div>
</div>
</div>
<div id="splitbar" style="-moz-user-select:none;"
class="ui-resizable-handle">
</div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('md_README.generic-table.html','');});
</script>
<div id="doc-content">
<div class="header">
<div class="headertitle">
<div class="title">Notes about generic-table </div> </div>
</div><!--header-->
<div class="contents">
<div class="textblock"><h2>What is generic-table? </h2>
<p>Generic-table is a JSON schema and client-side JS file that makes it easy to display live, table structured HTML over a ws link.</p>
<p>An example plugin and index.html using it are provided.</p>
<h2>Enabling for build </h2>
<p>Enable at CMake with -DLWS_WITH_PLUGINS=1</p>
<h2>Generic-table JSON </h2>
<h3>Column layout</h3>
<p>When the ws connection is established, the protocol should send a JSON message describing the table columns. For example</p>
<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span>&#160;msg = &quot;{\&quot;cols\&quot;:[&quot;</div><div class="line"><a name="l00002"></a><span class="lineno"> 2</span>&#160; &quot; {\&quot;name\&quot;: \&quot;Date\&quot;},&quot;</div><div class="line"><a name="l00003"></a><span class="lineno"> 3</span>&#160; &quot; {\&quot;name\&quot;: \&quot;Size\&quot;, \&quot;align\&quot;: \&quot;right\&quot;},&quot;</div><div class="line"><a name="l00004"></a><span class="lineno"> 4</span>&#160; &quot; {\&quot;name\&quot;: \&quot;Icon\&quot;},&quot;</div><div class="line"><a name="l00005"></a><span class="lineno"> 5</span>&#160; &quot; {\&quot;name\&quot;: \&quot;Name\&quot;, \&quot;href\&quot;: \&quot;uri\&quot;},&quot;</div><div class="line"><a name="l00006"></a><span class="lineno"> 6</span>&#160; &quot; {\&quot;name\&quot;: \&quot;uri\&quot;, \&quot;hide\&quot;: \&quot;1\&quot; }&quot;</div><div class="line"><a name="l00007"></a><span class="lineno"> 7</span>&#160; &quot; ]&quot;</div><div class="line"><a name="l00008"></a><span class="lineno"> 8</span>&#160; &quot;}&quot;;</div></div><!-- fragment --><ul>
<li>This describes 5 columns</li>
<li>Only four columns (not "uri") should be visible</li>
<li>"Name" should be presented as a clickable link using "uri" as the destination, when a "uri" field is presented.</li>
<li>"Size" field should be presented aligned to the right</li>
</ul>
<h3>Table data</h3>
<p>The </p>
</div></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
<li class="footer">Generated by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.11 </li>
</ul>
</div>
</body>
</html>