Is there any API out there in Objective C/Java/C/C++... which allows me to send and more importantly receive SMS from my iPhone?

I've read the source code of iSMS, aSMS and apparently:
- To send SMS, they open a socket-like connection to /dev/tty.debug and send the encoded messages there
- To receive SMS (or actually just display received messages), they just read the sms.db file in /private/var/mobile/Library/SMS to query for new messages, they didn't really listen to a port or something

Of course I might be wrong because my knowledge about those things is very limited.

What should I do some researches on to know more about this? Thank you.