Home » Developing U++ » UppHub » More new functions
Re: More new functions [message #19200 is a reply to message #18804] |
Wed, 19 November 2008 17:44   |
 |
koldo
Messages: 3432 Registered: August 2008
|
Senior Veteran |
|
|
Here it is!
I enclose you two folders:
- SysInfo: The package
---- SysInfo.cpp
---- SysInfo.h
---- SysInfo.upp
- SysInfo demo non-gui: A command line sample
---- main.cpp: The sample
---- SysInfo demo non-gui.upp
Finally I have included much more functions. Just run the demo program and play with it.
There are "SysInfo" functions and others, mainly because they were necessary. Please tell me the best way to organize them to be enclosed some in bazaar and some in other packages.
The next steps will be in addition to do a gui demo and to test the commands in more distros and OS as FreeBSD, OpenSolaris, Slackware and Knoppix. And of course to fix bugs and include more things if you want.
Best regards
Koldo
PD. I enclose you part of the program output as a sample:
Introduce enter or (l) to log off, (r) to reboot or (s) to shutdown
Introduce number of test cycles or just type enter to run it once:
SysInfo functions demo
Special folders
Desktop: /home/aupa/Escritorio
Programs: /usr/bin
Application Data: /home/aupa
Music: /home/aupa/Escritorio
Pictures: /home/aupa/Escritorio
Video: /home/aupa/Escritorio
Personal: /home/aupa/Escritorio
Templates: /home/aupa/Escritorio
Download: /home/aupa/Escritorio
Temp: /home/aupa
Os: /bin
System:
System info:
System manufacturer 'TOSHIBA', product name 'Satellite A300',
version 'PSWJ0E-21403CE', number of processors: 2
Real CPU Speed: 1.830 GHz
Battery info
Working with battery: yes, Percentage: 85%, Remaining; 151 min
Bios version 'V2.70 ',
release date '04/14/2008'
Processor #0: Vendor 'GenuineIntel',
identifier 'Intel(R) Core(TM)2 Duo CPU T5550 @ 1.83GHz',
architecture 'i686
Family 6 Model 15 Stepping 13', speed 1833 MHz
Processor #1: Vendor 'GenuineIntel',
identifier 'Intel(R) Core(TM)2 Duo CPU T5550 @ 1.83GHz',
architecture 'i686
Family 6 Model 15 Stepping 13', speed 1833 MHz
Press enter to continue...
Memory info:
Percent of memory in use: 75%
Total physical memory: 2116001792 bytes (2.0Gb)
Free physical memory: 518352896 bytes (494.3Mb)
Total paging file: 729112576 bytes (695.3Mb)
Free paging file: 0 bytes (0b)
Total virtual memory: 4721266688 bytes (4.4Gb)
Free virtual memory: 4721266688 bytes (4.4Gb)
Os info:
Kernel: Linux, version: 2.6.24-21-generic #1 SMP Tue Oct 21 23:43:45 UTC 2008,
architecture: i686
Distro: ubuntu, version: 8.04
Desktop: gnome, version: 2.22.3
Program compiled with gnuc version 40103. Compilation date: Nov 19 2008
Default exes info:
Default program for 'html' is 'firefox.desktop'
Default program for 'doc' is 'ooo-writer.desktop'
Default program for 'png' is 'eog.desktop'
Default program for 'pdf' is 'evince.desktop'
Default program for 'txt' is 'gedit.desktop'
Default program for 'xyz' is ''
Drives list:
Drive path:'/'
Type: 'Hard', Volume: 'Linux',
MaxName: 255, File System: ext3
Free Bytes User: 46895562752 (43.7Gb)
Total Bytes User: 54519554048 (50.8Gb), Total Free Bytes: 46895562752 (43.7Gb)
Drive path:'/home'
Type: 'Hard', Volume: 'Shared drive',
MaxName: 255, File System: ext3
Free Bytes User: 71834021888 (66.9Gb)
Total Bytes User: 130094362624 (121.2Gb), Total Free Bytes: 71834021888 (66.9Gb)
Other Info:
Process Id: 17248
Process name: 'demo'
Process file name: '/home/exe/demo'
Process priority is: 5
Now changed to high priority: No
Process priority is: 5
Launch file 'test.txt':
If modify 'test.txt' it will ask you to save or not the file
If you answer Yes or No the program will be terminated
If you answer Cancel or wait more than 5 seconds the program will be killed
Press enter to terminate 'test.txt'
Process terminated
Windows list:
Window hwnd: 41943086, processId: 6154, Name: gdesklets-daemon
File name: /usr/bin/python2.5
Window caption: 'gdesklets-daemon '
Window hwnd: 16821977, processId: 5995, Name: nautilus
File name: /usr/bin/nautilus
Window caption: 'SysInfo demo non-gui - Navegador de archivos '
Window hwnd: 35654762, processId: 0, Name: theide-svn
File name:
Window caption: 'SysInfo demo non-gui - - TheIDE - [/home/SysInfo/SysInfo.cpp UTF-8] { MyApps } '
Process list:
Id 5898: Priority: 5, Program: /usr/bin/gnome-session
Id 5948: Priority: 5, Program: /usr/lib/libgconf2-4/gconfd-2
Id 5956: Priority: 5, Program: /usr/bin/seahorse-agent
Id 17071: Priority: 5, Program: /usr/bin/theide-svn
-
Attachment: SysInfo.7z
(Size: 17.96KB, Downloaded 407 times)
Best regards
IƱaki
|
|
|
 |
|
More new functions
By: koldo on Wed, 22 October 2008 23:25
|
 |
|
Re: More new functions
By: tojocky on Thu, 23 October 2008 07:35
|
 |
|
Re: More new functions
By: captainc on Fri, 24 October 2008 01:22
|
 |
|
Re: More new functions
By: koldo on Fri, 24 October 2008 08:11
|
 |
|
Re: More new functions
By: captainc on Fri, 24 October 2008 14:05
|
 |
|
Re: More new functions
By: mrjt on Fri, 24 October 2008 15:28
|
 |
|
Re: More new functions
By: koldo on Sun, 26 October 2008 01:19
|
 |
|
Re: More new functions
By: captainc on Sun, 26 October 2008 02:03
|
 |
|
Re: More new functions
By: koldo on Sun, 26 October 2008 10:19
|
 |
|
Re: More new functions
By: koldo on Thu, 30 October 2008 08:24
|
 |
|
Re: More new functions
By: mirek on Fri, 31 October 2008 13:34
|
 |
|
Re: More new functions
By: cocob on Fri, 31 October 2008 10:44
|
 |
|
Re: More new functions
By: koldo on Fri, 31 October 2008 13:25
|
 |
|
Re: More new functions
By: koldo on Fri, 31 October 2008 15:51
|
 |
|
Re: More new functions
|
 |
|
Re: More new functions
By: koldo on Thu, 13 November 2008 09:15
|
 |
|
Re: More new functions
By: koldo on Wed, 19 November 2008 08:09
|
 |
|
Re: More new functions
By: koldo on Wed, 19 November 2008 17:44
|
 |
|
Re: More new functions
By: tojocky on Thu, 20 November 2008 10:35
|
 |
|
Re: More new functions
By: koldo on Thu, 20 November 2008 14:18
|
 |
|
Re: More new functions
By: tojocky on Fri, 21 November 2008 07:40
|
 |
|
Re: More new functions
By: koldo on Fri, 21 November 2008 08:17
|
 |
|
Re: More new functions
By: tojocky on Fri, 21 November 2008 13:25
|
 |
|
Re: More new functions
By: koldo on Fri, 21 November 2008 16:13
|
 |
|
Re: More new functions
By: koldo on Fri, 21 November 2008 22:24
|
 |
|
Re: More new functions
By: tojocky on Sat, 22 November 2008 08:32
|
 |
|
Re: More new functions
By: koldo on Sat, 22 November 2008 23:24
|
 |
|
Re: More new functions
By: tojocky on Sun, 23 November 2008 07:58
|
 |
|
Re: More new functions
By: mirek on Sun, 23 November 2008 10:45
|
 |
|
Re: More new functions
By: koldo on Sun, 23 November 2008 16:20
|
 |
|
Re: More new functions
By: mirek on Sun, 23 November 2008 18:23
|
 |
|
Re: More new functions
By: koldo on Sun, 23 November 2008 20:08
|
 |
|
Re: More new functions
By: koldo on Mon, 24 November 2008 00:28
|
 |
|
Re: More new functions
By: koldo on Wed, 03 December 2008 09:30
|
 |
|
Re: More new functions
By: mirek on Mon, 15 December 2008 10:07
|
 |
|
Re: More new functions
By: koldo on Wed, 17 December 2008 08:33
|
 |
|
Re: More new functions
By: koldo on Sat, 17 January 2009 22:32
|
 |
|
Re: More new functions
|
 |
|
Re: More new functions
By: koldo on Sat, 25 December 2010 10:05
|
Goto Forum:
Current Time: Thu May 08 07:35:58 CEST 2025
Total time taken to generate the page: 0.03142 seconds
|