82 bool CreateUser(
const char* user,
const char* name);
124 const char*
GetValue(
const char* key);
125 char*
GetValue(
const char* key,
char* val,
int val_length)
const;
126 bool GetBoolValue(
const char* key,
bool default_val)
const;
127 int GetIntValue(
const char* key,
int default_val)
const;
128 float GetFloatValue(
const char* key,
float default_val)
const;
129 int GetFloatValues(
const char* key,
float* values,
int num_vals)
const;
131 int GetDoubleValues(
const char* key,
double* values,
int num_vals)
const;
133 void SetValue(
const char* key,
const char* val);
137 void SetFloatValues(
const char* key,
const float* vals,
int num_vals);
139 void SetDoubleValues(
const char* key,
const double* vals,
int num_vals);
160 const char* device_model,
161 const char* device_serial);
165 const char* device_name,
166 const char* device_serial);
174 #if !defined(OVR_KEY_USER)
176 #define OVR_KEY_USER "User"
177 #define OVR_KEY_NAME "Name"
178 #define OVR_KEY_GENDER "Gender"
179 #define OVR_KEY_PLAYER_HEIGHT "PlayerHeight"
180 #define OVR_KEY_EYE_HEIGHT "EyeHeight"
181 #define OVR_KEY_IPD "IPD"
182 #define OVR_KEY_NECK_TO_EYE_DISTANCE "NeckEyeDistance"
183 #define OVR_KEY_EYE_RELIEF_DIAL "EyeReliefDial"
184 #define OVR_KEY_EYE_TO_NOSE_DISTANCE "EyeToNoseDist"
185 #define OVR_KEY_MAX_EYE_TO_PLATE_DISTANCE "MaxEyeToPlateDist"
186 #define OVR_KEY_EYE_CUP "EyeCup"
187 #define OVR_KEY_CUSTOM_EYE_RENDER "CustomEyeRender"
189 #define OVR_DEFAULT_GENDER "Male"
190 #define OVR_DEFAULT_PLAYER_HEIGHT 1.778f
191 #define OVR_DEFAULT_EYE_HEIGHT 1.675f
192 #define OVR_DEFAULT_IPD 0.064f
193 #define OVR_DEFAULT_NECK_TO_EYE_HORIZONTAL 0.09f
194 #define OVR_DEFAULT_NECK_TO_EYE_VERTICAL 0.15f
195 #define OVR_DEFAULT_EYE_RELIEF_DIAL 3
197 #endif // OVR_KEY_USER
203 #endif // OVR_Profile_h
void SetDoubleValues(const char *key, const double *vals, int num_vals)
void LoadCache(bool create)
bool CreateUser(const char *user, const char *name)
virtual Profile * CreateProfile()
const char * GetValue(const char *key)
float GetFloatValue(const char *key, float default_val) const
bool LoadUser(JSON *root, const char *user, const char *device_name, const char *device_serial)
int GetNumValues(const char *key) const
int GetIntValue(const char *key, int default_val) const
OVR::Hash< String, JSON *, String::HashFunctor > ValMap
static ProfileManager * Create()
String GetProfilePath(bool create_dir)
void SetBoolValue(const char *key, bool val)
OVR::Array< JSON * > Values
String GetBaseOVRPath(bool create_dir)
const char * GetDefaultUser(const DeviceBase *device)
Profile * GetProfile(const DeviceBase *device, const char *user)
bool LoadDeviceFile(unsigned int device_id, const char *serial)
const char * GetUser(unsigned int index)
void SetValue(const char *key, const char *val)
void SetIntValue(const char *key, int val)
int GetFloatValues(const char *key, float *values, int num_vals) const
bool GetBoolValue(const char *key, bool default_val) const
void SetDoubleValue(const char *key, double val)
Profile * GetDefaultProfile(const DeviceBase *device)
void LoadV1Profiles(JSON *v1)
void SetFloatValues(const char *key, const float *vals, int num_vals)
bool SetTaggedProfile(const char **key_names, const char **keys, int num_keys, Profile *profile)
void CopyItems(JSON *root, String prefix)
bool LoadDeviceProfile(const DeviceBase *device)
int GetDoubleValues(const char *key, double *values, int num_vals) const
int char * index(const char *__s, int __c) __THROW __attribute_pure__ __nonnull((1))
static bool LoadProfile(const DeviceBase *device, const char *user, Profile **profile)
bool RemoveUser(const char *user)
void SetFloatValue(const char *key, float val)
Profile * GetTaggedProfile(const char **key_names, const char **keys, int num_keys)
bool SetDefaultUser(const DeviceBase *device, const char *user)
bool GetDeviceTags(const DeviceBase *device, String &product, String &serial)
double GetDoubleValue(const char *key, double default_val) const