Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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...
commit d5f8f07b45504e6a667bfbffaef1180a9e6513a9 1 parent 549d062
Archimedes Trajano authored committed
6 insomniat.dox
@@ -341,7 +341,7 @@ EXTRACT_LOCAL_CLASSES = YES
341 341 # the interface are included in the documentation.
342 342 # If set to NO (the default) only methods in the interface are included.
343 343
344   -EXTRACT_LOCAL_METHODS = NO
  344 +EXTRACT_LOCAL_METHODS = YES
345 345
346 346 # If this flag is set to YES, the members of anonymous namespaces will be
347 347 # extracted and appear in the documentation as a namespace called
@@ -1254,7 +1254,7 @@ LATEX_SOURCE_CODE = NO
1254 1254 # The RTF output is optimized for Word 97 and may not look very pretty with
1255 1255 # other RTF readers or editors.
1256 1256
1257   -GENERATE_RTF = NO
  1257 +GENERATE_RTF = YES
1258 1258
1259 1259 # The RTF_OUTPUT tag is used to specify where the RTF docs will be put.
1260 1260 # If a relative path is entered the value of OUTPUT_DIRECTORY will be
@@ -1541,7 +1541,7 @@ HIDE_UNDOC_RELATIONS = YES
1541 1541 # toolkit from AT&T and Lucent Bell Labs. The other options in this section
1542 1542 # have no effect if this option is set to NO (the default)
1543 1543
1544   -HAVE_DOT = NO
  1544 +HAVE_DOT = YES
