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 "nsEmbedString.h"
27 #include "nsServiceManagerUtils.h"
30 #include "nsIStringBundle.h"
32 /* Project includes */
33 #include "aaIEntity.h"
34 #include "aaIResource.h"
35 #include "aaIHandler.h"
36 #include "aaIncomeFlow.h"
38 aaIncomeFlow::aaIncomeFlow()
42 aaIncomeFlow::~aaIncomeFlow()
46 NS_IMPL_ISUPPORTS2(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
);
80 aaIncomeFlow::PickId()
86 aaIncomeFlow::GetTag(nsAString
& aTag
)
89 nsCOMPtr
<nsIStringBundleService
> heap
= do_GetService(
90 NS_STRINGBUNDLE_CONTRACTID
, &rv
);
91 NS_ENSURE_SUCCESS(rv
, rv
);
93 nsCOMPtr
<nsIStringBundle
> bundle
;
94 rv
= heap
->CreateBundle("chrome://abstract/locale/abstract.properties",
95 getter_AddRefs( bundle
));
96 NS_ENSURE_SUCCESS(rv
, rv
);
99 rv
= bundle
->GetStringFromName(NS_LITERAL_STRING("terms.profits").get(), &w
);
100 NS_ENSURE_SUCCESS(rv
, rv
);
106 aaIncomeFlow::SetTag(const nsAString
& aTag
)
108 return NS_ERROR_NOT_IMPLEMENTED
;
112 aaIncomeFlow::GetEntity(aaIEntity
** aEntity
)
114 NS_ENSURE_ARG_POINTER(aEntity
);
119 aaIncomeFlow::SetEntity(aaIEntity
* aEntity
)
121 return NS_ERROR_NOT_IMPLEMENTED
;
125 aaIncomeFlow::GetGiveResource(aaIResource
** aGiveResource
)
127 NS_ENSURE_ARG_POINTER(aGiveResource
);
128 *aGiveResource
= nsnull
;
132 aaIncomeFlow::SetGiveResource(aaIResource
* aGiveResource
)
134 return NS_ERROR_NOT_IMPLEMENTED
;
138 aaIncomeFlow::GetTakeResource(aaIResource
** aTakeResource
)
140 NS_ENSURE_ARG_POINTER(aTakeResource
);
141 *aTakeResource
= nsnull
;
145 aaIncomeFlow::SetTakeResource(aaIResource
* aTakeResource
)
147 return NS_ERROR_NOT_IMPLEMENTED
;
151 aaIncomeFlow::GetRate(double *aRate
)
153 NS_ENSURE_ARG_POINTER(aRate
);
158 aaIncomeFlow::SetRate(double aRate
)
160 return NS_ERROR_NOT_IMPLEMENTED
;
164 aaIncomeFlow::GetLimit(double *aLimit
)
166 return NS_ERROR_NOT_IMPLEMENTED
;
169 aaIncomeFlow::SetLimit(double aLimit
)
171 return NS_ERROR_NOT_IMPLEMENTED
;