/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * The contents of this file are subject to the Mozilla Public * License Version 1.1 (the "License"); you may not use this file * except in compliance with the License. You may obtain a copy of * the License at http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or * implied. See the License for the specific language governing * rights and limitations under the License. * * The Original Code is Basic Socket Library * * The Initial Developer of the Original Code is New Dimensions Consulting, * Inc. Portions created by New Dimensions Consulting, Inc. are * Copyright (C) 1999 New Dimenstions Consulting, Inc. All * Rights Reserved. * * Contributor(s): * Robert Ginda, rginda@ndcico.com, original author */ #include "nsISupports.idl" [scriptable, uuid(ACEDC9B0-395C-11D3-AEB9-0000F8E25C06)] interface bsIConnection : nsISupports { attribute boolean isConnected; attribute boolean linebufferFlag; attribute unsigned short port; void init (in string hostname); void destroy (); boolean disconnect(); boolean connect (in unsigned short port, in string bindIP, in boolean tcpFlag); void sendData (in string data); boolean hasData (); string readData (in unsigned long timeout); }; %{ C++ // {25b7b6e0-3af4-11d3-aeb9-0000f8e25c06} #define BS_CONNECTION_CID \ { 0x25b7b6e0, 0x3af4, 0x11d3, { 0xae, 0xb9, 0x0, 0x0, 0xf8, 0xe2, 0x5c, 0x6 }} #define BS_CONNECTION_PROGID "component://misc/bs/connection" #define BS_CONNECTION_CLASSNAME "bsConnection" extern nsresult BS_NewConnection(bsIConnection** aConnection); %}