Skip to content
This repository was archived by the owner on Nov 1, 2023. It is now read-only.

2bbb/ofxMessageChecker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ofxMessageChecker (OSX only)

read message data of Message.app

Dependencies

API

ofxMessageChecker

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.

void update()

if you set disable auto update then you must call this method manually.

void enableAutoUpdate()

void disableAutoUpdate()

change auto update mode.

Notify Event

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
}

struct ofxMessageChecker::Mesage

  • 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

Update history

2015/02/26 ver 0.01 release

License

MIT License.

Author

  • ISHII 2bit [bufferRenaiss co., ltd.]
  • ishii[at]buffer-renaiss.com

At the last

Please create new issue, if there is a problem. And please throw pull request, if you have a cool idea!!

About

read data in Message.app

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published