Sophie

Sophie

distrib > * > cooker > x86_64 > by-pkgid > 5fb1c39f9f9130a3cc01e8b1ffa5c0f8 > files > 4279

libreoffice-devel-3.5.4-4.x86_64.rpm

<html>
<head>
<title>Service Package</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" type="text/css" href="../../../../idl.css">
</head>
<body>
<div id="adc-idlref">

<a name="_top_"> </a><table class="navimain" border="0" cellpadding="3">
<tr>
<td class="navimain"><a href="../module-ix.html" class="navimain">Overview</a></td>
<td class="navimain"><a href="module-ix.html" class="navimain">Module</a></td>
<td class="navimain"><a href="Package-xref.html" class="navimain">Use</a></td>
<td class="navimainnone">Devguide</td>
<td class="navimain"><a href="../../../../index-files/index-1.html" class="navimain">Index</a></td>
</tr>
</table>
<table class="navisub" border="0" cellpadding="0">
<tr>
<td class="navisub">Services' Summary</td>
<td class="navisub"><a href="#InterfacesSummary" class="navisub">Interfaces' Summary</a></td>
<td class="navisub">Properties' Summary</td>
<td class="navisub">Services' Details</td>
<td class="navisub"><a href="#InterfacesDetails" class="navisub">Interfaces' Details</a></td>
<td class="navisub">Properties' Details</td>
</tr>
</table>
<hr>
<table border="0" width="100%" cellpadding="5" cellspacing="3" class="title-table" style="margin-bottom:6pt;">
<tr>
<td><p class="namechain"><a href="../../../../module-ix.html" class="namechain">::</a> <a href="../../../module-ix.html" class="namechain">com</a> :: <a href="../../module-ix.html" class="namechain">sun</a> :: <a href="../module-ix.html" class="namechain">star</a> :: <a href="module-ix.html" class="namechain">packages</a> :: </p>
</td>
</tr>
<tr>
<td class="title">service Package</td>
</tr>
<tr>
<td><dl>
<dt><b>Description</b></dt>
<dd>The <a href="Package.html">Package</a> is a service that provides access to a set of
 files and folders contained within a Package. One instance of the
 Package service exists for each Package file to be manipulated.

 Each instance is created with an argument which specifies the URL of
 the Package file to which the user requires access. If the instance is
 created without arguments, it must be initialized with the
 ::com::sun::star::<a href="../lang/module-ix.html">lang</a>::<a href="../lang/XInitialization.html">XInitialization</a> service methods
 before it is a valid instance of the service.
</dd>
</dl>
</td>
</tr>
</table>
<hr>
<a name="InterfacesSummary"/><table border="1" width="100%" cellpadding="5" cellspacing="0" class="subtitle">
<tr>
<td class="subtitle" colspan="2">Exported Interfaces - Summary</td>
</tr>
<tr>
<td class="imsum_left">::com::sun::star::<a href="../lang/module-ix.html">lang</a>::<a href="../lang/XInitialization.html">XInitialization</a></td>
<td class="imsum_right"><p>A Package can be initialized with one of the following:

 1. A file URL referring to a package.
 2. An XInputStream referring to a package (it must also
 support an XSeekable interface).
 3. An XStream referring to a package. The XInputStream must support
 an XSeekable interface, and the XOutputStream must support an
 XTruncate interface.

 It will throw a css::uno::Exception if initialized with bad data or
 if the package has an invalid format (for example, a corrupt central
 directory record if the file is a ZIP file).
 </p>
</td>
</tr>
<tr>
<td class="imsum_left">::com::sun::star::<a href="../container/module-ix.html">container</a>::<a href="../container/XHierarchicalNameAccess.html">XHierarchicalNameAccess</a></td>
<td class="imsum_right"><p>This interface is used to get access to any entry within the package
 For example:
 getByHierarchicalName ("folder/subfolder/file1.txt");
 This will return a PackageStream which refers to the specified stream.
 This is also used to get access to a particular folder within the
 Package. For example:
 getByHierarchicalName ("folder/subfolder/");
 This will return a PackageFolder which describes the contents of the specified
 folder.

 Calls to methods of XHierarchicalNameAccess must NOT have a leading slash.
 </p>
</td>
</tr>
<tr>
<td class="imsum_left">::com::sun::star::<a href="../lang/module-ix.html">lang</a>::<a href="../lang/XSingleServiceFactory.html">XSingleServiceFactory</a></td>
<td class="imsum_right"><p>This interface is used to create new PackageStream or PackageFolder
 implementation objects for addition to the Package.

 createInstance - creates a new stream implementation object (when first
 created, the new object is not part of the Package). It must be added
 to the PackageFolder in which it will reside using the methods in the
 PackageFolder service.

 createInstanceWithArguments - This accepts one boolean value as an
 argument. If it set to true, a PackageFolder implementation is created,
 if it is set to false, a PackageStream implementation is created.

 Creating and inserting a new stream would be done as follows:

 1. xNewStream = package->createInstanceWithArguments( false );
 2. xDataStream = new MyStreamImpl(). (wherever the data comes from)
 3. xNewStream->setInputStream( xDataStream );
 4. parentFolder->insertByName( "image.png", xNewStream );

 Replacing an existing stream would be very similar, except that the
 call ->insertByName would be replaced by ->replaceByName.
 </p>
</td>
</tr>
<tr>
<td class="imsum_left">::com::sun::star::<a href="../util/module-ix.html">util</a>::<a href="../util/XChangesBatch.html">XChangesBatch</a></td>
<td class="imsum_right"><p>This interface is used to commit any changes to the Package. A new
 Package file will be written with any new or changed streams/folders and
 omitting any PackageStream or PackageFolder that has been removed.
 </p>
