/usr/share/doc/content-hub/qml/html/index.html is in libcontent-hub-doc 0.1+16.04.20160309-0ubuntu1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 | <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- mainpage.qdoc -->
<title>Ubuntu Content API | Ubuntu Content QML API </title>
<link rel="stylesheet" type="text/css" href="style/reset.css" />
<link rel="stylesheet" type="text/css" href="style/qtquick.css" />
<link rel="stylesheet" type="text/css" href="style/base.css" />
<link rel="stylesheet" type="text/css" href="style/scratch.css" />
</head>
<body>
<div class="wrapper">
<div class="main-content">
<li>Ubuntu Content API</li>
<p class="naviNextPrevious headerNavi">
</p><p/>
<h1 class="title">Ubuntu Content API</h1>
<span class="subtitle"></span>
<!-- $$$index.html-description -->
<div class="descr"> <a name="details"></a>
<a name="content-management-exchange"></a>
<h0 id="content-management-exchange">Content Management & Exchange</h0>
<a name="introduction"></a>
<h2 id="introduction">Introduction</h2>
<p>Unity and the overall Ubuntu experience put heavy emphasis on the notion of content, with Unity's dash offering streamlined access to arbitrary content, both local to the device or online. More to this, Unity's dash is the primary way of surfacing content on mobile form factors without the need to access individual applications and their respective content silos. The content-hub deals with application-specific content management and implements an architecture that allows an app to define its own content silo, exchange content with other applications/the system, and a way to provide the user with content picking functionality.</p>
<a name="definitions"></a>
<h2 id="definitions">Definitions</h2>
<p>To ease conversations, we start over with a set of definitions:</p>
<ul>
<li><b>Content item</b>: A content item is an entity that consists of meta-data and data. E.g., an image is a content item, where the actual pixels are the data, and information like size, image format, bit depth, location etc. is considered meta data. See also <a href="qml-ubuntu-content-contentitem.html">ContentItem</a>.</li>
<li><b>Content types</b>: A set of well-known content types. E.g., images or music files. See also <a href="qml-ubuntu-content-contenttype.html">ContentType</a></li>
<li><b>Content set</b>: A set of unique content items. Can be considered a content item itself, e.g., in the case of playlists.</li>
<li><b>Content owner</b>: The unique owner of a content item. A content item has to be owned by exactly one app. See also <a href="qml-ubuntu-content-contentpeer.html">ContentPeer</a></li>
<li><b>Content store</b>: A container (think of it as a top-level folder in the filesystem) that contains content items of a certain type. Different stores exist for different scopes, where scope refers to either system-wide, user-wide or app-specific storage locations. See also <a href="qml-ubuntu-content-contentstore.html">ContentStore</a></li>
<li><b>Content transfer</b>: Transferring content item/s to and from a source or destination. A transfer is uniquely defined by a source, destination, direction (import or export), and a set of items that should be exchanged. See also <a href="qml-ubuntu-content-contenttransfer.html">ContentTransfer</a></li>
<li><b>Content picking</b>: Operation that allows a user to select content for subsequent import from a content source (e.g., an application). The content source is responsible for providing a UI to the user.</li>
</ul>
<a name="architectural-overview"></a>
<h2 id="architectural-overview">Architectural Overview</h2>
<p>The architecture enforces complete application isolation, both in terms of content separation, sandboxing/confinement and in terms of the application lifecycle. As we cannot assume that two apps that want to exchange content are running at the same time, a system-level component needs to mediate and control the content exchange operation, making sure that neither app instance assumes the existence of the other one. We refer to this component as the content hub.</p>
<a name="example-usage-importing-pictures"></a>
<h2 id="example-usage-importing-pictures">Example usage - Importing Pictures</h2>
<pre class="qml">import QtQuick 2.0
import Ubuntu.Components 1.1
import Ubuntu.Content 1.1
<span class="type">Rectangle</span> {
<span class="name">id</span>: <span class="name">root</span>
property list<<span class="type"><a href="qml-ubuntu-content-contentitem.html">ContentItem</a></span>> <span class="name">importItems</span>
property <span class="type">var</span> <span class="name">activeTransfer</span>
<span class="type"><a href="qml-ubuntu-content-contentpeer.html">ContentPeer</a></span> {
<span class="name">id</span>: <span class="name">picSourceSingle</span>
<span class="name">contentType</span>: <span class="name">ContentType</span>.<span class="name">Pictures</span>
<span class="name">handler</span>: <span class="name">ContentHandler</span>.<span class="name">Source</span>
<span class="name">selectionType</span>: <span class="name">ContentTransfer</span>.<span class="name">Single</span>
}
<span class="type"><a href="qml-ubuntu-content-contentpeer.html">ContentPeer</a></span> {
<span class="name">id</span>: <span class="name">picSourceMulti</span>
<span class="name">contentType</span>: <span class="name">ContentType</span>.<span class="name">Pictures</span>
<span class="name">handler</span>: <span class="name">ContentHandler</span>.<span class="name">Source</span>
<span class="name">selectionType</span>: <span class="name">ContentTransfer</span>.<span class="name">Multiple</span>
}
<span class="type">Row</span> {
<span class="type">Button</span> {
<span class="name">text</span>: <span class="string">"Import single item"</span>
<span class="name">onClicked</span>: {
<span class="name">root</span>.<span class="name">activeTransfer</span> <span class="operator">=</span> <span class="name">picSourceSingle</span>.<span class="name">request</span>()
}
}
<span class="type">Button</span> {
<span class="name">text</span>: <span class="string">"Import multiple items"</span>
<span class="name">onClicked</span>: {
<span class="name">root</span>.<span class="name">activeTransfer</span> <span class="operator">=</span> <span class="name">picSourceMulti</span>.<span class="name">request</span>()
}
}
}
<span class="type"><a href="qml-ubuntu-content-contenttransferhint.html">ContentTransferHint</a></span> {
<span class="name">id</span>: <span class="name">transferHint</span>
<span class="name">anchors</span>.fill: <span class="name">parent</span>
<span class="name">activeTransfer</span>: <span class="name">root</span>.<span class="name">activeTransfer</span>
}
<span class="type">Connections</span> {
<span class="name">target</span>: <span class="name">root</span>.<span class="name">activeTransfer</span>
<span class="name">onStateChanged</span>: {
<span class="keyword">if</span> (<span class="name">root</span>.<span class="name">activeTransfer</span>.<span class="name">state</span> <span class="operator">===</span> <span class="name">ContentTransfer</span>.<span class="name">Charged</span>)
<span class="name">importItems</span> <span class="operator">=</span> <span class="name">root</span>.<span class="name">activeTransfer</span>.<span class="name">items</span>;
}
}
}</pre>
<a name="general-topics"></a>
<h0 id="general-topics">General Topics</h0>
<ul>
<li><a href="qml-ubuntu-content-contenthub.html">ContentHub</a></li>
<li><a href="qml-ubuntu-content-contentpeer.html">ContentPeer</a></li>
<li><a href="qml-ubuntu-content-contentpeermodel.html">ContentPeerModel</a></li>
<li><a href="qml-ubuntu-content-contentpeerpicker.html">ContentPeerPicker</a></li>
<li><a href="qml-ubuntu-content-contentstore.html">ContentStore</a></li>
<li><a href="qml-ubuntu-content-contenttransfer.html">ContentTransfer</a></li>
<li><a href="qml-ubuntu-content-contenttransferhint.html">ContentTransferHint</a></li>
<li><a href="qml-ubuntu-content-contenttype.html">ContentType</a></li>
</ul>
<a name="reporting-bugs"></a>
<h0 id="reporting-bugs">Reporting Bugs</h0>
<p>If you find any problems with the or this documentation, please file a bug in Ubuntu Content API <a href="https://bugs.launchpad.net/content-hub">Launchpad page</a></p>
<a name="components"></a>
<h0 id="components">Components</h0>
<p>Available through:</p>
<pre class="cpp"> import Ubuntu<span class="operator">.</span>Content <span class="number">1.1</span></pre>
</div>
<p><b>See also </b><a href="qml-ubuntu-content-contenthub.html">ContentHub</a>.</p>
<!-- @@@index.html -->
<p class="naviNextPrevious footerNavi">
</p>
</div></div>
<div class="shadow"></div>
<footer>
<div>
<nav role="navigation" class="clearfix">
</nav>
<p>© 2013 Canonical Ltd. Ubuntu and Canonical are registered trademarks of Canonical Ltd.</p>
</div>
</footer>
</body>
</html>
|