FOSSology  4.4.0
Open Source License Compliance by Open Source Software
agent-unpack.php
Go to the documentation of this file.
1 <?php
2 /*
3  SPDX-FileCopyrightText: © 2008-2013 Hewlett-Packard Development Company, L.P.
4  SPDX-FileCopyrightText: © 2015 Siemens AG
5 
6  SPDX-License-Identifier: GPL-2.0-only
7 */
15 
21 {
22  public function __construct() {
23  $this->Name = "agent_unpack";
24  $this->Title = _("Schedule an Unpack");
25  $this->AgentName = "ununpack";
26 
27  parent::__construct();
28  }
29 
34  function AgentHasResults($uploadId=0)
35  {
36  return CheckARS($uploadId, "ununpack", "Archive unpacker", "ununpack_ars");
37  }
38 
43  public function AgentAdd($jobId, $uploadId, &$errorMsg, $dependencies=array(), $arguments=null)
44  {
45 
46  $jobQueueId = \IsAlreadyScheduled($jobId, $this->AgentName, $uploadId);
47  if ($jobQueueId != 0)
48  {
49  return $jobQueueId;
50  }
51 
52  return $this->doAgentAdd($jobId, $uploadId, $errorMsg, $dependencies, $uploadId, $arguments);
53  }
54 }
55 
56 register_plugin(new UnpackAgentPlugin());
doAgentAdd($jobId, $uploadId, &$errorMsg, $dependencies, $jqargs="", $jq_cmd_args=null)
UI for ununpack agent to schedule a job.
AgentHasResults($uploadId=0)
AgentAdd($jobId, $uploadId, &$errorMsg, $dependencies=array(), $arguments=null)
CheckARS($upload_pk, $AgentName, $AgentDesc, $AgentARSTableName)
Check the ARS table to see if an agent has successfully scanned an upload.
IsAlreadyScheduled($job_pk, $AgentName, $upload_pk)
Check if an agent is already scheduled in a job.
Definition: common-job.php:378