| 1 |
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> |
| 2 |
<html> |
| 3 |
<head> |
| 4 |
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
| 5 |
<title>UDisksLinuxDriveAta: UDisks Reference Manual</title> |
| 6 |
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot"> |
| 7 |
<link rel="home" href="index.html" title="UDisks Reference Manual"> |
| 8 |
<link rel="up" href="ref-daemon-drives.html" title="Drives on Linux"> |
| 9 |
<link rel="prev" href="UDisksLinuxDrive.html" title="UDisksLinuxDrive"> |
| 10 |
<link rel="next" href="UDisksLinuxDriveObject.html" title="UDisksLinuxDriveObject"> |
| 11 |
<meta name="generator" content="GTK-Doc V1.35.1 (XML mode)"> |
| 12 |
<link rel="stylesheet" href="style.css" type="text/css"> |
| 13 |
</head> |
| 14 |
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> |
| 15 |
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle"> |
| 16 |
<td width="100%" align="left" class="shortcuts"> |
| 17 |
<a href="#" class="shortcut">Top</a><span id="nav_description"> <span class="dim">|</span> |
| 18 |
<a href="#UDisksLinuxDriveAta.description" class="shortcut">Description</a></span><span id="nav_hierarchy"> <span class="dim">|</span> |
| 19 |
<a href="#UDisksLinuxDriveAta.object-hierarchy" class="shortcut">Object Hierarchy</a></span><span id="nav_interfaces"> <span class="dim">|</span> |
| 20 |
<a href="#UDisksLinuxDriveAta.implemented-interfaces" class="shortcut">Implemented Interfaces</a></span> |
| 21 |
</td> |
| 22 |
<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td> |
| 23 |
<td><a accesskey="u" href="ref-daemon-drives.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td> |
| 24 |
<td><a accesskey="p" href="UDisksLinuxDrive.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td> |
| 25 |
<td><a accesskey="n" href="UDisksLinuxDriveObject.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td> |
| 26 |
</tr></table> |
| 27 |
<div class="refentry"> |
| 28 |
<a name="UDisksLinuxDriveAta"></a><div class="titlepage"></div> |
| 29 |
<div class="refnamediv"><table width="100%"><tr> |
| 30 |
<td valign="top"> |
| 31 |
<h2><span class="refentrytitle"><a name="UDisksLinuxDriveAta.top_of_page"></a>UDisksLinuxDriveAta</span></h2> |
| 32 |
<p>UDisksLinuxDriveAta — Linux implementation of <a class="link" href="UDisksDriveAta.html" title="UDisksDriveAta"><span class="type">UDisksDriveAta</span></a></p> |
| 33 |
</td> |
| 34 |
<td class="gallery_image" valign="top" align="right"></td> |
| 35 |
</tr></table></div> |
| 36 |
<div class="refsect1"> |
| 37 |
<a name="UDisksLinuxDriveAta.functions"></a><h2>Functions</h2> |
| 38 |
<div class="informaltable"><table class="informaltable" width="100%" border="0"> |
| 39 |
<colgroup> |
| 40 |
<col width="150px" class="functions_proto_type"> |
| 41 |
<col class="functions_proto_name"> |
| 42 |
</colgroup> |
| 43 |
<tbody> |
| 44 |
<tr> |
| 45 |
<td class="function_type"> |
| 46 |
<a class="link" href="UDisksDriveAta.html" title="UDisksDriveAta"><span class="returnvalue">UDisksDriveAta</span></a> * |
| 47 |
</td> |
| 48 |
<td class="function_name"> |
| 49 |
<a class="link" href="UDisksLinuxDriveAta.html#udisks-linux-drive-ata-new" title="udisks_linux_drive_ata_new ()">udisks_linux_drive_ata_new</a> <span class="c_punctuation">()</span> |
| 50 |
</td> |
| 51 |
</tr> |
| 52 |
<tr> |
| 53 |
<td class="function_type"> |
| 54 |
<span class="returnvalue">gboolean</span> |
| 55 |
</td> |
| 56 |
<td class="function_name"> |
| 57 |
<a class="link" href="UDisksLinuxDriveAta.html#udisks-linux-drive-ata-update" title="udisks_linux_drive_ata_update ()">udisks_linux_drive_ata_update</a> <span class="c_punctuation">()</span> |
| 58 |
</td> |
| 59 |
</tr> |
| 60 |
<tr> |
| 61 |
<td class="function_type"> |
| 62 |
<span class="returnvalue">gboolean</span> |
| 63 |
</td> |
| 64 |
<td class="function_name"> |
| 65 |
<a class="link" href="UDisksLinuxDriveAta.html#udisks-linux-drive-ata-refresh-smart-sync" title="udisks_linux_drive_ata_refresh_smart_sync ()">udisks_linux_drive_ata_refresh_smart_sync</a> <span class="c_punctuation">()</span> |
| 66 |
</td> |
| 67 |
</tr> |
| 68 |
<tr> |
| 69 |
<td class="function_type"> |
| 70 |
<span class="returnvalue">void</span> |
| 71 |
</td> |
| 72 |
<td class="function_name"> |
| 73 |
<a class="link" href="UDisksLinuxDriveAta.html#udisks-linux-drive-ata-apply-configuration" title="udisks_linux_drive_ata_apply_configuration ()">udisks_linux_drive_ata_apply_configuration</a> <span class="c_punctuation">()</span> |
| 74 |
</td> |
| 75 |
</tr> |
| 76 |
<tr> |
| 77 |
<td class="function_type"> |
| 78 |
<span class="returnvalue">gboolean</span> |
| 79 |
</td> |
| 80 |
<td class="function_name"> |
| 81 |
<a class="link" href="UDisksLinuxDriveAta.html#udisks-linux-drive-ata-secure-erase-sync" title="udisks_linux_drive_ata_secure_erase_sync ()">udisks_linux_drive_ata_secure_erase_sync</a> <span class="c_punctuation">()</span> |
| 82 |
</td> |
| 83 |
</tr> |
| 84 |
<tr> |
| 85 |
<td class="function_type"> |
| 86 |
<span class="returnvalue">gboolean</span> |
| 87 |
</td> |
| 88 |
<td class="function_name"> |
| 89 |
<a class="link" href="UDisksLinuxDriveAta.html#udisks-linux-drive-ata-get-pm-state" title="udisks_linux_drive_ata_get_pm_state ()">udisks_linux_drive_ata_get_pm_state</a> <span class="c_punctuation">()</span> |
| 90 |
</td> |
| 91 |
</tr> |
| 92 |
</tbody> |
| 93 |
</table></div> |
| 94 |
</div> |
| 95 |
<div class="refsect1"> |
| 96 |
<a name="UDisksLinuxDriveAta.other"></a><h2>Types and Values</h2> |
| 97 |
<div class="informaltable"><table class="informaltable" width="100%" border="0"> |
| 98 |
<colgroup> |
| 99 |
<col width="150px" class="other_proto_type"> |
| 100 |
<col class="other_proto_name"> |
| 101 |
</colgroup> |
| 102 |
<tbody><tr> |
| 103 |
<td class="datatype_keyword"> </td> |
| 104 |
<td class="function_name"><a class="link" href="UDisksLinuxDriveAta.html#UDisksLinuxDriveAta-struct" title="UDisksLinuxDriveAta">UDisksLinuxDriveAta</a></td> |
| 105 |
</tr></tbody> |
| 106 |
</table></div> |
| 107 |
</div> |
| 108 |
<div class="refsect1"> |
| 109 |
<a name="UDisksLinuxDriveAta.object-hierarchy"></a><h2>Object Hierarchy</h2> |
| 110 |
<pre class="screen"> GObject |
| 111 |
<span class="lineart">╰──</span> GDBusInterfaceSkeleton |
| 112 |
<span class="lineart">╰──</span> <a class="link" href="UDisksDriveAta.html#UDisksDriveAtaSkeleton">UDisksDriveAtaSkeleton</a> |
| 113 |
<span class="lineart">╰──</span> UDisksLinuxDriveAta |
| 114 |
</pre> |
| 115 |
</div> |
| 116 |
<div class="refsect1"> |
| 117 |
<a name="UDisksLinuxDriveAta.implemented-interfaces"></a><h2>Implemented Interfaces</h2> |
| 118 |
<p> |
| 119 |
UDisksLinuxDriveAta implements |
| 120 |
GDBusInterface and <a class="link" href="UDisksDriveAta.html" title="UDisksDriveAta">UDisksDriveAta</a>.</p> |
| 121 |
</div> |
| 122 |
<div class="refsect1"> |
| 123 |
<a name="UDisksLinuxDriveAta.description"></a><h2>Description</h2> |
| 124 |
<p>This type provides an implementation of the <a class="link" href="UDisksDriveAta.html" title="UDisksDriveAta"><span class="type">UDisksDriveAta</span></a> |
| 125 |
interface on Linux.</p> |
| 126 |
</div> |
| 127 |
<div class="refsect1"> |
| 128 |
<a name="UDisksLinuxDriveAta.functions_details"></a><h2>Functions</h2> |
| 129 |
<div class="refsect2"> |
| 130 |
<a name="udisks-linux-drive-ata-new"></a><h3>udisks_linux_drive_ata_new ()</h3> |
| 131 |
<pre class="programlisting"><a class="link" href="UDisksDriveAta.html" title="UDisksDriveAta"><span class="returnvalue">UDisksDriveAta</span></a> * |
| 132 |
udisks_linux_drive_ata_new (<em class="parameter"><code><span class="type">void</span></code></em>);</pre> |
| 133 |
<p>Creates a new <a class="link" href="UDisksLinuxDriveAta.html" title="UDisksLinuxDriveAta"><span class="type">UDisksLinuxDriveAta</span></a> instance.</p> |
| 134 |
<div class="refsect3"> |
| 135 |
<a name="udisks-linux-drive-ata-new.returns"></a><h4>Returns</h4> |
| 136 |
<p> A new <a class="link" href="UDisksLinuxDriveAta.html" title="UDisksLinuxDriveAta"><span class="type">UDisksLinuxDriveAta</span></a>. Free with <code class="function">g_object_unref()</code>.</p> |
| 137 |
</div> |
| 138 |
</div> |
| 139 |
<hr> |
| 140 |
<div class="refsect2"> |
| 141 |
<a name="udisks-linux-drive-ata-update"></a><h3>udisks_linux_drive_ata_update ()</h3> |
| 142 |
<pre class="programlisting"><span class="returnvalue">gboolean</span> |
| 143 |
udisks_linux_drive_ata_update (<em class="parameter"><code><a class="link" href="UDisksLinuxDriveAta.html" title="UDisksLinuxDriveAta"><span class="type">UDisksLinuxDriveAta</span></a> *drive</code></em>, |
| 144 |
<em class="parameter"><code><a class="link" href="UDisksLinuxDriveObject.html" title="UDisksLinuxDriveObject"><span class="type">UDisksLinuxDriveObject</span></a> *object</code></em>);</pre> |
| 145 |
<p>Updates the interface.</p> |
| 146 |
<div class="refsect3"> |
| 147 |
<a name="udisks-linux-drive-ata-update.parameters"></a><h4>Parameters</h4> |
| 148 |
<div class="informaltable"><table class="informaltable" width="100%" border="0"> |
| 149 |
<colgroup> |
| 150 |
<col width="150px" class="parameters_name"> |
| 151 |
<col class="parameters_description"> |
| 152 |
<col width="200px" class="parameters_annotations"> |
| 153 |
</colgroup> |
| 154 |
<tbody> |
| 155 |
<tr> |
| 156 |
<td class="parameter_name"><p>drive</p></td> |
| 157 |
<td class="parameter_description"><p>A <a class="link" href="UDisksLinuxDriveAta.html" title="UDisksLinuxDriveAta"><span class="type">UDisksLinuxDriveAta</span></a>.</p></td> |
| 158 |
<td class="parameter_annotations"> </td> |
| 159 |
</tr> |
| 160 |
<tr> |
| 161 |
<td class="parameter_name"><p>object</p></td> |
| 162 |
<td class="parameter_description"><p>The enclosing <a class="link" href="UDisksLinuxDriveObject.html" title="UDisksLinuxDriveObject"><span class="type">UDisksLinuxDriveObject</span></a> instance.</p></td> |
| 163 |
<td class="parameter_annotations"> </td> |
| 164 |
</tr> |
| 165 |
</tbody> |
| 166 |
</table></div> |
| 167 |
</div> |
| 168 |
<div class="refsect3"> |
| 169 |
<a name="udisks-linux-drive-ata-update.returns"></a><h4>Returns</h4> |
| 170 |
<p> <code class="literal">TRUE</code> if configuration has changed, <code class="literal">FALSE</code> otherwise.</p> |
| 171 |
</div> |
| 172 |
</div> |
| 173 |
<hr> |
| 174 |
<div class="refsect2"> |
| 175 |
<a name="udisks-linux-drive-ata-refresh-smart-sync"></a><h3>udisks_linux_drive_ata_refresh_smart_sync ()</h3> |
| 176 |
<pre class="programlisting"><span class="returnvalue">gboolean</span> |
| 177 |
udisks_linux_drive_ata_refresh_smart_sync |
| 178 |
(<em class="parameter"><code><a class="link" href="UDisksLinuxDriveAta.html" title="UDisksLinuxDriveAta"><span class="type">UDisksLinuxDriveAta</span></a> *drive</code></em>, |
| 179 |
<em class="parameter"><code><span class="type">gboolean</span> nowakeup</code></em>, |
| 180 |
<em class="parameter"><code>const <span class="type">gchar</span> *simulate_path</code></em>, |
| 181 |
<em class="parameter"><code><span class="type">GCancellable</span> *cancellable</code></em>, |
| 182 |
<em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre> |
| 183 |
<p>Synchronously refreshes ATA S.M.A.R.T. data on <em class="parameter"><code>drive</code></em> |
| 184 |
using one of |
| 185 |
the physical drives associated with it. The calling thread is |
| 186 |
blocked until the data has been obtained.</p> |
| 187 |
<p>If <em class="parameter"><code>nowake</code></em> |
| 188 |
is <code class="literal">TRUE</code> and the disk is in a sleep state this fails |
| 189 |
with <a class="link" href="udisks2-UDisksError.html#UDISKS-ERROR-WOULD-WAKEUP:CAPS"><code class="literal">UDISKS_ERROR_WOULD_WAKEUP</code></a>.</p> |
| 190 |
<p>This may only be called if <em class="parameter"><code>drive</code></em> |
| 191 |
has been associated with a |
| 192 |
<a class="link" href="UDisksLinuxDriveObject.html" title="UDisksLinuxDriveObject"><span class="type">UDisksLinuxDriveObject</span></a> instance.</p> |
| 193 |
<p>This method may be called from any thread.</p> |
| 194 |
<div class="refsect3"> |
| 195 |
<a name="udisks-linux-drive-ata-refresh-smart-sync.parameters"></a><h4>Parameters</h4> |
| 196 |
<div class="informaltable"><table class="informaltable" width="100%" border="0"> |
| 197 |
<colgroup> |
| 198 |
<col width="150px" class="parameters_name"> |
| 199 |
<col class="parameters_description"> |
| 200 |
<col width="200px" class="parameters_annotations"> |
| 201 |
</colgroup> |
| 202 |
<tbody> |
| 203 |
<tr> |
| 204 |
<td class="parameter_name"><p>drive</p></td> |
| 205 |
<td class="parameter_description"><p>The <a class="link" href="UDisksLinuxDriveAta.html" title="UDisksLinuxDriveAta"><span class="type">UDisksLinuxDriveAta</span></a> to refresh.</p></td> |
| 206 |
<td class="parameter_annotations"> </td> |
| 207 |
</tr> |
| 208 |
<tr> |
| 209 |
<td class="parameter_name"><p>nowakeup</p></td> |
| 210 |
<td class="parameter_description"><p>If <code class="literal">TRUE</code>, will not wake up the disk if asleep.</p></td> |
| 211 |
<td class="parameter_annotations"> </td> |
| 212 |
</tr> |
| 213 |
<tr> |
| 214 |
<td class="parameter_name"><p>simulate_path</p></td> |
| 215 |
<td class="parameter_description"><p>If not <code class="literal">NULL</code>, the path of a file with a libatasmart blob to use.</p></td> |
| 216 |
<td class="parameter_annotations"> </td> |
| 217 |
</tr> |
| 218 |
<tr> |
| 219 |
<td class="parameter_name"><p>cancellable</p></td> |
| 220 |
<td class="parameter_description"><p>A <span class="type">GCancellable</span> or <code class="literal">NULL</code>.</p></td> |
| 221 |
<td class="parameter_annotations"> </td> |
| 222 |
</tr> |
| 223 |
<tr> |
| 224 |
<td class="parameter_name"><p>error</p></td> |
| 225 |
<td class="parameter_description"><p>Return location for error.</p></td> |
| 226 |
<td class="parameter_annotations"> </td> |
| 227 |
</tr> |
| 228 |
</tbody> |
| 229 |
</table></div> |
| 230 |
</div> |
| 231 |
<div class="refsect3"> |
| 232 |
<a name="udisks-linux-drive-ata-refresh-smart-sync.returns"></a><h4>Returns</h4> |
| 233 |
<p> <code class="literal">TRUE</code> if the operation succeeded, <code class="literal">FALSE</code> if <em class="parameter"><code>error</code></em> |
| 234 |
is set.</p> |
| 235 |
</div> |
| 236 |
</div> |
| 237 |
<hr> |
| 238 |
<div class="refsect2"> |
| 239 |
<a name="udisks-linux-drive-ata-apply-configuration"></a><h3>udisks_linux_drive_ata_apply_configuration ()</h3> |
| 240 |
<pre class="programlisting"><span class="returnvalue">void</span> |
| 241 |
udisks_linux_drive_ata_apply_configuration |
| 242 |
(<em class="parameter"><code><a class="link" href="UDisksLinuxDriveAta.html" title="UDisksLinuxDriveAta"><span class="type">UDisksLinuxDriveAta</span></a> *drive</code></em>, |
| 243 |
<em class="parameter"><code><a class="link" href="UDisksLinuxDevice.html" title="UDisksLinuxDevice"><span class="type">UDisksLinuxDevice</span></a> *device</code></em>, |
| 244 |
<em class="parameter"><code><span class="type">GVariant</span> *configuration</code></em>);</pre> |
| 245 |
<p>Spawns a thread to apply <em class="parameter"><code>configuration</code></em> |
| 246 |
to <em class="parameter"><code>drive</code></em> |
| 247 |
, if any. Does not |
| 248 |
wait for the thread to terminate.</p> |
| 249 |
<div class="refsect3"> |
| 250 |
<a name="udisks-linux-drive-ata-apply-configuration.parameters"></a><h4>Parameters</h4> |
| 251 |
<div class="informaltable"><table class="informaltable" width="100%" border="0"> |
| 252 |
<colgroup> |
| 253 |
<col width="150px" class="parameters_name"> |
| 254 |
<col class="parameters_description"> |
| 255 |
<col width="200px" class="parameters_annotations"> |
| 256 |
</colgroup> |
| 257 |
<tbody> |
| 258 |
<tr> |
| 259 |
<td class="parameter_name"><p>drive</p></td> |
| 260 |
<td class="parameter_description"><p>A <a class="link" href="UDisksLinuxDriveAta.html" title="UDisksLinuxDriveAta"><span class="type">UDisksLinuxDriveAta</span></a>.</p></td> |
| 261 |
<td class="parameter_annotations"> </td> |
| 262 |
</tr> |
| 263 |
<tr> |
| 264 |
<td class="parameter_name"><p>device</p></td> |
| 265 |
<td class="parameter_description"><p>A <a class="link" href="UDisksLinuxDevice.html" title="UDisksLinuxDevice"><span class="type">UDisksLinuxDevice</span></a></p></td> |
| 266 |
<td class="parameter_annotations"> </td> |
| 267 |
</tr> |
| 268 |
<tr> |
| 269 |
<td class="parameter_name"><p>configuration</p></td> |
| 270 |
<td class="parameter_description"><p>The configuration to apply.</p></td> |
| 271 |
<td class="parameter_annotations"> </td> |
| 272 |
</tr> |
| 273 |
</tbody> |
| 274 |
</table></div> |
| 275 |
</div> |
| 276 |
</div> |
| 277 |
<hr> |
| 278 |
<div class="refsect2"> |
| 279 |
<a name="udisks-linux-drive-ata-secure-erase-sync"></a><h3>udisks_linux_drive_ata_secure_erase_sync ()</h3> |
| 280 |
<pre class="programlisting"><span class="returnvalue">gboolean</span> |
| 281 |
udisks_linux_drive_ata_secure_erase_sync |
| 282 |
(<em class="parameter"><code><a class="link" href="UDisksLinuxDriveAta.html" title="UDisksLinuxDriveAta"><span class="type">UDisksLinuxDriveAta</span></a> *drive</code></em>, |
| 283 |
<em class="parameter"><code><span class="type">uid_t</span> caller_uid</code></em>, |
| 284 |
<em class="parameter"><code><span class="type">gboolean</span> enhanced</code></em>, |
| 285 |
<em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre> |
| 286 |
<p>Performs an ATA Secure Erase operation. Blocks the calling thread until the operation completes.</p> |
| 287 |
<p>This operation may take a very long time (hours) to complete.</p> |
| 288 |
<div class="refsect3"> |
| 289 |
<a name="udisks-linux-drive-ata-secure-erase-sync.parameters"></a><h4>Parameters</h4> |
| 290 |
<div class="informaltable"><table class="informaltable" width="100%" border="0"> |
| 291 |
<colgroup> |
| 292 |
<col width="150px" class="parameters_name"> |
| 293 |
<col class="parameters_description"> |
| 294 |
<col width="200px" class="parameters_annotations"> |
| 295 |
</colgroup> |
| 296 |
<tbody> |
| 297 |
<tr> |
| 298 |
<td class="parameter_name"><p>drive</p></td> |
| 299 |
<td class="parameter_description"><p>A <a class="link" href="UDisksLinuxDriveAta.html" title="UDisksLinuxDriveAta"><span class="type">UDisksLinuxDriveAta</span></a>.</p></td> |
| 300 |
<td class="parameter_annotations"> </td> |
| 301 |
</tr> |
| 302 |
<tr> |
| 303 |
<td class="parameter_name"><p>caller_uid</p></td> |
| 304 |
<td class="parameter_description"><p>The unix user if of the caller requesting the operation.</p></td> |
| 305 |
<td class="parameter_annotations"> </td> |
| 306 |
</tr> |
| 307 |
<tr> |
| 308 |
<td class="parameter_name"><p>enhanced</p></td> |
| 309 |
<td class="parameter_description"><p><code class="literal">TRUE</code> to use the enhanced version of the ATA secure erase command.</p></td> |
| 310 |
<td class="parameter_annotations"> </td> |
| 311 |
</tr> |
| 312 |
<tr> |
| 313 |
<td class="parameter_name"><p>error</p></td> |
| 314 |
<td class="parameter_description"><p>Return location for error or <code class="literal">NULL</code>.</p></td> |
| 315 |
<td class="parameter_annotations"> </td> |
| 316 |
</tr> |
| 317 |
</tbody> |
| 318 |
</table></div> |
| 319 |
</div> |
| 320 |
<div class="refsect3"> |
| 321 |
<a name="udisks-linux-drive-ata-secure-erase-sync.returns"></a><h4>Returns</h4> |
| 322 |
<p> <code class="literal">TRUE</code> if the operation succeeded, <code class="literal">FALSE</code> if <em class="parameter"><code>error</code></em> |
| 323 |
is set.</p> |
| 324 |
</div> |
| 325 |
</div> |
| 326 |
<hr> |
| 327 |
<div class="refsect2"> |
| 328 |
<a name="udisks-linux-drive-ata-get-pm-state"></a><h3>udisks_linux_drive_ata_get_pm_state ()</h3> |
| 329 |
<pre class="programlisting"><span class="returnvalue">gboolean</span> |
| 330 |
udisks_linux_drive_ata_get_pm_state (<em class="parameter"><code><a class="link" href="UDisksLinuxDriveAta.html" title="UDisksLinuxDriveAta"><span class="type">UDisksLinuxDriveAta</span></a> *drive</code></em>, |
| 331 |
<em class="parameter"><code><span class="type">GError</span> **error</code></em>, |
| 332 |
<em class="parameter"><code><span class="type">guchar</span> *pm_state</code></em>);</pre> |
| 333 |
<p>Get the current power mode state.</p> |
| 334 |
<p>The format of <em class="parameter"><code>pm_state</code></em> |
| 335 |
is the result obtained from sending the |
| 336 |
ATA command <code class="literal">CHECK POWER MODE</code> to the drive.</p> |
| 337 |
<p>Known values include:</p> |
| 338 |
<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "> |
| 339 |
<li class="listitem"><p><code class="literal">0x00</code>: Device is in PM2: Standby state.</p></li> |
| 340 |
<li class="listitem"><p><code class="literal">0x40</code>: Device is in the PM0: Active state, the NV Cache power mode is enabled, and the spindle is spun down or spinning down.</p></li> |
| 341 |
<li class="listitem"><p><code class="literal">0x41</code>: Device is in the PM0: Active state, the NV Cache power mode is enabled, and the spindle is spun up or spinning up.</p></li> |
| 342 |
<li class="listitem"><p><code class="literal">0x80</code>: Device is in PM1: Idle state.</p></li> |
| 343 |
<li class="listitem"><p><code class="literal">0xff</code>: Device is in the PM0: Active state or PM1: Idle State.</p></li> |
| 344 |
</ul></div> |
| 345 |
<p>Typically user interfaces will report "Drive is spun down" if <em class="parameter"><code>pm_state</code></em> |
| 346 |
is |
| 347 |
0x00 and "Drive is spun up" otherwise.</p> |
| 348 |
<div class="refsect3"> |
| 349 |
<a name="udisks-linux-drive-ata-get-pm-state.parameters"></a><h4>Parameters</h4> |
| 350 |
<div class="informaltable"><table class="informaltable" width="100%" border="0"> |
| 351 |
<colgroup> |
| 352 |
<col width="150px" class="parameters_name"> |
| 353 |
<col class="parameters_description"> |
| 354 |
<col width="200px" class="parameters_annotations"> |
| 355 |
</colgroup> |
| 356 |
<tbody> |
| 357 |
<tr> |
| 358 |
<td class="parameter_name"><p>drive</p></td> |
| 359 |
<td class="parameter_description"><p>A <a class="link" href="UDisksLinuxDriveAta.html" title="UDisksLinuxDriveAta"><span class="type">UDisksLinuxDriveAta</span></a>.</p></td> |
| 360 |
<td class="parameter_annotations"> </td> |
| 361 |
</tr> |
| 362 |
<tr> |
| 363 |
<td class="parameter_name"><p>error</p></td> |
| 364 |
<td class="parameter_description"><p>Return location for error.</p></td> |
| 365 |
<td class="parameter_annotations"> </td> |
| 366 |
</tr> |
| 367 |
<tr> |
| 368 |
<td class="parameter_name"><p>pm_state</p></td> |
| 369 |
<td class="parameter_description"><p>Return location for the current power state value.</p></td> |
| 370 |
<td class="parameter_annotations"> </td> |
| 371 |
</tr> |
| 372 |
</tbody> |
| 373 |
</table></div> |
| 374 |
</div> |
| 375 |
<div class="refsect3"> |
| 376 |
<a name="udisks-linux-drive-ata-get-pm-state.returns"></a><h4>Returns</h4> |
| 377 |
<p> <code class="literal">TRUE</code> if the operation succeeded, <code class="literal">FALSE</code> if <em class="parameter"><code>error</code></em> |
| 378 |
is set.</p> |
| 379 |
</div> |
| 380 |
</div> |
| 381 |
</div> |
| 382 |
<div class="refsect1"> |
| 383 |
<a name="UDisksLinuxDriveAta.other_details"></a><h2>Types and Values</h2> |
| 384 |
<div class="refsect2"> |
| 385 |
<a name="UDisksLinuxDriveAta-struct"></a><h3>UDisksLinuxDriveAta</h3> |
| 386 |
<pre class="programlisting">typedef struct _UDisksLinuxDriveAta UDisksLinuxDriveAta;</pre> |
| 387 |
<p>The <a class="link" href="UDisksLinuxDriveAta.html" title="UDisksLinuxDriveAta"><span class="type">UDisksLinuxDriveAta</span></a> structure contains only private data and should |
| 388 |
only be accessed using the provided API.</p> |
| 389 |
</div> |
| 390 |
</div> |
| 391 |
</div> |
| 392 |
<div class="footer"> |
| 393 |
<hr>Generated by GTK-Doc V1.35.1</div> |
| 394 |
</body> |
| 395 |
</html> |