1/*
2 * Copyright (c) 2004 Apple Computer, Inc. All Rights Reserved.
3 *
4 * @APPLE_LICENSE_HEADER_START@
5 *
6 * This file contains Original Code and/or Modifications of Original Code
7 * as defined in and that are subject to the Apple Public Source License
8 * Version 2.0 (the 'License'). You may not use this file except in
9 * compliance with the License. Please obtain a copy of the License at
10 * http://www.opensource.apple.com/apsl/ and read it before using this
11 * file.
12 *
13 * The Original Code and all software distributed under the License are
14 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
15 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
16 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
17 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
18 * Please see the License for the specific language governing rights and
19 * limitations under the License.
20 *
21 * @APPLE_LICENSE_HEADER_END@
22 */
23
24//
25// tdclient - Security tokend client interface library
26//
27#include "tdtransit.h"
28#include <security_utilities/debugging.h>
29
30using MachPlusPlus::check;
31using MachPlusPlus::Bootstrap;
32
33
34namespace Security {
35namespace Tokend {
36
37
38//
39// Construct a client session
40//
41ClientSession::ClientSession(Allocator &std, Allocator &rtn)
42	: ClientCommon(std, rtn)
43{
44}
45
46
47//
48// Destroy a session
49//
50ClientSession::~ClientSession()
51{ }
52
53
54//
55// The default fault() notifier does nothing
56//
57void ClientSession::fault()
58{
59}
60
61
62//
63// Administrativa
64//
65void ClientSession::servicePort(Port p)
66{
67	// record service port
68	assert(!mServicePort);	// no overwrite
69	mServicePort = p;
70
71	// come back if the service port dies (usually a tokend crash)
72	mServicePort.requestNotify(mReplyPort);
73}
74
75
76} // end namespace Tokend
77} // end namespace Security
78