Changeset 0cfe72f


Ignore:
Timestamp:
Apr 12, 2013 8:40:12 AM (12 months ago)
Author:
Kris Moore <kris@…>
Branches:
master, 9.1-release, 9.2-release, releng/10.0, releng/10.0.1
Children:
bb72d33
Parents:
afd00d6
Message:

Add all the changes for related using of split pcbsd-utils libs

Location:
src-qt4
Files:
1 deleted
67 edited

Legend:

Unmodified
Added
Removed
  • src-qt4/PCDM/PCDM.pro

    r1f0939e r0cfe72f  
    44TEMPLATE = app 
    55 
    6 LIBS += -L../libpcbsd -L/usr/local/lib -lpcbsd -lpam 
    7 INCLUDEPATH += /usr/local/include ../libpcbsd 
     6LIBS += -L../libpcbsd -L/usr/local/lib -lpcbsd-ui -lpcbsd-utils -lpam 
     7INCLUDEPATH += ../libpcbsd/utils /usr/local/include 
    88 
    99SOURCES += src/main.cpp \ 
  • src-qt4/PCDM/src/pcdm-backend.cpp

    r1f0939e r0cfe72f  
    337337  usernameList.clear(); displaynameList.clear(); homedirList.clear(); 
    338338  //Get all the users from the file "/etc/passwd" 
    339   QStringList uList = Utils::runShellCommand("cat /etc/passwd"); 
     339  QStringList uList = pcbsd::Utils::runShellCommand("cat /etc/passwd"); 
    340340 
    341341  //Remove all users that have: 
  • src-qt4/PCDM/src/pcdm-gui.cpp

    r1f0939e r0cfe72f  
    99#include <QGraphicsPixmapItem> 
    1010#include <QStyle> 
     11#include <pcbsd-utils.h> 
    1112 
    1213#include "pcdm-gui.h" 
     
    418419  if(hostname.isEmpty()){ 
    419420    //Find the system hostname 
    420     hostname = Utils::runShellCommand("hostname").join(" ").simplified(); 
     421    hostname = pcbsd::Utils::runShellCommand("hostname").join(" ").simplified(); 
    421422    loginW->displayHostName(hostname);     
    422423  } 
  • src-qt4/about-gui/about-gui.pro

    r1f0939e r0cfe72f  
    1414 
    1515 
    16 LIBS +=-L../libpcbsd -L/usr/local/lib -lpcbsd -lQtSolutions_SingleApplication-head 
    17 INCLUDEPATH     += ../libpcbsd/ /usr/local/include 
     16LIBS +=-L../libpcbsd -L/usr/local/lib -lpcbsd-utils -lQtSolutions_SingleApplication-head 
     17INCLUDEPATH     += ../libpcbsd/utils /usr/local/include 
    1818 
    1919SOURCES += main.cpp\ 
  • src-qt4/about-gui/mainwindow.cpp

    r1f0939e r0cfe72f  
    7373 
    7474    //uname 
    75     QStringList unameParsed = QString(Utils::runShellCommand("uname -imnr").at(0)).split(" ", QString::SkipEmptyParts); 
     75    QStringList unameParsed = QString(pcbsd::Utils::runShellCommand("uname -imnr").at(0)).split(" ", QString::SkipEmptyParts); 
    7676    if (unameParsed.size()== 4) 
    7777    { 
     
    8484 
    8585    // pcbsd version 
    86     Ver = Utils::runShellCommand("uname -r").at(0); 
     86    Ver = pcbsd::Utils::runShellCommand("uname -r").at(0); 
    8787    ui->VersionLabel->setText(Ver+" ("+Arch+")"); 
    8888    ui->UnstableLabel->setVisible(false); 
     
    106106 
    107107    // CPU 
    108     ui->CPUInfoLabel->setText(Utils::sysctl("hw.model")); 
     108    ui->CPUInfoLabel->setText(pcbsd::Utils::sysctl("hw.model")); 
    109109 
    110110    // memory 
    111     ui->MemoryLabel->setText(Utils::bytesToHumanReadable(Utils::sysctlAsInt("hw.realmem"))); 
     111    ui->MemoryLabel->setText(pcbsd::Utils::bytesToHumanReadable(pcbsd::Utils::sysctlAsInt("hw.realmem"))); 
    112112    //this->setFixedSize(this->geometry().width(),this->geometry().height()); 
    113113} 
     
    129129{ 
    130130    outVer=""; 
    131     QStringList out = Utils::runShellCommand(QString("pkg info -f ") + name); 
     131    QStringList out = pcbsd::Utils::runShellCommand(QString("pkg info -f ") + name); 
    132132    if (!out.size()) 
    133133        return false; 
     
    172172{ 
    173173    //X.org version 
    174     QStringList xorgver = Utils::runShellCommand("Xorg -version"); 
     174    QStringList xorgver = pcbsd::Utils::runShellCommand("Xorg -version"); 
    175175    for(int i=0; i<xorgver.size(); i++) 
    176176    { 
  • src-qt4/libpcbsd/libpcbsd.pro

    r1f0939e r0cfe72f  
    11 
    2 QT       += core gui network 
     2TEMPLATE = subdirs 
    33 
    4 TARGET=pcbsd 
    5 target.path = /usr/local/lib 
    6  
    7 TEMPLATE        = lib 
    8 LANGUAGE        = C++ 
    9 VERSION         = 0.9.6 
    10  
    11 HEADERS += pcbsd-netif.h \ 
    12         pcbsd-utils.h \ 
    13         pcbsd-hardware.h \ 
    14         dialogMetaProgress.h \ 
    15         dialogwpaenterprise.h \ 
    16         dialogInfoBox.h 
    17  
    18 SOURCES += netif.cpp \ 
    19         utils.cpp \ 
    20         hardware.cpp \ 
    21         dialogInfoBox.cpp \ 
    22         dialogMetaProgress.cpp \ 
    23         dialogwpaenterprise.cpp \ 
    24         metaWidget.cpp 
    25  
    26 RESOURCES += libpcbsd.qrc 
    27  
    28 FORMS += dialogInfoBox.ui dialogMetaProgress.ui dialogwpaenterprise.ui 
    29  
    30 TRANSLATIONS =  i18n/libpcbsd_af.ts \ 
    31                 i18n/libpcbsd_ar.ts \ 
    32                 i18n/libpcbsd_az.ts \ 
    33                 i18n/libpcbsd_bg.ts \ 
    34                 i18n/libpcbsd_bn.ts \ 
    35                 i18n/libpcbsd_bs.ts \ 
    36                 i18n/libpcbsd_ca.ts \ 
    37                 i18n/libpcbsd_cs.ts \ 
    38                 i18n/libpcbsd_cy.ts \ 
    39                 i18n/libpcbsd_da.ts \ 
    40                 i18n/libpcbsd_de.ts \ 
    41                 i18n/libpcbsd_el.ts \ 
    42                 i18n/libpcbsd_en_GB.ts \ 
    43                 i18n/libpcbsd_en_ZA.ts \ 
    44                 i18n/libpcbsd_es.ts \ 
    45                 i18n/libpcbsd_et.ts \ 
    46                 i18n/libpcbsd_eu.ts \ 
    47                 i18n/libpcbsd_fa.ts \ 
    48                 i18n/libpcbsd_fi.ts \ 
    49                 i18n/libpcbsd_fr.ts \ 
    50                 i18n/libpcbsd_fr_CA.ts \ 
    51                 i18n/libpcbsd_fur.ts \ 
    52                 i18n/libpcbsd_gl.ts \ 
    53                 i18n/libpcbsd_he.ts \ 
    54                 i18n/libpcbsd_hi.ts \ 
    55                 i18n/libpcbsd_hr.ts \ 
    56                 i18n/libpcbsd_hu.ts \ 
    57                 i18n/libpcbsd_id.ts \ 
    58                 i18n/libpcbsd_is.ts \ 
    59                 i18n/libpcbsd_it.ts \ 
    60                 i18n/libpcbsd_ja.ts \ 
    61                 i18n/libpcbsd_ka.ts \ 
    62                 i18n/libpcbsd_ko.ts \ 
    63                 i18n/libpcbsd_lt.ts \ 
    64                 i18n/libpcbsd_lv.ts \ 
    65                 i18n/libpcbsd_mk.ts \ 
    66                 i18n/libpcbsd_mn.ts \ 
    67                 i18n/libpcbsd_ms.ts \ 
    68                 i18n/libpcbsd_mt.ts \ 
    69                 i18n/libpcbsd_nb.ts \ 
    70                 i18n/libpcbsd_ne.ts \ 
    71                 i18n/libpcbsd_nl.ts \ 
    72                 i18n/libpcbsd_pa.ts \ 
    73                 i18n/libpcbsd_pl.ts \ 
    74                 i18n/libpcbsd_pt.ts \ 
    75                 i18n/libpcbsd_pt_BR.ts \ 
    76                 i18n/libpcbsd_ro.ts \ 
    77                 i18n/libpcbsd_ru.ts \ 
    78                 i18n/libpcbsd_sk.ts \ 
    79                 i18n/libpcbsd_sl.ts \ 
    80                 i18n/libpcbsd_sr.ts \ 
    81                 i18n/libpcbsd_sv.ts \ 
    82                 i18n/libpcbsd_sw.ts \ 
    83                 i18n/libpcbsd_ta.ts \ 
    84                 i18n/libpcbsd_tg.ts \ 
    85                 i18n/libpcbsd_th.ts \ 
    86                 i18n/libpcbsd_tr.ts \ 
    87                 i18n/libpcbsd_uk.ts \ 
    88                 i18n/libpcbsd_uz.ts \ 
    89                 i18n/libpcbsd_vi.ts \ 
    90                 i18n/libpcbsd_zh_CN.ts \ 
    91                 i18n/libpcbsd_zh_HK.ts \ 
    92                 i18n/libpcbsd_zh_TW.ts \ 
    93                 i18n/libpcbsd_zu.ts 
    94  
    95 dotrans.path=/usr/local/share/pcbsd/i18n/ 
    96 dotrans.extra=cd i18n && lrelease-qt4 -nounfinished *.ts && cp *.qm /usr/local/share/pcbsd/i18n/ 
    97  
    98 include.path=/usr/local/include/ 
    99 include.files=pcbsd-*.h 
    100  
    101 INSTALLS += target include dotrans 
    102  
    103 QMAKE_LIBDIR = /usr/local/lib/qt4 /usr/local/lib 
     4SUBDIRS+=       utils \ 
     5                ui 
  • src-qt4/libpcbsd/ui/pcbsd-ui.h

    r1f0939e r0cfe72f  
    4545class UI 
    4646{ 
     47   public: 
    4748    static QStringList quickUserInputBox( QString title, QStringList inputList ); 
    4849}; 
  • src-qt4/pc-adsldap/adsldap.cpp

    r1f0939e r0cfe72f  
    7777{ 
    7878  QSettings settings("PCBSD", "ADS"); 
    79   QString tmp = Utils::getConfFileValue("/etc/rc.conf", "pc_activedirectory_enable=", 1) ; 
     79  QString tmp = pcbsd::Utils::getConfFileValue("/etc/rc.conf", "pc_activedirectory_enable=", 1) ; 
    8080  if ( tmp == "YES" )  
    8181    groupADS->setChecked(true); 
     
    124124 
    125125  // Now write ADCONF values 
    126   Utils::setConfFileValue(ADCONF, "ad_domainname =", "ad_domainname = " + lineADSDomainName->text(), -1); 
    127   Utils::setConfFileValue(ADCONF, "ad_adminname =", "ad_adminname = " + lineADSAdminName->text(), -1); 
    128   Utils::setConfFileValue(ADCONF, "ad_adminpw =", "ad_adminpw = " + lineADSAdminPW->text(), -1); 
    129   Utils::setConfFileValue(ADCONF, "ad_workgroup =", "ad_workgroup = " + lineADSWorkgroup->text().toUpper(), -1); 
    130   Utils::setConfFileValue(ADCONF, "ad_netbiosname =", "ad_netbiosname = " + lineADSNetBIOS->text().toUpper(), -1); 
     126  pcbsd::Utils::setConfFileValue(ADCONF, "ad_domainname =", "ad_domainname = " + lineADSDomainName->text(), -1); 
     127  pcbsd::Utils::setConfFileValue(ADCONF, "ad_adminname =", "ad_adminname = " + lineADSAdminName->text(), -1); 
     128  pcbsd::Utils::setConfFileValue(ADCONF, "ad_adminpw =", "ad_adminpw = " + lineADSAdminPW->text(), -1); 
     129  pcbsd::Utils::setConfFileValue(ADCONF, "ad_workgroup =", "ad_workgroup = " + lineADSWorkgroup->text().toUpper(), -1); 
     130  pcbsd::Utils::setConfFileValue(ADCONF, "ad_netbiosname =", "ad_netbiosname = " + lineADSNetBIOS->text().toUpper(), -1); 
    131131   
    132132  if ( checkADSTrustedDomains->isChecked() ) 
    133     Utils::setConfFileValue(ADCONF, "ad_allow_trusted_doms =", "ad_allow_trusted_doms = yes", -1); 
     133    pcbsd::Utils::setConfFileValue(ADCONF, "ad_allow_trusted_doms =", "ad_allow_trusted_doms = yes", -1); 
    134134  else 
    135     Utils::setConfFileValue(ADCONF, "ad_allow_trusted_doms =", "ad_allow_trusted_doms = no", -1); 
     135    pcbsd::Utils::setConfFileValue(ADCONF, "ad_allow_trusted_doms =", "ad_allow_trusted_doms = no", -1); 
    136136 
    137137} 
     
    139139void pcADSLDAP::exportLDAP() 
    140140{ 
    141   Utils::setConfFileValue(LDCONF, "ldap_hostname =", "ldap_hostname = " + lineLDHostname->text(), -1); 
    142   Utils::setConfFileValue(LDCONF, "ldap_basedn =", "ldap_basedn = " + lineLDBaseDN->text(), -1); 
     141  pcbsd::Utils::setConfFileValue(LDCONF, "ldap_hostname =", "ldap_hostname = " + lineLDHostname->text(), -1); 
     142  pcbsd::Utils::setConfFileValue(LDCONF, "ldap_basedn =", "ldap_basedn = " + lineLDBaseDN->text(), -1); 
    143143  if ( checkLDAnonBinding->isChecked() ) 
    144      Utils::setConfFileValue(LDCONF, "ldap_anonbind =", "ldap_anonbind = yes", -1); 
     144     pcbsd::Utils::setConfFileValue(LDCONF, "ldap_anonbind =", "ldap_anonbind = yes", -1); 
    145145  else 
    146      Utils::setConfFileValue(LDCONF, "ldap_anonbind =", "ldap_anonbind = no", -1); 
    147   Utils::setConfFileValue(LDCONF, "ldap_rootbasedn =", "ldap_rootbasedn = " + lineLDRootBindDN->text(), -1); 
    148   Utils::setConfFileValue(LDCONF, "ldap_rootbindpw =", "ldap_rootbindpw = " + lineLDRootBindPW->text(), -1); 
    149   Utils::setConfFileValue(LDCONF, "ldap_rootbindpw =", "ldap_rootbindpw = " + lineLDRootBindPW->text(), -1); 
    150   Utils::setConfFileValue(LDCONF, "ldap_pwencryption =", "ldap_pwencryption = " + comboLDPWEnc->currentText(), -1); 
    151   Utils::setConfFileValue(LDCONF, "ldap_usersuffix =", "ldap_usersuffix = " + lineLDUserSuffix->text(), -1); 
    152   Utils::setConfFileValue(LDCONF, "ldap_groupsuffix =", "ldap_groupsuffix = " + lineLDGroupSuffix->text(), -1); 
    153   Utils::setConfFileValue(LDCONF, "ldap_passwordstuff =", "ldap_passwordstuff = " + lineLDPWSuffix->text(), -1); 
    154   Utils::setConfFileValue(LDCONF, "ldap_machinesuffix =", "ldap_machinesuffix = " + lineLDMachineSuffix->text(), -1); 
    155   Utils::setConfFileValue(LDCONF, "ldap_encryption_mode =", "ldap_encryption_mode = " + comboLDEncMode->currentText().toLower(), -1); 
    156   Utils::setConfFileValue(LDCONF, "ldap_tls_cacertfile =", "ldap_tls_cacertfile = " + lineLDSelfSignedCert->text(), -1); 
     146     pcbsd::Utils::setConfFileValue(LDCONF, "ldap_anonbind =", "ldap_anonbind = no", -1); 
     147  pcbsd::Utils::setConfFileValue(LDCONF, "ldap_rootbasedn =", "ldap_rootbasedn = " + lineLDRootBindDN->text(), -1); 
     148  pcbsd::Utils::setConfFileValue(LDCONF, "ldap_rootbindpw =", "ldap_rootbindpw = " + lineLDRootBindPW->text(), -1); 
     149  pcbsd::Utils::setConfFileValue(LDCONF, "ldap_rootbindpw =", "ldap_rootbindpw = " + lineLDRootBindPW->text(), -1); 
     150  pcbsd::Utils::setConfFileValue(LDCONF, "ldap_pwencryption =", "ldap_pwencryption = " + comboLDPWEnc->currentText(), -1); 
     151  pcbsd::Utils::setConfFileValue(LDCONF, "ldap_usersuffix =", "ldap_usersuffix = " + lineLDUserSuffix->text(), -1); 
     152  pcbsd::Utils::setConfFileValue(LDCONF, "ldap_groupsuffix =", "ldap_groupsuffix = " + lineLDGroupSuffix->text(), -1); 
     153  pcbsd::Utils::setConfFileValue(LDCONF, "ldap_passwordstuff =", "ldap_passwordstuff = " + lineLDPWSuffix->text(), -1); 
     154  pcbsd::Utils::setConfFileValue(LDCONF, "ldap_machinesuffix =", "ldap_machinesuffix = " + lineLDMachineSuffix->text(), -1); 
     155  pcbsd::Utils::setConfFileValue(LDCONF, "ldap_encryption_mode =", "ldap_encryption_mode = " + comboLDEncMode->currentText().toLower(), -1); 
     156  pcbsd::Utils::setConfFileValue(LDCONF, "ldap_tls_cacertfile =", "ldap_tls_cacertfile = " + lineLDSelfSignedCert->text(), -1); 
    157157 
    158158  // Remove old opts 
    159159  QString optName, optVal; 
    160   Utils::setConfFileValue(LDCONF, "opt_", "", -1); 
     160  pcbsd::Utils::setConfFileValue(LDCONF, "opt_", "", -1); 
    161161  for ( int i = 0; i < textLDAux->document()->lineCount(); ++i) 
    162162  {  
     
    175175 
    176176     // Save the config 
    177      Utils::setConfFileValue(LDCONF, optName + " =", optName + " = " + optVal, -1); 
     177     pcbsd::Utils::setConfFileValue(LDCONF, optName + " =", optName + " = " + optVal, -1); 
    178178  } 
    179179} 
     
    186186    // Restart AD service if enabled    
    187187    qDebug() << "Enabling AD"; 
    188     Utils::setConfFileValue("/etc/rc.conf", "pc_activedirectory_enable=", "pc_activedirectory_enable=\"YES\"", -1); 
    189     Utils::runShellCommand("/usr/local/bin/pc-adctl start"); 
     188    pcbsd::Utils::setConfFileValue("/etc/rc.conf", "pc_activedirectory_enable=", "pc_activedirectory_enable=\"YES\"", -1); 
     189    pcbsd::Utils::runShellCommand("/usr/local/bin/pc-adctl start"); 
    190190  } else { 
    191191     qDebug() << "Disabling AD"; 
    192      Utils::runShellCommand("/usr/local/bin/pc-adctl stop"); 
    193      Utils::setConfFileValue("/etc/rc.conf", "pc_activedirectory_enable=", "pc_activedirectory_enable=\"NO\"", -1); 
     192     pcbsd::Utils::runShellCommand("/usr/local/bin/pc-adctl stop"); 
     193     pcbsd::Utils::setConfFileValue("/etc/rc.conf", "pc_activedirectory_enable=", "pc_activedirectory_enable=\"NO\"", -1); 
    194194  } 
    195195   
     
    197197  if ( groupLDAP->isChecked() ) { 
    198198    exportLDAP(); 
    199      Utils::setConfFileValue("/etc/rc.conf", "pc_ldap_enable=", "pc_ldap_enable=\"YES\"", -1); 
    200      Utils::runShellCommand("/usr/local/bin/pc-ldapctl start"); 
     199     pcbsd::Utils::setConfFileValue("/etc/rc.conf", "pc_ldap_enable=", "pc_ldap_enable=\"YES\"", -1); 
     200     pcbsd::Utils::runShellCommand("/usr/local/bin/pc-ldapctl start"); 
    201201  } else { 
    202202     qDebug() << "Disabling LDAP"; 
    203      Utils::runShellCommand("/usr/local/bin/pc-ldapctl stop"); 
    204      Utils::setConfFileValue("/etc/rc.conf", "pc_ldap_enable=", "pc_ldap_enable=\"NO\"", -1); 
    205   } 
    206 } 
     203     pcbsd::Utils::runShellCommand("/usr/local/bin/pc-ldapctl stop"); 
     204     pcbsd::Utils::setConfFileValue("/etc/rc.conf", "pc_ldap_enable=", "pc_ldap_enable=\"NO\"", -1); 
     205  } 
     206} 
  • src-qt4/pc-adsldap/pc-adsldap.pro

    r1f0939e r0cfe72f  
    44CONFIG  += qt warn_on release 
    55 
    6 LIBS    += -L../libpcbsd -L/usr/local/lib -lpcbsd 
     6LIBS    += -L../libpcbsd -L/usr/local/lib -lpcbsd-utils 
    77 
    8 INCLUDEPATH     += /usr/local/include ../libpcbsd 
     8INCLUDEPATH     += ../libpcbsd/utils /usr/local/include 
    99 
    1010HEADERS += adsldap.h 
  • src-qt4/pc-bluetoothmanager/btmaingui.cpp

    r1f0939e r0cfe72f  
    33#include <pcbsd-hardware.h> 
    44#include <pcbsd-utils.h> 
     5#include <pcbsd-ui.h> 
    56#include <QDebug> 
    67#include <QMessageBox> 
     
    106107   //Start scanning and put the results in the listbox 
    107108   QStringList bdaddrList = Hardware::findBTdevices(); 
    108    QStringList connectionList = Utils::runShellCommand("hccontrol read_connection_list"); 
     109   QStringList connectionList = pcbsd::Utils::runShellCommand("hccontrol read_connection_list"); 
    109110   for(int i=0; i<bdaddrList.length(); i++){ 
    110111     if( !connectionList.contains(bdaddrList[i]) && !oldSaveBdaddrList.contains(bdaddrList[i]) ){ //Check if it is a new device (not connected or saved) 
     
    196197  QStringList requests; 
    197198  requests << tr("PIN Code (Examples: 0000, 1234, or none)") << tr("Link Key (Leave blank for automatic)"); 
    198   QStringList outputs = Utils::quickUserInputBox(tr("Device Configuration"),requests); 
     199  QStringList outputs = pcbsd::UI::quickUserInputBox(tr("Device Configuration"),requests); 
    199200  if( outputs.length() != requests.length() ){ //rememberempty strings are valid 
    200201    //Error/cancelled operation - do nothing 
     
    235236  //List all active connections (if any) 
    236237  currentSaveDeviceList.clear(); 
    237   QStringList connectionList = Utils::runShellCommand("hccontrol read_connection_list"); 
     238  QStringList connectionList = pcbsd::Utils::runShellCommand("hccontrol read_connection_list"); 
    238239  if(connectionList.length() > 1){ 
    239240    for(int i=1; i<connectionList.length(); i++){ //skip the first line (labels) 
     
    264265 
    265266bool btmaingui::rootPermissions(){ 
    266   QString userID = Utils::runShellCommand("id -u").join(""); 
     267  QString userID = pcbsd::Utils::runShellCommand("id -u").join(""); 
    267268  if( userID.toInt() == 0){ return TRUE; } 
    268269  else{ return FALSE; } 
     
    282283  QStringList requests; 
    283284  requests << tr("PIN Code (Examples: 0000, 1234, or none)") << tr("Link Key (Leave blank for automatic)"); 
    284   QStringList outputs = Utils::quickUserInputBox(tr("Device Configuration"),requests); 
     285  QStringList outputs = pcbsd::UI::quickUserInputBox(tr("Device Configuration"),requests); 
    285286  if( outputs.length() != requests.length() ){ //remember empty strings are valid 
    286287    //Error/cancelled operation - do nothing 
     
    358359  QStringList requests; 
    359360  requests << tr("New Bluetooth Computer name"); 
    360   QStringList outputs = Utils::quickUserInputBox(tr("New Bluetooth Name"),requests); 
     361  QStringList outputs = pcbsd::UI::quickUserInputBox(tr("New Bluetooth Name"),requests); 
    361362  //Check for invalid names 
    362363  if( outputs.join(" ").simplified().isEmpty() ){  
     
    392393  //Startup pc-bluetoothtray with sudo 
    393394  QString cmd = "sudo pc-bluetoothtray &"; 
    394   Utils::runShellCommand(cmd); 
    395 } 
    396  
     395  pcbsd::Utils::runShellCommand(cmd); 
     396} 
     397 
  • src-qt4/pc-bluetoothmanager/pc-bluetoothmanager.pro

    r1f0939e r0cfe72f  
    1919FORMS    += btmaingui.ui 
    2020 
    21 LIBS     += -L../libpcbsd -lpcbsd -lQtSolutions_SingleApplication-head 
     21LIBS     += -L../libpcbsd -lpcbsd-ui -lpcbsd-utils -lQtSolutions_SingleApplication-head 
    2222 
    2323#RESOURCES += pc-bluetoothmanager.qrc 
    2424 
    25 INCLUDEPATH += ../libpcbsd /usr/local/include 
     25INCLUDEPATH += ../libpcbsd/ui ../libpcbsd/utils /usr/local/include 
    2626 
    2727TRANSLATIONS =  i18n/pc-bluetoothmanager_af.ts \ 
  • src-qt4/pc-bluetoothtray/btTray.cpp

    r1f0939e r0cfe72f  
    4343  bool oldStatus = isBTDevice; 
    4444  //Run a couple quick checks to see if a bluetooth device is plugged in 
    45   QStringList result = Utils::listShellCommandSearch("ngctl list","ubt0"); 
     45  QStringList result = pcbsd::Utils::listShellCommandSearch("ngctl list","ubt0"); 
    4646  if( result.isEmpty()){ isBTDevice=FALSE; } //no device has ever been plugged in since compupter turned on 
    4747  //else if( result[result.length()-1].contains("disconnected") ){ isBTDevice=FALSE; } //last entry says the device has been removed 
     
    9999  //Start bluetooth manager completely seperate from the tray app 
    100100  QString cmd = "pc-bluetoothmanager &"; //might need to be "sudo ..." 
    101   Utils::runShellCommand(cmd); 
     101  pcbsd::Utils::runShellCommand(cmd); 
    102102} 
    103103 
  • src-qt4/pc-bluetoothtray/pc-bluetoothtray.pro

    r1f0939e r0cfe72f  
    44CONFIG  += qt warn_on release 
    55 
    6 LIBS    += -L../libpcbsd -lQtSolutions_SingleApplication-head -lpcbsd 
     6LIBS    += -L../libpcbsd -lQtSolutions_SingleApplication-head -lpcbsd-utils 
    77 
    88HEADERS += btTray.h 
     
    1414RESOURCES += pc-bluetoothtray.qrc 
    1515 
    16 INCLUDEPATH += ../libpcbsd /usr/local/include 
     16INCLUDEPATH += ../libpcbsd/utils /usr/local/include 
    1717 
    1818QMAKE_LIBDIR = /usr/local/lib/qt4 /usr/local/lib 
  • src-qt4/pc-firstbootgui/firstboot.cpp

    r1f0939e r0cfe72f  
    296296 
    297297  // Start the scan and get the output 
    298   //ifconfout = Utils::runShellCommand("ifconfig -v wlan0 up list scan"); 
    299   ifconfout = Utils::runShellCommand("ifconfig -v wlan0 list scan"); 
     298  //ifconfout = pcbsd::Utils::runShellCommand("ifconfig -v wlan0 up list scan"); 
     299  ifconfout = pcbsd::Utils::runShellCommand("ifconfig -v wlan0 list scan"); 
    300300   
    301301  qDebug() << ifconfout; 
     
    336336{ 
    337337  //get the full SSID string 
    338   QString dat = Utils::runShellCommandSearch("ifconfig -v wlan0 list scan",ssid); 
     338  QString dat = pcbsd::Utils::runShellCommandSearch("ifconfig -v wlan0 list scan",ssid); 
    339339  QStringList wdat = NetworkInterface::parseWifiScanLine(dat,true); 
    340340  QString SSID = wdat[0]; 
  • src-qt4/pc-firstbootgui/pc-firstbootgui.pro

    r1f0939e r0cfe72f  
    44TARGET = pc-firstboot 
    55target.path = /usr/local/bin/ 
    6 LIBS    += -L../libpcbsd -lpcbsd 
    7 INCLUDEPATH+= ../libpcbsd/ 
     6LIBS    += -L../libpcbsd -lpcbsd-utils 
     7INCLUDEPATH+= ../libpcbsd/utils 
    88TEMPLATE = app 
    99SOURCES += main.cpp \ 
  • src-qt4/pc-mounttray/devCheck.cpp

    r1f0939e r0cfe72f  
    5858QString DevCheck::devLabel(QString node, QString filesystem){ 
    5959  QString dlabel; 
    60   QStringList glout = Utils::runShellCommand("glabel list"); 
     60  QStringList glout = pcbsd::Utils::runShellCommand("glabel list"); 
    6161  int index = glout.indexOf("Geom name: "+node); 
    6262  while(index != -1){ 
     
    111111  //Read the Device Info using "file -s <device>" 
    112112  QString cmd = "file -s "+fullDev; 
    113   QString output = Utils::runShellCommand(cmd).join(" "); 
     113  QString output = pcbsd::Utils::runShellCommand(cmd).join(" "); 
    114114  //if(isCD){ qDebug() << "File -s output:" << output; } 
    115115   
  • src-qt4/pc-mounttray/menuItem.cpp

    r1f0939e r0cfe72f  
    7070      if(mountpoint.isEmpty()){ 
    7171        //detect the current mountpoint 
    72         QString output = Utils::runShellCommandSearch("mount",device); 
     72        QString output = pcbsd::Utils::runShellCommandSearch("mount",device); 
    7373        mountpoint = output.section(" on ",1,1).section(" (",0,0).replace(" ","-"); 
    7474      } 
     
    106106bool MenuItem::isMounted(){ 
    107107  //Check if device is mounted 
    108   QString chk = Utils::runShellCommandSearch("mount",device);   
    109   if(chk.isEmpty() ){ chk = Utils::runShellCommandSearch("mount",devLabel->text().replace(" ","-")); }  
     108  QString chk = pcbsd::Utils::runShellCommandSearch("mount",device);   
     109  if(chk.isEmpty() ){ chk = pcbsd::Utils::runShellCommandSearch("mount",devLabel->text().replace(" ","-")); }  
    110110 
    111111  if(chk.isEmpty() ){ return FALSE; } 
     
    121121    if(QFile::exists(mountpoint)){ 
    122122      qDebug() << "Removing old mountpoint:" << mountpoint; 
    123       QString output = Utils::runShellCommand("rmdir "+mountpoint).join(" "); 
     123      QString output = pcbsd::Utils::runShellCommand("rmdir "+mountpoint).join(" "); 
    124124      if(!output.isEmpty()){ qDebug() << " -Error:" <<output; } 
    125125    } 
     
    161161    QString cmd = "cat "+AMFILE; 
    162162    QString search = devLabel->text() +" "+ devType +" "+ filesystem; 
    163     QString chk = Utils::runShellCommandSearch(cmd, search); 
     163    QString chk = pcbsd::Utils::runShellCommandSearch(cmd, search); 
    164164    if( chk.isEmpty() ){ return FALSE; } 
    165165    else{ return TRUE; } 
     
    210210  QString result, title; 
    211211  //Run the mounting commands 
    212   QStringList output = Utils::runShellCommand(cmd1); 
     212  QStringList output = pcbsd::Utils::runShellCommand(cmd1); 
    213213  if( output.join(" ").simplified().isEmpty() ){ 
    214214    //directory created, run the next commands 
    215215    system(cmd3.toUtf8()); //set directory permissions before mounting device 
    216     output = Utils::runShellCommand(cmd2); 
     216    output = pcbsd::Utils::runShellCommand(cmd2); 
    217217    if( output.join(" ").simplified().isEmpty() ){ 
    218218      title = tr("Success"); 
     
    225225      result =  output.join(" "); 
    226226      //Remove the mount point just created 
    227       Utils::runShellCommand("rmdir "+mntpoint); 
     227      pcbsd::Utils::runShellCommand("rmdir "+mntpoint); 
    228228    } 
    229229  }else{ 
     
    253253    if( isMounted() ){  //double check that it is actually mounted 
    254254      //mounted someplace else - find it 
    255       QString output = Utils::runShellCommandSearch("mount",device); 
     255      QString output = pcbsd::Utils::runShellCommandSearch("mount",device); 
    256256      mountpoint = output.section(" on ",1,1).section(" (",0,0).replace(" ","-"); 
    257257    }else{ 
     
    268268  QString result, title; 
    269269  bool ok = FALSE; 
    270   output = Utils::runShellCommand(cmd1); 
     270  output = pcbsd::Utils::runShellCommand(cmd1); 
    271271  if(output.join(" ").simplified().isEmpty()){ 
    272272    //unmounting successful, remove the mount point directory 
    273     output = Utils::runShellCommand(cmd2); 
     273    output = pcbsd::Utils::runShellCommand(cmd2); 
    274274    if(!output.join(" ").simplified().isEmpty()){ 
    275275      qDebug() << "pc-mounttray: Error removing mountpoint:" << mountpoint; 
  • src-qt4/pc-mounttray/mountTray.cpp

    r1f0939e r0cfe72f  
    266266  if(username=="root" || username.isEmpty() ){ 
    267267   //attempt another method of determining the username 
    268    QStringList uList = Utils::runShellCommand("who"); 
     268   QStringList uList = pcbsd::Utils::runShellCommand("who"); 
    269269   if( uList.length() > 0 ){  
    270270     username = uList[0].section(" ",0,0,QString::SectionSkipEmpty); 
     
    288288void MountTray::getDefaultFileManager(){ 
    289289  //Get the command to open the appropriate file manager 
    290   QString fmcmd = Utils::runShellCommand("de-info -fileman").join(" "); 
     290  QString fmcmd = pcbsd::Utils::runShellCommand("de-info -fileman").join(" "); 
    291291  //qDebug() << "de-info result:" << fmcmd; 
    292292  fmcmd = fmcmd.remove("%s").simplified(); 
  • src-qt4/pc-mounttray/pc-mounttray.pro

    r1f0939e r0cfe72f  
    55CONFIG  += qt warn_on release 
    66 
    7 LIBS    += -L../libpcbsd -lQtSolutions_SingleApplication-head -lpcbsd 
     7LIBS    += -L../libpcbsd -lQtSolutions_SingleApplication-head -lpcbsd-utils 
    88 
    99HEADERS += mountTray.h menuItem.h devCheck.h 
     
    1313RESOURCES += pc-mounttray.qrc 
    1414 
    15 INCLUDEPATH += ../libpcbsd /usr/local/include 
     15INCLUDEPATH += ../libpcbsd/utils /usr/local/include 
    1616 
    1717QMAKE_LIBDIR = /usr/local/lib/qt4 /usr/local/lib 
  • src-qt4/pc-netmanager/src/NetworkManager/NetworkManager.pro

    r1f0939e r0cfe72f  
    66QT      += network 
    77 
    8 LIBS    += -L../../../libpcbsd -lpcbsd 
     8LIBS    += -L../../../libpcbsd -lpcbsd-utils -lpcbsd-ui 
    99 
    1010HEADERS += networkman.h \ 
     
    101101INSTALLS+= target dotrans cpres resperm 
    102102 
    103 INCLUDEPATH+= ../../../libpcbsd/ 
     103INCLUDEPATH+= ../../../libpcbsd/ui ../../../libpcbsd/utils 
  • src-qt4/pc-netmanager/src/NetworkManager/networkman.cpp

    r1f0939e r0cfe72f  
    242242   dev.remove(0, dev.size() -1 ); 
    243243   QString DevNum = dev; 
    244    return Utils::sysctl("net.wlan." + DevNum + ".%parent"); 
     244   return pcbsd::Utils::sysctl("net.wlan." + DevNum + ".%parent"); 
    245245} 
    246246 
     
    519519{     
    520520    QString tmp; 
    521     lineHostname->setText(Utils::getConfFileValue("/etc/rc.conf", "hostname=", 1)); 
    522  
    523     tmp = Utils::getConfFileValue("/etc/rc.conf", "defaultrouter=", 1); 
     521    lineHostname->setText(pcbsd::Utils::getConfFileValue("/etc/rc.conf", "hostname=", 1)); 
     522 
     523    tmp = pcbsd::Utils::getConfFileValue("/etc/rc.conf", "defaultrouter=", 1); 
    524524    if ( tmp.isEmpty() ) 
    525525    { 
     
    531531    } else { 
    532532        groupGateway->setChecked(true); 
    533         lineGateway->setText(Utils::getConfFileValue("/etc/rc.conf", "defaultrouter=", 1) ); 
     533        lineGateway->setText(pcbsd::Utils::getConfFileValue("/etc/rc.conf", "defaultrouter=", 1) ); 
    534534    } 
    535535 
    536536    /* Use simple regular expressions to distinguish IPv4 and IPv6 addresses. */ 
    537     lineDNS1->setText(Utils::getConfFileValue("/etc/resolv.conf", "nameserver ", "\\b(?:\\d{1,3}\\.){3}\\d{1,3}\\b", 1) ); 
    538     lineDNS2->setText(Utils::getConfFileValue("/etc/resolv.conf", "nameserver ", "\\b(?:\\d{1,3}\\.){3}\\d{1,3}\\b", 2) ); 
     537    lineDNS1->setText(pcbsd::Utils::getConfFileValue("/etc/resolv.conf", "nameserver ", "\\b(?:\\d{1,3}\\.){3}\\d{1,3}\\b", 1) ); 
     538    lineDNS2->setText(pcbsd::Utils::getConfFileValue("/etc/resolv.conf", "nameserver ", "\\b(?:\\d{1,3}\\.){3}\\d{1,3}\\b", 2) ); 
    539539    // Check if we are using custom DNS 
    540     tmp = Utils::getConfFileValue("/etc/dhclient.conf", "supersede domain-name-servers", 1); 
     540    tmp = pcbsd::Utils::getConfFileValue("/etc/dhclient.conf", "supersede domain-name-servers", 1); 
    541541    if ( tmp.isEmpty() ) 
    542542       groupDNS->setChecked(false); 
     
    545545 
    546546 
    547     lineIPv6DNS1->setText(Utils::getConfFileValue("/etc/resolv.conf", "nameserver ", "\\b.*:.*:.*\\b", 1) ); 
    548     lineIPv6DNS2->setText(Utils::getConfFileValue("/etc/resolv.conf", "nameserver ", "\\b.*:.*:.*\\b", 2) ); 
    549     lineSearchDomain->setText(Utils::getConfFileValue("/etc/resolv.conf", "search ", 1) ); 
     547    lineIPv6DNS1->setText(pcbsd::Utils::getConfFileValue("/etc/resolv.conf", "nameserver ", "\\b.*:.*:.*\\b", 1) ); 
     548    lineIPv6DNS2->setText(pcbsd::Utils::getConfFileValue("/etc/resolv.conf", "nameserver ", "\\b.*:.*:.*\\b", 2) ); 
     549    lineSearchDomain->setText(pcbsd::Utils::getConfFileValue("/etc/resolv.conf", "search ", 1) ); 
    550550 
    551551    // Check for IPv6 settings 
    552     lineIPv6Gateway->setText(Utils::getConfFileValue("/etc/rc.conf", "ipv6_defaultrouter=", 1) ); 
    553     tmp = Utils::getConfFileValue("/etc/rc.conf", "ipv6_activate_all_interfaces=", 1) ; 
     552    lineIPv6Gateway->setText(pcbsd::Utils::getConfFileValue("/etc/rc.conf", "ipv6_defaultrouter=", 1) ); 
     553    tmp = pcbsd::Utils::getConfFileValue("/etc/rc.conf", "ipv6_activate_all_interfaces=", 1) ; 
    554554    if ( tmp == "YES" ) 
    555555        groupIPv6->setChecked(TRUE); 
     
    582582void NetworkMan::restartNetwork() 
    583583{ 
    584    Utils::restartNetworking(); 
     584   pcbsd::Utils::restartNetworking(); 
    585585} 
    586586 
     
    824824    } 
    825825   
    826      if ( lineDNS1->text() != "..."  && ! Utils::validateIPV4(lineDNS1->text() ) && groupDNS->isChecked()) { 
     826     if ( lineDNS1->text() != "..."  && ! pcbsd::Utils::validateIPV4(lineDNS1->text() ) && groupDNS->isChecked()) { 
    827827         textGlobalError->setText(tr("Invalid DNS specified")); 
    828828         return; 
    829829     } 
    830830     
    831     if ( lineDNS2->text() != "..."  && ! Utils::validateIPV4(lineDNS2->text() ) && groupDNS->isChecked()) { 
     831    if ( lineDNS2->text() != "..."  && ! pcbsd::Utils::validateIPV4(lineDNS2->text() ) && groupDNS->isChecked()) { 
    832832         textGlobalError->setText(tr("Invalid DNS specified")); 
    833833         return; 
     
    835835     
    836836     
    837      if ( lineGateway->text() != "..."  && ! Utils::validateIPV4(lineGateway->text())  && groupGateway->isChecked() ) { 
     837     if ( lineGateway->text() != "..."  && ! pcbsd::Utils::validateIPV4(lineGateway->text())  && groupGateway->isChecked() ) { 
    838838         textGlobalError->setText(tr("Invalid Gateway specified")); 
    839839         return; 
     
    869869{ 
    870870     
    871    if ( !lineHostname->text().isEmpty() && (lineHostname->text().toLower() != Utils::getConfFileValue("/etc/rc.conf", "hostname=", 1).toLower() ) ) { 
    872       Utils::setConfFileValue("/etc/rc.conf", "hostname=", "hostname=\"" + lineHostname->text() + "\"", -1); 
    873       Utils::setConfFileValue("/etc/hosts", "::1", "::1\t\t\tlocalhost localhost.localdomain " + lineHostname->text() + ".localhost " + lineHostname->text(), -1); 
    874       Utils::setConfFileValue("/etc/hosts", "127.0.0.1", "127.0.0.1\t\tlocalhost localhost.localdomain " + lineHostname->text() + ".localhost " + lineHostname->text(), -1); 
     871   if ( !lineHostname->text().isEmpty() && (lineHostname->text().toLower() != pcbsd::Utils::getConfFileValue("/etc/rc.conf", "hostname=", 1).toLower() ) ) { 
     872      pcbsd::Utils::setConfFileValue("/etc/rc.conf", "hostname=", "hostname=\"" + lineHostname->text() + "\"", -1); 
     873      pcbsd::Utils::setConfFileValue("/etc/hosts", "::1", "::1\t\t\tlocalhost localhost.localdomain " + lineHostname->text() + ".localhost " + lineHostname->text(), -1); 
     874      pcbsd::Utils::setConfFileValue("/etc/hosts", "127.0.0.1", "127.0.0.1\t\tlocalhost localhost.localdomain " + lineHostname->text() + ".localhost " + lineHostname->text(), -1); 
    875875      QMessageBox::information(this,tr("Computer Restart Required"), tr("You must restart your computer to finish changing your hostname") ); 
    876876   } 
     
    878878     
    879879   if ( lineGateway->text() == "..." || ! groupGateway->isChecked() ) { 
    880      Utils::setConfFileValue("/etc/rc.conf", "defaultrouter=", "", -1); 
     880     pcbsd::Utils::setConfFileValue("/etc/rc.conf", "defaultrouter=", "", -1); 
    881881   } else { 
    882      Utils::setConfFileValue("/etc/rc.conf", "defaultrouter=", "defaultrouter=\"" + lineGateway->text() + "\"", -1);   
     882     pcbsd::Utils::setConfFileValue("/etc/rc.conf", "defaultrouter=", "defaultrouter=\"" + lineGateway->text() + "\"", -1);   
    883883   } 
    884884    
     
    888888    if ( groupIPv6->isChecked() ) { 
    889889        if ( ! lineIPv6DNS1->text().isEmpty() ) { 
    890             Utils::setConfFileValue("/etc/resolv.conf", "nameserver", "nameserver " + lineIPv6DNS1->text(), DNSline);   
     890            pcbsd::Utils::setConfFileValue("/etc/resolv.conf", "nameserver", "nameserver " + lineIPv6DNS1->text(), DNSline);   
    891891            DNSline++; 
    892892        } 
    893893        if ( ! lineIPv6DNS2->text().isEmpty() ) { 
    894             Utils::setConfFileValue("/etc/resolv.conf", "nameserver", "nameserver " + lineIPv6DNS2->text(), DNSline);   
     894            pcbsd::Utils::setConfFileValue("/etc/resolv.conf", "nameserver", "nameserver " + lineIPv6DNS2->text(), DNSline);   
    895895            DNSline++; 
    896896        } 
     
    898898    
    899899   if ( lineDNS1->text() == "..."  || ! groupDNS->isChecked() ) { 
    900      Utils::setConfFileValue("/etc/resolv.conf", "nameserver", "", DNSline); 
     900     pcbsd::Utils::setConfFileValue("/etc/resolv.conf", "nameserver", "", DNSline); 
    901901   } else { 
    902      Utils::setConfFileValue("/etc/resolv.conf", "nameserver", "nameserver " + lineDNS1->text(), DNSline);   
     902     pcbsd::Utils::setConfFileValue("/etc/resolv.conf", "nameserver", "nameserver " + lineDNS1->text(), DNSline);   
    903903     DNSline++; 
    904904   }    
    905905   if ( lineDNS2->text() == "..." || ! groupDNS->isChecked() ) { 
    906      Utils::setConfFileValue("/etc/resolv.conf", "nameserver", "", DNSline); 
     906     pcbsd::Utils::setConfFileValue("/etc/resolv.conf", "nameserver", "", DNSline); 
    907907   } else { 
    908      Utils::setConfFileValue("/etc/resolv.conf", "nameserver", "nameserver " + lineDNS2->text(), DNSline);   
     908     pcbsd::Utils::setConfFileValue("/etc/resolv.conf", "nameserver", "nameserver " + lineDNS2->text(), DNSline);   
    909909   }    
    910910    
    911911   // If we have custom DNS, make sure it survives a dhclient run 
    912912   if ( lineDNS1->text() != "..." && lineDNS2->text() != "..." && groupDNS->isChecked() ) 
    913      Utils::setConfFileValue("/etc/dhclient.conf", "supersede domain-name-servers", "supersede domain-name-servers " + lineDNS1->text() + ", " + lineDNS2->text() +";");   
     913     pcbsd::Utils::setConfFileValue("/etc/dhclient.conf", "supersede domain-name-servers", "supersede domain-name-servers " + lineDNS1->text() + ", " + lineDNS2->text() +";");   
    914914   else if ( lineDNS1->text() != "..." ) 
    915      Utils::setConfFileValue("/etc/dhclient.conf", "supersede domain-name-servers", "supersede domain-name-servers " + lineDNS1->text() +";");   
     915     pcbsd::Utils::setConfFileValue("/etc/dhclient.conf", "supersede domain-name-servers", "supersede domain-name-servers " + lineDNS1->text() +";");   
    916916   else if ( lineDNS2->text() != "..." ) 
    917      Utils::setConfFileValue("/etc/dhclient.conf", "supersede domain-name-servers", "supersede domain-name-servers " + lineDNS2->text() +";");   
     917     pcbsd::Utils::setConfFileValue("/etc/dhclient.conf", "supersede domain-name-servers", "supersede domain-name-servers " + lineDNS2->text() +";");   
    918918   else 
    919      Utils::setConfFileValue("/etc/dhclient.conf", "supersede domain-name-servers", "");   
     919     pcbsd::Utils::setConfFileValue("/etc/dhclient.conf", "supersede domain-name-servers", "");   
    920920     
    921921 
    922922   if ( lineSearchDomain->text().isEmpty() || ! groupDNS->isChecked() ) { 
    923      Utils::setConfFileValue("/etc/resolv.conf", "search", "", 1); 
     923     pcbsd::Utils::setConfFileValue("/etc/resolv.conf", "search", "", 1); 
    924924   } else { 
    925      Utils::setConfFileValue("/etc/resolv.conf", "search", "search " + lineSearchDomain->text(), 1); 
     925     pcbsd::Utils::setConfFileValue("/etc/resolv.conf", "search", "search " + lineSearchDomain->text(), 1); 
    926926   } 
    927927 
    928928   // Save the IPv6 stuff 
    929929    if ( groupIPv6->isChecked() ) { 
    930         Utils::setConfFileValue("/etc/rc.conf", "ipv6_activate_all_interfaces=", "ipv6_activate_all_interfaces=\"YES\"", -1); 
     930        pcbsd::Utils::setConfFileValue("/etc/rc.conf", "ipv6_activate_all_interfaces=", "ipv6_activate_all_interfaces=\"YES\"", -1); 
    931931        if ( ! lineIPv6Gateway->text().isEmpty() ) { 
    932             Utils::setConfFileValue("/etc/rc.conf", "ipv6_defaultrouter=", "ipv6_defaultrouter=\"" + lineIPv6Gateway->text() + "\"", -1); 
     932            pcbsd::Utils::setConfFileValue("/etc/rc.conf", "ipv6_defaultrouter=", "ipv6_defaultrouter=\"" + lineIPv6Gateway->text() + "\"", -1); 
    933933        } else { 
    934             Utils::setConfFileValue("/etc/rc.conf", "ipv6_defaultrouter=", "", -1); 
     934            pcbsd::Utils::setConfFileValue("/etc/rc.conf", "ipv6_defaultrouter=", "", -1); 
    935935        } 
    936936    } else { 
    937         Utils::setConfFileValue("/etc/rc.conf", "ipv6_activate_all_interfaces=", "", -1); 
    938         Utils::setConfFileValue("/etc/rc.conf", "ipv6_defaultrouter=", "", -1); 
     937        pcbsd::Utils::setConfFileValue("/etc/rc.conf", "ipv6_activate_all_interfaces=", "", -1); 
     938        pcbsd::Utils::setConfFileValue("/etc/rc.conf", "ipv6_defaultrouter=", "", -1); 
    939939    } 
    940940 
     
    969969   bool ok; 
    970970 
    971    tmp = Utils::getProxyURL(); 
     971   tmp = pcbsd::Utils::getProxyURL(); 
    972972   if ( tmp.isEmpty() ) 
    973973      groupProxySettings->setChecked(false); 
     
    977977   lineProxyAddress->setText(tmp); 
    978978 
    979    tmp = Utils::getProxyUser(); 
     979   tmp = pcbsd::Utils::getProxyUser(); 
    980980   lineProxyUser->setText(tmp); 
    981981   if ( tmp.isEmpty() ) 
     
    984984      checkProxyUser->setChecked(true); 
    985985 
    986    lineProxyPass->setText(Utils::getProxyPass()); 
    987  
    988    tmp = Utils::getProxyPort(); 
     986   lineProxyPass->setText(pcbsd::Utils::getProxyPass()); 
     987 
     988   tmp = pcbsd::Utils::getProxyPort(); 
    989989   tmp.toInt(&ok); 
    990990   if ( ok ) 
     
    992992    
    993993 
    994    tmp = Utils::getProxyType(); 
     994   tmp = pcbsd::Utils::getProxyType(); 
    995995   if ( tmp == "digest" ) 
    996996      radioSOCKSProxy->setChecked(true); 
     
    10061006 
    10071007   if ( ! groupProxySettings->isChecked() ) { 
    1008          Utils::setProxyAuth(QString()); 
    1009          Utils::setProxyAddress(QString()); 
     1008         pcbsd::Utils::setProxyAuth(QString()); 
     1009         pcbsd::Utils::setProxyAddress(QString()); 
    10101010   } else { 
    1011         Utils::setProxyAddress(lineProxyAddress->text() + ":" + tmp.setNum(spinProxyPort->value())); 
     1011        pcbsd::Utils::setProxyAddress(lineProxyAddress->text() + ":" + tmp.setNum(spinProxyPort->value())); 
    10121012 
    10131013        QString authLine; 
    10141014        if ( ! checkProxyUser->isChecked() || lineProxyUser->text().isEmpty() ) { 
    1015           Utils::setProxyAuth(QString()); 
     1015          pcbsd::Utils::setProxyAuth(QString()); 
    10161016        } else { 
    10171017          if ( radioHTTPProxy->isChecked() ) 
     
    10211021          authLine += lineProxyUser->text() + ":"; 
    10221022          authLine += lineProxyPass->text() + ""; 
    1023           Utils::setProxyAuth(authLine); 
     1023          pcbsd::Utils::setProxyAuth(authLine); 
    10241024        } 
    10251025        QMessageBox::warning( this, tr("Proxy enabled"), tr("You may need to re-login for proxy settings to take effect.")); 
  • src-qt4/pc-netmanager/src/NetworkTray/NetworkTray.cpp

    r1f0939e r0cfe72f  
    108108   dev.remove(0, dev.size() -1 ); 
    109109   QString DevNum = dev; 
    110    return Utils::sysctl("net.wlan." + DevNum + ".%parent"); 
     110   return pcbsd::Utils::sysctl("net.wlan." + DevNum + ".%parent"); 
    111111} 
    112112 
     
    476476void NetworkTray::slotRestartNetwork() { 
    477477  //trayIcon->showMessage( tr("Please Wait"),tr("Restarting Network"),QSystemTrayIcon::NoIcon,5000);   
    478   Utils::restartNetworking(); 
     478  pcbsd::Utils::restartNetworking(); 
    479479} 
    480480 
     
    482482  QString arguments; 
    483483  arguments = "pc-netmanager"; 
    484   Utils::runShellCommand(arguments); 
     484  pcbsd::Utils::runShellCommand(arguments); 
    485485} 
    486486 
     
    599599  //update the list of wifi networks available 
    600600  QString cmd = "ifconfig "+DeviceName+" list scan"; 
    601   QStringList wifinet = Utils::runShellCommand(cmd); 
     601  QStringList wifinet = pcbsd::Utils::runShellCommand(cmd); 
    602602  
    603603 //Redo the tray menu 
     
    680680   
    681681  //get the full SSID string 
    682   QString dat = Utils::runShellCommandSearch("ifconfig -v "+DeviceName+" list scan",smSSID); 
     682  QString dat = pcbsd::Utils::runShellCommandSearch("ifconfig -v "+DeviceName+" list scan",smSSID); 
    683683  QStringList wdat = NetworkInterface::parseWifiScanLine(dat,true); 
    684684  QString SSID = wdat[0]; 
  • src-qt4/pc-netmanager/src/NetworkTray/NetworkTray.pro

    r1f0939e r0cfe72f  
    44CONFIG  += qt warn_on release 
    55 
    6 LIBS    += -L../../../libpcbsd -lpcbsd 
     6LIBS    += -L../../../libpcbsd -lpcbsd-utils -lpcbsd-ui 
    77 
    88HEADERS += NetworkTray.h netKey.h 
     
    8484target.path = /usr/local/bin/ 
    8585 
    86 INCLUDEPATH+= ../../../libpcbsd/ 
     86INCLUDEPATH+= ../../../libpcbsd/utils ../../../libpcbsd/ui 
  • src-qt4/pc-netmanager/src/ethernetconfig/ethernetconfig.cpp

    r1f0939e r0cfe72f  
    7878    if ( checkDisableNetwork->isChecked() ) 
    7979    { 
    80       Utils::setConfFileValue( "/etc/rc.conf", "ifconfig_" + DeviceName + "=", "", -1); 
     80      pcbsd::Utils::setConfFileValue( "/etc/rc.conf", "ifconfig_" + DeviceName + "=", "", -1); 
    8181      runCommand("ifconfig " + DeviceName + " down"); 
    8282      buttonApply->setEnabled(FALSE); 
     
    9393        } 
    9494         
    95         if ( ! Utils::validateIPV4(lineIP->text() ) ) { 
     95        if ( ! pcbsd::Utils::validateIPV4(lineIP->text() ) ) { 
    9696            QMessageBox::warning( this, tr("Warning"), 
    9797            tr("IP Address is out of range! (") + lineIP->text() + tr(") Fields must be between 0-255.") ); 
     
    9999               } 
    100100         
    101         if ( ! Utils::validateIPV4(lineNetmask->text() ) ) { 
     101        if ( ! pcbsd::Utils::validateIPV4(lineNetmask->text() ) ) { 
    102102            QMessageBox::warning( this, tr("Warning"), 
    103103            tr("Netmask is out of range! (") + lineNetmask->text() + tr(") Fields must be between 0-255.") ); 
     
    126126       // Get rid of the ifconfig line for the ipv6 interface 
    127127       // Remove old deprecated syntax as well: 
    128        Utils::setConfFileValue( "/etc/rc.conf", "ipv6_ifconfig_" + DeviceName + "=", "", -1); 
    129        Utils::setConfFileValue( "/etc/rc.conf", "ifconfig_" + DeviceName + "_ipv6=", "", -1); 
     128       pcbsd::Utils::setConfFileValue( "/etc/rc.conf", "ipv6_ifconfig_" + DeviceName + "=", "", -1); 
     129       pcbsd::Utils::setConfFileValue( "/etc/rc.conf", "ifconfig_" + DeviceName + "_ipv6=", "", -1); 
    130130       // Set accept_rtadv 
    131        Utils::setConfFileValue( "/etc/rc.conf", "ifconfig_" + DeviceName + "_ipv6=", "ifconfig_" + DeviceName + "_ipv6=\"inet6 accept_rtadv\"", -1); 
     131       pcbsd::Utils::setConfFileValue( "/etc/rc.conf", "ifconfig_" + DeviceName + "_ipv6=", "ifconfig_" + DeviceName + "_ipv6=\"inet6 accept_rtadv\"", -1); 
    132132    } else { 
    133133       // Set static address and disbale accept_rtadv.  This means someone will also have to set 
     
    139139             tmp.prepend("inet6 "); 
    140140          } 
    141           Utils::setConfFileValue( "/etc/rc.conf", "ifconfig_" + DeviceName + "_ipv6=", "ifconfig_" + DeviceName + "_ipv6=\"" + tmp + " -accept_rtadv\"", -1); 
     141          pcbsd::Utils::setConfFileValue( "/etc/rc.conf", "ifconfig_" + DeviceName + "_ipv6=", "ifconfig_" + DeviceName + "_ipv6=\"" + tmp + " -accept_rtadv\"", -1); 
    142142       } 
    143143    } 
    144144 
    145    Utils::setConfFileValue( "/etc/rc.conf", "ifconfig_" + DeviceName + "=", "ifconfig_" + DeviceName + "=\"" + ifConfigLine + "\"", -1);  
     145   pcbsd::Utils::setConfFileValue( "/etc/rc.conf", "ifconfig_" + DeviceName + "=", "ifconfig_" + DeviceName + "=\"" + ifConfigLine + "\"", -1);  
    146146 
    147147   // See if we need to enable lagg on this device 
     
    149149      NetworkInterface::enableLagg(QString("wlan0")); 
    150150     
    151    Utils::restartNetworking(); 
     151   pcbsd::Utils::restartNetworking(); 
    152152 
    153153   // Done, now set the apply button to off 
     
    374374   // Start loading the device information 
    375375   if ( useLagg ) 
    376       tmp = Utils::getConfFileValue( "/etc/rc.conf", "ifconfig_lagg0=", 1 ); 
     376      tmp = pcbsd::Utils::getConfFileValue( "/etc/rc.conf", "ifconfig_lagg0=", 1 ); 
    377377 
    378378   if ( tmp.isEmpty() ) 
    379       tmp = Utils::getConfFileValue( "/etc/rc.conf", "ifconfig_" + DeviceName + "=", 1 ); 
     379      tmp = pcbsd::Utils::getConfFileValue( "/etc/rc.conf", "ifconfig_" + DeviceName + "=", 1 ); 
    380380 
    381381   // Using WPAE config? 
     
    457457  // Check for the IPv6 Configuration 
    458458  // Start loading the device information 
    459    tmp = Utils::getConfFileValue( "/etc/rc.conf", "ifconfig_" + DeviceName + "_ipv6=", 1 ); 
     459   tmp = pcbsd::Utils::getConfFileValue( "/etc/rc.conf", "ifconfig_" + DeviceName + "_ipv6=", 1 ); 
    460460   if ( tmp.isEmpty() ) { 
    461461        // Check for backward compat. 
    462         tmp = Utils::getConfFileValue( "/etc/rc.conf", "ipv6_ifconfig_" + DeviceName + "=", 1 ); 
     462        tmp = pcbsd::Utils::getConfFileValue( "/etc/rc.conf", "ipv6_ifconfig_" + DeviceName + "=", 1 ); 
    463463   } 
    464464   if ( ! tmp.isEmpty() ) { 
  • src-qt4/pc-netmanager/src/ethernetconfig/ethernetconfig.pro

    r1f0939e r0cfe72f  
    44CONFIG  += qt warn_on release 
    55 
    6 LIBS    += -L../../../libpcbsd -lpcbsd 
     6LIBS    += -L../../../libpcbsd -lpcbsd-utils -lpcbsd-ui 
    77 
    88HEADERS += ethernetconfig.h 
     
    8787target.path = /usr/local/bin 
    8888 
    89 INCLUDEPATH+= ../../../libpcbsd/ 
     89INCLUDEPATH+= ../../../libpcbsd/ui ../../../libpcbsd/utils 
  • src-qt4/pc-netmanager/src/wificonfig/wificonfig.pro

    r1f0939e r0cfe72f  
    44CONFIG  += qt warn_on release 
    55 
    6 LIBS    += -L../../../libpcbsd -lpcbsd 
     6LIBS    += -L../../../libpcbsd -lpcbsd-utils -lpcbsd-ui 
    77 
    88HEADERS += dialogwpapersonal.h wepconfig.h wificonfigwidgetbase.h wifiscanssid.h wifiselectiondialog.h 
     
    8787target.path = /usr/local/bin 
    8888 
    89 INCLUDEPATH+= ../../../libpcbsd/ 
     89INCLUDEPATH+= ../../../libpcbsd/utils ../../../libpcbsd/ui 
  • src-qt4/pc-netmanager/src/wificonfig/wificonfigwidgetbase.cpp

    r1f0939e r0cfe72f  
    4949        } 
    5050         
    51         if ( ! Utils::validateIPV4(lineIP->text()) ) { 
     51        if ( ! pcbsd::Utils::validateIPV4(lineIP->text()) ) { 
    5252            QMessageBox::warning( this, tr("Warning"), 
    5353            tr("IP Address is out of range! (") + lineIP->text() + tr(") Fields must be between 0-255.") ); 
     
    5555               } 
    5656         
    57         if ( ! Utils::validateIPV4(lineNetmask->text()) ) { 
     57        if ( ! pcbsd::Utils::validateIPV4(lineNetmask->text()) ) { 
    5858            QMessageBox::warning( this, tr("Warning"), 
    5959            tr("Netmask is out of range! (") + lineNetmask->text() + tr(") Fields must be between 0-255.") ); 
     
    8888    if ( checkDisableWireless->isChecked() ) 
    8989    { 
    90          Utils::setConfFileValue( "/etc/rc.conf", "ifconfig_" + DeviceName, "", -1); 
     90         pcbsd::Utils::setConfFileValue( "/etc/rc.conf", "ifconfig_" + DeviceName, "", -1); 
    9191         runCommand("ifconfig " + DeviceName + " down"); 
    9292         pushApply->setEnabled(FALSE); 
     
    9595 
    9696    // Save the config 
    97     Utils::setConfFileValue( "/etc/rc.conf", "ifconfig_lagg0", "", -1); 
    98     Utils::setConfFileValue( "/etc/rc.conf", "ifconfig_" + DeviceName, \ 
     97    pcbsd::Utils::setConfFileValue( "/etc/rc.conf", "ifconfig_lagg0", "", -1); 
     98    pcbsd::Utils::setConfFileValue( "/etc/rc.conf", "ifconfig_" + DeviceName, \ 
    9999         "ifconfig_" + DeviceName + "=\"WPA " + ifConfigLine + "\"", -1); 
    100100 
     
    108108    // Restart the network 
    109109    buttonCancel->setEnabled(false); 
    110     Utils::restartNetworking(); 
     110    pcbsd::Utils::restartNetworking(); 
    111111 
    112112    buttonCancel->setEnabled(true); 
     
    218218    if ( listEmpty  && ! WPAONLY ){ 
    219219       fileout.remove(); 
    220        Utils::setConfFileValue( "/etc/rc.conf", "ifconfig_lagg0", "", -1); 
    221        Utils::setConfFileValue( "/etc/rc.conf", "ifconfig_" + DeviceName, "ifconfig_" + DeviceName + "=\"SYNCDHCP\""); 
     220       pcbsd::Utils::setConfFileValue( "/etc/rc.conf", "ifconfig_lagg0", "", -1); 
     221       pcbsd::Utils::setConfFileValue( "/etc/rc.conf", "ifconfig_" + DeviceName, "ifconfig_" + DeviceName + "=\"SYNCDHCP\""); 
    222222    }   
    223223 
     
    322322             
    323323    // Start the scan and get the output 
    324     ifconfout = Utils::runShellCommand("ifconfig -v " + DeviceName + " up list scan"); 
     324    ifconfout = pcbsd::Utils::runShellCommand("ifconfig -v " + DeviceName + " up list scan"); 
    325325 
    326326    //display the info for each wifi access point 
     
    10761076   // Get the ifconfig string 
    10771077   if ( usingLagg ) 
    1078      tmp = Utils::getConfFileValue( "/etc/rc.conf", "ifconfig_lagg0=", 1 ); 
     1078     tmp = pcbsd::Utils::getConfFileValue( "/etc/rc.conf", "ifconfig_lagg0=", 1 ); 
    10791079 
    10801080   if ( tmp.isEmpty() ) 
    1081      tmp = Utils::getConfFileValue( "/etc/rc.conf", "ifconfig_" + DeviceName + "=", 1 ); 
     1081     tmp = pcbsd::Utils::getConfFileValue( "/etc/rc.conf", "ifconfig_" + DeviceName + "=", 1 ); 
    10821082 
    10831083   if ( tmp.isEmpty() || tmp.indexOf("OFF") != -1 )  { 
     
    11391139    
    11401140   // Look for a country code 
    1141    tmp = Utils::getConfFileValue( "/etc/rc.conf", "ifconfig_" + DeviceName + "=", 1 ); 
     1141   tmp = pcbsd::Utils::getConfFileValue( "/etc/rc.conf", "ifconfig_" + DeviceName + "=", 1 ); 
    11421142   if ( tmp.indexOf("country ") != -1 ) { 
    11431143       tmp.remove(0, tmp.lastIndexOf("country") + 8); 
  • src-qt4/pc-netmanager/src/wificonfig/wificonfigwidgetbase.h

    r1f0939e r0cfe72f  
    88#include <pcbsd-netif.h> 
    99#include <pcbsd-utils.h> 
     10#include <pcbsd-ui.h> 
    1011#include "wifiselectiondialog.h" 
    1112#include "wepconfig.h" 
  • src-qt4/pc-netmanager/src/wificonfig/wifiscanssid.cpp

    r1f0939e r0cfe72f  
    3232             
    3333    // Start the scan and get the output 
    34     ifconfout = Utils::runShellCommand("ifconfig -v " + DeviceName + " up list scan"); 
     34    ifconfout = pcbsd::Utils::runShellCommand("ifconfig -v " + DeviceName + " up list scan"); 
    3535 
    3636    //display the info for each wifi access point 
  • src-qt4/pc-netmanager/src/wificonfig/wifiselectiondialog.cpp

    r1f0939e r0cfe72f  
    22#include "ui_wifiselectiondialog.h" 
    33#include <qtextstream.h> 
     4#include <pcbsd-ui.h> 
    45#include <QGroupBox> 
    56 
  • src-qt4/pc-netmanager/src/wificonfig/wifiselectiondialog.h

    r1f0939e r0cfe72f  
    1010#include "ui_wifiselectiondialog.h" 
    1111#include "pcbsd-utils.h" 
     12#include "pcbsd-ui.h" 
    1213 
    1314class wifiselectiondialog : public QDialog, private Ui::wifiselectiondialog 
  • src-qt4/pc-pfmanager/pc-pfmanager.pro

    r1f0939e r0cfe72f  
    44CONFIG  += dll 
    55 
    6 INCLUDEPATH     += . config ../libpcbsd/ 
     6INCLUDEPATH     += . config ../libpcbsd/utils/ 
    77 
    88HEADERS += config/packetfilter.hpp \ 
     
    3535DEPENDPATH += config 
    3636 
    37 LIBS    += -L../libpcbsd -lpcbsd 
     37LIBS    += -L../libpcbsd -lpcbsd-utils 
    3838INCLUDEPATH+= ../libpcbsd/ 
    3939 
  • src-qt4/pc-pfmanager/pfmanagerdlg.cpp

    r1f0939e r0cfe72f  
    2727        { 
    2828            _firewall.enable(); 
    29             Utils::setConfFileValue( "/etc/rc.conf", "pf_enable", "pf_enable=\"YES\"", -1); 
     29            pcbsd::Utils::setConfFileValue( "/etc/rc.conf", "pf_enable", "pf_enable=\"YES\"", -1); 
    3030            system("/etc/rc.d/pf start"); 
    3131        } 
     
    4040            { 
    4141                system("/etc/rc.d/pf stop"); 
    42                 Utils::setConfFileValue( "/etc/rc.conf", "pf_enable", "pf_enable=\"NO\"", -1); 
     42                pcbsd::Utils::setConfFileValue( "/etc/rc.conf", "pf_enable", "pf_enable=\"NO\"", -1); 
    4343            } else { 
    4444                cbEnable->setChecked(true); 
  • src-qt4/pc-servicemanager/pc-servicemanager.pro

    r1f0939e r0cfe72f  
    22LANGUAGE        = C++ 
    33 
    4 LIBS    += -L../libpcbsd -L/usr/local/lib -lpcbsd 
     4LIBS    += -L../libpcbsd -L/usr/local/lib -lpcbsd-utils 
    55 
    6 INCLUDEPATH+= ../libpcbsd/ 
     6INCLUDEPATH+= ../libpcbsd/utils/ 
    77 
    88CONFIG  += qt warn_on release 
  • src-qt4/pc-servicemanager/servicemanager.cpp

    r1f0939e r0cfe72f  
    192192    setButtonsAllEnabled(false); 
    193193 
    194     Utils::setConfFileValue( wDir + "/etc/rc.conf", tag, tag + "=\"YES\"", -1); 
     194    pcbsd::Utils::setConfFileValue( wDir + "/etc/rc.conf", tag, tag + "=\"YES\"", -1); 
    195195 
    196196    // Set the service as enabled 
     
    216216    setButtonsAllEnabled(false); 
    217217 
    218     Utils::setConfFileValue( wDir + "/etc/rc.conf", tag, tag + "=\"NO\"", -1); 
     218    pcbsd::Utils::setConfFileValue( wDir + "/etc/rc.conf", tag, tag + "=\"NO\"", -1); 
    219219 
    220220    // Set the service as enabled 
  • src-qt4/pc-softwaremanager/pc-softwaremanager.pro

    r1f0939e r0cfe72f  
    44CONFIG  += qt warn_on release 
    55 
    6 LIBS    += -L../libpcbsd -L/usr/local/lib -lpcbsd -lQtSolutions_SingleApplication-head 
     6LIBS    += -L../libpcbsd -L/usr/local/lib -lpcbsd-utils -lQtSolutions_SingleApplication-head 
    77 
    8 INCLUDEPATH+= ../libpcbsd/ 
     8INCLUDEPATH+= ../libpcbsd/utils/ 
    99 
    1010HEADERS += softmanager-main.h softconfigwidget.h clickedWidget.h dialogPreferences.h \ 
  • src-qt4/pc-soundconfig/pc-soundconfig.pro

    r1f0939e r0cfe72f  
    1313HEADERS += snddialog.h 
    1414 
    15 LIBS    += -L../libpcbsd -lpcbsd 
     15LIBS    += -L../libpcbsd -lpcbsd-utils 
    1616 
    17 INCLUDEPATH+= ../libpcbsd/ 
     17INCLUDEPATH+= ../libpcbsd/utils 
    1818 
    1919RESOURCES = SoundConfig.qrc 
  • src-qt4/pc-soundconfig/snddialog.cpp

    r1f0939e r0cfe72f  
    1212#include <QProcess> 
    1313#include "snddialog.h" 
    14 #include "pcbsd-utils.h" 
     14#include <pcbsd-utils.h> 
    1515 
    1616 
     
    7979  tmp.setNum(comboSound->currentIndex()); 
    8080  system("sysctl hw.snd.default_unit=" + tmp.toLatin1()); 
    81   Utils::setConfFileValue( "/etc/sysctl.conf", "hw.snd.default_unit=", "hw.snd.default_unit=" + tmp ); 
     81  pcbsd::Utils::setConfFileValue( "/etc/sysctl.conf", "hw.snd.default_unit=", "hw.snd.default_unit=" + tmp ); 
    8282  refreshDevices(); 
    8383} 
  • src-qt4/pc-sysmanager/pbsystemtab.cpp

    r1f0939e r0cfe72f  
    3737     
    3838    //Get & Set CPU Type 
    39     labelCPU->setText(Utils::sysctl("hw.model").simplified()); 
     39    labelCPU->setText(pcbsd::Utils::sysctl("hw.model").simplified()); 
    4040     
    4141    //Get & Set RAM 
    42     labelMemory->setText(Utils::bytesToHumanReadable(Utils::sysctlAsInt("hw.physmem"))); 
     42    labelMemory->setText(pcbsd::Utils::bytesToHumanReadable(pcbsd::Utils::sysctlAsInt("hw.physmem"))); 
    4343     
    4444    // Read any kernel settings 
     
    8686 
    8787  // Get the current mirror 
    88   currentMirror = Utils::getMasterMirror(); 
     88  currentMirror = pcbsd::Utils::getMasterMirror(); 
    8989 
    9090  // Load our array of mirrors 
     
    144144  
    145145 QString pcVer=""; 
    146  QStringList out = Utils::runShellCommand(QString("pkg info -f pcbsd-base")); 
     146 QStringList out = pcbsd::Utils::runShellCommand(QString("pkg info -f pcbsd-base")); 
    147147 if (out.size()) { 
    148148   for (int i=0; i<out.size(); i++) 
     
    229229{ 
    230230     if ( checkForceIbus->isChecked() ) 
    231                 Utils::setConfFileValue(PREFIX + "/share/pcbsd/xstartup/enable-ibus.sh", "FORCEIBUS", "FORCEIBUS=\"YES\"", 1); 
     231                pcbsd::Utils::setConfFileValue(PREFIX + "/share/pcbsd/xstartup/enable-ibus.sh", "FORCEIBUS", "FORCEIBUS=\"YES\"", 1); 
    232232     else 
    233                 Utils::setConfFileValue(PREFIX + "/share/pcbsd/xstartup/enable-ibus.sh", "FORCEIBUS", "FORCEIBUS=\"NO\"", 1); 
     233                pcbsd::Utils::setConfFileValue(PREFIX + "/share/pcbsd/xstartup/enable-ibus.sh", "FORCEIBUS", "FORCEIBUS=\"NO\"", 1); 
    234234 
    235235} 
     
    254254bool PBSystemTab::checkValue( QString File, QString Key, QString Value ) 
    255255{ 
    256     QString theValue = Utils::getConfFileValue(File, Key); 
     256    QString theValue = pcbsd::Utils::getConfFileValue(File, Key); 
    257257    if (theValue == Value) { 
    258258        return TRUE; 
     
    314314    if ( showBootCheck->isChecked() ) 
    315315    { 
    316         Utils::setConfFileValue("/boot/loader.conf", "splash_pcx_load=", "splash_pcx_load=\"YES\"" ); 
    317         Utils::setConfFileValue("/boot/loader.conf", "vesa_load=", "vesa_load=\"YES\"" ); 
    318         Utils::setConfFileValue("/boot/loader.conf", "bitmap_load=", "bitmap_load=\"YES\"" ); 
    319         Utils::setConfFileValue("/boot/loader.conf", "bitmap_name=", "bitmap_name=\"/boot/loading-screen.pcx\"" ); 
     316        pcbsd::Utils::setConfFileValue("/boot/loader.conf", "splash_pcx_load=", "splash_pcx_load=\"YES\"" ); 
     317        pcbsd::Utils::setConfFileValue("/boot/loader.conf", "vesa_load=", "vesa_load=\"YES\"" ); 
     318        pcbsd::Utils::setConfFileValue("/boot/loader.conf", "bitmap_load=", "bitmap_load=\"YES\"" ); 
     319        pcbsd::Utils::setConfFileValue("/boot/loader.conf", "bitmap_name=", "bitmap_name=\"/boot/loading-screen.pcx\"" ); 
    320320     } else { 
    321         Utils::setConfFileValue("/boot/loader.conf", "splash_pcx_load=", "splash_pcx_load=\"NO\"" ); 
    322         Utils::setConfFileValue("/boot/loader.conf", "vesa_load=", "vesa_load=\"NO\"" ); 
    323         Utils::setConfFileValue("/boot/loader.conf", "bitmap_load=", "bitmap_load=\"NO\"" ); 
     321        pcbsd::Utils::setConfFileValue("/boot/loader.conf", "splash_pcx_load=", "splash_pcx_load=\"NO\"" ); 
     322        pcbsd::Utils::setConfFileValue("/boot/loader.conf", "vesa_load=", "vesa_load=\"NO\"" ); 
     323        pcbsd::Utils::setConfFileValue("/boot/loader.conf", "bitmap_load=", "bitmap_load=\"NO\"" ); 
    324324     } 
    325325} 
     
    418418                showBootCheck->setChecked(TRUE); 
    419419 
    420     if ( Utils::getConfFileValue(QString(PREFIX + "/share/pcbsd/xstartup/enable-ibus.sh"), QString("FORCEIBUS=") ) == QString("YES")) 
     420    if ( pcbsd::Utils::getConfFileValue(QString(PREFIX + "/share/pcbsd/xstartup/enable-ibus.sh"), QString("FORCEIBUS=") ) == QString("YES")) 
    421421                checkForceIbus->setChecked(TRUE); 
    422422    else 
     
    530530 
    531531    if ( ! radioSelectMirror->isChecked() ) { 
    532        Utils::setMasterMirror(lineCustomMirror->text()); 
     532       pcbsd::Utils::setMasterMirror(lineCustomMirror->text()); 
    533533    } else if (radioAutoMirror->isChecked() ) { 
    534        Utils::setMasterMirror(""); 
     534       pcbsd::Utils::setMasterMirror(""); 
    535535    } else { 
    536536       // Check if we have a mirror selected and save it 
     
    546546       } 
    547547         
    548        Utils::setMasterMirror(curMirror); 
     548       pcbsd::Utils::setMasterMirror(curMirror); 
    549549    } 
    550550} 
     
    597597 
    598598  // If no proxy set 
    599   if ( Utils::getProxyURL().isEmpty() ) 
     599  if ( pcbsd::Utils::getProxyURL().isEmpty() ) 
    600600    return; 
    601601 
    602602  QNetworkProxy proxy; 
    603   if ( Utils::getProxyType() == "SOCKS5" ) 
     603  if ( pcbsd::Utils::getProxyType() == "SOCKS5" ) 
    604604    proxy.setType(QNetworkProxy::Socks5Proxy); 
    605605  else 
    606606    proxy.setType(QNetworkProxy::HttpProxy); 
    607607 
    608   proxy.setHostName(Utils::getProxyURL()); 
    609  
    610   port = Utils::getProxyPort().toInt(&ok); 
    611   if ( ! Utils::getProxyPort().isEmpty() && ok ) 
     608  proxy.setHostName(pcbsd::Utils::getProxyURL()); 
     609 
     610  port = pcbsd::Utils::getProxyPort().toInt(&ok); 
     611  if ( ! pcbsd::Utils::getProxyPort().isEmpty() && ok ) 
    612612    proxy.setPort(port); 
    613   if ( ! Utils::getProxyUser().isEmpty() ) 
    614     proxy.setUser(Utils::getProxyUser()); 
    615   if ( ! Utils::getProxyPass().isEmpty() ) 
    616     proxy.setPassword(Utils::getProxyPass()); 
     613  if ( ! pcbsd::Utils::getProxyUser().isEmpty() ) 
     614    proxy.setUser(pcbsd::Utils::getProxyUser()); 
     615  if ( ! pcbsd::Utils::getProxyPass().isEmpty() ) 
     616    proxy.setPassword(pcbsd::Utils::getProxyPass()); 
    617617 
    618618  QNetworkProxy::setApplicationProxy(proxy); 
  • src-qt4/pc-sysmanager/pbsystemtab.h

    r1f0939e r0cfe72f  
    1414 
    1515#include <pcbsd-utils.h> 
     16#include <pcbsd-ui.h> 
    1617#include "updaterDialog.h" 
    1718#include "ui_pbsystemtab.h" 
  • src-qt4/pc-sysmanager/pc-sysmanager.pro

    r1f0939e r0cfe72f  
    44CONFIG  += qt warn_on release 
    55 
    6 LIBS    += -L../libpcbsd -L/usr/local/lib -lpcbsd 
     6LIBS    += -L../libpcbsd -L/usr/local/lib -lpcbsd-ui -lpcbsd-utils 
    77 
    8 INCLUDEPATH     += /usr/local/include ../libpcbsd 
     8INCLUDEPATH     += ../libpcbsd/utils ../libpcbsd/ui /usr/local/include 
    99 
    1010HEADERS += pbsystemtab.h portsnapprogress.h updaterDialog.h 
  • src-qt4/pc-updategui/pc-updategui.pro

    r1f0939e r0cfe72f  
    33CONFIG  += qt warn_on release 
    44 
    5 LIBS    += -L../libpcbsd -L/usr/local/lib -lpcbsd -lQtSolutions_SingleApplication-head 
     5LIBS    += -L../libpcbsd -L/usr/local/lib -lpcbsd-utils -lQtSolutions_SingleApplication-head 
    66 
    77INCLUDEPATH     += ../libpcbsd/ /usr/local/include 
  • src-qt4/warden-gui/dialogEditIP.cpp

    r1f0939e r0cfe72f  
    8686                                        QString(), &ok); 
    8787        if ( ok ) { 
    88           if ( Utils::validateIPV4(url) || Utils::validateIPV6(url) ) 
     88          if ( pcbsd::Utils::validateIPV4(url) || pcbsd::Utils::validateIPV6(url) ) 
    8989            listIP->addItem(url); 
    9090          else 
  • src-qt4/warden-gui/dialogconfig.cpp

    r1f0939e r0cfe72f  
    6363    QSettings settings("PCBSD"); 
    6464     
    65     NIC = Utils::getValFromPCConf("/usr/local/etc/warden.conf", "NIC"); 
    66     TMPDIR = Utils::getValFromPCConf("/usr/local/etc/warden.conf", "WTMP"); 
    67     JailDir = Utils::getValFromPCConf("/usr/local/etc/warden.conf", "JDIR"); 
     65    NIC = pcbsd::Utils::getValFromPCConf("/usr/local/etc/warden.conf", "NIC"); 
     66    TMPDIR = pcbsd::Utils::getValFromPCConf("/usr/local/etc/warden.conf", "WTMP"); 
     67    JailDir = pcbsd::Utils::getValFromPCConf("/usr/local/etc/warden.conf", "JDIR"); 
    6868     
    6969    lineJailDir->setText(JailDir); 
     
    104104{ 
    105105     
    106     Utils::setValPCConf("/usr/local/etc/warden.conf", "NIC", comboNIC->currentText()); 
    107     Utils::setValPCConf("/usr/local/etc/warden.conf", "WTMP", lineTMPDIR->text()); 
    108     Utils::setValPCConf("/usr/local/etc/warden.conf", "JDIR", lineJailDir->text()); 
     106    pcbsd::Utils::setValPCConf("/usr/local/etc/warden.conf", "NIC", comboNIC->currentText()); 
     107    pcbsd::Utils::setValPCConf("/usr/local/etc/warden.conf", "WTMP", lineTMPDIR->text()); 
     108    pcbsd::Utils::setValPCConf("/usr/local/etc/warden.conf", "JDIR", lineJailDir->text()); 
    109109     
    110110    emit saved(); 
  • src-qt4/warden-gui/dialogwarden.cpp

    r1f0939e r0cfe72f  
    113113void dialogWarden::slotCheckNic()  
    114114{ 
    115    QString NIC = Utils::getValFromPCConf("/usr/local/etc/warden.conf", "NIC"); 
     115   QString NIC = pcbsd::Utils::getValFromPCConf("/usr/local/etc/warden.conf", "NIC"); 
    116116   if ( system("ifconfig " + NIC.toLatin1() + " >/dev/null 2>/dev/null") != 0 ) 
    117117   { 
     
    248248     
    249249    ProgDir = "/usr/local/share/warden"; 
    250     TMPDIR = Utils::getValFromPCConf("/usr/local/etc/warden.conf", "WTMP"); 
    251     JailDir = Utils::getValFromPCConf("/usr/local/etc/warden.conf", "JDIR"); 
     250    TMPDIR = pcbsd::Utils::getValFromPCConf("/usr/local/etc/warden.conf", "WTMP"); 
     251    JailDir = pcbsd::Utils::getValFromPCConf("/usr/local/etc/warden.conf", "JDIR"); 
    252252     
    253253} 
     
    14291429     return; 
    14301430 
    1431    Utils::runInTerminal(QString("warden chroot ") + listJails->currentItem()->text(0), 
     1431   pcbsd::Utils::runInTerminal(QString("warden chroot ") + listJails->currentItem()->text(0), 
    14321432                        QString("Jail: ") + listJails->currentItem()->text(0)); 
    14331433} 
     
    14821482 
    14831483   // We can return if we just changed to what is already set 
    1484    QString dMeta = Utils::getValFromPCConf(JailDir + listJails->currentItem()->text(0) + "/usr/local/etc/warden.conf", "PCBSD_METAPKGSET"); 
     1484   QString dMeta = pcbsd::Utils::getValFromPCConf(JailDir + listJails->currentItem()->text(0) + "/usr/local/etc/warden.conf", "PCBSD_METAPKGSET"); 
    14851485   if ( dMeta == comboPackageSet->currentText() ) 
    14861486      return; 
    14871487 
    14881488   // Update now 
    1489    Utils::setValPCConf(JailDir + listJails->currentItem()->text(0) + "/usr/local/etc/warden.conf", "PCBSD_METAPKGSET", comboPackageSet->currentText()); 
     1489   pcbsd::Utils::setValPCConf(JailDir + listJails->currentItem()->text(0) + "/usr/local/etc/warden.conf", "PCBSD_METAPKGSET", comboPackageSet->currentText()); 
    14901490 
    14911491   // Update the meta-widget 
  • src-qt4/warden-gui/dialogwarden.h

    r1f0939e r0cfe72f  
    1010#include "wizardNewJail.h" 
    1111#include <pcbsd-utils.h> 
     12#include <pcbsd-ui.h> 
    1213#include <QMenu> 
    1314 
  • src-qt4/warden-gui/main.cpp

    r1f0939e r0cfe72f  
    22#include <QDebug> 
    33#include <QTranslator> 
    4 #include <qtsingleapplication.h> 
     4#include <pcbsd-ui.h> 
    55#include <err.h> 
    66#include "dialogwarden.h" 
  • src-qt4/warden-gui/warden-gui.pro

    r1f0939e r0cfe72f  
    44CONFIG  += qt warn_on release 
    55 
    6 LIBS    +=-L../libpcbsd -lpcbsd -lQtSolutions_SingleApplication-head 
    7 INCLUDEPATH+= ../libpcbsd/ 
     6LIBS    +=-L../libpcbsd -lpcbsd-ui -lpcbsd-utils -lQtSolutions_SingleApplication-head 
     7INCLUDEPATH+= ../libpcbsd/ui ../libpcbsd/utils /usr/local/include 
    88 
    99HEADERS += dialogwarden.h dialogconfig.h dialogimport.h dialogworking.h dialogdisplayoutput.h wizardNewJail.h dialogEditIP.h 
  • src-qt4/warden-gui/wizardNewJail.cpp

    r1f0939e r0cfe72f  
    9292 
    9393         // Check if we have a good IPV4 or IPV6 address 
    94          if ( ! Utils::validateIPV4(lineIP->text()) && ! Utils::validateIPV6(lineIP->text()) ) { 
     94         if ( ! pcbsd::Utils::validateIPV4(lineIP->text()) && ! pcbsd::Utils::validateIPV6(lineIP->text()) ) { 
    9595           button(QWizard::NextButton)->setEnabled(false); 
    9696           lineIP->setPalette(badPal); 
Note: See TracChangeset for help on using the changeset viewer.