libusermetrics
MetricManagerUpdateTodayCAPI.c

A simple example of a metric that doesn't worry about updating history, and just updates a single value in response to an action. This is for apps that cannot simply just increment the current value.

int main(int argc, char *argv[]) {
// We start with a manager object
// Create a parameters object
// Set its attributes
"<b>%1</b> photos taken today");
"No photos today");
// You can hold onto this shared object for as long as you want
metricManager, parameters);
// Remember to free the parameters object after use
// Providing a blank username string will use the current
// user according to the USER environment variable.
usermetricsinput_metric_update_today(metric, photo_library_get_size(), "");
// Now we're done with the manager
return 0;
}