netatalk 4.5.0
Free and Open Source Apple Filing Protocol (AFP) Server
Loading...
Searching...
No Matches
spotlight.h File Reference
`#include <stdbool.h>`
`#include <stddef.h>`
`#include <stdint.h>`
`#include <atalk/globals.h>`
`#include <atalk/volume.h>`
`#include <atalk/dalloc.h>`

Go to the source code of this file.

## Data Structures
struct | sl_uuid_t
struct | sl_cnids_t
struct | sl_rslts
struct | _slq_t
struct | sl_backend_ops

## Macros
#define | SPOTLIGHT_H
#define | SPOTLIGHT_CMD_OPEN 1
#define | SPOTLIGHT_CMD_FLAGS 2
#define | SPOTLIGHT_CMD_RPC 3
#define | SPOTLIGHT_CMD_OPEN2 4
#define | SL_ENC_LITTLE_ENDIAN 1
#define | SL_ENC_BIG_ENDIAN 2
#define | SL_ENC_UTF_16 4

## Typedefs
typedef DALLOC_CTX | sl_array_t
typedef DALLOC_CTX | sl_dict_t
typedef DALLOC_CTX | sl_filemeta_t
typedef int | sl_nil_t
typedef bool | sl_bool_t
typedef struct timeval | sl_time_t
typedef struct _slq_t | slq_t
typedef struct sl_backend_ops | sl_backend_ops

## Enumerations
enum | slq_state_t { SLQ_STATE_NEW , SLQ_STATE_RUNNING , SLQ_STATE_RESULTS , SLQ_STATE_FULL , SLQ_STATE_DONE , SLQ_STATE_CANCEL_PENDING , SLQ_STATE_CANCELLED , SLQ_STATE_ERROR }
enum | sl_index_event_t { SL_INDEX_FILE_MODIFY , SL_INDEX_FILE_DELETE , SL_INDEX_DIR_DELETE , SL_INDEX_FILE_CREATE , SL_INDEX_DIR_CREATE , SL_INDEX_FILE_MOVE , SL_INDEX_DIR_MOVE }

## Functions
int | afp_spotlight_rpc (AFPObj *obj, char *ibuf, size_t ibuflen, char *rbuf, size_t *rbuflen)
int | sl_index_event (const AFPObj *obj, const struct vol *vol, sl_index_event_t event, const char *path, const char *oldpath)
int | sl_pack (DALLOC_CTX *query, char *buf)
int | sl_unpack (DALLOC_CTX *query, const char *buf)
int | sl_unpack_len (DALLOC_CTX *query, const char *buf, size_t buf_len)
void | configure_spotlight_attributes (const char *attributes)

## Macro Definition Documentation

## ◆ SL_ENC_BIG_ENDIAN

#define SL_ENC_BIG_ENDIAN 2

## ◆ SL_ENC_LITTLE_ENDIAN

#define SL_ENC_LITTLE_ENDIAN 1

## ◆ SL_ENC_UTF_16

#define SL_ENC_UTF_16 4

## ◆ SPOTLIGHT_CMD_FLAGS

#define SPOTLIGHT_CMD_FLAGS 2

## ◆ SPOTLIGHT_CMD_OPEN

#define SPOTLIGHT_CMD_OPEN 1

## ◆ SPOTLIGHT_CMD_OPEN2

#define SPOTLIGHT_CMD_OPEN2 4

## ◆ SPOTLIGHT_CMD_RPC

#define SPOTLIGHT_CMD_RPC 3

## ◆ SPOTLIGHT_H

#define SPOTLIGHT_H

## Typedef Documentation

## ◆ sl_array_t

typedef DALLOC_CTX sl_array_t

an array of elements

## ◆ sl_backend_ops

typedef struct sl_backend_ops sl_backend_ops

## ◆ sl_bool_t

typedef bool sl_bool_t

a boolean, we avoid bool_t

## ◆ sl_dict_t

typedef DALLOC_CTX sl_dict_t

an array of key/value elements

## ◆ sl_filemeta_t

typedef DALLOC_CTX sl_filemeta_t

contains one sl_array_t

## ◆ sl_nil_t

typedef int sl_nil_t

a nil element

## ◆ sl_time_t

typedef struct timeval sl_time_t

## ◆ slq_t

typedef struct _slq_t slq_t

Internal query data structure

## Enumeration Type Documentation

## ◆ sl_index_event_t

enum sl_index_event_t

file-system changes a Spotlight backend may index incrementally

Enumerator
SL_INDEX_FILE_MODIFY |
SL_INDEX_FILE_DELETE |
SL_INDEX_DIR_DELETE |
SL_INDEX_FILE_CREATE |
SL_INDEX_DIR_CREATE |
SL_INDEX_FILE_MOVE |
SL_INDEX_DIR_MOVE |

## ◆ slq_state_t

enum slq_state_t

query state

Enumerator
SLQ_STATE_NEW | Query received from client
SLQ_STATE_RUNNING | Query dispatched to backend
SLQ_STATE_RESULTS | Async backend query read
SLQ_STATE_FULL | result queue is full
SLQ_STATE_DONE | Got all results from backend
SLQ_STATE_CANCEL_PENDING | a cancel op for the query is pending
SLQ_STATE_CANCELLED | the query has been cancelled
SLQ_STATE_ERROR | an error happended somewhere

## Function Documentation

## ◆ afp_spotlight_rpc()

int afp_spotlight_rpc | ( | AFPObj * | obj,
|  | char * | ibuf,
|  | size_t | ibuflen,
|  | char * | rbuf,
|  | size_t * | rbuflen )
| extern

## ◆ configure_spotlight_attributes()

void configure_spotlight_attributes | ( | const char * | attributes | ) |
| extern

## ◆ sl_index_event()

int sl_index_event | ( | const AFPObj * | obj,
|  | const struct vol * | vol,
|  | sl_index_event_t | event,
|  | const char * | path,
|  | const char * | oldpath )
| extern

## ◆ sl_pack()

int sl_pack | ( | DALLOC_CTX * | query,
|  | char * | buf )
| extern

## ◆ sl_unpack()

int sl_unpack | ( | DALLOC_CTX * | query,
|  | const char * | buf )
| extern

## ◆ sl_unpack_len()

int sl_unpack_len | ( | DALLOC_CTX * | query,
|  | const char * | buf,
|  | size_t | buf_len )
| extern