/** * Gets the value of the specified property key in the application * property set. * * @param key The key to search for * * @return The value associated with <tt>key</tt> if found, otherwise * <tt>NULL</tt> */ const char* getSystemProperty(const char* key) { char *str; if (JAVACALL_OK == javacall_get_property(key, JAVACALL_APPLICATION_PROPERTY, &str)) { return str; } /* Attempt to obtain the property from callout function */ return doCallout(key); }
/** * Finds a property key and returns its value. * * @param propertySet The property set to search * @param key The key to search for * * @return The value associated with <tt>key<tt> if found, otherwise * <tt>NULL<tt> */ static const char* getProp(Property** propertySet, const char* key) { Property* p; p = *propertySet; while (p) { if (strcmp(key, p->key) == 0) { if (NULL == p->value) { return doCallout(p->key); } return (p->value); } p = p->next; } return NULL; }