
Components.utils.import("resource://avg/Preferences.js");Components.utils.import("resource://avg/IOJsm.js");var EXPORTED_SYMBOLS=["Domains_avg","LogAddonMsgs_avg","Ctye_avg","GlobalsScopeVariables_avg"];var Ctye_avg={_lib:null,OpenLib:function(){if(this._lib!==null){return;}
Components.utils.import("resource://gre/modules/ctypes.jsm");try{var dllPath=IORegistryModule_avg.ReadRegistryKey(IORegistryModule_avg.WIN_REG_ROOT.LOCAL_MACHINE,Domains_avg.IE_REG_USER_CHOICES_PATH,Domains_avg.IE_REG_KEYS.FFNativeApi);dllPath=dllPath.replace(/\\/g,"\\");this._lib=ctypes.open(dllPath);LogAddonMsgs_avg.CreateDumpLogString("Ctype DLL Open");}catch(e){dump("\nOpenLib err: "+e);}},CloseLib:function(){if(this._lib!==null){this._lib.close();this._lib=null;LogAddonMsgs_avg.CreateDumpLogString("Ctype DLL Close");}},GetLib:function(){if(this._lib!==null){return this._lib;}else{return null;}}};var GlobalsScopeVariables_avg={searchBarMenuOpened:false,_branchSP:false,_branch:false,_branchKURL:false}
var Domains_avg={ExtensionName:"avg",PartnerID:"avg",ThirdPartyPartner:"avg",IsInstall:false,BaseDomain:"avg.com",SubDomain:"toolbar",DisplayName:"AVG Security Toolbar",InstallDirPath:null,ToolbarURLSMandatoryparams:{"ProductID":"pid","SearchGroup":"sg","ClientID":"cid","MachineID":"mid","DistributionSource":"ds","CoBrand":"coid","CMPID":"cmpid","Version":"v","Language":"lang","InstallDate":"d","Profile":"pr"},STATSURLSMandatoryparams:{"ProductID":"pid","SearchGroup":"sg","ClientID":"ClientID","MachineID":"MachineID","DistributionSource":"DistributionSource","CoBrand":"CoBrand","CMPID":"cmpid","Version":"Version","Language":"Language","InstallDate":"InstallDate","Profile":"Profile"},PreferencesSubRoots:{"Install":"install","User":"userPreferences"},IE_REG_USER_CHOICES_PATH:"SOFTWARE\\AVG Secure Search",FF_REG_USER_CONFIGURATION_PATH:"SOFTWARE\\AVG Secure Search\\FF",OTHER_USER:"SOFTWARE\\AVG Secure Search\\Initialize\\General",IE_REG_KEYS:{"PID":"pid","SG":"sg","HP":"hp","SP":"sp","NT":"NT","NT_ACTIVE":"NT_ACTIVE","PWB":"PWB","FinishURL":"FinishURL","Profile":"Profile","MachineID":"MachineID","MachineIDEnc":"MachineIDEnc","ClientID":"cid","LOCAlE":"lang","Version":"v","DistributionSource":"DistributionSource","CoBrand":"CoBrand","CMPID":"cmpid","InstallDate":"InstallDate","TrackingCode":"TrackingCode","LPCK":"lpck","EnableFFCampaign":"enable_ff_campaign","IgearedInstalled":"_igeared_was_installed_tt","IgearedMigrationCompleteState":"_igeared_was_installed_tbstate_tt","LastInstallationMode":"LastInstallation","OTHER_USER":"OTHER_USER","INSTALL_USER":"InstallUser","FFNativeApi":"FFNativeApi"},IE_HOMEPAGE:"SOFTWARE\\Microsoft\\Internet Explorer\\Main",CLIENT_JS_HTTP_SRC:"",CLIENT_JS_HTTPS_SRC:"",LoadedPreferenceKeys:{},dumpLogDataEnabled:true,dumpLogData:""};var _LogEnabled_avg=null;var LogAddonMsgs_avg={DumpToLog_avg:function(msg){if(_LogEnabled_avg==null)_LogEnabled_avg=Preferences.get(Domains_avg.ExtensionName+".install.enableLog",false);if(!_LogEnabled_avg)return;var aConsoleService=Components.classes["@mozilla.org/consoleservice;1"].getService(Components.interfaces.nsIConsoleService);aConsoleService.logStringMessage(msg);},CreateDumpLogString:function(data){Domains_avg.dumpLogData+=_Utils_avg.ConvertJSDateToSQLDate()+"|"+data+"|\r\n";}};var _Utils_avg={ConvertJSDateToSQLDate:function(){var d=new Date();var m=d.getMonth();m=m+1;if(m==12)m="01";else{if(m<10)m=("0"+m).toString();}
var hh,mm,ss
hh=d.getHours();mm=d.getMinutes();ss=d.getSeconds();hh=hh<10?"0"+hh:hh;mm=mm<10?"0"+mm:mm;ss=ss<10?"0"+ss:ss;var sqlDate=d.getFullYear()+'-'+m+'-'+d.getDate()+' '+hh+':'+mm+':'+ss;return sqlDate;}};