LCOV - code coverage report
Current view: top level - src/hooks - urlhook.cpp (source / functions) Hit Total Coverage
Test: dring-coverage-filtered.info Lines: 0 4 0.0 %
Date: 2019-02-25 22:01:53 Functions: 0 1 0.0 %

          Line data    Source code
       1             : /*
       2             :  *  Copyright (C) 2004-2019 Savoir-faire Linux Inc.
       3             :  *
       4             :  *  Author: Emmanuel Milou <emmanuel.milou@savoirfairelinux.com>
       5             :  *
       6             :  *  This program is free software; you can redistribute it and/or modify
       7             :  *  it under the terms of the GNU General Public License as published by
       8             :  *  the Free Software Foundation; either version 3 of the License, or
       9             :  *  (at your option) any later version.
      10             :  *
      11             :  *  This program is distributed in the hope that it will be useful,
      12             :  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
      13             :  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
      14             :  *  GNU General Public License for more details.
      15             :  *
      16             :  *  You should have received a copy of the GNU General Public License
      17             :  *  along with this program; if not, write to the Free Software
      18             :  *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301 USA.
      19             :  */
      20             : 
      21             : #include "urlhook.h"
      22             : #include <cstdlib>
      23             : 
      24             : namespace ring {
      25             : 
      26           0 : int UrlHook::runAction(const std::string &command, const std::string &args)
      27             : {
      28             :     //FIXME : use fork and execve, so no need to escape shell arguments
      29           0 :     const std::string cmd = command + (args.empty() ? "" : " ") +
      30           0 :                             "\"" + args + "\" &";
      31             : 
      32             : #if __APPLE__
      33             :   #include "TargetConditionals.h"
      34             :   #if defined(TARGET_IPHONE_SIMULATOR) || defined(TARGET_OS_IPHONE)
      35             :     return 0;
      36             :   #endif
      37             : #elif defined(RING_UWP)
      38             :     return 0;
      39             : #else
      40           0 :     return system(cmd.c_str());
      41             : #endif
      42             : }
      43             : 
      44             : } // namespace ring

Generated by: LCOV version 1.12