dom/mobilemessage/src/MobileMessageCallback.h

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/dom/mobilemessage/src/MobileMessageCallback.h	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,41 @@
     1.4 +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
     1.5 +/* This Source Code Form is subject to the terms of the Mozilla Public
     1.6 + * License, v. 2.0. If a copy of the MPL was not distributed with this
     1.7 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     1.8 +
     1.9 +#ifndef mozilla_dom_mobilemessage_MobileMessageCallback_h
    1.10 +#define mozilla_dom_mobilemessage_MobileMessageCallback_h
    1.11 +
    1.12 +#include "nsIMobileMessageCallback.h"
    1.13 +#include "nsCOMPtr.h"
    1.14 +#include "DOMRequest.h"
    1.15 +
    1.16 +class nsIDOMMozMmsMessage;
    1.17 +
    1.18 +namespace mozilla {
    1.19 +namespace dom {
    1.20 +namespace mobilemessage {
    1.21 +
    1.22 +class MobileMessageCallback MOZ_FINAL : public nsIMobileMessageCallback
    1.23 +{
    1.24 +public:
    1.25 +  NS_DECL_ISUPPORTS
    1.26 +  NS_DECL_NSIMOBILEMESSAGECALLBACK
    1.27 +
    1.28 +  MobileMessageCallback(DOMRequest* aDOMRequest);
    1.29 +
    1.30 +private:
    1.31 +  ~MobileMessageCallback();
    1.32 +
    1.33 +  nsRefPtr<DOMRequest> mDOMRequest;
    1.34 +
    1.35 +  nsresult NotifySuccess(JS::Handle<JS::Value> aResult, bool aAsync = false);
    1.36 +  nsresult NotifySuccess(nsISupports *aMessage, bool aAsync = false);
    1.37 +  nsresult NotifyError(int32_t aError, bool aAsync = false);
    1.38 +};
    1.39 +
    1.40 +} // namespace mobilemessage
    1.41 +} // namespace dom
    1.42 +} // namespace mozilla
    1.43 +
    1.44 +#endif // mozilla_dom_mobilemessage_MobileMessageCallback_h

mercurial