toolkit/components/mediasniffer/nsMediaSniffer.h

branch
TOR_BUG_9701
changeset 14
925c144e1f1f
equal deleted inserted replaced
-1:000000000000 0:fd5e9842a301
1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* vim:set ts=2 sw=2 sts=2 tw=80 et cindent: */
3 /* This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6
7 #ifndef nsMediaSniffer_h
8 #define nsMediaSniffer_h
9
10 #include "nsIModule.h"
11 #include "nsIFactory.h"
12
13 #include "nsIComponentManager.h"
14 #include "nsIComponentRegistrar.h"
15 #include "nsIContentSniffer.h"
16 #include "mozilla/Attributes.h"
17
18 // ed905ba3-c656-480e-934e-6bc35bd36aff
19 #define NS_MEDIA_SNIFFER_CID \
20 {0x3fdd6c28, 0x5b87, 0x4e3e, \
21 {0x8b, 0x57, 0x8e, 0x83, 0xc2, 0x3c, 0x1a, 0x6d}}
22
23 #define NS_MEDIA_SNIFFER_CONTRACTID "@mozilla.org/media/sniffer;1"
24
25 class nsMediaSniffer MOZ_FINAL : public nsIContentSniffer
26 {
27 public:
28 NS_DECL_ISUPPORTS
29 NS_DECL_NSICONTENTSNIFFER
30 protected:
31 ~nsMediaSniffer() {}
32
33 #define PATTERN_ENTRY(mask, pattern, contentType) \
34 {(const uint8_t*)mask, (const uint8_t*)pattern, sizeof(mask) - 1, contentType}
35
36 struct nsMediaSnifferEntry {
37 const uint8_t* mMask;
38 const uint8_t* mPattern;
39 const uint32_t mLength;
40 const char* mContentType;
41 };
42
43 static nsMediaSnifferEntry sSnifferEntries[];
44 };
45
46 #endif

mercurial