1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* vim:set ts=2 sw=2 sts=2 et cindent tw=79 ft=cpp: */
4 * Copyright (C) 2007 Sergey Yanovich <ynvich@gmail.com>
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License as
8 * published by the Free Software Foundation; either version 2 of the
9 * License, or (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * General Public License for more details.
16 * You should have received a copy of the GNU General Public
17 * License along with this program; if not, write to the
18 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
19 * Boston, MA 02111-1307, USA.
22 #include "xpcom-config.h"
25 #include "nsStringAPI.h"
26 #include "nsServiceManagerUtils.h"
29 #include "nsIStringBundle.h"
31 /* Project includes */
32 #include "aaIEntity.h"
33 #include "aaIResource.h"
34 #include "aaIHandler.h"
35 #include "aaIncomeFlow.h"
37 aaIncomeFlow::aaIncomeFlow()
41 aaIncomeFlow::~aaIncomeFlow()
45 NS_IMPL_ISUPPORTS3(aaIncomeFlow
,
51 aaIncomeFlow::GetId(PRInt64
*aId
)
53 NS_ENSURE_ARG_POINTER(aId
);
58 aaIncomeFlow::SetId(PRInt64 aId
)
60 return NS_ERROR_NOT_IMPLEMENTED
;
64 aaIncomeFlow::Accept(aaIHandler
* aQuery
)
66 NS_ENSURE_ARG_POINTER(aQuery
);
67 return aQuery
->HandleFlow(this);
71 aaIncomeFlow::GetEdited(PRBool
* aEdited
)
73 NS_ENSURE_ARG_POINTER(aEdited
);
79 aaIncomeFlow::Sync(aaIStorager
*aStorager
, aaISqliteChannel
*aChannel
)
81 return NS_ERROR_NOT_IMPLEMENTED
;
86 aaIncomeFlow::PickId()
92 aaIncomeFlow::GetTag(nsAString
& aTag
)
95 nsCOMPtr
<nsIStringBundleService
> heap
= do_GetService(
96 NS_STRINGBUNDLE_CONTRACTID
, &rv
);
97 NS_ENSURE_SUCCESS(rv
, rv
);
99 nsCOMPtr
<nsIStringBundle
> bundle
;
100 rv
= heap
->CreateBundle("chrome://abstract/locale/abstract.properties",
101 getter_AddRefs( bundle
));
102 NS_ENSURE_SUCCESS(rv
, rv
);
105 rv
= bundle
->GetStringFromName(NS_LITERAL_STRING("terms.profits").get(),
107 NS_ENSURE_SUCCESS(rv
, rv
);
113 aaIncomeFlow::SetTag(const nsAString
& aTag
)
115 return NS_ERROR_NOT_IMPLEMENTED
;
119 aaIncomeFlow::GetEntity(aaIEntity
** aEntity
)
121 NS_ENSURE_ARG_POINTER(aEntity
);
126 aaIncomeFlow::SetEntity(aaIEntity
* aEntity
)
128 return NS_ERROR_NOT_IMPLEMENTED
;
132 aaIncomeFlow::GetGiveResource(aaIResource
** aGiveResource
)
134 NS_ENSURE_ARG_POINTER(aGiveResource
);
135 *aGiveResource
= nsnull
;
139 aaIncomeFlow::SetGiveResource(aaIResource
* aGiveResource
)
141 return NS_ERROR_NOT_IMPLEMENTED
;
144 aaIncomeFlow::PickGiveResource()
150 aaIncomeFlow::GetTakeResource(aaIResource
** aTakeResource
)
152 NS_ENSURE_ARG_POINTER(aTakeResource
);
153 *aTakeResource
= nsnull
;
157 aaIncomeFlow::SetTakeResource(aaIResource
* aTakeResource
)
159 return NS_ERROR_NOT_IMPLEMENTED
;
162 aaIncomeFlow::PickTakeResource()
168 aaIncomeFlow::GetRate(double *aRate
)
170 NS_ENSURE_ARG_POINTER(aRate
);
175 aaIncomeFlow::SetRate(double aRate
)
177 return NS_ERROR_NOT_IMPLEMENTED
;
181 aaIncomeFlow::GetLimit(double *aLimit
)
183 return NS_ERROR_NOT_IMPLEMENTED
;
186 aaIncomeFlow::SetLimit(double aLimit
)
188 return NS_ERROR_NOT_IMPLEMENTED
;
192 aaIncomeFlow::GetIsOffBalance(PRBool
*aIsOffBalance
)
194 return NS_ERROR_NOT_IMPLEMENTED
;
197 aaIncomeFlow::SetIsOffBalance(PRBool aIsOffBalance
)
199 return NS_ERROR_NOT_IMPLEMENTED
;
202 aaIncomeFlow::PickIsOffBalance()
208 aaIncomeFlow::StoreRule(aaIRule
*aRule
)
210 return NS_ERROR_NOT_IMPLEMENTED
;