SAMport

SAMport SAMport is an abstract PIM data importing/exporting library written in C++. Its intended use is to supply mail, address-book, task-lists, schedules, etc. importing and exporting functions to Linux and other POSIX operating systems applications.

SAMport was started to supply these features to the open-source software project, Aethera, but (since it will be free-software) can be used in just about any other project as well.

Right now there is not much here, but you can take a look at a snapshot of my work so far :
samport_snap.tar.gz

Please note that until I get a real release, this snapshot may or may not represent what I am currently working on. Also, the makefiles, install scripts, and most everything else may or may not work. DO NOT DOWNLOAD THIS EXPECTING A FINAL OR EVEN CLOSE-TO-FINAL PROJECT!

For now, ignore the INSTALL file in the project's root directory. Instead, read the README file for information (as I will be keeping that file current until I get a real release ;-)

In the meantime, perhaps you may be interested in how this class will be used.
SAMport will be a superclass with several subclasses supplying the import/export functionality. Let's say to wanted to import/export Mail from/to a UNIX mbox compliant mailer (such as Pine or Kmail). You would create an instance of SAMport thusly:
SAMport x = new SAMport_umbox;
At this point, `x' will have certain methods common to all import/export subclasses. Some of these methods include the following:
  • x.load("filename") : This begins the import functionality.
  • x.save("filename") : This begins the export functionality.
  • x.next() : Goes to the next record (import only) and returns an abstract PIM structure (which you use however you wish).
  • x.prev() : Same as next(), but goes backward.
  • x.jump(#) : Jumps to a record number # (int, import only) and returns an abstract PIM struct.
  • x.first() x.last() : Jumps to the first and last records respectively (import only) and returns an abstract PIM struct.
  • x.push(PIM_struct) : Pushes the abstract PIM struct to the exporting mailbox (export only).
There may or may not be other methods (or even classes)... we will just have to see how this all works.
Download it, check out any demos or tests, look at the interface.... let me know what you think!

NOTE: This project is essentially dead to me. I am not updating or actively working on it. For the reasons why, read this tirade. I do actually use this code for Pilot over at Tux4Kids dev server, so I know it works for what's included in it.