Lines Matching refs:target

80 								Session(uid_t user, const BMessenger& target);
193 void _AddJobs(Target* target, BMessage& message);
198 void _AddJob(Target* target, bool service,
200 void _InitJobs(Target* target);
201 void _LaunchJobs(Target* target,
203 void _StopJobs(Target* target, bool force);
210 void _AddTarget(Target* target);
537 BMessenger target(this);
538 BMessenger::Private messengerPrivate(target);
548 Target* target = FindTarget(fRunTargets.StringAt(index));
549 if (target != NULL)
550 _LaunchJobs(target);
706 Target* target = FindTarget(name);
707 if (target != NULL) {
708 fLog.EventTriggered(target, event);
709 _LaunchJobs(target);
790 const char* name = message->GetString("target");
791 const char* baseName = message->GetString("base target");
793 Target* target = FindTarget(name);
794 if (target == NULL && baseName != NULL) {
797 target = new Target(name);
799 // Copy all jobs with the base target into the new target
807 copy->SetTarget(target);
814 if (target == NULL) {
829 target->AddData(data.GetString("name"), data);
831 _LaunchJobs(target);
845 const char* name = message->GetString("target");
847 Target* target = FindTarget(name);
848 if (target == NULL) {
863 target->AddData(data.GetString("name"), data);
866 fLog.JobStopped(target, force);
867 _StopJobs(target, force);
1002 BMessenger target;
1003 if (message->FindMessenger("daemon", &target) != B_OK)
1007 Session* session = new (std::nothrow) Session(user, target);
1026 target.SendMessage(&message);
1030 target.SendMessage(&message);
1198 reply.AddString("target", iterator->first);
1214 Target* target = FindTarget(name);
1215 if (target == NULL && !fUserMode) {
1220 BMessage info(uint32(target != NULL ? B_OK : B_NAME_NOT_FOUND));
1221 if (target != NULL) {
1222 _GetBaseJobInfo(target, info);
1227 if (job->Target() == target)
1242 const char* targetName = message->GetString("target");
1254 status = request.AddString("target", targetName);
1307 info.SetString("target", job->Target()->Name());
1477 LaunchDaemon::_AddJobs(Target* target, BMessage& message)
1482 _AddJob(target, true, job);
1487 _AddJob(target, false, job);
1496 for (int32 index = 0; message.FindMessage("target", index,
1505 Target* target = FindTarget(name);
1506 if (target == NULL) {
1507 target = new Target(name);
1508 _AddTarget(target);
1510 // Remove all jobs from this target
1516 if (job->Target() == target) {
1523 _SetCondition(target, targetMessage);
1524 _SetEvent(target, targetMessage);
1525 _SetEnvironment(target, targetMessage);
1526 _AddJobs(target, targetMessage);
1528 if (target->Event() != NULL)
1529 target->Event()->Register(*this);
1570 const char* target;
1571 for (int32 index = 0; targets.FindString("target", index, &target) == B_OK;
1573 fRunTargets.Add(target);
1579 LaunchDaemon::_AddJob(Target* target, bool service, BMessage& message)
1599 job->SetTarget(target);
1637 /*! Initializes all jobs for the specified target (may be \c NULL).
1642 LaunchDaemon::_InitJobs(Target* target)
1648 if (job->Target() != target)
1681 /*! Adds all jobs for the specified target (may be \c NULL) to the launch
1685 Unless \a forceNow is true, the target is only launched if its events,
1689 LaunchDaemon::_LaunchJobs(Target* target, bool forceNow)
1691 if (!forceNow && target != NULL && (!target->EventHasTriggered()
1692 || !target->CheckCondition(*this))) {
1696 if (target != NULL && !target->HasLaunched()) {
1697 target->SetLaunched(true);
1698 _InitJobs(target);
1704 if (job->Target() == target)
1710 /*! Stops all running jobs of the specified target (may be \c NULL).
1713 LaunchDaemon::_StopJobs(Target* target, bool force)
1715 if (target != NULL && !target->HasLaunched())
1721 if (job->Target() == target)
1770 Unless \c FORCE_NOW is set, the target is only launched if its events,
1861 LaunchDaemon::_AddTarget(Target* target)
1863 fTargets.insert(std::make_pair(target->Title(), target));