mailnews/news/src/nsNewsUtils.h
author Gervase Markham <gerv@gerv.net>
Wed, 30 May 2012 17:48:24 +0100
changeset 12286 84ac3c71109811da751f0ef2d72108075938f094
parent 8508 8e5dde6eb30787e8f3f40ae1ec5d87c6a9430127
child 13324 3f9b812e72471c2172bfde0ebbeeb210bf5f1a95
permissions -rw-r--r--
Bug 757018 - upgrade license to MPL 2.

/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */

#ifndef NS_NEWSUTILS_H
#define NS_NEWSUTILS_H

#include "nsStringGlue.h"

class nsIMsgNewsFolder;

static const char kNntpRootURI[] = "nntp:/";
static const char kNewsRootURI[] = "news:/";
static const char kNewsMessageRootURI[] = "news-message:/";
static const char kNewsURIGroupQuery[] = "?group=";
static const char kNewsURIKeyQuery[] = "&key=";

#define kNewsRootURILen 6
#define kNntpRootURILen 6
#define kNewsMessageRootURILen 14
#define kNewsURIGroupQueryLen 7
#define kNewsURIKeyQueryLen 5

extern nsresult
nsParseNewsMessageURI(const char* uri, nsCString& group, PRUint32 *key);

extern nsresult
nsCreateNewsBaseMessageURI(const char *baseURI, nsCString &baseMessageURI);

#endif //NS_NEWSUTILS_H