c6e3bda895b60a49b6adb3d53b63e45395c659b1vboxsync/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
c6e3bda895b60a49b6adb3d53b63e45395c659b1vboxsync * ***** BEGIN LICENSE BLOCK *****
c6e3bda895b60a49b6adb3d53b63e45395c659b1vboxsync * Version: MPL 1.1/GPL 2.0/LGPL 2.1
c6e3bda895b60a49b6adb3d53b63e45395c659b1vboxsync *
c6e3bda895b60a49b6adb3d53b63e45395c659b1vboxsync * The contents of this file are subject to the Mozilla Public License Version
c6e3bda895b60a49b6adb3d53b63e45395c659b1vboxsync * 1.1 (the "License"); you may not use this file except in compliance with
c6e3bda895b60a49b6adb3d53b63e45395c659b1vboxsync * the License. You may obtain a copy of the License at
c6e3bda895b60a49b6adb3d53b63e45395c659b1vboxsync * http://www.mozilla.org/MPL/
c6e3bda895b60a49b6adb3d53b63e45395c659b1vboxsync *
c6e3bda895b60a49b6adb3d53b63e45395c659b1vboxsync * Software distributed under the License is distributed on an "AS IS" basis,
c6e3bda895b60a49b6adb3d53b63e45395c659b1vboxsync * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
c6e3bda895b60a49b6adb3d53b63e45395c659b1vboxsync * for the specific language governing rights and limitations under the
c6e3bda895b60a49b6adb3d53b63e45395c659b1vboxsync * License.
c6e3bda895b60a49b6adb3d53b63e45395c659b1vboxsync *
c6e3bda895b60a49b6adb3d53b63e45395c659b1vboxsync * The Original Code is mozilla.org code.
c6e3bda895b60a49b6adb3d53b63e45395c659b1vboxsync *
c6e3bda895b60a49b6adb3d53b63e45395c659b1vboxsync * The Initial Developer of the Original Code is
c6e3bda895b60a49b6adb3d53b63e45395c659b1vboxsync * Richard L. Walsh.
c6e3bda895b60a49b6adb3d53b63e45395c659b1vboxsync * Portions created by the Initial Developer are Copyright (C) 2005
c6e3bda895b60a49b6adb3d53b63e45395c659b1vboxsync * the Initial Developer. All Rights Reserved.
c6e3bda895b60a49b6adb3d53b63e45395c659b1vboxsync *
c6e3bda895b60a49b6adb3d53b63e45395c659b1vboxsync * Contributor(s):
c6e3bda895b60a49b6adb3d53b63e45395c659b1vboxsync * Rich Walsh <dragtext@e-vertise.com> (Original Author)
c6e3bda895b60a49b6adb3d53b63e45395c659b1vboxsync *
c6e3bda895b60a49b6adb3d53b63e45395c659b1vboxsync * Alternatively, the contents of this file may be used under the terms of
c6e3bda895b60a49b6adb3d53b63e45395c659b1vboxsync * either the GNU General Public License Version 2 or later (the "GPL"), or
c6e3bda895b60a49b6adb3d53b63e45395c659b1vboxsync * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
c6e3bda895b60a49b6adb3d53b63e45395c659b1vboxsync * in which case the provisions of the GPL or the LGPL are applicable instead
c6e3bda895b60a49b6adb3d53b63e45395c659b1vboxsync * of those above. If you wish to allow use of your version of this file only
c6e3bda895b60a49b6adb3d53b63e45395c659b1vboxsync * under the terms of either the GPL or the LGPL, and not to allow others to
c6e3bda895b60a49b6adb3d53b63e45395c659b1vboxsync * use your version of this file under the terms of the MPL, indicate your
c6e3bda895b60a49b6adb3d53b63e45395c659b1vboxsync * decision by deleting the provisions above and replace them with the notice
c6e3bda895b60a49b6adb3d53b63e45395c659b1vboxsync * and other provisions required by the GPL or the LGPL. If you do not delete
c6e3bda895b60a49b6adb3d53b63e45395c659b1vboxsync * the provisions above, a recipient may use your version of this file under
c6e3bda895b60a49b6adb3d53b63e45395c659b1vboxsync * the terms of any one of the MPL, the GPL or the LGPL.
c6e3bda895b60a49b6adb3d53b63e45395c659b1vboxsync *
c6e3bda895b60a49b6adb3d53b63e45395c659b1vboxsync * ***** END LICENSE BLOCK *****
c6e3bda895b60a49b6adb3d53b63e45395c659b1vboxsync */
c6e3bda895b60a49b6adb3d53b63e45395c659b1vboxsync
c6e3bda895b60a49b6adb3d53b63e45395c659b1vboxsync#include "nsILocalFile.idl"
c6e3bda895b60a49b6adb3d53b63e45395c659b1vboxsync
c6e3bda895b60a49b6adb3d53b63e45395c659b1vboxsyncinterface nsIArray;
c6e3bda895b60a49b6adb3d53b63e45395c659b1vboxsync
c6e3bda895b60a49b6adb3d53b63e45395c659b1vboxsync[scriptable, uuid(26de2089-239d-4697-818b-bae1fe8e8e0d)]
c6e3bda895b60a49b6adb3d53b63e45395c659b1vboxsyncinterface nsILocalFileOS2 : nsILocalFile
c6e3bda895b60a49b6adb3d53b63e45395c659b1vboxsync{
c6e3bda895b60a49b6adb3d53b63e45395c659b1vboxsync /**
c6e3bda895b60a49b6adb3d53b63e45395c659b1vboxsync * getFileTypes
c6e3bda895b60a49b6adb3d53b63e45395c659b1vboxsync *
c6e3bda895b60a49b6adb3d53b63e45395c659b1vboxsync * Returns the file's .TYPE extended attribute as an array of
c6e3bda895b60a49b6adb3d53b63e45395c659b1vboxsync * nsISupportsCStrings.
c6e3bda895b60a49b6adb3d53b63e45395c659b1vboxsync *
c6e3bda895b60a49b6adb3d53b63e45395c659b1vboxsync */
c6e3bda895b60a49b6adb3d53b63e45395c659b1vboxsync nsIArray getFileTypes( );
c6e3bda895b60a49b6adb3d53b63e45395c659b1vboxsync
c6e3bda895b60a49b6adb3d53b63e45395c659b1vboxsync /**
c6e3bda895b60a49b6adb3d53b63e45395c659b1vboxsync * setFileTypes
c6e3bda895b60a49b6adb3d53b63e45395c659b1vboxsync *
c6e3bda895b60a49b6adb3d53b63e45395c659b1vboxsync * Sets the file's .TYPE extended attribute from a comma-separated
c6e3bda895b60a49b6adb3d53b63e45395c659b1vboxsync * list of types (this format is used because clients are unlikely
c6e3bda895b60a49b6adb3d53b63e45395c659b1vboxsync * to write more than a single type).
c6e3bda895b60a49b6adb3d53b63e45395c659b1vboxsync * @param fileTypes
c6e3bda895b60a49b6adb3d53b63e45395c659b1vboxsync * a string in the filesystem's native character set
c6e3bda895b60a49b6adb3d53b63e45395c659b1vboxsync *
c6e3bda895b60a49b6adb3d53b63e45395c659b1vboxsync */
c6e3bda895b60a49b6adb3d53b63e45395c659b1vboxsync void setFileTypes( in ACString fileTypes );
c6e3bda895b60a49b6adb3d53b63e45395c659b1vboxsync
c6e3bda895b60a49b6adb3d53b63e45395c659b1vboxsync /**
c6e3bda895b60a49b6adb3d53b63e45395c659b1vboxsync * isFileType
c6e3bda895b60a49b6adb3d53b63e45395c659b1vboxsync *
c6e3bda895b60a49b6adb3d53b63e45395c659b1vboxsync * Returns TRUE if the file has a .TYPE extended attribute that
c6e3bda895b60a49b6adb3d53b63e45395c659b1vboxsync * matches the string passed in. The comparison is case-sensitive.
c6e3bda895b60a49b6adb3d53b63e45395c659b1vboxsync * @param fileType
c6e3bda895b60a49b6adb3d53b63e45395c659b1vboxsync * a string in the filesystem's native character set
c6e3bda895b60a49b6adb3d53b63e45395c659b1vboxsync *
c6e3bda895b60a49b6adb3d53b63e45395c659b1vboxsync */
c6e3bda895b60a49b6adb3d53b63e45395c659b1vboxsync PRBool isFileType( in ACString fileType );
c6e3bda895b60a49b6adb3d53b63e45395c659b1vboxsync
c6e3bda895b60a49b6adb3d53b63e45395c659b1vboxsync /**
c6e3bda895b60a49b6adb3d53b63e45395c659b1vboxsync * setFileSource
c6e3bda895b60a49b6adb3d53b63e45395c659b1vboxsync *
c6e3bda895b60a49b6adb3d53b63e45395c659b1vboxsync * Identifies the origin of a downloaded file by writing the
c6e3bda895b60a49b6adb3d53b63e45395c659b1vboxsync * source URI's spec to the .SUBJECT extended attribute.
c6e3bda895b60a49b6adb3d53b63e45395c659b1vboxsync *
c6e3bda895b60a49b6adb3d53b63e45395c659b1vboxsync * @param aURI
c6e3bda895b60a49b6adb3d53b63e45395c659b1vboxsync * the source URI
c6e3bda895b60a49b6adb3d53b63e45395c659b1vboxsync *
c6e3bda895b60a49b6adb3d53b63e45395c659b1vboxsync */
c6e3bda895b60a49b6adb3d53b63e45395c659b1vboxsync void setFileSource( in AUTF8String aURI );
c6e3bda895b60a49b6adb3d53b63e45395c659b1vboxsync};