File: shared_xmp.c

package info (click to toggle)
liblicense 0.8-2.1
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 6,448 kB
  • ctags: 793
  • sloc: sh: 9,182; ansic: 8,249; makefile: 862; xml: 178; cpp: 111; ruby: 41; python: 39
file content (30 lines) | stat: -rw-r--r-- 869 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#include <string.h>
#include <stdbool.h>
#include <liblicense.h>
#include <exempi/xmp.h>
#include <exempi/xmpconsts.h>

#include "shared_xmp.h"

const char  _ll_shared_xmp_license[] = "license";
const char  _ll_shared_xmp_webstatement[] = "WebStatement";
const char  _ll_shared_xmp_morepermissions[] = "morePermissions";

struct _ll_shared_xmp_ns_and_rest
_ll_shared_xmp_uri2struct (const char * uri) {
  struct _ll_shared_xmp_ns_and_rest ret;
  ret.namespace = NULL;
  ret.rest = NULL;

  if (strcmp(LL_LICENSE, uri) == 0) {
    ret.namespace = NS_CC;
    ret.rest = _ll_shared_xmp_license;
  } else if (strcmp(LL_WEBSTATEMENT, uri) == 0) {
    ret.namespace = NS_XAP_RIGHTS;
    ret.rest = _ll_shared_xmp_webstatement;
  } else if (strcmp(LL_MORE_PERMISSIONS, uri) == 0) {
    ret.namespace = NS_CC;
    ret.rest = _ll_shared_xmp_morepermissions;
  }
  return ret;
}