Changeset 134a36022f726cd51165392d8d68b4249f425794


Ignore:
Timestamp:
07/01/11 13:25:32 (2 years ago)
Author:
Matias De la Puente <mfpuente.ar@…>
Children:
6907a8e216b3303b3279c644e459eecaded0446a
Parents:
372eb3dcd21ac852c68f554713d7b67588aa9f16
git-committer:
Matias De la Puente <mfpuente.ar@…> (07/01/11 13:25:32)
Message:

Rename Command to CommandRunner?

Files:
4 edited
4 moved

Legend:

Unmodified
Added
Removed
  • .gitignore

    r5f73715 r134a360  
    3838po/.intltool-merge-cache 
    3939po/i4uc.pot 
    40 !libi4uccore/i4uccommandfactory.c 
    41 !libi4uccore/i4ucserialportutilsfactory.c 
     40!libi4uccore/commandrunnerfactory.c 
     41!libi4uccore/serialportutilsfactory.c 
  • libi4uccore/Makefile.am

    r9fab498 r134a360  
    22 
    33WIN_SOURCES = \ 
    4         wincommand.vala \ 
     4        wincommandrunner.vala \ 
    55        winserialportutils.vala \ 
    66        $(NULL) 
    77 
    88POSIX_SOURCES = \ 
    9         posixcommand.vala \ 
     9        posixcommandrunner.vala \ 
    1010        posixserialportutils.vala \ 
    1111        $(NULL) 
     
    4141        builder.vala \ 
    4242        builderslist.vala \ 
    43         command.vala \ 
    44         commandfactory.c \ 
     43        commandrunner.vala \ 
     44        commandrunnerfactory.c \ 
    4545        dialogresponse.vala \ 
    4646        document.vala \ 
  • libi4uccore/commandrunner.vala

    r840e33f r134a360  
    1 /* command.vala 
     1/* commandrunner.vala 
    22 * 
    3  * Copyright (C) 2009  Matias De la Puente 
     3 * Copyright (C) 2009-2011  Matias De la Puente 
    44 * 
    55 * This program is free software: you can redistribute it and/or modify 
     
    2020 */ 
    2121 
    22 public abstract class I4uc.Core.Command : GLib.Object 
     22public abstract class I4uc.Core.CommandRunner : GLib.Object 
    2323{ 
    2424        protected Pid? _child_pid = null; 
     
    9393namespace I4uc.Core 
    9494{ 
    95         //Defined in commandfactory.c 
    96         public extern Command create_command (); 
     95        //Defined in commandrunnerfactory.c 
     96        public extern CommandRunner create_command_runner (); 
    9797} 
  • libi4uccore/commandrunnerfactory.c

    rdfe49c7 r134a360  
    1 /* commandfactory.c 
     1/* commandrunnerfactory.c 
    22 * 
    3  * Copyright (C) 2010  Matias De la Puente 
     3 * Copyright (C) 2010-2011  Matias De la Puente 
    44 * 
    55 * This program is free software: you can redistribute it and/or modify 
     
    2121#include <i4uccore.h> 
    2222 
    23 I4ucCoreCommand* i4uc_core_create_command () 
     23I4ucCoreCommandRunner* i4uc_core_create_command_runner () 
    2424{ 
    2525#if __gnu_linux__ 
    26         return (I4ucCoreCommand*)i4uc_core_posix_command_new (); 
     26        return (I4ucCoreCommandRunner*)i4uc_core_posix_command_runner_new (); 
    2727#elif __WIN32__ 
    28         return (I4ucCoreCommand*)i4uc_core_win_command_new (); 
     28        return (I4ucCoreCommandRunner*)i4uc_core_win_command_runner_new (); 
    2929#else 
    3030        return NULL; 
  • libi4uccore/posixcommandrunner.vala

    r4358b86 r134a360  
    1 /* posixcommand.vala 
     1/* posixcommandrunner.vala 
    22 * 
    3  * Copyright (C) 2010  Matias De la Puente 
     3 * Copyright (C) 2010-2011  Matias De la Puente 
    44 * 
    55 * This program is free software: you can redistribute it and/or modify 
     
    2121using Posix; 
    2222 
    23 public class I4uc.Core.PosixCommand : Command 
     23public class I4uc.Core.PosixCommandRunner : CommandRunner 
    2424{ 
    2525        private override void close_process () 
  • libi4uccore/profilebuilder.vala

    r372eb3d r134a360  
    3232{ 
    3333        private App _app; 
    34         private Command _command = create_command (); 
     34        private CommandRunner _command_runner = create_command_runner (); 
    3535        private ArrayList<CommandContext> _commands = new ArrayList<CommandContext> (); 
    3636        private int _command_index = 0; 
     
    5353        { 
    5454                _app = app; 
    55                 _command.finished.connect (on_command_finished); 
     55                _command_runner.finished.connect (on_command_runner_finished); 
    5656        } 
    5757 
     
    155155                        } 
    156156                 
    157                 on_command_finished (true); 
     157                on_command_runner_finished (true); 
    158158        } 
    159159         
     
    203203        { 
    204204                _commands.clear (); 
    205                 _command.stop (); 
    206         } 
    207  
    208         private void on_command_finished (bool exited_ok, string standard_output="", string standard_error="") 
     205                _command_runner.stop (); 
     206        } 
     207 
     208        private void on_command_runner_finished (bool exited_ok, string standard_output="", string standard_error="") 
    209209        { 
    210210                // When _command_index is different to 0, a command just finished 
     
    221221                        try 
    222222                        { 
    223                                 _command.run (_commands[_command_index].command, folder_file.get_path ()); 
     223                                _command_runner.run (_commands[_command_index].command, folder_file.get_path ()); 
    224224                                this.is_building = true; 
    225225                                _command_index++; 
  • libi4uccore/programmerslogic.vala

    r372eb3d r134a360  
    2626        private DocumentsLogic _documents_logic; 
    2727        private Programmer _current_programmer; 
    28         private Command _command = create_command (); 
     28        private CommandRunner _command_runner = create_command_runner (); 
    2929        private SerialPortUtils _serial_port_utils = create_serial_port_utils (); 
    3030        private string _read_firmware; 
     
    7777                _view.read_fuses_clicked.connect (() => run_command (_current_programmer.read_fuses_command)); 
    7878                _view.get_version_clicked.connect (() => run_command (_current_programmer.get_version_command)); 
    79                 _view.stop_clicked.connect (() => _command.stop ()); 
    80                 _command.finished.connect (on_command_finished); 
     79                _view.stop_clicked.connect (() => _command_runner.stop ()); 
     80                _command_runner.finished.connect (on_command_finished); 
    8181        } 
    8282         
     
    9494                { 
    9595                        _view.log_page.add_message ("<b>" + _("Running:") + " </b><i>" + filtered_command + "</i>"); 
    96                         _command.run (filtered_command); 
     96                        _command_runner.run (filtered_command); 
    9797                        set_parameters_sensitive (false); 
    9898                        disable_actions (); 
     
    363363                { 
    364364                        _view.log_page.add_message ("<b>" + _("Running:") + " </b><i>" + filtered_command + "</i>"); 
    365                         _command.run (filtered_command); 
     365                        _command_runner.run (filtered_command); 
    366366                        set_parameters_sensitive (false); 
    367367                        disable_actions (); 
     
    427427                _view.read_fuses_sensitive = _current_programmer.can_read_fuses; 
    428428                _view.get_version_sensitive = _current_programmer.can_get_version; 
    429                 _view.stop_sensitive = _command.is_running; 
     429                _view.stop_sensitive = _command_runner.is_running; 
    430430        } 
    431431         
  • libi4uccore/wincommandrunner.vala

    r4358b86 r134a360  
    1 /* wincommand.vala 
     1/* wincommandrunner.vala 
    22 * 
    3  * Copyright (C) 2010  Matias De la Puente 
     3 * Copyright (C) 2010-2011  Matias De la Puente 
    44 * 
    55 * This program is free software: you can redistribute it and/or modify 
     
    2121using Windows; 
    2222 
    23 public class I4uc.Core.WinCommand : Command 
     23public class I4uc.Core.WinCommandRunner : CommandRunner 
    2424{ 
    2525        private override void close_process () 
Note: See TracChangeset for help on using the changeset viewer.