toolkit/components/mediasniffer/nsMediaSniffer.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 /* 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/. */
     7 #ifndef nsMediaSniffer_h
     8 #define nsMediaSniffer_h
    10 #include "nsIModule.h"
    11 #include "nsIFactory.h"
    13 #include "nsIComponentManager.h"
    14 #include "nsIComponentRegistrar.h"
    15 #include "nsIContentSniffer.h"
    16 #include "mozilla/Attributes.h"
    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}}
    23 #define NS_MEDIA_SNIFFER_CONTRACTID "@mozilla.org/media/sniffer;1"
    25 class nsMediaSniffer MOZ_FINAL : public nsIContentSniffer
    26 {
    27   public:
    28     NS_DECL_ISUPPORTS
    29     NS_DECL_NSICONTENTSNIFFER
    30   protected:
    31     ~nsMediaSniffer() {}
    33 #define PATTERN_ENTRY(mask, pattern, contentType) \
    34     {(const uint8_t*)mask, (const uint8_t*)pattern, sizeof(mask) - 1, contentType}
    36   struct nsMediaSnifferEntry {
    37     const uint8_t* mMask;
    38     const uint8_t* mPattern;
    39     const uint32_t mLength;
    40     const char* mContentType;
    41   };
    43   static nsMediaSnifferEntry sSnifferEntries[];
    44 };
    46 #endif

mercurial