| The Red Matrix

- Main Page
- Related Pages
- Namespaces
- Classes
- Files

- File List
- File Members

All Classes Namespaces Files Functions Variables Pages
Functions
zot.php File Reference

## Functions
| zot_new_uid ($channel_nick)
| zot_get_hubloc ($arr, $primary=false)
| zot_build_packet ($channel, $type= 'notify', $recipients=null, $remote_key=null, $secret=null)
| zot_zot ($url, $data)
| zot_finger ($webbie, $channel)
| zot_refresh ($them, $channel=null)
| zot_gethub ($arr)
| zot_register_hub ($arr)
| import_xchan ($arr)
| zot_process_response ($hub, $arr, $outq)
| zot_fetch ($arr)
| zot_import ($arr)
| public_recips ($msg)
| allowed_public_recips ($msg)
| process_delivery ($sender, $arr, $deliveries, $relay)
| remove_community_tag ($sender, $arr, $uid)
| update_imported_item ($sender, $item, $uid)
| delete_imported_item ($sender, $item, $uid)
| process_mail_delivery ($sender, $arr, $deliveries)
| process_profile_delivery ($sender, $arr, $deliveries)
| import_directory_profile ($hash, $profile)
| import_directory_keywords ($hash, $keywords)
| update_modtime ($hash)
| import_site ($arr, $pubkey)
| build_sync_packet ($uid=0, $packet=null)
| process_channel_sync_delivery ($sender, $arr, $deliveries)

## Function Documentation

allowed_public_recips | ( |  | $msg | ) |

Referenced by zot_import().

build_sync_packet | ( |  | $uid = `0`,
|  |  | $packet = `null`
| ) |  |

Send a zot packet to all hubs where this channel is duplicated, refreshing such things as personal settings, channel permissions, address book updates, etc.

Referenced by connections_clone(), and settings_post().

delete_imported_item | ( |  | $sender,
|  |  | $item,
|  |  | $uid
| ) |  |

Referenced by process_delivery().

import_directory_keywords | ( |  | $hash,
|  |  | $keywords
| ) |  |

Referenced by import_directory_profile().

import_directory_profile | ( |  | $hash,
|  |  | $profile
| ) |  |

Referenced by import_xchan(), process_profile_delivery(), and syncdirs().

import_site | ( |  | $arr,
|  |  | $pubkey
| ) |  |

Referenced by import_xchan().

import_xchan | ( |  | $arr | ) |

Referenced by chanview_content(), gprobe_run(), magic_init(), message_post(), new_contact(), poco_load(), post_init(), zot_refresh(), and zot_register_hub().

process_channel_sync_delivery | ( |  | $sender,
|  |  | $arr,
|  |  | $deliveries
| ) |  |

Referenced by zot_import().

process_delivery | ( |  | $sender,
|  |  | $arr,
|  |  | $deliveries,
|  |  | $relay
| ) |  |

Referenced by onepoll_run(), and zot_import().

process_mail_delivery | ( |  | $sender,
|  |  | $arr,
|  |  | $deliveries
| ) |  |

Referenced by zot_import().

process_profile_delivery | ( |  | $sender,
|  |  | $arr,
|  |  | $deliveries
| ) |  |

Referenced by zot_import().

public_recips | ( |  | $msg | ) |

Referenced by allowed_public_recips().

remove_community_tag | ( |  | $sender,
|  |  | $arr,
|  |  | $uid
| ) |  |

Referenced by process_delivery().

update_imported_item | ( |  | $sender,
|  |  | $item,
|  |  | $uid
| ) |  |

Referenced by process_delivery().

update_modtime | ( |  | $hash | ) |

Referenced by import_directory_profile(), and import_xchan().

zot_build_packet | ( |  | $channel,
|  |  | $type = `'notify'`,
|  |  | $recipients = `null`,
|  |  | $remote_key = `null`,
|  |  | $secret = `null`
| ) |  |

Referenced by build_sync_packet(), directory_run(), notifier_run(), post_init(), and zping_content().

zot_fetch | ( |  | $arr | ) |

: zot_fetch

We received a notification packet (in mod/post.php) that a message is waiting for us, and we've verified the sender. Now send back a pickup message, using our message tracking ID ($arr['secret']), which we will sign. The entire pickup message is encrypted with the remote site's public key. If everything checks out on the remote end, we will receive back a packet containing one or more messages, which will be processed before returning.

Referenced by post_post().

zot_finger | ( |  | $webbie,
|  |  | $channel
| ) |  |

: zot_finger

Look up information about channel

Parameters

  | string $webbie does not have to be host qualified e.g. 'foo' is treated as 'foo'
  | array $channel (optional), if supplied permissions will be enumerated specifically for $channel

Returns
  : array => see z_post_url and mod/zfinger.php

Referenced by chanview_content(), gprobe_run(), magic_init(), message_post(), new_contact(), poco_load(), post_init(), and probe_content().

zot_get_hubloc | ( |  | $arr,
|  |  | $primary = `false`
| ) |  |

Given an array of zot hashes, return all distinct hubs If primary is true, return only primary hubs Result is ordered by url to assist in batching. Return only the first primary hub as there should only be one.

Referenced by zfinger_init().

zot_gethub | ( |  | $arr | ) |

: zot_gethub

A guid and a url, both signed by the sender, distinguish a known sender at a known location This function looks these up to see if the channel is known. If not, we will need to verify it.

Returns
  : array => hubloc record

Referenced by import_post(), post_post(), and zot_fetch().

zot_import | ( |  | $arr | ) |

zot_import

Process an incoming array of messages which were obtained via pickup, and import, update, delete as directed.

The message types handled here are 'activity' (e.g. posts), 'mail' and 'profile'

Referenced by deliver_run(), and zot_fetch().

zot_new_uid | ( |  | $channel_nick | ) |

zot_new_uid($channel_nick) = unique nickname of controlling entity

Returns
  string

Referenced by create_identity().

zot_process_response | ( |  | $hub,
|  |  | $arr,
|  |  | $outq
| ) |  |

Referenced by deliver_run(), and queue_run().

zot_refresh | ( |  | $them,
|  |  | $channel = `null`
| ) |  |

: zot_refresh

zot_refresh is typically invoked when somebody has changed permissions of a channel and they are notified to fetch new permissions via a finger operation. This may result in a new connection (abook entry) being added to a local channel and it may result in auto-permissions being granted.

Referenced by connections_content(), import_author_xchan(), onepoll_run(), and post_post().

zot_register_hub | ( |  | $arr | ) |

Referenced by post_post().

zot_zot | ( |  | $url,
|  |  | $data
| ) |  |

: zot_zot

Parameters

  | string $url
  | array $data

Returns
  : array => see z_post_url for returned data format

Referenced by deliver_run(), directory_run(), notifier_run(), post_init(), queue_run(), zot_fetch(), and zping_content().