On x86 compilers without fastcall, simulate it when invoking traces and un-simulate...
[wine-gecko.git] / xpcom / io / nsLocalFileOS2.h
bloba39390377bba1b40fb0f0384ffd6755033ea8d91
1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* ***** BEGIN LICENSE BLOCK *****
3 * Version: MPL 1.1/GPL 2.0/LGPL 2.1
5 * The contents of this file are subject to the Mozilla Public License Version
6 * 1.1 (the "License"); you may not use this file except in compliance with
7 * the License. You may obtain a copy of the License at
8 * http://www.mozilla.org/MPL/
10 * Software distributed under the License is distributed on an "AS IS" basis,
11 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
12 * for the specific language governing rights and limitations under the
13 * License.
15 * The Original Code is Mozilla Communicator client code, released
16 * March 31, 1998.
18 * The Initial Developer of the Original Code is
19 * Netscape Communications Corporation.
20 * Portions created by the Initial Developer are Copyright (C) 1998-2000
21 * the Initial Developer. All Rights Reserved.
23 * Contributor(s):
24 * Rich Walsh <dragtext@e-vertise.com>
26 * Alternatively, the contents of this file may be used under the terms of
27 * either of the GNU General Public License Version 2 or later (the "GPL"),
28 * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
29 * in which case the provisions of the GPL or the LGPL are applicable instead
30 * of those above. If you wish to allow use of your version of this file only
31 * under the terms of either the GPL or the LGPL, and not to allow others to
32 * use your version of this file under the terms of the MPL, indicate your
33 * decision by deleting the provisions above and replace them with the notice
34 * and other provisions required by the GPL or the LGPL. If you do not delete
35 * the provisions above, a recipient may use your version of this file under
36 * the terms of any one of the MPL, the GPL or the LGPL.
38 * ***** END LICENSE BLOCK *****
40 * This Original Code has been modified by IBM Corporation. Modifications made by IBM
41 * described herein are Copyright (c) International Business Machines Corporation, 2000.
42 * Modifications to Mozilla code or documentation identified per MPL Section 3.3
44 * Date Modified by Description of modification
45 * 05/26/2000 IBM Corp. Make more like Windows.
48 #ifndef _nsLocalFileOS2_H_
49 #define _nsLocalFileOS2_H_
51 #include "nscore.h"
52 #include "nsError.h"
53 #include "nsString.h"
54 #include "nsCRT.h"
55 #include "nsIFile.h"
56 #include "nsIFactory.h"
57 #include "nsILocalFileOS2.h"
58 #include "nsIHashable.h"
59 #include "nsIClassInfoImpl.h"
61 #define INCL_DOSFILEMGR
62 #define INCL_DOSERRORS
63 #define INCL_DOSPROCESS
64 #define INCL_DOSSESMGR
65 #define INCL_DOSMODULEMGR
66 #define INCL_DOSNLS
67 #define INCL_DOSMISC
68 #define INCL_WINCOUNTRY
69 #define INCL_WINWORKPLACE
71 #include <os2.h>
73 class TypeEaEnumerator;
75 class NS_COM nsLocalFile : public nsILocalFileOS2,
76 public nsIHashable
78 public:
79 NS_DEFINE_STATIC_CID_ACCESSOR(NS_LOCAL_FILE_CID)
81 nsLocalFile();
83 static NS_METHOD nsLocalFileConstructor(nsISupports* outer, const nsIID& aIID, void* *aInstancePtr);
85 // nsISupports interface
86 NS_DECL_ISUPPORTS
88 // nsIFile interface
89 NS_DECL_NSIFILE
91 // nsILocalFile interface
92 NS_DECL_NSILOCALFILE
94 // nsILocalFileOS2 interface
95 NS_DECL_NSILOCALFILEOS2
97 // nsIHashable interface
98 NS_DECL_NSIHASHABLE
100 public:
101 static void GlobalInit();
102 static void GlobalShutdown();
104 private:
105 nsLocalFile(const nsLocalFile& other);
106 ~nsLocalFile() {}
108 // cached information can only be used when this is PR_FALSE
109 PRPackedBool mDirty;
111 // this string will always be in native format!
112 nsCString mWorkingPath;
114 PRFileInfo64 mFileInfo64;
116 void MakeDirty() { mDirty = PR_TRUE; }
118 nsresult Stat();
120 nsresult CopyMove(nsIFile *newParentDir, const nsACString &newName, PRBool move);
121 nsresult CopySingleFile(nsIFile *source, nsIFile* dest, const nsACString &newName, PRBool move);
123 nsresult SetModDate(PRInt64 aLastModifiedTime);
124 nsresult AppendNativeInternal(const nsAFlatCString &node, PRBool multipleComponents);
126 nsresult GetEA(const char *eaName, PFEA2LIST pfea2list);
127 friend class TypeEaEnumerator;
130 #endif