]> code.citadel.org Git - citadel.git/commitdiff
* Updated CxMsList() API to allow users to select only NEW messages, or only
authorBrian <brian@uncensored.citadel.org>
Thu, 22 Feb 2001 17:05:19 +0000 (17:05 +0000)
committerBrian <brian@uncensored.citadel.org>
Thu, 22 Feb 2001 17:05:19 +0000 (17:05 +0000)
the LAST x messages (<-skel).  THIS WILL REQUIRE CLIENT-SIDE CHANGES IN ORDER
FOR YOUR CLIENT TO WORK!

libCxClient/ChangeLog
libCxClient/src/CxClient.h
libCxClient/src/messages.c
libCxClient/src/testlib.c

index 3ff1307c6f68fdb7883b0f5f58576713353ead96..88f0224527b13cba1ef3e3e3a18ef34945e7fb58 100644 (file)
@@ -1,4 +1,9 @@
 $Log$
+Revision 1.6  2001/02/22 17:05:19  brian
+* Updated CxMsList() API to allow users to select only NEW messages, or only
+the LAST x messages (<-skel).  THIS WILL REQUIRE CLIENT-SIDE CHANGES IN ORDER
+FOR YOUR CLIENT TO WORK!
+
 Revision 1.5  2001/02/19 14:50:58  brian
 * Fixed problem in which unconnected clients send messages to file descriptor
 0 (stdout), Now CxClSend() should do nothing if not connected.
@@ -13,3 +18,4 @@ Revision 1.3  2001/02/07 22:42:24  brian
 Revision 1.2  2001/02/07 22:41:51  brian
 * Updated ChangeLog to conform to Citadel/UX standards (kinda)  :)
 
+
index b77a15939c55e5a8279768a2589cedbb97b4ad0a..1482b3db4f5168838e1f210992074ad0c8b78d8e 100644 (file)
@@ -211,7 +211,7 @@ char                *CxFiGet(const char *);
  ** Message Input/Output
  **/
 CXLIST         CxMsInfo(CXLIST);
-CXLIST         CxMsList();
+CXLIST         CxMsList(int,int);
 int            CxMsLoad(const char *, int, MESGINFO *);
 int            CxMsSaveOk(const char *);
 int            CxMsSave(MESGINFO);
index d9f2d3b118a79375883aaf7db9e701c896aba608..f00465d25d471814288235373f5e1f5927f54d83 100644 (file)
@@ -74,14 +74,26 @@ int         rc;
 /**
  ** CxMsList(): Retrieve a list of messages in the current room.
  **/
-CXLIST         CxMsList() {
+CXLIST         CxMsList(int list_type, int number_messages) {
 int            rc;
 char           buf[255], *malleable;
 CXLIST         msgs = NULL;
 
        DPF((DFA,"Retrieving list of messages from the server."));
 
-       CxClSend("MSGS");
+       switch( list_type ) {
+               case(2):
+                       // MSGS LAST|%d
+                       break;
+
+               case(1):
+                       CxClSend("MSGS NEW");
+                       break;
+
+               default:
+                       CxClSend("MSGS");
+                       break;
+       }
        rc = CxClRecv( buf );
 
        if( CHECKRC(rc, RC_LISTING) ) {
index a8eb3511c3dc65e4e88b3798e961a258e21f0317..91051acad252e40e8ea3d063b295fe2c02b84624 100644 (file)
@@ -48,7 +48,7 @@ char          buf[255],*s = 0;
                        room_info = 0;
 
                        fl = CxLlFlush(fl);
-                       fl = CxMsList();
+                       fl = CxMsList(0, 0);
 
                        fl = CxLlFlush(fl);