sbFileSystemChange.cpp
Go to the documentation of this file.
1 /*
2 //
3 // Copyright(c) 2005-2009 POTI, Inc.
4 // http://songbirdnest.com
5 //
6 // This file may be licensed under the terms of of the
7 // GNU General Public License Version 2 (the "GPL").
8 //
9 // Software distributed under the License is distributed
10 // on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either
11 // express or implied. See the GPL for the specific language
12 // governing rights and limitations.
13 //
14 // You should have received a copy of the GPL along with this
15 // program. If not, go to http://www.gnu.org/licenses/gpl.html
16 // or write to the Free Software Foundation, Inc.,
17 // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
18 //
19 // END SONGBIRD GPL
20 //
21 */
22 
23 #include "sbFileSystemChange.h"
24 #include "sbFileSystemNode.h"
25 
26 
28 
30 {
31 }
32 
34 {
35 }
36 
37 NS_IMETHODIMP
39 {
40  mChangeType = aChangeType;
41  return NS_OK;
42 }
43 
44 NS_IMETHODIMP
46 {
47  NS_ENSURE_ARG_POINTER(aChangeType);
48  *aChangeType = mChangeType;
49  return NS_OK;
50 }
51 
52 //------------------------------------------------------------------------------
53 
55 {
56 }
57 
59  EChangeType aChangeType)
60  : mNode(aNode)
61 {
62  mChangeType = aChangeType;
63  NS_ASSERTION(aNode, "Invalid node passed into constructor!");
64 }
65 
67 {
68 }
69 
70 nsresult
72 {
73  NS_ENSURE_ARG_POINTER(aNode);
74  mNode = aNode;
75  return NS_OK;
76 }
77 
78 nsresult
80 {
81  NS_ENSURE_ARG_POINTER(aRetVal);
82  NS_IF_ADDREF(*aRetVal = mNode);
83  return NS_OK;
84 }
85 
86 //------------------------------------------------------------------------------
87 
89 {
90 }
91 
92 sbFileSystemPathChange::sbFileSystemPathChange(const nsAString & aChangePath,
93  EChangeType aChangeType)
94  : mChangePath(aChangePath)
95 {
96  mChangeType = aChangeType;
97 }
98 
100 {
101 }
102 
103 nsresult
104 sbFileSystemPathChange::SetChangePath(const nsAString & aChangePath)
105 {
106  mChangePath.Assign(aChangePath);
107  return NS_OK;
108 }
109 
110 nsresult
112 {
113  aChangePath.Assign(mChangePath);
114  return NS_OK;
115 }
116 
NS_IMPL_THREADSAFE_ISUPPORTS0(sbMetadataCrashTracker)
return NS_OK
nsresult SetNode(sbFileSystemNode *aNode)
NS_DECL_ISUPPORTS NS_IMETHOD SetChangeType(EChangeType aChangeType)
nsresult GetChangePath(nsAString &aChangePath)
NS_IMETHOD GetChangeType(EChangeType *aChangeType)
nsresult SetChangePath(const nsAString &aChangePath)
nsresult GetNode(sbFileSystemNode **aRetVal)