mailnews/mime/public/nsIMimeContentTypeHandler.h
author Rob Lemley <rob@thunderbird.net>
Fri, 09 Oct 2020 10:28:30 -0400
changeset 36220 02fc18d67f53e3c2b4a37a89bf568e76eb4551d9
parent 32711 bca950c87a074a65e00c0894937c46b3b644ee5e
permissions -rw-r--r--
Bug 1669147 - [esr68] Disable release-bouncer-aliases. r=justdave a=rjl DONTBUILD This is for documentation purposes as there are no plans for further releases based on esr68. This is a recurring problem every release. The new release (eg 78.0) comes out and is followed by a release from the previous version. The download bouncer's "latest" aliases are overwritten with the old version, which is not what we want. This bug is referred to in the notes for esr78 launch so that it is not missed for Thunderbird 90. Differential Revision: https://phabricator.services.mozilla.com/D93084

/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* 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/. */

/*
 * This interface is implemented by content type handlers that will be
 * called upon by libmime to process various attachments types. The primary
 * purpose of these handlers will be to represent the attached data in a
 * viewable HTML format that is useful for the user
 *
 * Note: These will all register by their content type prefixed by the
 *       following:  mimecth:text/vcard
 *
 *       libmime will then use the XPCOM Component Manager to
 *       locate the appropriate Content Type handler
 */
#ifndef nsIMimeContentTypeHandler_h_
#define nsIMimeContentTypeHandler_h_

typedef struct {
  bool force_inline_display;
} contentTypeHandlerInitStruct;

#include "nsISupports.h"
#include "mimecth.h"

// {20DABD99-F8B5-11d2-8EE0-00A024A7D144}
#define NS_IMIME_CONTENT_TYPE_HANDLER_IID           \
  {                                                 \
    0x20dabd99, 0xf8b5, 0x11d2, {                   \
      0x8e, 0xe0, 0x0, 0xa0, 0x24, 0xa7, 0xd1, 0x44 \
    }                                               \
  }

// {20DABDA1-F8B5-11d2-8EE0-00A024A7D144}
#define NS_VCARD_CONTENT_TYPE_HANDLER_CID           \
  {                                                 \
    0x20dabda1, 0xf8b5, 0x11d2, {                   \
      0x8e, 0xe0, 0x0, 0xa0, 0x24, 0xa7, 0xd1, 0x44 \
    }                                               \
  }

#define NS_SMIME_CONTENT_TYPE_HANDLER_CID           \
  {                                                 \
    0x20dabdac, 0xf8b5, 0x11d2, {                   \
      0xFF, 0xe0, 0x0, 0xa0, 0x24, 0xa7, 0xd1, 0x44 \
    }                                               \
  }

#define NS_SIGNED_CONTENT_TYPE_HANDLER_CID          \
  {                                                 \
    0x20dabdac, 0xf8b5, 0x11d2, {                   \
      0xFF, 0xe0, 0x0, 0xaf, 0x19, 0xa7, 0xd1, 0x44 \
    }                                               \
  }

#define NS_PGPMIME_CONTENT_TYPE_HANDLER_CID         \
  {                                                 \
    0x212f415f, 0xf8b5, 0x11d2, {                   \
      0xFF, 0xe0, 0x0, 0xaf, 0x19, 0xa7, 0xd1, 0x44 \
    }                                               \
  }

class nsIMimeContentTypeHandler : public nsISupports {
 public:
  NS_DECLARE_STATIC_IID_ACCESSOR(NS_IMIME_CONTENT_TYPE_HANDLER_IID)

  NS_IMETHOD GetContentType(char **contentType) = 0;

  NS_IMETHOD CreateContentTypeHandlerClass(
      const char *content_type, contentTypeHandlerInitStruct *initStruct,
      MimeObjectClass **objClass) = 0;
};

NS_DEFINE_STATIC_IID_ACCESSOR(nsIMimeContentTypeHandler,
                              NS_IMIME_CONTENT_TYPE_HANDLER_IID)

#endif /* nsIMimeContentTypeHandler_h_ */