# OSMASTER-정책-서비스콜 ###### tags: `OSMASTER` `정책` `서비스콜` [OS1-2팀 디바이스 제어] 1. USB 키보드/마우스 제어 - 서비스 명: "tos.service.DeviceControl" - method 명 : -- bool disableUSBMouse(void) -- bool enableUSBMouse(void) -- bool disableUSBKeyboard(void) -- bool enableUSBKeyboard(void) 2. CD-ROM 제어 - 서비스 명: "tos.service.DeviceControl" - method 명 : -- bool disableCDROM(void) -- bool enableCDROM(void) 3. 블루투스 제어 - 서비스 명: "tos.service.BluetoothManager" - method 명 : -- bool block(void) // disable bluetooth -- bool unblock(void) // enable bluetooth 4. 프린터 제어 - 서비스 명: "tos.service.PrinterService" - method 명: -- bool enablePrinters(void) -- bool disabledPrinters(void) [OS1-4팀] 1. 패키지매니저-화이트리스트제어 - 서비스 명: "tos.service.PackageManager" - method 명 : -- tos::service::call_method("tos.service.PackageManager.setWhitelist" , vec); -- std::vector vec({"appid1", "appid2"}; -- whitelist 로 등록된 모든 리스트를 제거하고 vec 의 리스트로 치환, + whitelist mode 가 off 였다면 on 으로 변경 -- bool mode = tos::service::call_method("tos.service.PackageManager.isWhitelistMode" ); -- whitelist mode 가 on 인지 query 하는 함수 -- bool allowd = tos::service::call_method("tos.service.PackageManager.checkExecutionAllowed", str); -- app launcher 에서 사용하는 함수. 실행해도 되는것인지 query -- tos::service::call_method("tos.service.PackageManager.setDefaultInstallMode"); -- whitelistmode 끄는 함수 -- installApplcation(putty.tai, /home/AllUsers/AppList) -- 첫번째 인자는 tai 파일의 절대경로 기본앱 리스트 - ErrorReport - Hi-T - TOSupdate - app_bind_fixer - basic_info - cloud_space - control_panel - copy_process - deb_installer - diskmgr - filemanager - quick_help - search_app - taskmanager - terminal - tplayer - tunzip - uninstall - url_executor - xwm 소프트웨어센터 앱 리스트 - Togate - KakaoTalk - putty - gimp - steam-launcher - gnome-mines - ToPoint - ToCell - ToMail - ToWord - hancomoffice-hwpviewer - virtualbox-6.1 - filezilla [OS1-1팀] 1. 네트워크-화이트리스트-제어 Service : tos.service.NetworkManager.system Method Detail 1) "setPolicyEnabled" desc : 특정 policy 에 대해서 on/off arg : 2개 > (1) policy(int) >> 0 == WirelessDisallowed >> 1 == ApDisallowed >> 2 == ThtheringDisallowed > (2) enabled(bool) return : void 2) "getPolicyEnabled" desc : 특정 policy 의 on/off 받아오기 arg : 1개 > (1) policy(int) : 위 참조 return : bool 3) "updateApWhiteList" desc : AP whitelist 업데이트 arg : 1개 > ssid_list(string) : json 형태의 arrary 변환값 return : void 4) "flushApWhiteList" desc : white list 모두 삭제 arg : 1개 > flush_cache(bool) : cache 만을 남겨둘때 false를 주면 되나 보통 true return : 없음 2. 시리얼포트, 페러렐포트 제어 - 서비스 명: "tos.service.DeviceControl" - method 명 : -- void serialEnable(void) (msg: enableSerialPort) -- void serialDisable(void) (msg: disableSerialPort) -- void parportEnable(void) (msg: enableParallelPort) -- void parportDisable(void) (msg: disableParallelPort) 3. USB 마운트 제어 - 서비스 명 : "tos.service.automountd" - method 명 : "apply_security" -- return : void -- args : std::string --- value ---- "USB RO" (usb read-only mount) ---- "USB DISABLE" (disable usb mount) ---- "USB RW" 또는 "NONE" (enable usb mount + read-write mount) [PK1-4] 1. URL 정책 - [이미지](http://192.168.2.112/index.php/%ED%8C%8C%EC%9D%BC:TogateURLBlacklistURLWhitelist.PNG)