read message data of Message.app
- ofxSQLiteCpp by bakercp
void setup(const string &computerUserName, int latestID = 0, bool bAutoUpdate = true, float updateInterval = 3.0f)
- computerUseName : your account name i.e. /User/YourComputerUserName/
- latestID : will read from this id
- bAutoUpdate : if set false, you must call ofxMessageChecker::update() manually.
- updateInterval : if bAutoUpdate is true then update() is called every updateInterval sec.
if you set disable auto update then you must call this method manually.
change auto update mode.
ofxMessageChecker will push event with ofxMessageChecker::gotMessage.
you can receive event, like this:
ofAddListener(checker.gotMessage, this, &ofApp::gotMessageListener);
here, checker is instance of ofxMessageChecker, and ofApp::gotMessageListener is define as
void ofApp::gotMEssageListener(ofxMessageChecker::Message &m) {
// some code
}
- int messageID : internal id
- string message : message body
- string userAccount : tel no. or mail address of message's sender
- int timestamp : received date
- bool hasAttachment : if this value is true then message has attachment
- string attachmentPath : if hasAttachment is true then this contain path of attachment file
MIT License.
- ISHII 2bit [bufferRenaiss co., ltd.]
- ishii[at]buffer-renaiss.com
Please create new issue, if there is a problem. And please throw pull request, if you have a cool idea!!