int SettingsScreen::getSystemProperty(const char* key, MAUtil::String& dst) { int size = maGetSystemProperty(key, NULL, 0); printf("received size: %i", size); if (size < 0) return size; dst.resize(size-1); maGetSystemProperty(key, dst.pointer(), size); return size; }
int FileLister::next(MAUtil::String& dst) { int len = maFileListNext(mList, NULL, 0); if(len <= 0) return len; dst.resize(len); len = maFileListNext(mList, dst.pointer(), len+1); MAASSERT(len > 0); return len; }
int XML::getSystemProperty(const char* key, MAUtil::String& dst) { int size = maGetSystemProperty(key, NULL, 0); if(size < 0) return size; dst.resize(size-1); maGetSystemProperty(key, dst.pointer(), size); return size; }