diff options
Diffstat (limited to 'libmultimc/src/library.cpp')
-rw-r--r-- | libmultimc/src/library.cpp | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/libmultimc/src/library.cpp b/libmultimc/src/library.cpp index b0490616..0fb4f9d3 100644 --- a/libmultimc/src/library.cpp +++ b/libmultimc/src/library.cpp @@ -15,4 +15,23 @@ #include "include/library.h" +RuleAction RuleAction_fromString(QString name) +{ + if(name == "allow") + return Allow; + if(name == "disallow") + return Disallow; + return Defer; +} + +OpSys OpSys_fromString(QString name) +{ + if(name == "linux") + return Os_Linux; + if(name == "windows") + return Os_Windows; + if(name == "osx") + return Os_OSX; + return Os_Other; +} // default url for lib: https://s3.amazonaws.com/Minecraft.Download/libraries/ |