• Home
  • Raw
  • Download

Lines Matching +full:- +full:- +full:allow +full:- +full:dirty

4  * Copyright © 2020-2024 by OpenPrinting.
5 * Copyright @ 2007-2018 by Apple Inc.
34 * printing a job. And on macOS we can also "sleep print" - basically the
41 * 'cupsdCleanDirty()' - Write dirty config and state files.
65 if (job->dirty) in cupsdCleanDirty()
80 * 'cupsdMarkDirty()' - Mark config or state files as needing a write.
84 cupsdMarkDirty(int what) /* I - What file(s) are dirty? */ in cupsdMarkDirty()
87 (what & CUPSD_DIRTY_PRINTERS) ? 'P' : '-', in cupsdMarkDirty()
88 (what & CUPSD_DIRTY_CLASSES) ? 'C' : '-', in cupsdMarkDirty()
89 (what & CUPSD_DIRTY_PRINTCAP) ? 'p' : '-', in cupsdMarkDirty()
90 (what & CUPSD_DIRTY_JOBS) ? 'J' : '-', in cupsdMarkDirty()
91 (what & CUPSD_DIRTY_SUBSCRIPTIONS) ? 'S' : '-'); in cupsdMarkDirty()
106 * 'cupsdSetBusyState()' - Let the system know when we are busy doing something.
110 cupsdSetBusyState(int working) /* I - Doing significant work? */ in cupsdSetBusyState()
120 "Dirty files", in cupsdSetBusyState()
122 "Printing jobs and dirty files", in cupsdSetBusyState()
124 "Active clients and dirty files", in cupsdSetBusyState()
126 "Active clients, printing jobs, and dirty files" in cupsdSetBusyState()
144 if ((p = job->printer) != NULL) in cupsdSetBusyState()
146 for (i = 0; i < p->num_reasons; i ++) in cupsdSetBusyState()
147 if (!strcmp(p->reasons[i], "connecting-to-device")) in cupsdSetBusyState()
150 if (!p->num_reasons || i >= p->num_reasons) in cupsdSetBusyState()
190 * This is the Apple-specific system event code. It works by creating
196 * Include MacOS-specific headers...
212 # define SYSEVENT_CANSLEEP 0x1 /* Decide whether to allow sleep or not */
288 * 'cupsdAllowSleep()' - Tell the OS it is now OK to sleep.
303 * 'cupsdStartSystemMonitor()' - Start monitoring for system change.
316 cupsdLogMessage(CUPSD_LOG_ERROR, "System event monitor pipe() failed - %s!", in cupsdStartSystemMonitor()
324 * Set non-blocking mode on the descriptor we will be receiving notification in cupsdStartSystemMonitor()
351 * 'cupsdStopSystemMonitor()' - Stop monitoring for system change.
402 * 'sysEventThreadEntry()' - A thread to receive power and computer name
406 static void * /* O - Return status/value */
605 * 'sysEventPowerNotifier()' - Handle power notification events.
610 void *context, /* I - Thread context data */ in sysEventPowerNotifier()
611 io_service_t service, /* I - Unused service info */ in sysEventPowerNotifier()
612 natural_t messageType, /* I - Type of message */ in sysEventPowerNotifier()
613 void *messageArgument) /* I - Message data */ in sysEventPowerNotifier()
622 (void)service; /* anti-compiler-warning-code */ in sysEventPowerNotifier()
628 threadData->sysevent.event |= SYSEVENT_CANSLEEP; in sysEventPowerNotifier()
634 threadData->sysevent.event |= SYSEVENT_WILLSLEEP; in sysEventPowerNotifier()
635 threadData->sysevent.event &= ~SYSEVENT_WOKE; in sysEventPowerNotifier()
640 * Because powered on is followed by a net-changed event, delay in sysEventPowerNotifier()
645 threadData->sysevent.event |= SYSEVENT_WOKE; in sysEventPowerNotifier()
705 IOAllowPowerChange(threadData->sysevent.powerKernelPort, in sysEventPowerNotifier()
709 threadData->sysevent.powerNotificationID = (long)messageArgument; in sysEventPowerNotifier()
717 write(SysEventPipes[1], &threadData->sysevent, in sysEventPowerNotifier()
718 sizeof(threadData->sysevent)); in sysEventPowerNotifier()
719 threadData->sysevent.event = 0; in sysEventPowerNotifier()
727 CFRunLoopTimerSetNextFireDate(threadData->timerRef, in sysEventPowerNotifier()
735 * 'sysEventConfigurationNotifier()' - Network configuration change notification
741 SCDynamicStoreRef store, /* I - System data (unused) */ in sysEventConfigurationNotifier()
742 CFArrayRef changedKeys, /* I - Changed data */ in sysEventConfigurationNotifier()
743 void *context) /* I - Thread context data */ in sysEventConfigurationNotifier()
750 (void)store; /* anti-compiler-warning-code */ in sysEventConfigurationNotifier()
756 threadData->sysevent.event |= SYSEVENT_NAMECHANGED; in sysEventConfigurationNotifier()
759 threadData->sysevent.event |= SYSEVENT_NETCHANGED; in sysEventConfigurationNotifier()
771 * de-bounce these so we only end up generating one event for the main thread. in sysEventConfigurationNotifier()
774 CFRunLoopTimerSetNextFireDate(threadData->timerRef, in sysEventConfigurationNotifier()
780 * 'sysEventTimerNotifier()' - Handle delayed event notifications.
785 CFRunLoopTimerRef timer, /* I - Timer information */ in sysEventTimerNotifier()
786 void *context) /* I - Thread context data */ in sysEventTimerNotifier()
799 if (threadData->sysevent.event) in sysEventTimerNotifier()
801 write(SysEventPipes[1], &threadData->sysevent, in sysEventTimerNotifier()
802 sizeof(threadData->sysevent)); in sysEventTimerNotifier()
803 threadData->sysevent.event = 0; in sysEventTimerNotifier()
809 * 'sysUpdate()' - Update the current system state.
830 * If there are active printers that don't have the connecting-to-device in sysUpdate()
831 * or cups-waiting-for-job-completed printer-state-reason then cancel the in sysUpdate()
840 if (p->job) in sysUpdate()
842 for (i = 0; i < p->num_reasons; i ++) in sysUpdate()
843 if (!strcmp(p->reasons[i], "connecting-to-device") || in sysUpdate()
844 !strcmp(p->reasons[i], "cups-waiting-for-job-completed")) in sysUpdate()
847 if (!p->num_reasons || i >= p->num_reasons) in sysUpdate()
856 p->name); in sysUpdate()
877 * If we have no printing jobs, allow the power change immediately. in sysUpdate()
891 * If there are active printers that don't have the connecting-to-device in sysUpdate()
892 * or cups-waiting-for-job-completed printer-state-reasons then delay the in sysUpdate()
900 if (p->job) in sysUpdate()
902 for (i = 0; i < p->num_reasons; i ++) in sysUpdate()
903 if (!strcmp(p->reasons[i], "connecting-to-device") || in sysUpdate()
904 !strcmp(p->reasons[i], "cups-waiting-for-job-completed")) in sysUpdate()
907 if (!p->num_reasons || i >= p->num_reasons) in sysUpdate()
916 p->name); in sysUpdate()
950 if (job->cancel_time) in sysUpdate()
952 ipp_attribute_t *cancel_after = ippFindAttribute(job->attrs, in sysUpdate()
953 "job-cancel-after", in sysUpdate()
957 job->cancel_time = time(NULL) + ippGetInteger(cancel_after, 0); in sysUpdate()
959 job->cancel_time = time(NULL) + MaxJobTime; in sysUpdate()
974 "System network configuration changed - " in sysUpdate()
988 "Computer name or BTMM domains changed - ignored while " in sysUpdate()
1004 * 'sysUpdateNames()' - Update computer and/or BTMM domains.
1016 * De-register the individual printers... in sysUpdateNames()
1033 * Now re-register them... in sysUpdateNames()