Permalink
Browse files

ssage:

corrected doxygen configuration
updated logic for the installer
const correctness and documentation

original bzr status:
revno: 91
tags: 3.0.2
committer: Archimedes Trajano <developer@trajano.net>
branch nick: InsomniaT
  • Loading branch information...
1 parent 549d062 commit d5f8f07b45504e6a667bfbffaef1180a9e6513a9 @trajano committed with Aug 1, 2011
View
6 insomniat.dox
@@ -341,7 +341,7 @@ EXTRACT_LOCAL_CLASSES = YES
# the interface are included in the documentation.
# If set to NO (the default) only methods in the interface are included.
-EXTRACT_LOCAL_METHODS = NO
+EXTRACT_LOCAL_METHODS = YES
# If this flag is set to YES, the members of anonymous namespaces will be
# extracted and appear in the documentation as a namespace called
@@ -1254,7 +1254,7 @@ LATEX_SOURCE_CODE = NO
# The RTF output is optimized for Word 97 and may not look very pretty with
# other RTF readers or editors.
-GENERATE_RTF = NO
+GENERATE_RTF = YES
# The RTF_OUTPUT tag is used to specify where the RTF docs will be put.
# If a relative path is entered the value of OUTPUT_DIRECTORY will be
@@ -1541,7 +1541,7 @@ HIDE_UNDOC_RELATIONS = YES
# toolkit from AT&T and Lucent Bell Labs. The other options in this section
# have no effect if this option is set to NO (the default)
-HAVE_DOT = NO
+HAVE_DOT = YES
# The DOT_NUM_THREADS specifies the number of dot invocations doxygen is
# allowed to run in parallel. When set to 0 (the default) doxygen will
View
8 src/cli/insomniat.m
@@ -15,9 +15,7 @@ @implementation TestClient
@end
-int main( int argc, char * const argv[] ) {
- io_service_t service;
-
+int main(int const argc, char * const argv[] ) {
extern char *optarg;
extern int optind;
@@ -84,14 +82,14 @@ int main( int argc, char * const argv[] ) {
//argc -= optind;
//argv += optind;
- service = IOServiceGetMatchingService(kIOMasterPortDefault,IOServiceMatching("net_trajano_driver_InsomniaT"));
+ const io_service_t service = IOServiceGetMatchingService(kIOMasterPortDefault,IOServiceMatching("net_trajano_driver_InsomniaT"));
if (service == IO_OBJECT_NULL) {
fprintf(stderr, "service was not found\n");
return -1;
}
io_connect_t connect;
- kern_return_t kernResult = IOServiceOpen(service, mach_task_self(), 0, &connect);
+ const kern_return_t kernResult = IOServiceOpen(service, mach_task_self(), 0, &connect);
if (kernResult == KERN_SUCCESS) {
uint64_t output[1];
uint32_t count = 1;
View
56 src/iceberg/InsomniaT/InsomniaT.packproj
@@ -3617,6 +3617,62 @@
<key>TestOperator</key>
<string>=</string>
</dict>
+ <dict>
+ <key>AlertDialog</key>
+ <dict>
+ <key>International</key>
+ <dict>
+ <key>MessageKey</key>
+ <string></string>
+ <key>TitleKey</key>
+ <string></string>
+ </dict>
+ </dict>
+ <key>LabelKey</key>
+ <string>InsomniaT files present</string>
+ <key>Level</key>
+ <integer>0</integer>
+ <key>SpecArgument</key>
+ <string>/System/Library/Extensions/InsomniaT.kext</string>
+ <key>SpecTag</key>
+ <integer>1</integer>
+ <key>SpecType</key>
+ <string>file</string>
+ <key>Status</key>
+ <true/>
+ <key>TestObject</key>
+ <string></string>
+ <key>TestOperator</key>
+ <string>=</string>
+ </dict>
+ <dict>
+ <key>AlertDialog</key>
+ <dict>
+ <key>International</key>
+ <dict>
+ <key>MessageKey</key>
+ <string></string>
+ <key>TitleKey</key>
+ <string></string>
+ </dict>
+ </dict>
+ <key>LabelKey</key>
+ <string>InsomniaT files already present (10.5)</string>
+ <key>Level</key>
+ <integer>0</integer>
+ <key>SpecArgument</key>
+ <string>/System/Library/Extensions/InsomniaT (10.5).kext</string>
+ <key>SpecTag</key>
+ <integer>1</integer>
+ <key>SpecType</key>
+ <string>file</string>
+ <key>Status</key>
+ <true/>
+ <key>TestObject</key>
+ <string></string>
+ <key>TestOperator</key>
+ <string>=</string>
+ </dict>
</array>
</dict>
<key>Settings</key>
View
6 src/kext/InsomniaTUserClient.h
@@ -9,10 +9,14 @@
*/
class net_trajano_driver_InsomniaTUserClient : public IOUserClient
{
- OSDeclareDefaultStructors(net_trajano_driver_InsomniaTUserClient)
+ OSDeclareDefaultStructors(net_trajano_driver_InsomniaTUserClient);
private:
+ /**
+ * IOService provider.
+ */
net_trajano_driver_InsomniaT* fProvider;
+
public:
virtual bool start(IOService* provider);
View
7 src/prefpane/InsomniaTPref.h
@@ -9,10 +9,17 @@
#import <PreferencePanes/PreferencePanes.h>
#import "InsomniaTPrefController.h"
+/**
+ * InsomniaT preference pane.
+ */
@interface InsomniaTPref : NSPreferencePane
{
+ /**
+ * Controller.
+ */
IBOutlet InsomniaTPrefController *controller;
}
+
- (void) willSelect;
- (void) didUnselect;
View
9 src/prefpane/InsomniaTStatus.h
@@ -8,11 +8,14 @@
#import <Cocoa/Cocoa.h>
+/**
+ * InsomniaT status model. This interfaces with the InsomniaT kernel extension.
+ */
@interface InsomniaTStatus : NSObject {
/**
- * This is zero if disabled
- * This is one if enabled
- * This is two if there's a problem
+ * This is zero if disabled.
+ * This is one if enabled.
+ * This is two if there's a problem.
*/
NSNumber* insomniaTEnabled;
}
View
17 src/prefpane/InsomniaTStatus.m
@@ -30,8 +30,14 @@ - (id) init {
uint32_t count = 1;
IOConnectCallScalarMethod(connect, 3, NULL, 0, output, &count);
IOServiceClose(connect);
- [self setValue: [NSNumber numberWithUnsignedInt: output[0]]
- forKey: @"insomniaTEnabled"];
+
+ if (output[0] == 1) {
+ [self setValue: [NSNumber numberWithUnsignedInt: 1]
+ forKey: @"insomniaTEnabled"];
+ } else {
+ [self setValue: [NSNumber numberWithUnsignedInt: 0]
+ forKey: @"insomniaTEnabled"];
+ }
} else {
[self setValue: [NSNumber numberWithUnsignedInt: 2]
forKey: @"insomniaTEnabled"];
@@ -61,11 +67,10 @@ -(uint64_t) getInsomniaTStatusFromDriver{
IOServiceClose(connect);
if (output[0] == 1) {
- return 0;
- } else {
return 1;
+ } else {
+ return 0;
}
- return output[0] ;
} else {
return 2;
}
@@ -74,7 +79,7 @@ -(uint64_t) getInsomniaTStatusFromDriver{
- (void) enableInsomniaT {
const io_service_t service = IOServiceGetMatchingService(kIOMasterPortDefault,IOServiceMatching("net_trajano_driver_InsomniaT"));
if (service == IO_OBJECT_NULL) {
- [self setValue: [NSNumber numberWithUnsignedInt:[self getInsomniaTStatusFromDriver]]
+ [self setValue: [NSNumber numberWithUnsignedInt: 2]
forKey: @"insomniaTEnabled"];
return;
}

0 comments on commit d5f8f07

Please sign in to comment.