Home | History | Annotate | Download | only in client

Lines Matching defs:args

75 #define CHECK_ARGS_COUNT(args, op, num, msg) \
76 if (!((args).size() op num)) { \
80 #define CHECK_NO_ARGS(args) \
81 CHECK_ARGS_COUNT(args, ==, 0, "Expected no arguments")
330 void HandleDisable(IBluetooth* bt_iface, const vector<string>& args) {
331 CHECK_NO_ARGS(args);
337 void HandleEnable(IBluetooth* bt_iface, const vector<string>& args) {
340 for (auto iter : args) {
360 void HandleGetState(IBluetooth* bt_iface, const vector<string>& args) {
361 CHECK_NO_ARGS(args);
369 void HandleIsEnabled(IBluetooth* bt_iface, const vector<string>& args) {
370 CHECK_NO_ARGS(args);
376 void HandleGetLocalAddress(IBluetooth* bt_iface, const vector<string>& args) {
377 CHECK_NO_ARGS(args);
383 void HandleSetLocalName(IBluetooth* bt_iface, const vector<string>& args) {
384 CHECK_ARGS_COUNT(args, >=, 1, "No name was given");
387 for (const auto& arg : args) name += arg + " ";
396 void HandleGetLocalName(IBluetooth* bt_iface, const vector<string>& args) {
397 CHECK_NO_ARGS(args);
403 void HandleAdapterInfo(IBluetooth* bt_iface, const vector<string>& args) {
404 CHECK_NO_ARGS(args);
427 void HandleSupportsMultiAdv(IBluetooth* bt_iface, const vector<string>& args) {
428 CHECK_NO_ARGS(args);
436 const vector<string>& args) {
437 CHECK_NO_ARGS(args);
464 const vector<string>& args) {
465 CHECK_NO_ARGS(args);
484 void HandleRegisterBLE(IBluetooth* bt_iface, const vector<string>& args) {
485 CHECK_NO_ARGS(args);
510 void HandleUnregisterBLE(IBluetooth* bt_iface, const vector<string>& args) {
511 CHECK_NO_ARGS(args);
530 void HandleUnregisterAllBLE(IBluetooth* bt_iface, const vector<string>& args) {
531 CHECK_NO_ARGS(args);
544 void HandleRegisterGATT(IBluetooth* bt_iface, const vector<string>& args) {
545 CHECK_NO_ARGS(args);
570 void HandleUnregisterGATT(IBluetooth* bt_iface, const vector<string>& args) {
571 CHECK_NO_ARGS(args);
590 void HandleStartAdv(IBluetooth* bt_iface, const vector<string>& args) {
598 for (auto iter = args.begin(); iter != args.end(); ++iter) {
611 if (iter == args.end()) {
713 void HandleStopAdv(IBluetooth* bt_iface, const vector<string>& args) {
731 void HandleConnect(IBluetooth* bt_iface, const vector<string>& args) {
734 if (args.size() != 1) {
739 address = args[0];
761 void HandleDisconnect(IBluetooth* bt_iface, const vector<string>& args) {
764 if (args.size() != 1) {
769 address = args[0];
789 void HandleSetMtu(IBluetooth* bt_iface, const vector<string>& args) {
793 if (args.size() != 2) {
798 address = args[0];
799 mtu = std::stoi(args[1]);
825 const vector<string>& args) {
826 CHECK_NO_ARGS(args);
853 const vector<string>& args) {
854 CHECK_NO_ARGS(args);
873 void HandleStartLeScan(IBluetooth* bt_iface, const vector<string>& args) {
879 for (const auto& arg : args) {
910 void HandleStopLeScan(IBluetooth* bt_iface, const vector<string>& args) {
928 void HandleHelp(IBluetooth* bt_iface, const vector<string>& args);
932 void (*func)(IBluetooth*, const vector<string>& args);
977 void HandleHelp(IBluetooth* /* bt_iface */, const vector<string>& /* args */) {
988 vector<string> args = base::SplitString(command, " ", base::TRIM_WHITESPACE,
991 if (args.empty()) return true;
995 command = args[0];
996 args.erase(args.begin());
1000 kCommandMap[i].func(bt_iface.get(), args);