michael@0: /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: #include "nsISupports.idl" michael@0: michael@0: %{ C++ michael@0: typedef void (*NSSCMSContentCallback)(void *arg, const char *buf, unsigned long len); michael@0: michael@0: #define NS_CMSENCODER_CONTRACTID "@mozilla.org/nsCMSEncoder;1" michael@0: %} michael@0: michael@0: native NSSCMSContentCallback(NSSCMSContentCallback); michael@0: michael@0: interface nsICMSMessage; michael@0: michael@0: /** michael@0: * nsICMSEncoder michael@0: * Interface to Encode an CMS message michael@0: */ michael@0: [uuid(a15789aa-8903-462b-81e9-4aa2cff4d5cb)] michael@0: interface nsICMSEncoder : nsISupports michael@0: { michael@0: void start(in nsICMSMessage aMsg, in NSSCMSContentCallback cb, in voidPtr arg); michael@0: void update(in string aBuf, in long aLen); michael@0: void finish(); michael@0: void encode(in nsICMSMessage aMsg); michael@0: }; michael@0: