<table><tr><td style="">barchiesi created this revision.<br />barchiesi added a reviewer: dvratil.<br />barchiesi added a project: LibKGAPI.<br />Herald added a project: KDE PIM.<br />Herald added a subscriber: kde-pim.<br />barchiesi requested review of this revision.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D19546">View Revision</a></tr></table><br /><div><strong>REVISION SUMMARY</strong><div><p>As of now, TeamdriveFetchJob is missing support for search queries (as seen in FileFetchJob). These queries may be used with an account with Team Drive admin priviledges.</p></div></div><br /><div><strong>TEST PLAN</strong><div><p>I added TeamdriveSearchQueryTest which should cover all functionality.</p>
<p>Below is an example of usage with TeamdriveFetchJob:</p>
<div class="remarkup-code-block" style="margin: 12px 0;" data-code-lang="c++" data-sigil="remarkup-code-block"><pre class="remarkup-code" style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; padding: 12px; margin: 0; background: rgba(71, 87, 120, 0.08);"><span class="n">KGAPI2</span><span style="color: #aa2211">::</span><span class="n">Drive</span><span style="color: #aa2211">::</span><span class="n">TeamdriveSearchQuery</span> <span class="n">query</span><span class="p">;</span>
<span class="n">query</span><span class="p">.</span><span class="n">addQuery</span><span class="p">(</span><span class="n">KGAPI2</span><span style="color: #aa2211">::</span><span class="n">Drive</span><span style="color: #aa2211">::</span><span class="n">TeamdriveSearchQuery</span><span style="color: #aa2211">::</span><span class="n">MemberCount</span><span class="p">,</span> <span class="n">KGAPI2</span><span style="color: #aa2211">::</span><span class="n">Drive</span><span style="color: #aa2211">::</span><span class="n">TeamdriveSearchQuery</span><span style="color: #aa2211">::</span><span class="n">Less</span><span class="p">,</span> <span style="color: #601200">10</span><span class="p">);</span>
<span class="n">KGAPI2</span><span style="color: #aa2211">::</span><span class="n">Drive</span><span style="color: #aa2211">::</span><span class="n">TeamdriveFetchJob</span> <span style="color: #aa2211">*</span><span class="n">fetchJob</span> <span style="color: #aa2211">=</span> <span style="color: #aa4000">new</span> <span class="n">KGAPI2</span><span style="color: #aa2211">::</span><span class="n">Drive</span><span style="color: #aa2211">::</span><span class="n">TeamdriveFetchJob</span><span class="p">(</span><span class="n">query</span><span class="p">,</span> <span class="n">m_account</span><span class="p">,</span> <span style="color: #aa4000">this</span><span class="p">);</span></pre></div></div></div><br /><div><strong>REPOSITORY</strong><div><div>R477 KGAPI Library</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D19546">https://phabricator.kde.org/D19546</a></div></div><br /><div><strong>AFFECTED FILES</strong><div><div>autotests/CMakeLists.txt<br />
autotests/drive/teamdrivesearchquerytest.cpp<br />
examples/teamdrive/mainwindow.cpp<br />
src/drive/CMakeLists.txt<br />
src/drive/teamdrivefetchjob.cpp<br />
src/drive/teamdrivefetchjob.h<br />
src/drive/teamdrivesearchquery.cpp<br />
src/drive/teamdrivesearchquery.h</div></div></div><br /><div><strong>To: </strong>barchiesi, dvratil<br /><strong>Cc: </strong>kde-pim, LibKGAPI, barchiesi, gennad, dvasin, rodsevich, winterz, vkrause, mlaurent, knauss, dvratil<br /></div>