mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-14 15:37:55 +00:00
858dfa00a5
--HG-- rename : dom/mobilemessage/src/Constants.cpp => dom/mobilemessage/Constants.cpp rename : dom/mobilemessage/src/Constants.h => dom/mobilemessage/Constants.h rename : dom/mobilemessage/src/DOMMobileMessageError.cpp => dom/mobilemessage/DOMMobileMessageError.cpp rename : dom/mobilemessage/src/DOMMobileMessageError.h => dom/mobilemessage/DOMMobileMessageError.h rename : dom/mobilemessage/src/DeletedMessageInfo.cpp => dom/mobilemessage/DeletedMessageInfo.cpp rename : dom/mobilemessage/src/DeletedMessageInfo.h => dom/mobilemessage/DeletedMessageInfo.h rename : dom/mobilemessage/src/MmsMessage.cpp => dom/mobilemessage/MmsMessage.cpp rename : dom/mobilemessage/src/MmsMessage.h => dom/mobilemessage/MmsMessage.h rename : dom/mobilemessage/src/MobileMessageCallback.cpp => dom/mobilemessage/MobileMessageCallback.cpp rename : dom/mobilemessage/src/MobileMessageCallback.h => dom/mobilemessage/MobileMessageCallback.h rename : dom/mobilemessage/src/MobileMessageCursorCallback.cpp => dom/mobilemessage/MobileMessageCursorCallback.cpp rename : dom/mobilemessage/src/MobileMessageCursorCallback.h => dom/mobilemessage/MobileMessageCursorCallback.h rename : dom/mobilemessage/src/MobileMessageManager.cpp => dom/mobilemessage/MobileMessageManager.cpp rename : dom/mobilemessage/src/MobileMessageManager.h => dom/mobilemessage/MobileMessageManager.h rename : dom/mobilemessage/src/MobileMessageService.cpp => dom/mobilemessage/MobileMessageService.cpp rename : dom/mobilemessage/src/MobileMessageService.h => dom/mobilemessage/MobileMessageService.h rename : dom/mobilemessage/src/MobileMessageThread.cpp => dom/mobilemessage/MobileMessageThread.cpp rename : dom/mobilemessage/src/MobileMessageThread.h => dom/mobilemessage/MobileMessageThread.h rename : dom/mobilemessage/src/SmsMessage.cpp => dom/mobilemessage/SmsMessage.cpp rename : dom/mobilemessage/src/SmsMessage.h => dom/mobilemessage/SmsMessage.h rename : dom/mobilemessage/src/SmsServicesFactory.cpp => dom/mobilemessage/SmsServicesFactory.cpp rename : dom/mobilemessage/src/SmsServicesFactory.h => dom/mobilemessage/SmsServicesFactory.h rename : dom/mobilemessage/src/Types.h => dom/mobilemessage/Types.h rename : dom/mobilemessage/src/android/MobileMessageDatabaseService.cpp => dom/mobilemessage/android/MobileMessageDatabaseService.cpp rename : dom/mobilemessage/src/android/MobileMessageDatabaseService.h => dom/mobilemessage/android/MobileMessageDatabaseService.h rename : dom/mobilemessage/src/android/SmsService.cpp => dom/mobilemessage/android/SmsService.cpp rename : dom/mobilemessage/src/android/SmsService.h => dom/mobilemessage/android/SmsService.h rename : dom/mobilemessage/src/gonk/MmsPduHelper.jsm => dom/mobilemessage/gonk/MmsPduHelper.jsm rename : dom/mobilemessage/src/gonk/MmsService.js => dom/mobilemessage/gonk/MmsService.js rename : dom/mobilemessage/src/gonk/MmsService.manifest => dom/mobilemessage/gonk/MmsService.manifest rename : dom/mobilemessage/src/gonk/MobileMessageDB.jsm => dom/mobilemessage/gonk/MobileMessageDB.jsm rename : dom/mobilemessage/src/gonk/MobileMessageDatabaseService.js => dom/mobilemessage/gonk/MobileMessageDatabaseService.js rename : dom/mobilemessage/src/gonk/MobileMessageDatabaseService.manifest => dom/mobilemessage/gonk/MobileMessageDatabaseService.manifest rename : dom/mobilemessage/src/gonk/SmsService.cpp => dom/mobilemessage/gonk/SmsService.cpp rename : dom/mobilemessage/src/gonk/SmsService.h => dom/mobilemessage/gonk/SmsService.h rename : dom/mobilemessage/src/gonk/WspPduHelper.jsm => dom/mobilemessage/gonk/WspPduHelper.jsm rename : dom/mobilemessage/src/gonk/mms_consts.js => dom/mobilemessage/gonk/mms_consts.js rename : dom/mobilemessage/src/gonk/wap_consts.js => dom/mobilemessage/gonk/wap_consts.js rename : dom/mobilemessage/src/ipc/PMobileMessageCursor.ipdl => dom/mobilemessage/ipc/PMobileMessageCursor.ipdl rename : dom/mobilemessage/src/ipc/PSms.ipdl => dom/mobilemessage/ipc/PSms.ipdl rename : dom/mobilemessage/src/ipc/PSmsRequest.ipdl => dom/mobilemessage/ipc/PSmsRequest.ipdl rename : dom/mobilemessage/src/ipc/SmsChild.cpp => dom/mobilemessage/ipc/SmsChild.cpp rename : dom/mobilemessage/src/ipc/SmsChild.h => dom/mobilemessage/ipc/SmsChild.h rename : dom/mobilemessage/src/ipc/SmsIPCService.cpp => dom/mobilemessage/ipc/SmsIPCService.cpp rename : dom/mobilemessage/src/ipc/SmsIPCService.h => dom/mobilemessage/ipc/SmsIPCService.h rename : dom/mobilemessage/src/ipc/SmsParent.cpp => dom/mobilemessage/ipc/SmsParent.cpp rename : dom/mobilemessage/src/ipc/SmsParent.h => dom/mobilemessage/ipc/SmsParent.h rename : dom/mobilemessage/src/ipc/SmsTypes.ipdlh => dom/mobilemessage/ipc/SmsTypes.ipdlh
164 lines
3.8 KiB
C++
164 lines
3.8 KiB
C++
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
|
* You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
|
|
#ifndef mozilla_dom_mobilemessage_SmsParent_h
|
|
#define mozilla_dom_mobilemessage_SmsParent_h
|
|
|
|
#include "mozilla/dom/mobilemessage/PSmsParent.h"
|
|
#include "mozilla/dom/mobilemessage/PSmsRequestParent.h"
|
|
#include "mozilla/dom/mobilemessage/PMobileMessageCursorParent.h"
|
|
#include "nsIDOMDOMCursor.h"
|
|
#include "nsIMobileMessageCallback.h"
|
|
#include "nsIMobileMessageCursorCallback.h"
|
|
#include "nsIObserver.h"
|
|
|
|
namespace mozilla {
|
|
namespace dom {
|
|
|
|
class ContentParent;
|
|
|
|
namespace mobilemessage {
|
|
|
|
class SmsParent : public PSmsParent
|
|
, public nsIObserver
|
|
{
|
|
friend class mozilla::dom::ContentParent;
|
|
|
|
public:
|
|
NS_DECL_ISUPPORTS
|
|
NS_DECL_NSIOBSERVER
|
|
|
|
protected:
|
|
virtual bool
|
|
RecvAddSilentNumber(const nsString& aNumber) MOZ_OVERRIDE;
|
|
|
|
virtual bool
|
|
RecvRemoveSilentNumber(const nsString& aNumber) MOZ_OVERRIDE;
|
|
|
|
SmsParent();
|
|
virtual ~SmsParent()
|
|
{
|
|
MOZ_COUNT_DTOR(SmsParent);
|
|
}
|
|
|
|
virtual void
|
|
ActorDestroy(ActorDestroyReason why);
|
|
|
|
virtual bool
|
|
RecvPSmsRequestConstructor(PSmsRequestParent* aActor,
|
|
const IPCSmsRequest& aRequest) MOZ_OVERRIDE;
|
|
|
|
virtual PSmsRequestParent*
|
|
AllocPSmsRequestParent(const IPCSmsRequest& aRequest) MOZ_OVERRIDE;
|
|
|
|
virtual bool
|
|
DeallocPSmsRequestParent(PSmsRequestParent* aActor) MOZ_OVERRIDE;
|
|
|
|
virtual bool
|
|
RecvPMobileMessageCursorConstructor(PMobileMessageCursorParent* aActor,
|
|
const IPCMobileMessageCursor& aCursor) MOZ_OVERRIDE;
|
|
|
|
virtual PMobileMessageCursorParent*
|
|
AllocPMobileMessageCursorParent(const IPCMobileMessageCursor& aCursor) MOZ_OVERRIDE;
|
|
|
|
virtual bool
|
|
DeallocPMobileMessageCursorParent(PMobileMessageCursorParent* aActor) MOZ_OVERRIDE;
|
|
|
|
private:
|
|
nsTArray<nsString> mSilentNumbers;
|
|
};
|
|
|
|
class SmsRequestParent : public PSmsRequestParent
|
|
, public nsIMobileMessageCallback
|
|
{
|
|
friend class SmsParent;
|
|
|
|
bool mActorDestroyed;
|
|
|
|
public:
|
|
NS_DECL_ISUPPORTS
|
|
NS_DECL_NSIMOBILEMESSAGECALLBACK
|
|
|
|
protected:
|
|
SmsRequestParent()
|
|
: mActorDestroyed(false)
|
|
{
|
|
MOZ_COUNT_CTOR(SmsRequestParent);
|
|
}
|
|
|
|
virtual ~SmsRequestParent()
|
|
{
|
|
MOZ_COUNT_DTOR(SmsRequestParent);
|
|
}
|
|
|
|
virtual void
|
|
ActorDestroy(ActorDestroyReason aWhy) MOZ_OVERRIDE;
|
|
|
|
bool
|
|
DoRequest(const SendMessageRequest& aRequest);
|
|
|
|
bool
|
|
DoRequest(const RetrieveMessageRequest& aRequest);
|
|
|
|
bool
|
|
DoRequest(const GetMessageRequest& aRequest);
|
|
|
|
bool
|
|
DoRequest(const DeleteMessageRequest& aRequest);
|
|
|
|
bool
|
|
DoRequest(const MarkMessageReadRequest& aRequest);
|
|
|
|
bool
|
|
DoRequest(const GetSegmentInfoForTextRequest& aRequest);
|
|
|
|
bool
|
|
DoRequest(const GetSmscAddressRequest& aRequest);
|
|
|
|
nsresult
|
|
SendReply(const MessageReply& aReply);
|
|
};
|
|
|
|
class MobileMessageCursorParent : public PMobileMessageCursorParent
|
|
, public nsIMobileMessageCursorCallback
|
|
{
|
|
friend class SmsParent;
|
|
|
|
nsCOMPtr<nsICursorContinueCallback> mContinueCallback;
|
|
|
|
public:
|
|
NS_DECL_ISUPPORTS
|
|
NS_DECL_NSIMOBILEMESSAGECURSORCALLBACK
|
|
|
|
protected:
|
|
MobileMessageCursorParent()
|
|
{
|
|
MOZ_COUNT_CTOR(MobileMessageCursorParent);
|
|
}
|
|
|
|
virtual ~MobileMessageCursorParent()
|
|
{
|
|
MOZ_COUNT_DTOR(MobileMessageCursorParent);
|
|
}
|
|
|
|
virtual void
|
|
ActorDestroy(ActorDestroyReason aWhy) MOZ_OVERRIDE;
|
|
|
|
virtual bool
|
|
RecvContinue() MOZ_OVERRIDE;
|
|
|
|
bool
|
|
DoRequest(const CreateMessageCursorRequest& aRequest);
|
|
|
|
bool
|
|
DoRequest(const CreateThreadCursorRequest& aRequest);
|
|
};
|
|
|
|
} // namespace mobilemessage
|
|
} // namespace dom
|
|
} // namespace mozilla
|
|
|
|
#endif // mozilla_dom_mobilemessage_SmsParent_h
|