gecko-dev/dom/media/MediaCallbackID.h
Kaku Kuo f78f42e9df Bug 1266027 part 1 - make the MediaDecoderReaderWrapper as a proxy of requesting media data; r=jwwang
MozReview-Commit-ID: CgTBPmtbNfh

--HG--
extra : transplant_source : %16%86%F676/S%C8%5Dj%86%9C%09%0E%D9%16L%DB%92y
2016-04-27 14:50:23 +08:00

39 lines
880 B
C++

/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
/* 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 MediaCallbackID_h_
#define MediaCallbackID_h_
namespace mozilla {
struct CallbackID
{
static char const* INVALID_TAG;
static int32_t const INVALID_ID;
CallbackID();
explicit CallbackID(char const* aTag, int32_t aID = 0);
CallbackID& operator++(); // prefix++
CallbackID operator++(int); // postfix++
bool operator==(const CallbackID& rhs) const;
bool operator!=(const CallbackID& rhs) const;
operator int() const;
private:
char const* mTag;
int32_t mID;
};
} // namespace mozilla
#endif // MediaCallbackID_h_