1545 1545
1546 1546 # The DOT_NUM_THREADS specifies the number of dot invocations doxygen is
1547 1547 # allowed to run in parallel. When set to 0 (the default) doxygen will
8 src/cli/insomniat.m
@@ -15,9 +15,7 @@ @implementation TestClient
15 15
16 16 @end
17 17
18   -int main( int argc, char * const argv[] ) {
19   - io_service_t service;
20   -
  18 +int main(int const argc, char * const argv[] ) {
21 19 extern char *optarg;
22 20 extern int optind;
23 21
@@ -84,14 +82,14 @@ int main( int argc, char * const argv[] ) {
84 82 //argc -= optind;
85 83 //argv += optind;
86 84
87   - service = IOServiceGetMatchingService(kIOMasterPortDefault,IOServiceMatching("net_trajano_driver_InsomniaT"));
  85 + const io_service_t service = IOServiceGetMatchingService(kIOMasterPortDefault,IOServiceMatching("net_trajano_driver_InsomniaT"));
88 86 if (service == IO_OBJECT_NULL) {
89 87 fprintf(stderr, "service was not found\n");
90 88 return -1;
91 89 }
92 90
93 91 io_connect_t connect;
94   - kern_return_t kernResult = IOServiceOpen(service, mach_task_self(), 0, &connect);
  92 + const kern_return_t kernResult = IOServiceOpen(service, mach_task_self(), 0, &connect);
95 93 if (kernResult == KERN_SUCCESS) {
96 94 uint64_t output[1];
97 95 uint32_t count = 1;
56 src/iceberg/InsomniaT/InsomniaT.packproj
@@ -3617,6 +3617,62 @@
3617 3617 <key>TestOperator</key>
3618 3618 <string>=</string>
3619 3619 </dict>
  3620 + <dict>
  3621 + <key>AlertDialog</key>
  3622 + <dict>
  3623 + <key>International</key>
  3624 + <dict>
  3625 + <key>MessageKey</key>
  3626 + <string></string>
  3627 + <key>TitleKey</key>
  3628 + <string></string>
  3629 + </dict>
  3630 + </dict>
  3631 + <key>LabelKey</key>
  3632 + <string>InsomniaT files present</string>
  3633 + <key>Level</key>
  3634 + <integer>0</integer>
  3635 + <key>SpecArgument</key>
  3636 + <string>/System/Library/Extensions/InsomniaT.kext</string>
  3637 + <key>SpecTag</key>
  3638 + <integer>1</integer>
  3639 + <key>SpecType</key>
  3640 + <string>file</string>
  3641 + <key>Status</key>
  3642 + <true/>
  3643 + <key>TestObject</key>
  3644 + <string></string>
  3645 + <key>TestOperator</key>
  3646 + <string>=</string>
  3647 + </dict>
  3648 + <dict>
  3649 + <key>AlertDialog</key>
  3650 + <dict>
  3651 + <key>International</key>
  3652 + <dict>
  3653 + <key>MessageKey</key>
  3654 + <string></string>
  3655 + <key>TitleKey</key>
  3656 + <string></string>
  3657 + </dict>
  3658 + </dict>
  3659 + <key>LabelKey</key>
  3660 + <string>InsomniaT files already present (10.5)</string>
  3661 + <key>Level</key>
  3662 + <integer>0</integer>
  3663 + <key>SpecArgument</key>
  3664 + <string>/System/Library/Extensions/InsomniaT (10.5).kext</string>
  3665 + <key>SpecTag</key>
  3666 + <integer>1</integer>
  3667 + <key>SpecType</key>
  3668 + <string>file</string>
  3669 + <key>Status</key>
  3670 + <true/>
  3671 + <key>TestObject</key>
  3672 + <string></string>
  3673 + <key>TestOperator</key>
  3674 + <string>=</string>
  3675 + </dict>
3620 3676 </array>
3621 3677 </dict>
3622 3678 <key>Settings</key>
6 src/kext/InsomniaTUserClient.h
@@ -9,10 +9,14 @@
9 9 */
10 10 class net_trajano_driver_InsomniaTUserClient : public IOUserClient
11 11 {
12   - OSDeclareDefaultStructors(net_trajano_driver_InsomniaTUserClient)
  12 + OSDeclareDefaultStructors(net_trajano_driver_InsomniaTUserClient);
13 13
14 14 private:
  15 + /**
  16 + * IOService provider.
  17 + */
15 18 net_trajano_driver_InsomniaT* fProvider;
  19 +
16 20 public:
17 21 virtual bool start(IOService* provider);
18 22
7 src/prefpane/InsomniaTPref.h
@@ -9,10 +9,17 @@
9 9 #import <PreferencePanes/PreferencePanes.h>
10 10 #import "InsomniaTPrefController.h"
11 11
  12 +/**
  13 + * InsomniaT preference pane.
  14 + */
12 15 @interface InsomniaTPref : NSPreferencePane
13 16 {
  17 + /**
  18 + * Controller.
  19 + */
14 20 IBOutlet InsomniaTPrefController *controller;
15 21 }
  22 +
16 23 - (void) willSelect;
17 24 - (void) didUnselect;
18 25
9 src/prefpane/InsomniaTStatus.h
@@ -8,11 +8,14 @@
8 8
9 9 #import <Cocoa/Cocoa.h>
10 10
  11 +/**
  12 + * InsomniaT status model. This interfaces with the InsomniaT kernel extension.
  13 + */
11 14 @interface InsomniaTStatus : NSObject {
12 15 /**
13   - * This is zero if disabled
14   - * This is one if enabled
15   - * This is two if there's a problem
  16 + * This is zero if disabled.
  17 + * This is one if enabled.
  18 + * This is two if there's a problem.
16 19 */
17 20 NSNumber* insomniaTEnabled;
18 21 }
17 src/prefpane/InsomniaTStatus.m
@@ -30,8 +30,14 @@ - (id) init {
30 30 uint32_t count = 1;
31 31 IOConnectCallScalarMethod(connect, 3, NULL, 0, output, &count);
32 32 IOServiceClose(connect);
33   - [self setValue: [NSNumber numberWithUnsignedInt: output[0]]
34   - forKey: @"insomniaTEnabled"];
  33 +
  34 + if (output[0] == 1) {
  35 + [self setValue: [NSNumber numberWithUnsignedInt: 1]
  36 + forKey: @"insomniaTEnabled"];
  37 + } else {
  38 + [self setValue: [NSNumber numberWithUnsignedInt: 0]
  39 + forKey: @"insomniaTEnabled"];
  40 + }
35 41 } else {
36 42 [self setValue: [NSNumber numberWithUnsignedInt: 2]
37 43 forKey: @"insomniaTEnabled"];
@@ -61,11 +67,10 @@ -(uint64_t) getInsomniaTStatusFromDriver{
61 67 IOServiceClose(connect);
62 68
63 69 if (output[0] == 1) {
64   - return 0;
65   - } else {
66 70 return 1;
  71 + } else {
  72 + return 0;
67 73 }
68   - return output[0] ;
69 74 } else {
70 75 return 2;
71 76 }
@@ -74,7 +79,7 @@ -(uint64_t) getInsomniaTStatusFromDriver{
74 79 - (void) enableInsomniaT {
75 80 const io_service_t service = IOServiceGetMatchingService(kIOMasterPortDefault,IOServiceMatching("net_trajano_driver_InsomniaT"));
76 81 if (service == IO_OBJECT_NULL) {
77   - [self setValue: [NSNumber numberWithUnsignedInt:[self getInsomniaTStatusFromDriver]]
  82 + [self setValue: [NSNumber numberWithUnsignedInt: 2]
78 83 forKey: @"insomniaTEnabled"];
79 84 return;
80 85 }

0 comments on commit d5f8f07

Please sign in to comment.
Something went wrong with that request. Please try again.