+
+bool mnenc::is_int(char c) { //See if a char is an int
+ return (c == '0' || c == '1' || c == '2' || c == '3' || c == '4' || c == '5' || c == '6' || c == '7' || c == '8' || c == '9');
+}
+
+bool mnenc::is_imei(string str) { //See if a string is made up of 15 ints
+ bool proper_length = false; //Is it 15 chars?
+ bool is_ints = true; //Is it only ints?
+ if(str.length() == 15) { //Check length
+ proper_length = true;
+ } else {
+ return false; //Exit early if it fails length test
+ }
+ for(int i = 0; i < (signed) str.length(); i++) { //Check if they are all ints
+ if(!is_int(str[i])) {
+ is_ints = false;
+ }
+ }
+ if(proper_length && is_ints) { //Return true if it passes the tests
+ return true;
+ } else {
+ return false; //And false if it doesnt
+ }
+}
+
+string mnenc::make_path() { //Create path to qtify home
+ string username = getenv("USER"); //Get username
+ string path = "/home/" + username + "/.qtify/"; //This is home directory of qtify
+ return path;
+}