<?xml version="1.0" encoding="UTF-8"?>
<interface>
  <requires lib="gtk" version="4.0"/>
  <object class="GtkListStore" id="device_store">
    <columns>
      <column type="gchararray"/>
      <column type="gchararray"/>
      <column type="gchararray"/>
      <column type="gchararray"/>
    </columns>
  </object>
  <object class="GtkListStore" id="packet_store">
    <columns>
      <column type="gchararray"/>
      <column type="gchararray"/>
      <column type="gchararray"/>
      <column type="gchararray"/>
      <column type="gchararray"/>
      <column type="SoupMessageHeaders"/>
      <column type="GDateTime"/>
    </columns>
  </object>
  <menu id="sniffer-window-menu">
    <section>
      <item>
        <attribute name="label" translatable="yes">Show packet details</attribute>
        <attribute name="action">win.show-packet-details</attribute>
      </item>
    </section>
    <section>
      <item>
        <attribute name="label" translatable="yes">_About</attribute>
        <attribute name="action">win.about</attribute>
      </item>
    </section>
  </menu>
  <template class="GSSDPDeviceSnifferMainWindow" parent="GtkApplicationWindow">
    <property name="can_focus">0</property>
    <property name="can_focus">0</property>
    <child>
      <menu id="sniffer_context_menu">
        <section>
          <item>
            <attribute name="label" translatable="yes">Set as filter</attribute>
            <attribute name="action">win.set-address-filter</attribute>
          </item>
        </section>
      </menu>
    </child>
    <child type="titlebar">
      <object class="GtkHeaderBar">
        <property name="can_focus">0</property>
        <child>
          <object class="GtkBox">
            <property name="can_focus">0</property>
            <property name="spacing">6</property>
            <child>
              <object class="GtkButton">
                <property name="receives_default">1</property>
                <property name="tooltip_text" translatable="yes">Clear packet capture</property>
                <property name="action_name">win.clear-capture</property>
                <property name="icon_name">edit-clear-all-symbolic</property>
              </object>
            </child>
            <child>
              <object class="GtkToggleButton" id="capture_button">
                <property name="receives_default">1</property>
                <property name="tooltip_text" translatable="yes">Toggle packet capture</property>
                <property name="active">1</property>
                <property name="action_name">win.toggle-capture</property>
                <property name="icon_name">media-playback-stop-symbolic</property>
              </object>
            </child>
            <child>
              <object class="GtkButton">
                <property name="receives_default">1</property>
                <property name="tooltip_text" translatable="yes">Trigger a rescan of the network</property>
                <property name="action_name">win.trigger-rescan</property>
                <property name="icon_name">view-refresh-symbolic</property>
              </object>
            </child>
          </object>
        </child>
        <child type="title">
          <object class="GtkStackSwitcher">
            <property name="can_focus">0</property>
            <property name="halign">center</property>
            <property name="stack">stack1</property>
          </object>
        </child>
        <child type="end">
          <object class="GtkToggleButton" id="searchbutton">
            <property name="receives_default">1</property>
            <property name="tooltip_text" translatable="yes">Enable content filter</property>
            <property name="icon_name">system-search-symbolic</property>
          </object>
        </child>
        <child type="end">
          <object class="GtkMenuButton" id="window-menu">
            <property name="receives_default">1</property>
            <property name="menu-model">sniffer-window-menu</property>
            <property name="icon-name">open-menu-symbolic</property>
          </object>
        </child>
      </object>
    </child>
    <child>
      <object class="GtkStack" id="stack1">
        <property name="can_focus">0</property>
        <child>
          <object class="GtkStackPage">
            <property name="title" translatable="yes">Packets</property>
            <property name="child">
              <object class="GtkBox" id="vbox">
                <property name="can_focus">0</property>
                <property name="margin-start">6</property>
                <property name="margin-end">6</property>
                <property name="margin-top">6</property>
                <property name="margin-bottom">6</property>
                <property name="orientation">vertical</property>
                <property name="spacing">6</property>
                <child>
                  <object class="GtkSearchBar" id="searchbar">
                    <property name="show_close_button">1</property>
                    <property name="search-mode-enabled">1</property>
                    <property name="child">
                      <object class="GtkSearchEntry" id="address_filter">
                        <property name="max-width-chars">40</property>
                      </object>
                    </property>
                  </object>
                </child>
                <child>
                  <object class="GtkScrolledWindow" id="packet-scrolledwindow">
                    <property name="vexpand">1</property>
                    <property name="child">
                      <object class="GtkTreeView" id="packet_treeview">
                        <property name="model">packet_store</property>
                        <child internal-child="selection">
                          <object class="GtkTreeSelection"/>
                        </child>
                        <child>
                          <object class="GtkTreeViewColumn">
                            <property name="title" translatable="yes">Time</property>
                            <child>
                              <object class="GtkCellRendererText"/>
                              <attributes>
                                <attribute name="markup">0</attribute>
                              </attributes>
                            </child>
                          </object>
                        </child>
                        <child>
                          <object class="GtkTreeViewColumn">
                            <property name="title" translatable="yes">Source Address</property>
                            <child>
                              <object class="GtkCellRendererText"/>
                              <attributes>
                                <attribute name="markup">1</attribute>
                              </attributes>
                            </child>
                          </object>
                        </child>
                        <child>
                          <object class="GtkTreeViewColumn">
                            <property name="title" translatable="yes">Interface</property>
                            <child>
                              <object class="GtkCellRendererText"/>
                              <attributes>
                                <attribute name="markup">2</attribute>
                              </attributes>
                            </child>
                          </object>
                        </child>
                        <child>
                          <object class="GtkTreeViewColumn">
                            <property name="title" translatable="yes">Packet Type</property>
                            <child>
                              <object class="GtkCellRendererText"/>
                              <attributes>
                                <attribute name="markup">3</attribute>
                              </attributes>
                            </child>
                          </object>
                        </child>
                        <child>
                          <object class="GtkTreeViewColumn">
                            <property name="title" translatable="yes">Packet Information</property>
                            <child>
                              <object class="GtkCellRendererText"/>
                              <attributes>
                                <attribute name="markup">4</attribute>
                              </attributes>
                            </child>
                          </object>
                        </child>
                      </object>
                    </property>
                  </object>
                </child>
                <child>
                  <object class="GtkScrolledWindow" id="details_scrolled">
                    <property name="vexpand">1</property>
                    <property name="child">
                      <object class="GtkTextView" id="packet_textview">
                        <property name="editable">0</property>
                        <property name="monospace">1</property>
                      </object>
                    </property>
                  </object>
                </child>
            <child type="end">
              <object class="GtkBox">
                <property name="orientation">horizontal</property>
                <property name="spacing">6</property>
                <property name="visible">True</property>
                <child type="start">
                      <object class="GtkLabel" id="info_label">
                        <property name="label"></property>
                        <property name="visible">True</property>
                        <property name="halign">start</property>
                        <property name="hexpand">true</property>
                        <property name="valign">center</property>
                      </object>
                  </child>
                  <child type="end">
                      <object class="GtkLabel" id="counter_label">
                        <property name="label"></property>
                        <property name="visible">True</property>
                        <property name="halign">end</property>
                        <property name="hexpand">true</property>
                        <property name="valign">center</property>
                      </object>
                </child>
              </object>
            </child>

              </object>
            </property>
          </object>
        </child>
        <child>
          <object class="GtkStackPage">
            <property name="title" translatable="yes">Device history</property>
            <property name="child">
              <object class="GtkScrolledWindow" id="device-details-scrolledwindow">
                <property name="name">Bar</property>
                <property name="margin_top">6</property>
                <property name="margin_bottom">6</property>
                <property name="child">
                  <object class="GtkTreeView" id="device_treeview">
                    <property name="model">device_store</property>
                    <child internal-child="selection">
                      <object class="GtkTreeSelection"/>
                    </child>
                    <child>
                      <object class="GtkTreeViewColumn">
                        <property name="title" translatable="yes">Unique Identifier</property>
                        <child>
                          <object class="GtkCellRendererText"/>
                          <attributes>
                            <attribute name="text">0</attribute>
                          </attributes>
                        </child>
                      </object>
                    </child>
                    <child>
                      <object class="GtkTreeViewColumn">
                        <property name="title" translatable="yes">First Notify</property>
                        <child>
                          <object class="GtkCellRendererText"/>
                          <attributes>
                            <attribute name="text">1</attribute>
                          </attributes>
                        </child>
                      </object>
                    </child>
                    <child>
                      <object class="GtkTreeViewColumn">
                        <property name="title" translatable="yes">Device Type</property>
                        <child>
                          <object class="GtkCellRendererText"/>
                          <attributes>
                            <attribute name="text">2</attribute>
                          </attributes>
                        </child>
                      </object>
                    </child>
                    <child>
                      <object class="GtkTreeViewColumn">
                        <property name="title" translatable="yes">Location</property>
                        <child>
                          <object class="GtkCellRendererText"/>
                          <attributes>
                            <attribute name="text">3</attribute>
                          </attributes>
                        </child>
                      </object>
                    </child>
                  </object>
                </property>
              </object>
            </property>
          </object>
        </child>
      </object>
    </child>
  </template>
</interface>
