dom/mobilemessage/src/MobileMessageManager.h

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

     1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
     2 /* This Source Code Form is subject to the terms of the Mozilla Public
     3  * License, v. 2.0. If a copy of the MPL was not distributed with this
     4  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     6 #ifndef mozilla_dom_mobilemessage_MobileMessageManager_h
     7 #define mozilla_dom_mobilemessage_MobileMessageManager_h
     9 #include "mozilla/DOMEventTargetHelper.h"
    10 #include "nsIDOMMobileMessageManager.h"
    11 #include "nsIObserver.h"
    13 class nsIDOMMozSmsMessage;
    14 class nsIDOMMozMmsMessage;
    16 namespace mozilla {
    17 namespace dom {
    19 class MobileMessageManager : public DOMEventTargetHelper
    20                            , public nsIDOMMozMobileMessageManager
    21                            , public nsIObserver
    22 {
    23 public:
    24   NS_DECL_ISUPPORTS_INHERITED
    25   NS_DECL_NSIOBSERVER
    26   NS_DECL_NSIDOMMOZMOBILEMESSAGEMANAGER
    28   NS_REALLY_FORWARD_NSIDOMEVENTTARGET(DOMEventTargetHelper)
    30   void Init(nsPIDOMWindow *aWindow);
    31   void Shutdown();
    33 private:
    34   /**
    35    * Internal Send() method used to send one message.
    36    */
    37   nsresult Send(JSContext* aCx, JS::Handle<JSObject*> aGlobal,
    38                 uint32_t aServiceId,
    39                 JS::Handle<JSString*> aNumber,
    40                 const nsAString& aMessage,
    41                 JS::Value* aRequest);
    43   nsresult DispatchTrustedSmsEventToSelf(const char* aTopic,
    44                                          const nsAString& aEventName,
    45                                          nsISupports* aMsg);
    47   /**
    48    * Helper to get message ID from SMS/MMS Message object
    49    */
    50   nsresult GetMessageId(JSContext* aCx, const JS::Value& aMessage,
    51                         int32_t* aId);
    52 };
    54 } // namespace dom
    55 } // namespace mozilla
    57 #endif // mozilla_dom_mobilemessage_MobileMessageManager_h

mercurial