зеркало из https://github.com/mozilla/pjs.git
Bug 674725 - Part AS - Remove SmsCursor.filter. r=sicking
This commit is contained in:
Родитель
cb6b502717
Коммит
73552338bf
|
@ -39,10 +39,9 @@
|
|||
interface nsIDOMMozSmsFilter;
|
||||
interface nsIDOMMozSmsMessage;
|
||||
|
||||
[scriptable, function, uuid(5000ce1d-2ed3-4be5-b34c-439907489995)]
|
||||
[scriptable, function, uuid(77b41d7e-ccb1-4480-8322-2af7bc437a3c)]
|
||||
interface nsIDOMMozSmsCursor : nsISupports
|
||||
{
|
||||
readonly attribute nsIDOMMozSmsFilter filter;
|
||||
// Can be null if there is no more results.
|
||||
readonly attribute nsIDOMMozSmsMessage message;
|
||||
void continue();
|
||||
|
|
|
@ -38,7 +38,6 @@
|
|||
#include "SmsCursor.h"
|
||||
#include "nsIDOMClassInfo.h"
|
||||
#include "nsDOMError.h"
|
||||
#include "nsIDOMSmsFilter.h"
|
||||
#include "nsIDOMSmsMessage.h"
|
||||
#include "nsIDOMSmsRequest.h"
|
||||
#include "SmsRequest.h"
|
||||
|
@ -57,20 +56,18 @@ NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(SmsCursor)
|
|||
NS_DOM_INTERFACE_MAP_ENTRY_CLASSINFO(MozSmsCursor)
|
||||
NS_INTERFACE_MAP_END
|
||||
|
||||
NS_IMPL_CYCLE_COLLECTION_3(SmsCursor, mFilter, mRequest, mMessage)
|
||||
NS_IMPL_CYCLE_COLLECTION_2(SmsCursor, mRequest, mMessage)
|
||||
|
||||
NS_IMPL_CYCLE_COLLECTING_ADDREF(SmsCursor)
|
||||
NS_IMPL_CYCLE_COLLECTING_RELEASE(SmsCursor)
|
||||
|
||||
SmsCursor::SmsCursor(nsIDOMMozSmsFilter* aFilter)
|
||||
SmsCursor::SmsCursor()
|
||||
: mListId(-1)
|
||||
, mFilter(aFilter)
|
||||
{
|
||||
}
|
||||
|
||||
SmsCursor::SmsCursor(PRInt32 aListId, nsIDOMMozSmsFilter* aFilter, nsIDOMMozSmsRequest* aRequest)
|
||||
SmsCursor::SmsCursor(PRInt32 aListId, nsIDOMMozSmsRequest* aRequest)
|
||||
: mListId(aListId)
|
||||
, mFilter(aFilter)
|
||||
, mRequest(aRequest)
|
||||
{
|
||||
}
|
||||
|
@ -84,13 +81,6 @@ SmsCursor::Disconnect()
|
|||
mListId = -1;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
SmsCursor::GetFilter(nsIDOMMozSmsFilter** aFilter)
|
||||
{
|
||||
NS_ADDREF(*aFilter = mFilter);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
SmsCursor::GetMessage(nsIDOMMozSmsMessage** aMessage)
|
||||
{
|
||||
|
|
|
@ -42,7 +42,6 @@
|
|||
#include "nsCycleCollectionParticipant.h"
|
||||
#include "nsCOMPtr.h"
|
||||
|
||||
class nsIDOMMozSmsFilter;
|
||||
class nsIDOMMozSmsMessage;
|
||||
class nsIDOMMozSmsRequest;
|
||||
|
||||
|
@ -58,8 +57,8 @@ public:
|
|||
|
||||
NS_DECL_CYCLE_COLLECTION_CLASS(SmsCursor)
|
||||
|
||||
SmsCursor(nsIDOMMozSmsFilter* aFilter);
|
||||
SmsCursor(PRInt32 aListId, nsIDOMMozSmsFilter* aFilter, nsIDOMMozSmsRequest* aRequest);
|
||||
SmsCursor();
|
||||
SmsCursor(PRInt32 aListId, nsIDOMMozSmsRequest* aRequest);
|
||||
|
||||
void SetMessage(nsIDOMMozSmsMessage* aMessage);
|
||||
|
||||
|
@ -67,7 +66,6 @@ public:
|
|||
|
||||
private:
|
||||
PRInt32 mListId;
|
||||
nsCOMPtr<nsIDOMMozSmsFilter> mFilter;
|
||||
nsCOMPtr<nsIDOMMozSmsRequest> mRequest;
|
||||
nsCOMPtr<nsIDOMMozSmsMessage> mMessage;
|
||||
};
|
||||
|
|
|
@ -211,12 +211,11 @@ SmsRequestManager::NotifySmsDeleteFailed(PRInt32 aRequestId, SmsRequest::ErrorTy
|
|||
void
|
||||
SmsRequestManager::NotifyNoMessageInList(PRInt32 aRequestId)
|
||||
{
|
||||
// TODO: use Filter!
|
||||
SmsRequest* request = GetRequest(aRequestId);
|
||||
|
||||
nsCOMPtr<nsIDOMMozSmsCursor> cursor = request->GetCursor();
|
||||
if (!cursor) {
|
||||
cursor = new SmsCursor(nsnull);
|
||||
cursor = new SmsCursor();
|
||||
} else {
|
||||
static_cast<SmsCursor*>(cursor.get())->Disconnect();
|
||||
}
|
||||
|
@ -228,10 +227,9 @@ void
|
|||
SmsRequestManager::NotifyCreateMessageList(PRInt32 aRequestId, PRInt32 aListId,
|
||||
nsIDOMMozSmsMessage* aMessage)
|
||||
{
|
||||
// TODO: use Filter!
|
||||
SmsRequest* request = GetRequest(aRequestId);
|
||||
|
||||
nsCOMPtr<SmsCursor> cursor = new SmsCursor(aListId, nsnull, request);
|
||||
nsCOMPtr<SmsCursor> cursor = new SmsCursor(aListId, request);
|
||||
cursor->SetMessage(aMessage);
|
||||
|
||||
NotifySuccess<nsIDOMMozSmsCursor*>(aRequestId, cursor);
|
||||
|
|
Загрузка…
Ссылка в новой задаче