24.07.2017 Views

Hacking Gmail

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Chapter 7 — <strong>Gmail</strong> Libraries<br />

123<br />

Constant<br />

GM_ACT_TRASH<br />

GM_ACT_UNTRASH<br />

GM_ACT_DELFOREVER<br />

GM_USE_PHPSESSION<br />

[0.6.4]<br />

GM_USE_COOKIE [0.6.4]<br />

Description<br />

Move message to or away from the Trash.<br />

Delete message forever.<br />

Use PHP session to handle <strong>Gmail</strong>-lite session.<br />

Use cookie to handle <strong>Gmail</strong>-lite session.<br />

Table 7-3 gives special properties available for each constant’s Snapshot.<br />

Table 7-3<br />

The Data Available via a Snapshot<br />

Properties available to all Snapshot types except GM_CONTACT<br />

Property<br />

Description<br />

gmail_ver<br />

quota_mb<br />

quota_per<br />

std_box_new<br />

have_invit<br />

label_list<br />

label_new<br />

Version of <strong>Gmail</strong> JavaScript core program.<br />

Mailbox quota in MB.<br />

Mailbox quota in percentage.<br />

Number-indexed array. Number of unread mails in each standard box. You<br />

may call GMailer::getStandardBox() to get an array of names of<br />

standard boxes.<br />

Number of invites you have. 0 = no invitation, and so forth.<br />

Number-indexed array. An array of label names.<br />

Number-indexed array. Number of unread mails in each label. (A 1-to-1<br />

mapping of label_list.)<br />

Properties available to Snapshot types GM_STANDARD, GM_LABEL, and GM_QUERY<br />

Property<br />

box_name<br />

box_total<br />

box_pos<br />

Description<br />

Name of the standard box or label, or query string currently viewing.<br />

Total number of conversations in current mailbox.<br />

Current starting position (for paged results).<br />

Number-indexed array. An array of conversations in the current mailbox.<br />

Each conversation is a text-indexed array of the following:<br />

Continued

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!