File:  [mozdev] / archangel / src / archangel-client.idl
Revision 1.1: download - view: text, annotated - select for diffs - revision graph
Sat Jan 3 22:07:13 2004 UTC (13 years, 11 months ago) by marnanel
Branches: MAIN
CVS tags: HEAD
initial checkin

// $Header: /mozdev/cvs/archangel/src/archangel-client.idl,v 1.1 2004/01/03 22:07:13 marnanel Exp $
// Copyright (c) 2004 Thomas Thurman
// thomas@thurman.org.uk
// 
// This program is free software; you can redistribute it and/or modify
// it under the terms of version 2 of the GNU General Public License
// as published by the Free Software Foundation.
// 
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.
// 
// You should have be able to view the GNU General Public License at 
// http://www.gnu.org/copyleft/gpl.html ; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
//
#include "nsISupports.idl"

[scriptable, uuid(63a069dc-ca7e-4998-8e7a-46675f865fbd)]
interface nsIReverseGossip : nsISupports
{

  // Last message returned by the RGTP server.
  // Often useful for testing.
  readonly attribute string rgtpMessage;

  // Connects us to an RGTP server.
  //  host - the hostname, or dotted quad
  //  port - the port number
  //  username - username to log in as.
  //    If this is an empty string, then:
  //        * if the server permits reading without login,
  //          no login attempt will be made
  //        * if not, the client will attempt to log in as
  //          "guest" without a password
  //  sharedsecret - shared secret
  void connect(in string host, in long port, in string username,
	       in string sharedsecret);

  // Login level.
  //    0 = not logged in
  //    1 = read-only
  //    2 = ordinary read/write access
  //    3 = editor
  readonly attribute long level;

  // True if the client is connected to the server.
  readonly attribute long connected;

  // True if the user has the edit lock.
  readonly attribute long hasEditLock;

  // Number of items on the server.
  // (The MOTD is counted as an item.)
  readonly attribute long itemCount;

  // Selects a particular item by itemid.
  // The MOTD can be selected with the string 'motd'.
  void loadItemByID(in string itemid);

  // Selects a particular item by index number.
  // The number is between 0 and itemCount, inclusive.
  void loadItemByNumber(in long number);

  ////////////////////////////////////////////////////////////////
  //
  // You must load an item before using the following
  // methods and properties.

  // ItemID of the current item.
  readonly attribute string itemID;

  // Subject of the current item.
  readonly attribute string subject;

  // Parent item of this item, or an empty string.
  readonly attribute string parent;

  // Child item of this item, or an empty string.
  readonly attribute string child;

  // Number of replies to this item.
  readonly attribute string entryCount;

  // Latest poster to this item.
  readonly attribute string latestBy;

  // Last known sequence number on this item.
  readonly attribute long latestSeqKnown;

  // Last read sequence number on this item.
  readonly attribute long latestSeqRead;

  // Latest datestamp known on this item.
  readonly attribute long latestDatestamp;

  // Selects a particular entry within this item.
  // The number is between 0 and entryCount, inclusive.
  void loadEntry(in long number);

  // Resets latestSeqRead to be equal to latestSeqKnown
  void markItemAsRead();

  ////////////////////////////////////////////////////////////////
  //
  // You must load an entry before using the following
  // methods and properties.

  // Datestamp on this entry.
  readonly attribute long datestamp;

  // Sequence stamp on this entry.
  readonly attribute long seq;

  // Content of the body of this piece of gossip.
  attribute string body;

  ////////////////////////////////////////////////////////////////

  //string registerBegin();
  //void registerCommit(in string emailAddress);
};


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>