summaryrefslogtreecommitdiff
path: root/docs/Protocols/SDLManagerDelegate.html
blob: 72795275b407b74be63dfbe12e04f0d582724619 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
<h1>SDLManagerDelegate Protocol Reference</h1>

<h3>Section Contents</h3>

<ul>
  <li><a href="#section--managerDidDisconnect">-managerDidDisconnect</a></li>
  <li><a href="#section--hmiLevel:didChangeToLevel:">-hmiLevel:didChangeToLevel:</a></li>
  <li><a href="#section--audioStreamingState:didChangeToState:">-audioStreamingState:didChangeToState:</a></li>
  <li><a href="#section--systemContext:didChangeToContext:">-systemContext:didChangeToContext:</a></li>
  <li><a href="#section--managerShouldUpdateLifecycleToLanguage:">-managerShouldUpdateLifecycleToLanguage:</a></li>
</ul>

<h3>Overview</h3>

<p>Undocumented</p>


<section class="section task-group-section">
  <h3 id="section--managerDidDisconnect">
      -managerDidDisconnect
  </h3>
  
  <p>Called upon a disconnection from the remote system.</p>

  
  
  <h4>Objective-C</h4>
  <pre class="highlight objective_c"><code><span class="k">-</span> <span class="p">(</span><span class="kt">void</span><span class="p">)</span><span class="n">managerDidDisconnect</span><span class="p">;</span></code></pre>

  
  <h4>Swift</h4>
  <pre class="highlight swift"><code><span class="kd">func</span> <span class="nf">managerDidDisconnect</span><span class="p">()</span></code></pre>

  
  
  
  <h3 id="section--hmiLevel:didChangeToLevel:">
      -hmiLevel:didChangeToLevel:
  </h3>
  
  <p>Called when the HMI level state of this application changes on the remote system. This is equivalent to the application&rsquo;s state changes in iOS such as foreground, background, or closed.</p>

  
  
  <h4>Objective-C</h4>
  <pre class="highlight objective_c"><code><span class="k">-</span> <span class="p">(</span><span class="kt">void</span><span class="p">)</span><span class="nf">hmiLevel</span><span class="p">:(</span><span class="n">nonnull</span> <span class="n"><a href="../Type%20Definitions.html#/c:SDLHMILevel.h@T@SDLHMILevel">SDLHMILevel</a></span><span class="p">)</span><span class="nv">oldLevel</span>
    <span class="nf">didChangeToLevel</span><span class="p">:(</span><span class="n">nonnull</span> <span class="n"><a href="../Type%20Definitions.html#/c:SDLHMILevel.h@T@SDLHMILevel">SDLHMILevel</a></span><span class="p">)</span><span class="nv">newLevel</span><span class="p">;</span></code></pre>

  
  <h4>Swift</h4>
  <pre class="highlight swift"><code><span class="kd">func</span> <span class="nf">hmiLevel</span><span class="p">(</span><span class="n">_</span> <span class="nv">oldLevel</span><span class="p">:</span> <span class="kt"><a href="../Type%20Definitions.html#/c:SDLHMILevel.h@T@SDLHMILevel">SDLHMILevel</a></span><span class="p">,</span> <span class="n">didChangeToLevel</span> <span class="nv">newLevel</span><span class="p">:</span> <span class="kt"><a href="../Type%20Definitions.html#/c:SDLHMILevel.h@T@SDLHMILevel">SDLHMILevel</a></span><span class="p">)</span></code></pre>

  
  
  <h4>Parameters</h4>
  <dl>
      <dt>oldLevel</dt>
      <dd><p>The previous level which has now been left.</p></dd>
      <dt>newLevel</dt>
      <dd><p>The current level.</p></dd>
  </dl>
  
  <h3 id="section--audioStreamingState:didChangeToState:">
      -audioStreamingState:didChangeToState:
  </h3>
  
  <p>Called when the audio streaming state of this application changes on the remote system. This refers to when streaming audio is audible to the user.</p>

  
  
  <h4>Objective-C</h4>
  <pre class="highlight objective_c"><code><span class="k">-</span> <span class="p">(</span><span class="kt">void</span><span class="p">)</span><span class="nf">audioStreamingState</span><span class="p">:(</span><span class="n">nullable</span> <span class="n"><a href="../Type%20Definitions.html#/c:SDLAudioStreamingState.h@T@SDLAudioStreamingState">SDLAudioStreamingState</a></span><span class="p">)</span><span class="nv">oldState</span>
           <span class="nf">didChangeToState</span><span class="p">:(</span><span class="n">nonnull</span> <span class="n"><a href="../Type%20Definitions.html#/c:SDLAudioStreamingState.h@T@SDLAudioStreamingState">SDLAudioStreamingState</a></span><span class="p">)</span><span class="nv">newState</span><span class="p">;</span></code></pre>

  
  <h4>Swift</h4>
  <pre class="highlight swift"><code><span class="kd">optional</span> <span class="kd">func</span> <span class="nf">audioStreamingState</span><span class="p">(</span><span class="n">_</span> <span class="nv">oldState</span><span class="p">:</span> <span class="kt"><a href="../Type%20Definitions.html#/c:SDLAudioStreamingState.h@T@SDLAudioStreamingState">SDLAudioStreamingState</a></span><span class="p">?,</span> <span class="n">didChangeToState</span> <span class="nv">newState</span><span class="p">:</span> <span class="kt"><a href="../Type%20Definitions.html#/c:SDLAudioStreamingState.h@T@SDLAudioStreamingState">SDLAudioStreamingState</a></span><span class="p">)</span></code></pre>

  
  
  <h4>Parameters</h4>
  <dl>
      <dt>oldState</dt>
      <dd><p>The previous state which has now been left.</p></dd>
      <dt>newState</dt>
      <dd><p>The current state.</p></dd>
  </dl>
  
  <h3 id="section--systemContext:didChangeToContext:">
      -systemContext:didChangeToContext:
  </h3>
  
  <p>Called when the system context of this application changes on the remote system. This refers to whether or not a user-initiated interaction is in progress, and if so, what it is.</p>

  
  
  <h4>Objective-C</h4>
  <pre class="highlight objective_c"><code><span class="k">-</span> <span class="p">(</span><span class="kt">void</span><span class="p">)</span><span class="nf">systemContext</span><span class="p">:(</span><span class="n">nullable</span> <span class="n"><a href="../Type%20Definitions.html#/c:SDLSystemContext.h@T@SDLSystemContext">SDLSystemContext</a></span><span class="p">)</span><span class="nv">oldContext</span>
    <span class="nf">didChangeToContext</span><span class="p">:(</span><span class="n">nonnull</span> <span class="n"><a href="../Type%20Definitions.html#/c:SDLSystemContext.h@T@SDLSystemContext">SDLSystemContext</a></span><span class="p">)</span><span class="nv">newContext</span><span class="p">;</span></code></pre>

  
  <h4>Swift</h4>
  <pre class="highlight swift"><code><span class="kd">optional</span> <span class="kd">func</span> <span class="nf">systemContext</span><span class="p">(</span><span class="n">_</span> <span class="nv">oldContext</span><span class="p">:</span> <span class="kt"><a href="../Type%20Definitions.html#/c:SDLSystemContext.h@T@SDLSystemContext">SDLSystemContext</a></span><span class="p">?,</span> <span class="n">didChangeToContext</span> <span class="nv">newContext</span><span class="p">:</span> <span class="kt"><a href="../Type%20Definitions.html#/c:SDLSystemContext.h@T@SDLSystemContext">SDLSystemContext</a></span><span class="p">)</span></code></pre>

  
  
  <h4>Parameters</h4>
  <dl>
      <dt>oldContext</dt>
      <dd><p>The previous context which has now been left.</p></dd>
      <dt>newContext</dt>
      <dd><p>The current context.</p></dd>
  </dl>
  
  <h3 id="section--managerShouldUpdateLifecycleToLanguage:">
      -managerShouldUpdateLifecycleToLanguage:
  </h3>
  
  <p>Called when the lifecycle manager detected a language mismatch. In case of a language mismatch the manager should change the apps registration by updating the lifecycle configuration to the specified language. If the app can support the specified language it should return an Object of SDLLifecycleConfigurationUpdate, otherwise it should return nil to indicate that the language is not supported.</p>

  
  
  <h4>Objective-C</h4>
  <pre class="highlight objective_c"><code><span class="k">-</span> <span class="p">(</span><span class="n">nullable</span> <span class="n"><a href="../Classes/SDLLifecycleConfigurationUpdate.html">SDLLifecycleConfigurationUpdate</a></span> <span class="o">*</span><span class="p">)</span>
    <span class="nf">managerShouldUpdateLifecycleToLanguage</span><span class="p">:(</span><span class="n">nonnull</span> <span class="n"><a href="../Type%20Definitions.html#/c:SDLLanguage.h@T@SDLLanguage">SDLLanguage</a></span><span class="p">)</span><span class="nv">language</span><span class="p">;</span></code></pre>

  
  <h4>Swift</h4>
  <pre class="highlight swift"><code><span class="kd">optional</span> <span class="kd">func</span> <span class="nf">managerShouldUpdateLifecycle</span><span class="p">(</span><span class="n">toLanguage</span> <span class="nv">language</span><span class="p">:</span> <span class="kt"><a href="../Type%20Definitions.html#/c:SDLLanguage.h@T@SDLLanguage">SDLLanguage</a></span><span class="p">)</span> <span class="o">-&gt;</span> <span class="kt"><a href="../Classes/SDLLifecycleConfigurationUpdate.html">SDLLifecycleConfigurationUpdate</a></span><span class="p">?</span></code></pre>

  
  
  <h4>Parameters</h4>
  <dl>
      <dt>language</dt>
      <dd><p>The language of the connected head unit the manager is trying to update the configuration.</p></dd>
  </dl>
  <div>
    <h4>Return Value</h4>
    <p>An object of SDLLifecycleConfigurationUpdate if the head unit language is supported, otherwise nil to indicate that the language is not supported.</p>
  </div>
  
</section>