</td>
</tr>
</table>
<a name="InterfacesDetails"/><table border="1" width="100%" cellpadding="5" cellspacing="0" class="subtitle">
<tr>
<td class="subtitle" colspan="2">Exported Interfaces - Details</td>
</tr>
<tr/>
<tr>
<td class="imdetail"><a name="XInitialization" class="membertitle">::com::sun::star::<a href="../lang/module-ix.html">lang</a>::<a href="../lang/XInitialization.html">XInitialization</a></a><table border="0" width="96%" cellpadding="5" cellspacing="0" class="table-in-data" bgcolor="#ffffff" align="center">
<tr>
<td><dl>
<dt><b>Description</b></dt>
<dd>A Package can be initialized with one of the following:

 1. A file URL referring to a package.
 2. An XInputStream referring to a package (it must also
 support an XSeekable interface).
 3. An XStream referring to a package. The XInputStream must support
 an XSeekable interface, and the XOutputStream must support an
 XTruncate interface.

 It will throw a css::uno::Exception if initialized with bad data or
 if the package has an invalid format (for example, a corrupt central
 directory record if the file is a ZIP file).
 </dd>
</dl>
</td>
</tr>
</table>
</td>
</tr>
<tr/>
<tr>
<td class="imdetail"><a name="XHierarchicalNameAccess" class="membertitle">::com::sun::star::<a href="../container/module-ix.html">container</a>::<a href="../container/XHierarchicalNameAccess.html">XHierarchicalNameAccess</a></a><table border="0" width="96%" cellpadding="5" cellspacing="0" class="table-in-data" bgcolor="#ffffff" align="center">
<tr>
<td><dl>
<dt><b>Description</b></dt>
<dd>This interface is used to get access to any entry within the package
 For example:
 getByHierarchicalName ("folder/subfolder/file1.txt");
 This will return a PackageStream which refers to the specified stream.
 This is also used to get access to a particular folder within the
 Package. For example:
 getByHierarchicalName ("folder/subfolder/");
 This will return a PackageFolder which describes the contents of the specified
 folder.

 Calls to methods of XHierarchicalNameAccess must NOT have a leading slash.
 </dd>
</dl>
</td>
</tr>
</table>
</td>
</tr>
<tr/>
<tr>
<td class="imdetail"><a name="XSingleServiceFactory" class="membertitle">::com::sun::star::<a href="../lang/module-ix.html">lang</a>::<a href="../lang/XSingleServiceFactory.html">XSingleServiceFactory</a></a><table border="0" width="96%" cellpadding="5" cellspacing="0" class="table-in-data" bgcolor="#ffffff" align="center">
<tr>
<td><dl>
<dt><b>Description</b></dt>
<dd>This interface is used to create new PackageStream or PackageFolder
 implementation objects for addition to the Package.

 createInstance - creates a new stream implementation object (when first
 created, the new object is not part of the Package). It must be added
 to the PackageFolder in which it will reside using the methods in the
 PackageFolder service.

 createInstanceWithArguments - This accepts one boolean value as an
 argument. If it set to true, a PackageFolder implementation is created,
 if it is set to false, a PackageStream implementation is created.

 Creating and inserting a new stream would be done as follows:

 1. xNewStream = package->createInstanceWithArguments( false );
 2. xDataStream = new MyStreamImpl(). (wherever the data comes from)
 3. xNewStream->setInputStream( xDataStream );
 4. parentFolder->insertByName( "image.png", xNewStream );

 Replacing an existing stream would be very similar, except that the
 call ->insertByName would be replaced by ->replaceByName.
 </dd>
</dl>
</td>
</tr>
</table>
</td>
</tr>
<tr/>
<tr>
<td class="imdetail"><a name="XChangesBatch" class="membertitle">::com::sun::star::<a href="../util/module-ix.html">util</a>::<a href="../util/XChangesBatch.html">XChangesBatch</a></a><table border="0" width="96%" cellpadding="5" cellspacing="0" class="table-in-data" bgcolor="#ffffff" align="center">
<tr>
<td><dl>
<dt><b>Description</b></dt>
<dd>This interface is used to commit any changes to the Package. A new
 Package file will be written with any new or changed streams/folders and
 omitting any PackageStream or PackageFolder that has been removed.
 </dd>
</dl>
</td>
</tr>
</table>
</td>
</tr>
</table>
<br>&nbsp;<a href="#_top_">Top of Page</a><hr size="3"><p class="copyright" align="center">Copyright &copy; 2000, 2012 LibreOffice contributors and/or their affiliates. All rights reserved.</p><p class="copyright" align="center">LibreOffice was created by The Document Foundation, based on OpenOffice.org, which is Copyright 2000, 2010 Oracle and/or its affiliates.</p><p class="copyright" align="center">The Document Foundation acknowledges all community members, please find more info <a href="http://www.libreoffice.org/about-us/credits/" target="_blank">at our website</a>.<p>&nbsp;</p><p class="copyright" align="center"><a href="http://www.libreoffice.org/privacy" target="_blank">Privacy Policy</a> | <a href="http://www.libreoffice.org/imprint" target="_blank">Impressum (Legal Info)</a> | Copyright information: The source code of LibreOffice is licensed under the GNU Lesser General Public License (<a href="http://www.libreoffice.org/download/license/" target="_blank">LGPLv3</a>). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our <a href="http://wiki.documentfoundation.org/TradeMark_Policy" target="_blank">trademark policy</a>.</p>

</div> <!-- id="adc-idlref" -->
</body>

</html>